From PostgreSQL wiki

Jump to: navigation, search


This list contains known PostgreSQL bugs and feature requests and we hope it is complete. If you would like to work on an item, please read the Developer FAQ first. There is also a development information page.

  • Incomplete item - marks ordinary, incomplete items
  • [E] Incomplete item - marks items that are easier to implement
  • [D] Completed item - marks changes that are done, and will appear in the PostgreSQL 9.6 release.

For help on editing this list, please see Talk:Todo. Please do not add items here without discussion on the mailing list.

Development Process

WARNING for Developers: Unfortunately this list does not contain all the information necessary for someone to start coding a feature. Some of these items might have become unnecessary since they were added --- others might be desirable but the implementation might be unclear. When selecting items listed below, be prepared to first discuss the value of the feature. Do not assume that you can select one, code it and then expect it to be committed. Always discuss design on Hackers list before starting to code. The flow should be:

    Desirability -> Design -> Implement -> Test -> Review -> Commit


Incomplete itemAllow administrators to cancel multi-statement idle transactions

This allows locks to be released, but it is complex to report the cancellation back to the client.

Incomplete itemAllow administrators to cancel long-lived prepared transactions

Incomplete itemCheck for unreferenced table files created by transactions that were in-progress when the server terminated abruptly

Incomplete itemAllow log_min_messages to be specified on a per-module basis

This would allow administrators to see more detailed information from specific sections of the backend, e.g. checkpoints, autovacuum, etc. Another idea is to allow separate configuration files for each module, or allow arbitrary SET commands to be passed to them. See also Logging Brainstorm.

Incomplete itemSimplify creation of partitioned tables

This would allow creation of partitioned tables without requiring creation of triggers or rules for INSERT/UPDATE/DELETE, and constraints for rapid partition selection. Options could include range and hash partition selection. See also Table partitioning

Incomplete itemAllow custom variables to appear in pg_settings()

Incomplete itemHave custom variables be transaction-safe

Incomplete itemImplement the SQL-standard mechanism whereby REVOKE ROLE revokes only the privilege granted by the invoking role, and not those granted by other roles

Incomplete itemPrevent query cancel packets from being replayed by an attacker, especially when using SSL

Incomplete itemProvide a way to query the log collector subprocess to determine the name of the currently active log file

Incomplete itemImprove logging of prepared transactions recovered during startup

Incomplete itemConsider supporting incremental base backups

Configuration files

Incomplete itemConsider normalizing fractions in postgresql.conf, perhaps using '%'

Incomplete itemImprove LDAP authentication configuration options

Incomplete itemAdd external tool to auto-tune some postgresql.conf parameters

Incomplete itemProcess pg_hba.conf keywords as case-insensitive

Incomplete itemAllow pg_hba.conf to process include files

Incomplete itemCreate utility to compute accurate random_page_cost value

Incomplete itemAllow synchronous_standby_names to be disabled after communication failure with all synchronous standby servers exceeds some timeout

This also requires successful execution of a synchronous notification command.

Incomplete itemFix log_line_prefix to display the transaction id (%x) for statements not in a transaction block

  • Currently it displays zero.

[E] Incomplete itemIf pg_hba.conf has changed since last config reload and we reject an authentication attempt, emit a HINT to the user and in the log

Incomplete itemAdjust rounding behavior for numeric GUC values

Incomplete itemDevelop replacement for MD5 authentication


Incomplete itemAllow a database in tablespace t1 with tables created in tablespace t2 to be used as a template for a new database created with default tablespace t2

Currently all objects in the default database tablespace must have default tablespace specifications. This is because new databases are created by copying directories. If you mix default tablespace tables and tablespace-specified tables in the same directory, creating a new database from such a mixed directory would create a new database with tables that had incorrect explicit tablespaces. To fix this would require modifying pg_class in the newly copied database, which we don't currently do.

Incomplete itemAllow reporting of which objects are in which tablespaces

This item is difficult because a tablespace can contain objects from multiple databases. There is a server-side function that returns the databases which use a specific tablespace, so this requires a tool that will call that function and connect to each database to find the objects in each database for that tablespace.

Incomplete itemAllow WAL replay of CREATE TABLESPACE to work when the directory structure on the recovery computer is different from the original

Incomplete itemAllow per-tablespace quotas

Incomplete itemAllow tablespaces on RAM-based partitions for unlogged tables

Incomplete itemAllow toast tables to be moved to a different tablespace

Incomplete itemClose race in DROP TABLESPACE on Windows

[D] Completed itemAdd per-tablespace effective_io_concurrency

Statistics Collector

Incomplete itemAllow statistics last vacuum/analyze execution times to be displayed without requiring track_counts to be enabled

Incomplete itemTesting pgstat via pg_regress is tricky and inefficient. Consider making a dedicated pgstat test-suite.

Incomplete itemTrack number of WAL files ready to be archived in pg_stat_archiver


Incomplete itemAllow SSL authentication/encryption over unix domain sockets

Incomplete itemAllow SSL key file permission checks to be optionally disabled when sharing SSL keys with other applications

Incomplete itemAllow SSL CRL files to be re-read during configuration file reload, rather than requiring a server restart

Unlike SSL CRT files, CRL (Certificate Revocation List) files are updated frequently

Alternatively or additionally supporting OCSP (online certificate security protocol) would provide real-time revocation discovery without reloading

Incomplete item Allow automatic selection of SSL client certificates from a certificate store

Incomplete item Send the full certificate server chain to the client

Incomplete item Re-read SSL certificates on server reload

Point-In-Time Recovery (PITR)

Incomplete itemAllow archive_mode to be changed without server restart?

Incomplete itemConsider avoiding WAL switching via archive_timeout if there has been no database activity

Standby server mode

Incomplete item Allow pg_xlogfile_name() to be used in recovery mode

Incomplete item Prevent variables inherited from the server environment from begin used for making streaming replication connections

Incomplete item Change walsender so that it applies per-role settings

Incomplete item Restructure configuration parameters for standby mode

Data Types

Incomplete itemFix data types where equality comparison is not intuitive, e.g. box

Incomplete itemAdd support for public SYNONYMs

Incomplete itemAdd support for SQL-standard GENERATED/IDENTITY columns

Incomplete itemConsider placing all sequences in a single table, or create a system view

Incomplete itemConsider a special data type for regular expressions

Incomplete itemAllow renaming and deleting enumerated values from an existing enumerated data type

Incomplete itemSupport scoped IPv6 addresses in the inet type

Incomplete itemAdd overlaps geometric operators that ignore point overlaps

Incomplete itemRemove or improve rounding in geometric comparison operators

Incomplete item Add IMMUTABLE column attribute

Incomplete itemImprove removal of unreferenced large objects, either with vacuum (contrib/vacuumlo) or upon deletion (contrib/lo)


Incomplete itemAllow functions defined as casts to domains to be called during casting

Incomplete itemAllow values to be cast to domain types

Incomplete itemMake domains work better with polymorphic functions

Dates and Times

Incomplete itemAllow infinite intervals just like infinite timestamps

Incomplete itemDetermine how to represent date/time field extraction on infinite timestamps

Incomplete itemAllow TIMESTAMP WITH TIME ZONE to store the original timezone information, either zone name or offset from UTC

If the TIMESTAMP value is stored with a time zone name, interval computations should adjust based on the time zone rules.

Incomplete itemHave timestamp subtraction not call justify_hours()?

Incomplete itemAllow a comma to denote fractional seconds in ISO-8601-compliant times (and timestamps)


Incomplete itemAdd support for arrays of domains

Incomplete itemAllow single-byte header storage for array elements

Incomplete itemAdd function to detect if an array is empty

Incomplete itemImprove handling of NULLs in arrays

MONEY Data Type

Incomplete itemAdd locale-aware MONEY type, and support multiple currencies

Incomplete itemMONEY dumps in a locale-specific format making it difficult to restore to a system with a different locale

Text Search

Incomplete itemAllow dictionaries to change the token that is passed on to later dictionaries

Incomplete itemAdd exact phrase search

Incomplete itemConsider a function-based API for '@@' searches

Incomplete itemImprove text search error messages

Incomplete itemConsider changing error to warning for strings larger than one megabyte

Incomplete itemtsearch and tsdicts regression tests fail in Turkish locale on glibc

Incomplete itemtsquery negator operator treated as part of lexeme

Incomplete itemImprove handling of dash and plus signs in email address user names, and perhaps improve URL parsing

Incomplete itemImprove default parser, to more easily allow adding new tokens

Incomplete itemAdd additional support functions


Incomplete itemAllow XML arrays to be cast to other data types

Incomplete itemAdd XML Schema validation and xmlvalidate functions (SQL:2008)

Incomplete itemAdd xmlvalidatedtd variant to support validating against a DTD?

Incomplete itemRelax-NG validation; libxml2 supports this already

Incomplete itemAllow reliable XML operation non-UTF8 server encodings (xpath(), in particular, is known to not work)

Incomplete itemAdd functions from SQL:2006: XMLDOCUMENT, XMLCAST, XMLTEXT

Incomplete itemAdd XMLNAMESPACES support in XMLELEMENT and elsewhere

Incomplete itemMove XSLT from contrib/xml2 to a more reasonable location

Incomplete itemReport errors returned by the XSLT library

Incomplete itemImprove the XSLT parameter passing API

Incomplete itemXML Canonical: Convert XML documents to canonical form to compare them. libxml2 has support for this.

Incomplete itemAdd pretty-printed XML output option

Parse a document and serialize it back in some indented form. libxml2 might support this.

Incomplete itemAdd XMLQUERY (from the SQL/XML standard)

Incomplete itemAllow XML shredding

In some cases shredding could be better option (if there is no need to keep XML docs entirely, e.g. if we have already developed tools that understand only relational data. This would be a separate module that implements annotated schema decomposition technique, similar to DB2 and SQL Server functionality.

Incomplete itemXPath: Adding the <x> at the root causes problems [1] [2] [3]

Incomplete itemxpath_table needs to be implemented/implementable to get rid of contrib/xml2 [4]

Incomplete itemxpath_table is pretty broken anyway [5]

Incomplete itembetter handling of XPath data types [6] [7]

Incomplete itemImprove handling of PIs and DTDs in xmlconcat() [8]

Incomplete itemRestructure XML and /contrib/xml2 functionality

Incomplete itemVerify Xpath escaping behavior


Incomplete itemEnforce typmod for function inputs, function results and parameters for spi_prepare'd statements called from PLs

Incomplete itemFix IS OF so it matches the ISO specification, and add documentation

Incomplete itemImplement Boyer-Moore searching in LIKE queries

Incomplete itemPrevent malicious functions from being executed with the permissions of unsuspecting users

Indexed functions are safe, so VACUUM and ANALYZE are safe too. Triggers, CHECK and DEFAULT expressions, and rules are still vulnerable.

Incomplete itemReduce memory usage of aggregates in set returning functions

Incomplete itemFix /contrib/ltree operator

Incomplete itemFix /contrib/btree_gist's implementation of inet indexing

Incomplete itemHave /contrib/dblink reuse unnamed connections

Incomplete itemAdd function to allow easier transaction id comparisons

Character Formatting

Incomplete itemAllow to_date() and to_timestamp() to accept localized month names

Incomplete itemAdd missing parameter handling in to_char()

Incomplete itemThrow an error from to_char() instead of printing a string of "#" when a number doesn't fit in the desired output format.

Incomplete itemFix to_number() handling for values not matching the format string

Multi-Language Support

Incomplete itemAdd NCHAR (as distinguished from ordinary varchar)

Incomplete itemAdd a cares-about-collation column to pg_proc, so that unresolved-collation errors can be thrown at parse time

Incomplete itemIntegrate collations with text search configurations

Incomplete itemIntegrate collations with to_char() and related functions

Incomplete itemSupport collation-sensitive equality and hashing functions

Incomplete itemAdd a LOCALE option to CREATE DATABASE, as a shorthand

Incomplete itemSupport multiple simultaneous character sets, per SQL:2008

Incomplete itemImprove UTF8 combined character handling?

Incomplete itemAdd octet_length_server() and octet_length_client()

Incomplete itemMake octet_length_client() the same as octet_length()?

Incomplete itemFix problems with wrong runtime encoding conversion for NLS message files

Incomplete itemAdd URL to more complete multi-byte regression tests

Incomplete itemFix contrib/fuzzystrmatch to work with multibyte encodings

Incomplete itemChange memory allocation for multi-byte functions so memory is allocated inside conversion functions

Currently we preallocate memory based on worst-case usage.

Incomplete itemAdd ability to use case-insensitive regular expressions on multi-byte characters

Currently it works for UTF-8, but not other multi-byte encodings

Incomplete itemImprove encoding of connection startup messages sent to the client

Currently some authentication error messages are sent in the server encoding

Incomplete itemWindows: Cache MessageEncoding conversion for use outside transactions

Incomplete itemMore sensible support for Unicode combining characters, normal forms

Incomplete itemDetect operating system collation changes, or make Postgres immune to them

Views and Rules

Incomplete itemAllow VIEW/RULE recompilation when the underlying tables change

This is both difficult and controversial.

Incomplete itemMake it possible to use RETURNING together with conditional DO INSTEAD rules, such as for partitioning setups

Incomplete itemImprove ability to modify views via ALTER TABLE

SQL Commands


Incomplete itemImprove type determination of unknown (NULL or quoted literal) result columns for UNION/INTERSECT/EXCEPT

Incomplete itemAllow prepared transactions with temporary tables created and dropped in the same transaction, and when an ON COMMIT DELETE ROWS temporary table is accessed

Incomplete itemAdd a GUC variable to warn about non-standard SQL usage in queries

Incomplete itemAdd NOVICE output level for helpful messages

For example, have it warn about unjoined tables. This could also control automatic sequence/index creation messages.

Incomplete itemAdd SQL-standard MERGE command

MERGE is typically used to merge two tables, for data warehousing type use cases. PostgreSQL has an "UPSERT" command as of version 9.5, with the addition of "ON CONFLICT DO UPDATE". SQL MERGE is independently useful, though.

Incomplete itemAllow NOTIFY in rules involving conditionals

Incomplete itemAllow LISTEN on patterns

Incomplete itemSimplify dropping roles that have objects in several databases

Incomplete itemAllow the count returned by SELECT, etc to be represented as an int64 to allow a higher range of values

Incomplete itemAdd support for WITH RECURSIVE ... CYCLE

Incomplete itemAdd DEFAULT .. AS OWNER so permission checks are done as the table owner

This would be useful for SERIAL nextval() calls and CHECK constraints.

Incomplete itemAllow DISTINCT to work in multiple-argument aggregate calls

Incomplete itemAdd comments on system tables/columns using the information in catalogs.sgml

Ideally the information would be pulled from the SGML file automatically.

Incomplete itemPrevent the specification of conflicting transaction read/write options

Incomplete itemAllow DELETE and UPDATE to be used with LIMIT and ORDER BY

Incomplete itemAllow PREPARE of cursors

Incomplete itemHave DISCARD PLANS discard plans cached by functions

DISCARD ALL should do the same.

Incomplete itemAvoid multiple-evaluation of BETWEEN and IN arguments containing volatile expressions

Incomplete itemIS NULL testing of nested ROW() values is inconsistent


Incomplete itemAllow CREATE TABLE AS to determine column lengths for complex expressions like SELECT col1

Incomplete itemHave WITH CONSTRAINTS also create constraint indexes

Incomplete itemMove NOT NULL constraint information to pg_constraint

Currently NOT NULL constraints are stored in pg_attribute without any designation of their origins, e.g. primary keys. One manifest problem is that dropping a PRIMARY KEY constraint does not remove the NOT NULL constraint designation. Another issue is that we should probably force NOT NULL to be propagated from parent tables to children, just as CHECK constraints are. (But then does dropping PRIMARY KEY affect children?)

Incomplete itemPrevent concurrent CREATE TABLE from sometimes returning a cryptic error message

Incomplete itemAdd CREATE SCHEMA ... LIKE that copies a schema

Incomplete itemFix CREATE OR REPLACE FUNCTION to not leave objects depending on the function in inconsistent state

Incomplete itemAllow temporary tables to exist as empty by default in all sessions

Incomplete itemAllow the creation of "distinct" types

Incomplete itemConsider analyzing temporary tables when they are first used in a query

Autovacuum cannot analyze or vacuum temporary tables.


Incomplete itemResearch self-referential UPDATEs that see inconsistent row versions in read-committed mode

Incomplete itemImprove performance of EvalPlanQual mechanism that rechecks already-updated rows

This is related to the previous item, which questions whether it even has the right semantics


Incomplete itemHave ALTER TABLE RENAME of a SERIAL column rename the sequence

Incomplete itemHave ALTER SEQUENCE RENAME rename the sequence name stored in the sequence table

Incomplete itemAdd ALTER DOMAIN to modify the underlying data type

Incomplete itemAllow ALTER TABLESPACE to move the tablespace to different directories

Incomplete itemAllow moving system tables to other tablespaces, where possible

Currently non-global system tables must be in the default database tablespace. Global system tables can never be moved.

Incomplete itemHave ALTER INDEX update the name of a constraint using that index

Incomplete itemAllow column display reordering by recording a display, storage, and permanent id for every column?

Incomplete itemAllow deactivating (and reactivating) indexes via ALTER TABLE

Incomplete itemAdd ALTER OPERATOR ... RENAME

needs to consider effects of changing operator precedence


Incomplete itemAutomatically maintain clustering on a table

This might require some background daemon to maintain clustering during periods of low usage. It might also require tables to be only partially filled for easier reorganization. Another idea would be to create a merged heap/index data file so an index lookup would automatically access the heap data too. A third idea would be to store heap rows in hashed groups, perhaps using a user-supplied hash function.

Incomplete item Allow CLUSTER to be used on partial indexes


Incomplete itemAllow COPY to report error lines and continue

This requires the use of a savepoint before each COPY line is processed, with ROLLBACK on COPY failure.

Incomplete itemAllow COPY FROM to create index entries in bulk

Incomplete itemImprove COPY performance

Incomplete itemAllow COPY to report errors sooner

Incomplete itemAllow a stalled COPY to exit if the backend is terminated

Incomplete itemAllow COPY "text" format to output a header

Incomplete itemHave COPY FREEZE set PD_ALL_VISIBLE


Incomplete itemAllow SERIAL sequences to inherit permissions from the base table?

Incomplete itemAllow dropping of a role that has connection rights


Incomplete itemPrevent DROP TABLE from dropping a table referenced by its own open cursor?

Incomplete itemProvide some guarantees about the behavior of cursors that invoke volatile functions


Incomplete itemAllow INSERT/UPDATE of the system-generated oid value for a row



Incomplete itemRationalize the discrepancy between settings that use values in bytes and SHOW that returns the object count


Incomplete itemHave EXPLAIN ANALYZE issue NOTICE messages when the estimated and actual row counts differ by a specified percentage

Incomplete itemHave EXPLAIN ANALYZE report rows as floating-point numbers

Incomplete itemImprove how ANALYZE computes in-doubt tuples

Incomplete itemRemove quadratic time in statistics sender when analyzing many tables

Incomplete itemReduce memory use when analyzing many tables in a single command by making catcache and syscache flushable or bounded.

Window Functions

See TODO items for window functions.

Incomplete itemSupport creation of user-defined window functions

We have the ability to create new window functions written in C. Is it worth the effort to create an API that would let them be written in PL/pgsql, etc?

Incomplete itemImplement full support for window framing clauses

In addition to done clauses described in the latest doc, these clauses are not implemented yet.


Incomplete itemInvestigate tuplestore performance issues

The tuplestore_in_memory() thing is just a band-aid, we ought to try to solve it properly. tuplestore_advance seems like a weak spot as well.

Incomplete itemDo we really need so much duplicated code between Agg and WindowAgg?

Incomplete itemTeach planner to evaluate multiple windows in the optimal order

Currently windows are always evaluated in the query-specified order.

Incomplete itemImplement DISTINCT clause in window aggregates

Some proprietary RDBMSs have implemented it already, so it helps with porting from those.

Integrity Constraints


Incomplete itemImprove deferrable unique constraints for cases with many conflicts

The current implementation fires a trigger for each potentially conflicting row. This might not scale well for an update that changes many key values at once.

Referential Integrity

Incomplete itemAdd MATCH PARTIAL referential integrity

Incomplete itemChange foreign key constraint for array -> element to mean element in array?

Incomplete itemFix problem when cascading referential triggers make changes on cascaded tables, seeing the tables in an intermediate state

Incomplete itemAre ri_KeysEqual checks in the RI enforcement triggers still necessary?

Check Constraints

Incomplete itemRun check constraints only when affected columns are changed

Server-Side Languages

Incomplete itemAdd support for polymorphic arguments and return types to languages other than PL/PgSQL

Incomplete itemAdd support for OUT and INOUT parameters to languages other than PL/PgSQL

Incomplete itemAdd more fine-grained specification of functions taking arbitrary data types

Incomplete itemImplement stored procedures

This might involve the control of transaction state and the return of multiple result sets

Incomplete itemAllow holdable cursors in SPI

SQL-Language Functions

Incomplete itemRethink query plan caching and timing of parse analysis within SQL-language functions

They should work more like plpgsql functions do ...


Incomplete itemAllow handling of %TYPE arrays, e.g. tab.col%TYPE[]

Incomplete itemAllow listing of record column names, and access to record columns via variables, e.g. columns := r.(*), tval2 := r.(colname)

Incomplete itemAllow row and record variables to be set to NULL constants, and allow NULL tests on such variables

Because a row is not scalar, do not allow assignment from NULL-valued scalars.

Incomplete itemConsider keeping separate cached copies when search_path changes

Incomplete itemImprove handling of NULL row values vs. NULL rows

Incomplete itemImprove PERFORM handling of WITH queries or document limitation


Incomplete itemAllow regex operations in plperl using UTF8 characters in non-UTF8 encoded databases


Incomplete itemCreate a new restricted execution class that will allow passing function arguments in as locals. Passing them as globals means functions cannot be called recursively.

Incomplete itemAdd a DB-API compliant interface on top of the SPI interface

Incomplete itemFor functions returning a setof record with a composite type, cache the I/O functions for the composite type


Incomplete itemAdd a function like pg_get_indexdef() that report more detailed index information

Incomplete itemSplit out pg_resetxlog output into pre- and post-sections


Incomplete itemHave psql \ds show all sequences and their settings

Incomplete itemMove psql backslash database information into the backend, use mnemonic commands?

This would allow non-psql clients to pull the same information out of the database as psql.

Incomplete itemMake psql's \d commands more consistent in their handling of schemas

Incomplete itemMake psql's \d commands distinguish default privileges from no privileges

ACL displays were visibly different for the two cases before we "improved" them by using array_to_string.

Incomplete itemConsistently display privilege information for all objects in psql

[E] Incomplete item\s without arguments (display history) fails with libedit, doesn't use pager either

Incomplete itemAdd a \set variable to control whether \s displays line numbers

Another option is to add \# which lists line numbers, and allows command execution.

Incomplete itemInclude the symbolic SQLSTATE name in verbose error reports

Incomplete itemAdd prompt escape to display the client and server versions

Incomplete itemAdd option to wrap column values at whitespace boundaries, rather than chopping them at a fixed width.

Currently, "wrapped" format chops values into fixed widths. Perhaps the word wrapping could use the same algorithm documented in the W3C specification.

Incomplete itemAdd option to print advice for people familiar with other databases

Incomplete itemFix FETCH_COUNT to handle SELECT ... INTO and WITH queries

Incomplete itemPrevent psql from sending remaining single-line multi-statement queries after reconnecting

Incomplete itemConsider having psql -c read .psqlrc, for consistency

psql -f already reads .psqlrc

Incomplete itemAllow processing of multiple -f (file) options

Incomplete itemImprove line drawing characters

Incomplete itemConsider improving the continuation prompt

Incomplete itemImprove speed of tab completion by using LIKE

pg_dump / pg_restore

[E] Incomplete itemDump security labels and comments on databases in a way that allows to load a dump into a differently named database

[E] Incomplete itemAdd full object name to the tag field. eg. for operators we need '=(integer, integer)', instead of just '='.

[E] Incomplete itemModify pg_dump to create skeleton views for reload (which are then updated via CREATE OR REPLACE VIEW) when views have circular dependencies. This should eliminate the need for the CREATE RULE "_RETURN" hack currently used to address this issue. Thread and additional information here:

Incomplete itemAvoid using platform-dependent names for locales in pg_dumpall output

Using native locale names puts roadblocks in the way of porting a dump to another platform. One possible solution is to get CREATE DATABASE to accept some agreed-on set of locale names and fix them up to meet the platform's requirements.

Incomplete itemIn a selective dump, allow dumping of an object and all its dependencies

Incomplete itemStop dumping CASCADE on DROP TYPE commands in clean mode

Incomplete itemAllow pg_restore to load different parts of the COPY data for a single table simultaneously

Incomplete itemRemove support for dumping from pre-7.3 servers

In 7.3 and later, we can get accurate dependency information from the server. pg_dump still contains a lot of crufty code to try to deal with the lack of dependency info in older servers, but the usefulness of maintaining that code grows small.

Incomplete itemRefactor handling of database attributes between pg_dump and pg_dumpall

Currently only pg_dumpall emits database attributes, such as ALTER DATABASE SET commands and database-level GRANTs. Many people wish that pg_dump would do that. One proposal is to let pg_dump issue such commands if the -C switch was used, but it's unclear whether that will satisfy the demand.

Incomplete itemChange pg_dump so that a comment on the dumped database is applied to the loaded database, even if the database has a different name.

This will require new backend syntax, perhaps COMMENT ON CURRENT DATABASE. This is related to the previous item.

Incomplete itemAllow parallel restore of tar dumps

Incomplete itemPreserve sparse storage of large objects over dump/restore

Incomplete itemPrevent PL/pgSQL comment from throwing an error in a non-superuser restore

Incomplete itemDelay REFRESH MATERIALIZED VIEW until dependent indexes are created

Incomplete itemWhen pg_restore -j ... on Linux is interrupted (for example, ctrl-C from the keyboard) make it cancel the children processes


Incomplete itemHandle large object comments

This is difficult to do because the large object doesn't exist when --schema-only is loaded.

Incomplete itemConsider using pg_depend for checking object usage in version.c

Incomplete itemMigrate pg_statistic by dumping it out as a flat file, so analyze is not necessary

Incomplete itemImprove testing, perhaps using the buildfarm

The buildfarm has access to multiple versions of PostgreSQL.

Incomplete itemCreate machine-readable output of pg_controldata

This would avoid parsing its output. The problem is we need pg_controldata output from both the old and new clusters so we would need to support both formats.

Incomplete itemFind cleaner way to start/stop dedicated servers for upgrades

Incomplete itemDesired changes that would prevent upgrades with pg_upgrade


Incomplete itemDocs

Document differences between ecpg and the SQL standard and information about the Informix-compatibility module.

Incomplete itemSolve cardinality > 1 for input descriptors / variables?

Incomplete itemAdd a semantic check level, e.g. check if a table really exists

Incomplete itemfix handling of DB attributes that are arrays

Incomplete itemFix nested C comments

[E] Incomplete itemsqlwarn[6] should be 'W' if the PRECISION or SCALE value specified

Incomplete itemMake SET CONNECTION thread-aware, non-standard?

Incomplete itemAllow multidimensional arrays

Incomplete itemImplement COPY FROM STDIN

Incomplete itemProvide a way to specify size of a bytea parameter

[E] Incomplete itemFix small memory leaks in ecpg

Memory leaks in a short running application like ecpg are not really a problem, but make debugging more complicated

Incomplete itemAllow reuse of cursor name variables


Incomplete itemPrevent PQfnumber() from lowercasing unquoted column names

PQfnumber() should never have been doing lowercasing, but historically it has so we need a way to prevent it

Incomplete itemConsider disallowing multiple queries in PQexec() as an additional barrier to SQL injection attacks

Incomplete itemAdd PQexecf() that allows complex parameter substitution

Incomplete itemAdd SQLSTATE and severity to errors generated within libpq itself

Incomplete itemAdd support for interface/ipaddress binding to libpq


Incomplete itemImprove storage of deferred trigger queue

Right now all deferred trigger information is stored in backend memory. This could exhaust memory for very large trigger queues. This item involves dumping large queues into files, or doing some kind of join to process all the triggers, some bulk operation, or a bitmap.

Incomplete itemAllow triggers to be disabled in only the current session.

This is currently possible by starting a multi-statement transaction, modifying the system tables, performing the desired SQL, restoring the system tables, and committing the transaction. ALTER TABLE ... TRIGGER requires a table lock so it is not ideal for this usage.

Incomplete itemWith disabled triggers, allow pg_dump to use ALTER TABLE ADD FOREIGN KEY

If the dump is known to be valid, allow foreign keys to be added without revalidating the data.

Incomplete itemAllow statement-level triggers to access modified rows

Incomplete itemWhen statement-level triggers are defined on a parent table, have them fire only on the parent table, and fire child table triggers only where appropriate

Incomplete itemTighten trigger permission checks

Incomplete itemAllow BEFORE INSERT triggers on views

Incomplete itemAdd database and transaction-level triggers

Incomplete itemReduce locking requirements for creating a trigger

Incomplete itemAvoid requirement for AFTER trigger functions to return a value

Incomplete itemAllow creation of inline triggers


Incomplete itemAllow inherited tables to inherit indexes, UNIQUE constraints, and primary/foreign keys

Incomplete itemAllow unique indexes across inherited tables (requires multi-table indexes

Incomplete itemResearch whether ALTER TABLE / SET SCHEMA should work on inheritance hierarchies (and thus support ONLY)

Incomplete itemALTER TABLE variants sometimes support recursion and sometimes not, but this is poorly/not documented, and the ONLY marker would then be silently ignored. Clarify the documentation, and reject ONLY if it is not supported.


Incomplete itemPrevent index uniqueness checks when UPDATE does not modify the column

Uniqueness (index) checks are done when updating a column even if the column is not modified by the UPDATE. However, HOT already short-circuits this in common cases, so more work might not be helpful.

Incomplete itemAllow accurate statistics to be collected on indexes with more than one column or expression indexes, perhaps using per-index statistics

Incomplete itemConsider having a larger statistics target for indexed columns and expression indexes.


This is difficult because you must upgrade to an exclusive table lock to replace the existing index file. CREATE INDEX CONCURRENTLY does not have this complication. This would allow index compaction without downtime.

Incomplete itemAllow multiple indexes to be created concurrently, ideally via a single heap scan

pg_restore allows parallel index builds, but it is done via subprocesses, and there is no SQL interface for this. Cluster could definitely benefit from this.

Incomplete itemConsider sorting entries before inserting into btree index

Incomplete itemConsider using "effective_io_concurrency" for index scans

Currently only bitmap scans use this, which might be fine because most multi-row index scans use bitmap scans.

Incomplete itemAllow GIN indexes to be used for exclusion constraints

Incomplete item Allow "loose" or "skip" scans on btree indexes in which the first column has low cardinality

Incomplete item Make the planner's "special index operator" mechanism extensible

Incomplete item Allow index-only COUNT(*) for indexes which don't support index-only scans

Incomplete itemImprove GIN performance

Incomplete item Teach GIN cost estimation about "fast scans"

Incomplete item Allow unlogged indexes


Incomplete itemAdd more GIST index support for geometric data types

Incomplete itemAllow GIST indexes to create more complex index types, like digital trees (see Aoki)

Incomplete itemFix performance issues in contrib/seg and contrib/cube GiST support

Incomplete itemGiST index support for arrays


Incomplete itemAdd UNIQUE capability to hash indexes

Incomplete itemAdd hash WAL logging for crash recovery

Incomplete itemAllow multi-column hash indexes


Incomplete itemConsider whether duplicate keys should be sorted by block/offset

Incomplete itemConsider being smarter about memory and external files used during sorts

Incomplete itemConsider detoasting keys before sorting

Incomplete itemAllow sorts of skinny tuples to use even more available memory.

Now that it is not limited by MaxAllocSize, don't limit by INT_MAX either.


Incomplete itemConsider sorting writes during checkpoint

Cache Usage

Incomplete itemConsider automatic caching of statements at various levels:

Incomplete itemConsider allowing higher priority queries to have referenced shared buffer pages stay in memory longer

Incomplete itemFix memory leak caused by negative catcache entries


Incomplete itemAuto-fill the free space map by scanning the buffer cache or by checking pages written by the background writer

Incomplete itemAllow concurrent inserts to use recently created pages rather than creating new ones

Incomplete itemConsider having single-page pruning update the visibility map

Incomplete itemAllow VACUUM FULL and CLUSTER to update the visibility map

Incomplete itemImprove tracking of total relation tuple counts now that vacuum doesn't always scan the whole heap

Incomplete itemBias FSM towards returning free space near the beginning of the heap file, in hopes that empty pages at the end can be truncated by VACUUM

Incomplete itemConsider a more compact data representation for dead tuple locations within VACUUM

Incomplete itemProvide more information in order to improve user-side estimates of dead space bloat in relations

Incomplete itemImprove locking behaviour of vacuum during trailing page truncation

Incomplete itemReduce the number of table scans performed by vacuum

Incomplete itemVacuum Gin indexes in physically order rather than logical order

Incomplete itemAvoid creation of the free space map for small tables


Incomplete itemIssue log message to suggest VACUUM FULL if a table is nearly empty?

Incomplete itemPrevent long-lived temporary tables from causing frozen-xid advancement starvation

The problem is that autovacuum cannot vacuum them to set frozen xids; only the session that created them can.

Incomplete itemPrevent autovacuum from running if an old transaction is still running from the last vacuum

Incomplete itemHave autoanalyze of parent tables occur when child tables are modified

Incomplete itemAllow visibility map all-visible bits to be set even when an auto-ANALYZE is running

Incomplete itemImprove autovacuum tuning

Incomplete itemImprove setting of visibility map bits for read-only and insert-only workloads


Incomplete itemFix problem when multiple subtransactions of the same outer transaction hold different types of locks, and one subtransaction aborts

Incomplete itemAdd idle_in_transaction_timeout GUC so locks are not held for long periods of time

Incomplete itemImprove deadlock detection when a page cleaning lock conflicts with a shared buffer that is pinned

Incomplete itemDetect deadlocks involving LockBufferForCleanup()

Incomplete itemAllow finer control over who is cancelled in a deadlock

Startup Time Improvements

Incomplete itemAllow backends to change their database without restart

This allows for faster server startup.

Write-Ahead Log

Incomplete itemEliminate need to write full pages to WAL before page modification

Currently, to protect against partial disk page writes, we write full page images to WAL before they are modified so we can correct any partial page writes during recovery. These pages can also be eliminated from point-in-time archive files.

Incomplete itemWhen full page writes are off, write CRC to WAL and check file system blocks on recovery

If CRC check fails during recovery, remember the page in case a later CRC for that page properly matches. The difficulty is that hint bits are not WAL logged, meaning a valid page might not match the earlier CRC.

Incomplete itemWrite full pages during file system write and not when the page is modified in the buffer cache

This allows most full page writes to happen in the background writer. It might cause problems for applying WAL on recovery into a partially-written page, but later the full page will be replaced from WAL.

Incomplete itemAllow WAL information to recover corrupted pg_controldata

Incomplete itemSpeed WAL recovery by allowing more than one page to be prefetched

This should be done utilizing the same infrastructure used for prefetching in general to avoid introducing complex error-prone code in WAL replay.

Incomplete itemImprove WAL concurrency by increasing lock granularity

Incomplete itemHave resource managers report the duration of their status changes

Incomplete itemClose deleted WAL files held open in *nix by long-lived read-only backends

Optimizer / Executor

Incomplete itemImprove selectivity functions for geometric operators

Incomplete itemConsider increasing the default values of from_collapse_limit, join_collapse_limit, and/or geqo_threshold

Incomplete itemImprove ability to display optimizer analysis using OPTIMIZER_DEBUG

Incomplete itemLog statements where the optimizer row estimates were dramatically different from the number of rows actually found?

Incomplete itemConsider compressed annealing to search for query plans

This might replace GEQO.

Incomplete itemImprove use of expression indexes for ORDER BY

Incomplete itemModify the planner to better estimate caching effects

Incomplete itemAllow shared buffer cache contents to affect index cost computations

Incomplete itemAllow the CTE (Common Table Expression) optimization fence to be optionally disabled

Incomplete itemTeach the planner how to better use partial indexes for index-only scans


Incomplete itemConsider using a hash for joining to a large IN (VALUES ...) list

Incomplete itemAllow single batch hash joins to preserve outer pathkeys

Incomplete item"lazy" hash tables - look up only the tuples that are actually requested

Incomplete itemAvoid building the same hash table more than once during the same query

Incomplete itemAvoid hashing for distinct and then re-hashing for hash join

Background Writer

Incomplete itemConsider having the background writer update the transaction status hint bits before writing out the page

Implementing this requires the background writer to have access to system catalogs and the transaction status log.

Incomplete itemConsider adding buffers the background writer finds reusable to the free list

Incomplete itemAutomatically tune bgwriter_delay based on activity rather then using a fixed interval

Incomplete itemConsider whether increasing BM_MAX_USAGE_COUNT improves performance

Incomplete itemTest to see if calling PreallocXlogFiles() from the background writer will help with WAL segment creation latency

Incomplete itemAdd auto-tuning of work_mem

Concurrent Use of Resources

Incomplete itemDo async I/O for faster random read-ahead of data

Async I/O allows multiple I/O requests to be sent to the disk with results coming back asynchronously.

The above patch is already applied as of 8.4, but it still remains to figure out how to handle plain indexscans effectively.

Incomplete itemSMP scalability improvements


Incomplete itemAllow user configuration of TOAST thresholds

Incomplete itemReduce unnecessary cases of deTOASTing

Incomplete itemReduce costs of repeat de-TOASTing of values


Incomplete itemAdd column to pg_stat_activity that shows the progress of long-running commands like CREATE INDEX and VACUUM

Incomplete itemHave pg_stat_activity display query strings in the correct client encoding

[E] Incomplete itemExpose pg_controldata via an SQL interface

Helpful for monitoring replicated databases

Incomplete item Add entry creation timestamp column to pg_stat_replication

Incomplete item Allow reporting of stalls due to wal_buffer wrap-around

Incomplete item Restructure pg_stat_database columns tup_returned and tup_fetched to return meaningful values

Miscellaneous Performance

Incomplete itemUse mmap() rather than shared memory for shared buffers?

This would remove the requirement for SYSV SHM but would introduce portability issues. Anonymous mmap (or mmap to /dev/zero) is required to prevent I/O overhead. We could also consider mmap() for writing WAL.

Incomplete itemRather than consider mmap()-ing in 8k pages, consider mmap()'ing entire files into a backend?

Doing I/O to large tables would consume a lot of address space or require frequent mapping/unmapping. Extending the file also causes mapping problems that might require mapping only individual pages, leading to thousands of mappings. Another problem is that there is no way to _prevent_ I/O to disk from the dirty shared buffers so changes could hit disk before WAL is written.

Incomplete itemAllow configuration of backend priorities via the operating system

Though backend priorities make priority inversion during lock waits possible, research shows that this is not a huge problem.

Incomplete itemConsider if CommandCounterIncrement() can avoid its AcceptInvalidationMessages() call

Incomplete itemConsider Cartesian joins when both relations are needed to form an indexscan qualification for a third relation

Incomplete itemConsider not storing a NULL bitmap on disk if all the NULLs are trailing

Incomplete itemSort large UPDATE/DELETEs so it is done in heap order

Incomplete itemConsider decreasing the I/O caused by updating tuple hint bits

Incomplete itemAvoid the requirement of freezing pages that are infrequently modified

If all rows on a page are visible, it is possible to set a bit in the visibility map (once the visibility map is 100% reliable) and not need to freeze the page, avoiding a page rewrite

Incomplete itemAvoid reading in b-tree pages when replaying vacuum records in hot standby mode

Incomplete itemRestructure truncation logic to be more resistant to failure

This also involves not writing dirty buffers for a truncated or dropped relation

Incomplete itemConsider adding logic to increase large tables by more than 8k

This would reduce file system fragmentation

Incomplete itemAdd "abbreviated keys" support for more character-based types
This should include citext type, and character(n) type, which lack support. character(n) is used extensively by TPC-H benchmark.

Incomplete itemEnhance foreign data wrappers, parallelism, partitioning, and perhaps add a global snapshot/transaction manager to allow creation of a proof-of-concept built-in sharding solution

Ideally these enhancements and new facilities will be available to external sharding solutions as well.

Miscellaneous Other

Incomplete itemDeal with encoding issues for filenames in the server filesystem

Incomplete itemDeal with encoding issues in the output of localeconv()

Incomplete itemHave GB18030 handle more than 2-byte Unicode code points

Incomplete itemProvide schema name and other fields available from SQL GET DIAGNOSTICS in error reports

Incomplete itemUse sa_mask to close race conditions between signal handlers

Source Code

[E] Incomplete itemRemove warnings created by -Wcast-align

Incomplete itemMove platform-specific ps status display info from ps_status.c to /port

Incomplete itemAllow cross-compiling by generating the zic database on the target system

Incomplete itemImprove NLS maintenance of libpgport messages linked onto applications

Incomplete itemUse UTF8 encoding for NLS messages so all server encodings can read them properly

Incomplete itemAllow creation of universal binaries for Darwin

Incomplete itemConsider GnuTLS if OpenSSL license becomes a problem

Incomplete itemConsider making NAMEDATALEN more configurable in future releases

Incomplete itemResearch use of signals and sleep wake ups

Incomplete itemAllow C++ code to more easily access backend code

Incomplete itemConsider simplifying how memory context resets handle child contexts

Incomplete itemCreate three versions of libpgport to simplify client code

Incomplete itemImprove detection of shared memory segments being used by others by checking the SysV shared memory field 'nattch'

Incomplete itemImplement the non-threaded Avahi service discovery protocol

Incomplete itemReduce data row alignment requirements on some 64-bit systems

Incomplete itemRestructure TOAST internal storage format for greater flexibility

Incomplete item Add regression tests for pg_dump/restore

Incomplete item Research different memory allocation methods for lists

Incomplete item Consider removing the attribute options cache

Incomplete item Restructure /contrib section

Incomplete item Consider adding explicit huge page support


Incomplete itemRemove check for link failure when cause is found

Incomplete itemAllow psql to use readline once non-US code pages work with backslashes

Incomplete itemFix problem with shared memory on the Win32 Terminal Server

Incomplete itemImprove signal handling

Incomplete itemSupport pgxs when using MSVC

Incomplete itemFix MSVC NLS support, like for to_char()

Incomplete itemFix global namespace issues when using multiple terminal server sessions

Incomplete itemChange from the current autoconf/gmake build system to cmake

Incomplete itemImprove consistency of path separator usage

Incomplete itemFix cross-compiling on Windows

Incomplete itemReduce file statistics overhead on directory reads

Incomplete itemFix hang with long file paths

Wire Protocol Changes

Incomplete itemAllow dynamic character set handling

Incomplete itemEnsure the client can determine the encoding of messages sent early in the handshake

Incomplete itemLet the client indicate character encoding of database names, user names, passwords, and of pre-auth error messages returned by the server

Incomplete itemAdd decoded type length/precision (i.e. typmod information)

Incomplete itemMark result columns as known-not-null when possible

Incomplete itemUse compression

Specify and implement wire protocol compression. If SSL transparent compression is used, hopefully avoid the overhead of key negotiation and encryption when SSL is configured only for compression.

Incomplete itemUpdate clients to use data types, typmod, schema.table.column names of result sets using new statement protocol

Incomplete itemSet protocol for wire format negotiation

Incomplete itemMake sure upgrading to a 4.1 protocol version will actually work smoothly

Incomplete itemAllow multi-state authentication (e.g. try client peer, fall back to md5)

Incomplete itemIdentify the affected object in CommandComplete message?

Incomplete itemAllow negotiation of encryption, STARTTLS style, rather than forcing client to decide on SSL or !SSL before connecting

Incomplete itemPermit lazy fetches of large values, at least out-of-line TOASTED values

Incomplete itemAdd session-level whitelisting of types for binary-mode transfer

Incomplete itemReport xlog position in commit message

Help enable client-side failover by providing a token clients can use to see if a commit has replayed to replicas yet


[E] Incomplete item Add contrib functions to the index

Incomplete itemConvert single quotes to apostrophes in the PDF documentation

Incomplete itemProvide a manpage for postgresql.conf

Incomplete itemChange the manpage-generating toolchain to use the new XML-based docbook2x tools

Incomplete itemConsider changing documentation format from SGML to XML

Incomplete itemDocument support for N' ' national character string literals, if it matches the SQL standard

Incomplete itemAdd diagrams to the documentation

Exotic Features

Incomplete itemAdd pre-parsing phase that converts non-ISO syntax to supported syntax

This could allow SQL written for other databases to run without modification.

Incomplete itemAllow plug-in modules to emulate features from other databases

Incomplete itemAdd features of Oracle-style packages

A package would be a schema with session-local variables, public/private functions, and initialization functions. It is also possible to implement these capabilities in any schema and not use a separate "packages" syntax at all.

Incomplete itemConsider allowing control of upper/lower case folding of unquoted identifiers

Incomplete itemAdd autonomous transactions

Incomplete itemGive query progress indication

Incomplete itemRethink our type system

Incomplete itemImprove push-down of joins, aggregates, and sorts to foreign data wrappers

Features We Do Not Want

The following features have been discussed ad nauseum on the PostgreSQL mailing lists and the consensus has been that the project is not interested in them. As such, if you are going to bring them up as potential features, you will want to be familiar with all of the arguments against these features which have been previously made over the years. If you decide to work on such features anyway, you should be aware that you face a higher-than-normal barrier to get the Project to accept them.

Incomplete itemAll backends running as threads in a single process (not wanted)

This eliminates the process protection we get from the current setup. Thread creation is usually the same overhead as process creation on modern systems, so it seems unwise to use a pure threaded model, and MySQL and DB2 have demonstrated that threads introduce as many issues as they solve. Threading specific operations such as I/O, seq scans, and connection management has been discussed and will probably be implemented to enable specific performance features. Moving to a threaded engine would also require halting all other work on PostgreSQL for one to two years.

Incomplete item"Oracle-style" optimizer hints (not wanted)

Optimizer hints, as implemented in Oracle and other RDBMSes, are used to work around problems in the optimizer and introduce upgrade and maintenance issues. We would rather have such problems reported and fixed. We have discussed a more sophisticated system of per-class cost adjustment instead, but a specification remains to be developed. See Optimizer Hints Discussion for further information.

Incomplete itemEmbedded server (not wanted)

While PostgreSQL clients runs fine in limited-resource environments, the server requires multiple processes and a stable pool of resources to run reliably and efficiently. Stripping down the PostgreSQL server to run in the same process address space as the client application would add too much complexity and failure cases. Besides, there are several very mature embedded SQL databases already available.

Incomplete itemObfuscated function source code (not wanted)

Obfuscating function source code has minimal protective benefits because anyone with super-user access can find a way to view the code. At the same time, it would greatly complicate backups and other administrative tasks. To prevent non-super-users from viewing function source code, remove SELECT permission on pg_proc.

Incomplete itemIndeterminate behavior for the GROUP BY clause (not wanted)

At least one other database product allows specification of a subset of the result columns which GROUP BY would need to be able to provide predictable results; the server is free to return any value from the group. This is not viewed as a desirable feature. PostgreSQL 9.1 allows result columns that are not referenced by GROUP BY if a primary key for the same table is referenced in GROUP BY.

Incomplete itemOn-disk bitmap indexes (not wanted)

The rigidity of on-disk bitmap indexes, and the existence of GIN and in-memory bitmaps make this undesirable

Personal tools