Difference between revisions of "TodoDone90"

From PostgreSQL wiki
Jump to: navigation, search
(Updat masthead for 9.0 todo.)
(Only show completed items.)
Line 7: Line 7:
 
<div style="padding: 1ex 4em;">
 
<div style="padding: 1ex 4em;">
 
== Administration ==
 
== Administration ==
 
{{TodoItem
 
|Allow 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.
 
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg01340.php <nowiki>Cancelling idle in transaction state</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg00441.php <nowiki>Re: Cancelling idle in transaction state</nowiki>]
 
}}
 
 
{{TodoItem
 
|Check for unreferenced table files created by transactions that were in-progress when the server terminated abruptly
 
* [http://archives.postgresql.org/pgsql-patches/2006-06/msg00096.php <nowiki>Removing unreferenced files</nowiki>]
 
}}
 
 
{{TodoItem
 
|Set proper permissions on non-system schemas during db creation
 
|Currently all schemas are owned by the super-user because they are copied from the template1 database.  However, since all objects are inherited from the template database, it is not clear that setting schemas to the db owner is correct.}}
 
 
{{TodoItem
 
|Allow 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]].}}
 
 
{{TodoItem
 
|Simplify ability to create 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]]
 
}}
 
 
{{TodoItem
 
|Allow auto-selection of partitioned tables for min/max() operations
 
|There was a patch on -hackers from July 2009, but it has not been merged: [http://archives.postgresql.org/pgsql-hackers/2009-07/msg01115.php <nowiki>MIN/MAX optimization for partitioned table</nowiki>]}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
Line 42: Line 13:
 
* [http://archives.postgresql.org/pgsql-hackers/2006-09/msg02345.php <nowiki>Re: Per-database search_path</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2006-09/msg02345.php <nowiki>Re: Per-database search_path</nowiki>]
 
* http://archives.postgresql.org/message-id/20090811221921.GK16362@alvh.no-ip.org
 
* http://archives.postgresql.org/message-id/20090811221921.GK16362@alvh.no-ip.org
}}
 
 
{{TodoItem
 
|Allow custom variables to appear in pg_settings()
 
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00850.php <nowiki>Re: count(*) performance improvement ideas</nowiki>]
 
}}
 
 
{{TodoItem
 
|Have custom variables be transaction safe
 
* {{MessageLink|4B577E9F.8000505@dunslane.net|Custom GUCs still a bit broken}}
 
 
}}
 
}}
  
Line 57: Line 18:
 
|Allow custom variables to be created only by super-users but modified by ordinary uses, where appropriate
 
|Allow custom variables to be created only by super-users but modified by ordinary uses, where appropriate
 
* [http://archives.postgresql.org/pgsql-hackers/2006-11/msg00911.php <nowiki>custom variable classes</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2006-11/msg00911.php <nowiki>custom variable classes</nowiki>]
}}
 
 
{{TodoItem
 
|Implement the SQL standard mechanism whereby REVOKE ROLE revokes only the privilege granted by the invoking role, and not those granted by other roles
 
* [http://archives.postgresql.org/pgsql-bugs/2007-05/msg00010.php <nowiki>Re: Grantor name gets lost when grantor role dropped</nowiki>]
 
}}
 
 
{{TodoItem
 
|Improve server security options
 
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01875.php <nowiki>Re: [0/4] Proposal of SE-PostgreSQL patches</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00000.php <nowiki>Re: [0/4] Proposal of SE-PostgreSQL patches</nowiki>]
 
}}
 
 
{{TodoItem
 
|Prevent query cancel packets from being replayed by an attacker, especially when using SSL
 
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg00345.php <nowiki>Replay attack of query cancel</nowiki>]
 
}}
 
 
{{TodoItem
 
|Provide a way to query the log collector subprocess to determine what the currently active log file is
 
* [http://archives.postgresql.org/pgsql-general/2008-11/msg00418.php <nowiki>Current log files when rotating?</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow the client to authenticate the server in a Unix-domain socket connection, e.g., using SO_PEERCRED
 
* http://archives.postgresql.org/message-id/20090401173756.GB21229@svana.org
 
 
}}
 
}}
  
Line 96: Line 31:
 
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg00025.php <nowiki>Re: Rejecting weak passwords</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg00025.php <nowiki>Re: Rejecting weak passwords</nowiki>]
 
}}
 
}}
 
{{TodoItem
 
|Allow custom daemons to be automatically stopped/started along postmaster
 
|This allows easier administration of daemons like user job schedulers or replication-related daemons.
 
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01701.php <nowiki>Re: scheduler in core</nowiki>]
 
}}
 
 
=== Configuration files ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|Allow pg_hba.conf to specify host names along with IP addresses
 
|Host name lookup could occur when the postmaster reads the pg_hba.conf file, or when the backend starts.  Another solution would be to reverse lookup the connection IP and check that hostname against the host names in pg_hba.conf. We could also then check that the host name maps to the IP address.
 
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00569.php <nowiki>TODO Item: Allow pg_hba.conf to specify host names along with IP addresses</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow postgresql.conf file values to be changed via an SQL API, perhaps using SET GLOBAL}}
 
 
{{TodoItem
 
|Allow the server to be stopped/restarted via an SQL API}}
 
 
{{TodoItem
 
|Consider normalizing fractions in postgresql.conf, perhaps using '%'
 
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg00550.php <nowiki>Fractions in GUC variables</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow Kerberos to disable stripping of realms so we can check the username@realm against multiple realms
 
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00009.php <nowiki>krb_match_realm patch</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add functions to check correctness of configuration files before they are loaded "live"}}
 
 
{{TodoItem
 
|Improve LDAP authentication configuration options
 
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01745.php <nowiki>Proposed Patch - LDAPS support for servers on port 636 w/o TLS</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add external tool to auto-tune some postgresql.conf parameters
 
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00000.php <nowiki>Re: Overhauling GUCS</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00033.php <nowiki>Simple postgresql.conf wizard</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add 'hostgss' pg_hba.conf option to allow GSS link-level encryption
 
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg01454.php <nowiki>Re: Plans for 8.4</nowiki>]
 
}}
 
 
{{TodoItem
 
|Process pg_hba.conf keywords as case-insensitive
 
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00432.php <nowiki>More robust pg_hba.conf parsing/error logging</nowiki>]
 
}}
 
 
{{TodoEndSubsection}}
 
  
 
=== Tablespaces ===
 
=== Tablespaces ===
 
{{TodoSubsection}}
 
{{TodoSubsection}}
 
{{TodoItem
 
|Allow 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.}}
 
 
{{TodoItem
 
|Allow 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.}}
 
 
{{TodoItem
 
|Allow WAL replay of CREATE TABLESPACE to work when the directory structure on the recovery computer is different from the original}}
 
 
{{TodoItem
 
|Allow per-tablespace quotas}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
Line 175: Line 39:
 
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg01128.php <nowiki>per table random-page-cost?</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg01128.php <nowiki>per table random-page-cost?</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg01486.php <nowiki>per-tablespace random_page_cost/seq_page_cost</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg01486.php <nowiki>per-tablespace random_page_cost/seq_page_cost</nowiki>]
}}
 
 
{{TodoEndSubsection}}
 
 
=== Statistics Collector ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|Allow statistics last vacuum/analyze execution times to be displayed without requiring track_counts to be enabled
 
* [http://archives.postgresql.org/pgsql-docs/2007-04/msg00028.php <nowiki>row-level stats and last analyze time</nowiki>]
 
}}
 
 
{{TodoItem
 
|Clear table counters on TRUNCATE
 
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg00169.php <nowiki>Small TRUNCATE glitch</nowiki>]
 
}}
 
 
{{TodoItem
 
| Allow the clearing of cluster-level statistics
 
* [http://archives.postgresql.org/pgsql-hackers/2009-03/msg00917.php <nowiki>Resetting cluster-wide statistics</nowiki>]
 
 
}}
 
}}
  
Line 205: Line 49:
 
|Allow a warm standby system to also allow read-only statements
 
|Allow a warm standby system to also allow read-only statements
 
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg00050.php <nowiki>Updated propsoal for read-only queries on PITR slaves (SoC 2007)</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg00050.php <nowiki>Updated propsoal for read-only queries on PITR slaves (SoC 2007)</nowiki>]
}}
 
 
{{TodoItemEasy
 
|Create dump tool for write-ahead logs for use in determining transaction id for point-in-time recovery
 
|This is useful for checking PITR recovery.}}
 
 
{{TodoItem
 
|Allow recovery.conf to support the same syntax as postgresql.conf, including quoting
 
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00497.php <nowiki>recovery.conf parsing problems</nowiki>]
 
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg00684.php
 
}}
 
 
{{TodoItem
 
|Allow archive_mode to be changed without server restart?
 
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01655.php <nowiki>Enabling archive_mode without restart</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider avoiding WAL switching via archive_timeout if there has been no database activity
 
* [http://archives.postgresql.org/pgsql-hackers/2010-01/msg01469.php <nowiki>archive_timeout behavior for no activity</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg00395.php <nowiki>Re: archive_timeout behavior for no activity</nowiki>]
 
}}
 
 
{{TodoItemEasy
 
|[http://archives.postgresql.org/message-id/4B901D73.8030003@agliodbs.com Expose pg_controldata via SQL interface]
 
|Helpful for monitoring replicated databases; [http://archives.postgresql.org/message-id/4B959D7A.6010907@joeconway.com initial patch]}}
 
 
{{TodoEndSubsection}}
 
 
=== SSL ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|Allow SSL authentication/encryption over unix domain sockets
 
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00924.php <nowiki>Re: Spoofing as the postmaster</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow SSL key file permission checks to be optionally disabled when sharing SSL keys with other applications
 
* [http://archives.postgresql.org/pgsql-bugs/2007-12/msg00069.php <nowiki>BUG #3809: SSL &quot;unsafe&quot; private key permissions bug</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow 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
 
* [http://archives.postgresql.org/pgsql-general/2008-12/msg00832.php <nowiki>Automatic CRL reload</nowiki>]
 
Alternatively or additionally supporting OCSP (online certificate security protocol) would provide real-time revocation discovery without reloading
 
}}
 
 
{{TodoItem
 
| Allow automatic selection of SSL client certificates from a certificate store
 
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00406.php <nowiki>Allow multiple certificates or keys in the postgresql.crt/.key files</nowiki>]
 
}}
 
 
{{TodoItem
 
| Send full certificate server chain to client
 
* [http://archives.postgresql.org/pgsql-bugs/2009-12/msg00145.php BUG #5245: Full Server Certificate Chain Not Sent to client]
 
 
}}
 
}}
  
Line 268: Line 55:
 
=== Standby server mode ===
 
=== Standby server mode ===
 
{{TodoSubsection}}
 
{{TodoSubsection}}
 
{{TodoItem
 
| Allow pg_xlogfile_name() to be used in recovery mode
 
* [http://archives.postgresql.org/message-id/3f0b79eb1001190135vd9f62f1sa7868abc1ea61d12@mail.gmail.com <nowiki>Streaming replication and pg_xlogfile_name()</nowiki>]
 
}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
Line 278: Line 60:
 
* [http://archives.postgresql.org/pgsql-hackers/2010-01/msg02044.php <nowiki>Re: HS/SR and smart shutdown</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2010-01/msg02044.php <nowiki>Re: HS/SR and smart shutdown</nowiki>]
 
* [http://archives.postgresql.org/pgsql-committers/2010-04/msg00081.php commit log]
 
* [http://archives.postgresql.org/pgsql-committers/2010-04/msg00081.php commit log]
}}
 
 
{{TodoItem
 
| Fix things so that any such variables inherited from the server environment are intentionally *NOT* used for making SR connections.
 
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01011.php <nowiki>Re: Parameter name standby_mode</nowiki>]
 
 
}}
 
}}
  
Line 290: Line 67:
 
* [http://archives.postgresql.org/pgsql-committers/2010-04/msg00222.php commit log]
 
* [http://archives.postgresql.org/pgsql-committers/2010-04/msg00222.php commit log]
 
}}
 
}}
 
{{TodoItem
 
| Add a new privilege for connecting for streaming replication
 
* [http://archives.postgresql.org/message-id/3f0b79eb1003040247p6b092241of91784a505e9abd8@mail.gmail.com <nowiki>Streaming replication and privilege</nowiki>]
 
}}
 
 
{{TodoItem
 
| Add support for synchronous replication.
 
}}
 
 
{{TodoItem
 
| Add capability to take and send a base backup over the streaming replication connection, making it possible to initialize a new standby server from a running primary server without a WAL archive or other access to the primary server.
 
}}
 
 
  
 
{{TodoEndSubsection}}
 
{{TodoEndSubsection}}
  
 
== Data Types ==
 
== Data Types ==
 
{{TodoItem
 
|Change NUMERIC to enforce the maximum precision}}
 
 
{{TodoItem
 
|Reduce storage space for small NUMERICs
 
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg01331.php <nowiki>Saving space for common kinds of numeric values</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2007-02/msg00505.php <nowiki>Numeric patch to add special-case representations for &lt; 8 bytes</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg00715.php <nowiki>Re: Reducing NUMERIC size for 8.3</nowiki>]
 
}}
 
 
{{TodoItem
 
|Fix data types where equality comparison isn't intuitive, e.g. box}}
 
 
{{TodoItem
 
|Add support for public SYNONYMs
 
* [http://archives.postgresql.org/pgsql-hackers/2006-03/msg00519.php <nowiki>Proposal for SYNONYMS</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add support for SQL-standard GENERATED/IDENTITY columns
 
* [http://archives.postgresql.org/pgsql-hackers/2006-07/msg00543.php <nowiki>Re: Three weeks left until feature freeze</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2006-08/msg00038.php <nowiki>GENERATED ... AS IDENTITY, Was: Re: Feature Freeze</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00344.php <nowiki>Behavior of GENERATED columns per SQL2003</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00076.php <nowiki>Re: [HACKERS] Behavior of GENERATED columns per SQL2003</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00604.php <nowiki>IDENTITY/GENERATED patch</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider placing all sequences in a single table, or create a system view
 
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php <nowiki>Re: newbie: renaming sequences task</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider a special data type for regular expressions
 
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg01067.php <nowiki>Why is there a tsquery data type?</nowiki>]
 
}}
 
 
{{TodoItem
 
|Reduce BIT data type overhead using short varlena headers
 
* [http://archives.postgresql.org/pgsql-general/2007-12/msg00273.php <nowiki>storage size of &quot;bit&quot; data type..</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow adding/renaming/removing enumerated values to an existing enumerated data type
 
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01718.php <nowiki>Re: [COMMITTERS] pgsql: Update:  &lt; * Allow adding enumerated values to an existing</nowiki>]
 
}}
 
 
{{TodoItem
 
|Support scoped IPv6 addresses in inet type
 
* [http://archives.postgresql.org/pgsql-bugs/2007-05/msg00111.php <nowiki>strange problem with ip6</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add JSON (JavaScript Object Notation) data type
 
|This would behave similar to the XML data type, which is stored as text, but allows element lookup and conversion functions.
 
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg01494.php <nowiki>PATCH: Add hstore_to_json()</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2010-01/msg00001.php <nowiki>Re: PATCH: Add hstore_to_json()</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2010-03/msg01092.php <nowiki>Proposal: Add JSON support</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00057.php <nowiki>Re: Proposal: Add JSON support</nowiki>]
 
 
}}
 
 
{{TodoItem
 
|Considering improving performance of computing CHAR() value lengths
 
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg00900.php <nowiki>char() overhead on read-only workloads not so insignifcant as the docs claim it is...</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01787.php <nowiki>Re: [PATCH] backend: compare word-at-a-time in bcTruelen</nowiki>]
 
}}
 
 
=== Domains ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|Fix CREATE CAST on DOMAINs
 
* [http://archives.postgresql.org/pgsql-hackers/2006-05/msg00072.php <nowiki>bug? non working casts for domain</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2006-09/msg01681.php <nowiki>TODO: Fix CREATE CAST on DOMAINs</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow domains to be cast
 
* [http://archives.postgresql.org/pgsql-hackers/2003-06/msg01206.php <nowiki>Domain casting still doesn't work right</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00289.php <nowiki>domain casting?</nowiki>]
 
}}
 
 
{{TodoItem
 
|Make domains work better with polymorphic functions
 
* [http://archives.postgresql.org/message-id/4887.1228700773@sss.pgh.pa.us Polymorphic types vs. domains]
 
* [http://archives.postgresql.org/message-id/15535.1238774571@sss.pgh.pa.us some difficulties with fixing it]
 
}}
 
 
{{TodoEndSubsection}}
 
  
 
=== Dates and Times ===
 
=== Dates and Times ===
 
{{TodoSubsection}}
 
{{TodoSubsection}}
 
{{TodoItem
 
|Allow infinite intervals just like infinite timestamps}}
 
 
{{TodoItem
 
|Allow 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.
 
* [http://archives.postgresql.org/pgsql-hackers/2004-10/msg00705.php <nowiki>timestamp with time zone a la sql99</nowiki>]
 
}}
 
 
{{TodoItem
 
|Fix SELECT '0.01 years'::interval, '0.01 months'::interval}}
 
 
{{TodoItem
 
|Have timestamp subtraction not call justify_hours()?
 
* [http://archives.postgresql.org/pgsql-sql/2006-10/msg00059.php <nowiki>timestamp subtraction (was Re: formatting intervals with to_char)</nowiki>]
 
}}
 
 
{{TodoItem
 
|Improve timestamptz subtraction to be DST-aware
 
|Currently subtracting one date from another that crosses a daylight savings time adjustment can return '1 day 1 hour', but adding that back to the first date returns a time one hour in the future.  This is caused by the adjustment of '25 hours' to '1 day 1 hour', and '1 day' is the same time the next day, even if daylight savings adjustments are involved.}}
 
 
{{TodoItem
 
|Fix interval display to support values exceeding 2^31 hours}}
 
 
{{TodoItem
 
|Add overflow checking to timestamp and interval arithmetic}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
Line 435: Line 80:
 
* to find abbreviations that can be safely promoted to the Default list
 
* to find abbreviations that can be safely promoted to the Default list
 
* {{messageLink|7867.1219793881@sss.pgh.pa.us|BUG #4377: casting result of timeofday() to timestamp fails in some timezones}}}}
 
* {{messageLink|7867.1219793881@sss.pgh.pa.us|BUG #4377: casting result of timeofday() to timestamp fails in some timezones}}}}
 
{{TodoItem
 
|Add function to allow the creation of timestamps using parameters
 
* http://archives.postgresql.org/pgsql-performance/2010-06/msg00232.php
 
}}
 
 
{{TodoEndSubsection}}
 
 
=== Arrays ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|Add support for arrays of domains
 
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00114.php <nowiki>Re: updated WIP: arrays of composites</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow single-byte header storage for array elements}}
 
 
{{TodoItem
 
|Add function to detect if an array is empty
 
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00475.php <nowiki>Re: array_length()</nowiki>]
 
}}
 
 
{{TodoItem
 
|Improve handling of empty arrays
 
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01033.php <nowiki>So what's an &quot;empty&quot; array anyway?</nowiki>]
 
}}
 
 
{{TodoItem
 
|Improve handling of NULLs in arrays
 
* [http://archives.postgresql.org/pgsql-bugs/2008-11/msg00009.php <nowiki>BUG #4509: array_cat's null behaviour is inconsistent</nowiki>]
 
}}
 
  
 
{{TodoEndSubsection}}
 
{{TodoEndSubsection}}
Line 473: Line 85:
 
=== Binary Data ===
 
=== Binary Data ===
 
{{TodoSubsection}}
 
{{TodoSubsection}}
 
{{TodoItem
 
|Improve vacuum of large objects, like contrib/vacuumlo?}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
 
|Add security checks for large objects}}
 
|Add security checks for large objects}}
 
{{TodoItem
 
|Auto-delete large objects when referencing row is deleted
 
|contrib/lo offers this functionality.}}
 
 
{{TodoItem
 
|Allow read/write into TOAST values like large objects
 
|This requires the TOAST column to be stored EXTERNAL.}}
 
 
{{TodoItem
 
|Add API for 64-bit large object access
 
* [http://archives.postgresql.org/pgsql-hackers/2005-09/msg00781.php <nowiki>64-bit API for large objects</nowiki>]
 
}}
 
 
{{TodoEndSubsection}}
 
 
=== MONEY Data Type ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|Add locale-aware MONEY type, and support multiple currencies
 
* [http://archives.postgresql.org/pgsql-general/2005-08/msg01432.php <nowiki>A real currency type</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01181.php <nowiki>Money type todos?</nowiki>]
 
}}
 
 
{{TodoItem
 
|MONEY dumps in a locale-specific format making it difficult to restore to a system with a different locale}}
 
 
{{TodoItem
 
|Allow MONEY to be easily cast to/from other numeric data types}}
 
 
{{TodoEndSubsection}}
 
 
=== Text Search ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|Allow dictionaries to change the token that is passed on to later dictionaries
 
* [http://archives.postgresql.org/pgsql-patches/2007-11/msg00081.php <nowiki>a tsearch2 (8.2.4) dictionary that only filters out stopwords</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider a function-based API for '@@' searches
 
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00511.php <nowiki>Simplifying Text Search</nowiki>]
 
}}
 
 
{{TodoItem
 
|Improve text search error messages
 
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00966.php <nowiki>Poorly designed tsearch NOTICEs</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg01146.php <nowiki>Re: Poorly designed tsearch NOTICEs</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider changing error to warning for strings larger than one megabyte
 
* [http://archives.postgresql.org/pgsql-bugs/2008-02/msg00190.php <nowiki>BUG #3975: tsearch2 index should not bomb out of 1Mb limit</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2008-03/msg00062.php <nowiki>Re: [BUGS] BUG #3975: tsearch2 index should not bomb out of 1Mb limit</nowiki>]
 
}}
 
 
{{TodoItem
 
|tsearch and tsdicts regression tests fail in Turkish locale on glibc
 
* [http://archives.postgresql.org/message-id/49749645.5070801@gmx.net tsearch with Turkish locale]
 
}}
 
 
{{TodoItem
 
|tsquery negator operator treated as part of lexeme
 
* [http://archives.postgresql.org/pgsql-bugs/2009-06/msg00346.php BUG #4887: inclusion operator (@>) on tsqeries behaves not conforming to documentation]
 
}}
 
  
 
{{TodoEndSubsection}}
 
{{TodoEndSubsection}}
Line 551: Line 93:
 
=== XML ===
 
=== XML ===
 
{{TodoSubsection}}
 
{{TodoSubsection}}
 
{{TodoItem
 
|Allow xml arrays to be cast to other data types
 
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00981.php <nowiki>proposal casting from XML[] to int[], numeric[], text[]</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00231.php <nowiki>Re: proposal casting from XML[] to int[], numeric[], text[]</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00471.php <nowiki>Re: proposal casting from XML[] to int[], numeric[], text[]</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add XML Schema validation and xmlvalidate function (SQL:2008)}}
 
 
{{TodoItem
 
|Add xmlvalidatedtd variant to support validating against a DTD?}}
 
 
{{TodoItem
 
|Relax-NG validation; libxml2 supports this already}}
 
 
{{TodoItem
 
|Make it work reliably for non-UTF8 server encoding (xpath()) in particular is known to not work)
 
* [http://archives.postgresql.org/pgsql-bugs/2009-01/msg00135.php <nowiki>BUG #4622: xpath only work in utf-8 server encoding</nowiki>]
 
* http://archives.postgresql.org/message-id/4110.1238973350@sss.pgh.pa.us}}
 
 
{{TodoItem
 
|Extra functions from SQL:2006: XMLDOCUMENT, XMLCAST, XMLTEXT}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
 
|Inline ORDER BY for XMLAGG. Example: "... XMLAGG(XMLELEMENT(...) ORDER BY col1) ..." (should be made to work with all aggregate functions)}}
 
|Inline ORDER BY for XMLAGG. Example: "... XMLAGG(XMLELEMENT(...) ORDER BY col1) ..." (should be made to work with all aggregate functions)}}
 
{{TodoItem
 
|XMLNAMESPACES support in XMLELEMENT and elsewhere}}
 
 
{{TodoItem
 
|XSLT support; already available in contrib/xml2, but needs API fixes and adaptation to xml type.}}
 
 
{{TodoItem
 
|XML Canonical: Convert XML documents to canonical form to compare them. libxml2 has support for this.}}
 
 
{{TodoItem
 
|Pretty-printing XML: Parse a document and serialize it back in some indented form. libxml2 might support this.}}
 
 
{{TodoItem
 
|XMLQUERY (from SQL/XML standard)}}
 
 
{{TodoItem
 
|In some cases shredding could be better option (if there is no need in keeping XML docs entirely; if we have already developed tools that understand only relational data; etc) -- it would be a separate module that implements annotated schema decomposition technique, similar to DB2 and SQL Server functionality.}}
 
 
{{TodoItem
 
| Nested or repeated xpath() apparently mess up namespaces [http://archives.postgresql.org/pgsql-bugs/2008-03/msg00097.php] [http://archives.postgresql.org/pgsql-bugs/2008-03/msg00144.php] [http://archives.postgresql.org/pgsql-general/2008-03/msg00295.php] [http://archives.postgresql.org/pgsql-bugs/2008-07/msg00054.php] [http://archives.postgresql.org/message-id/004f01c90e91$138e9d10$3aabd730$@anstett@iaas.uni-stuttgart.de]}}
 
 
{{TodoItem
 
|XPath: Adding the <x> at the root causes problems [http://archives.postgresql.org/pgsql-bugs/2008-05/msg00184.php] [http://archives.postgresql.org/pgsql-bugs/2008-07/msg00054.php] [http://archives.postgresql.org/pgsql-general/2008-07/msg00613.php]}}
 
 
{{TodoItem
 
|xpath_table needs to be implemented/implementable to get rid of contrib/xml2 [http://archives.postgresql.org/pgsql-general/2008-05/msg00823.php]}}
 
 
{{TodoItem
 
|xpath_table is pretty broken anyway [http://archives.postgresql.org/pgsql-hackers/2010-02/msg02424.php]}}
 
 
{{TodoItem
 
|better handling of XPath data types [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00616.php] [http://archives.postgresql.org/message-id/004a01c90e90$4b986d90$e2c948b0$@anstett@iaas.uni-stuttgart.de]}}
 
 
{{TodoItem
 
|xpath_exists() is needed. It checks, whether or not the path specified exists in the XML value. (W/o this function we need to use weird "array_dims(xpath(...)) IS NOT NULL" syntax.)}}
 
 
{{TodoItem
 
|better handling of PIs and DTDs in xmlconcat() [http://archives.postgresql.org/message-id/200904211211.n3LCB09p008988@wwwmaster.postgresql.org]}}
 
  
 
{{TodoEndSubsection}}
 
{{TodoEndSubsection}}
  
 
== Functions ==
 
== Functions ==
 
{{TodoItem
 
|Allow INET subnet tests using non-constants to be indexed}}
 
 
{{TodoItem
 
|Add INET overlaps operator, for use by exclusion constraints
 
* http://archives.postgresql.org/pgsql-hackers/2010-03/msg00845.php
 
}}
 
 
{{TodoItem
 
|Allow to_date() and to_timestamp() to accept localized month names}}
 
 
{{TodoItem
 
|Add missing parameter handling in to_char()
 
* [http://archives.postgresql.org/pgsql-hackers/2005-12/msg00948.php <nowiki>Re: to_char and i18n</nowiki>]
 
}}
 
 
{{TodoItem
 
|Throw an error from to_char() instead of printing a string of "#" when a number doesn't fit in the desired output format.
 
* discussed in [http://archives.postgresql.org/message-id/37ed240d0907290836w42187222n18664dfcbcb445b1@mail.gmail.com "to_char, support for EEEE format"]
 
}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
Line 647: Line 105:
 
* [http://archives.postgresql.org/pgsql-hackers/2004-01/msg00498.php <nowiki>implemented missing bitSetBit() and bitGetBit()</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2004-01/msg00498.php <nowiki>implemented missing bitSetBit() and bitGetBit()</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2004-02/msg00478.php <nowiki>Re: implemented missing bitSetBit() and bitGetBit()</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2004-02/msg00478.php <nowiki>Re: implemented missing bitSetBit() and bitGetBit()</nowiki>]
}}
 
 
{{TodoItem
 
|Allow to_char() on interval values to accumulate the highest unit requested
 
|2= Some special format flag would be required to request such accumulation.  Such functionality could also be added to EXTRACT. Prevent accumulation that crosses the month/day boundary because of the uneven number of days in a month.
 
* to_char(INTERVAL '1 hour 5 minutes', 'MI') =&gt; 65
 
* to_char(INTERVAL '43 hours 20 minutes', 'MI' ) =&gt; 2600
 
* to_char(INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI') =&gt; 0:1:19:20
 
* to_char(INTERVAL '3 years 5 months','MM') =&gt; 41}}
 
 
{{TodoItem
 
|Allow SQL-language functions to reference parameters by parameter name
 
|Currently SQL-language functions can only refer to dollar parameters, e.g. $1}}
 
 
{{TodoItem
 
|Add SPI_gettypmod() to return the typemod for a TupleDesc}}
 
 
{{TodoItem
 
|Enforce typmod for function inputs, function results and parameters for spi_prepare'd statements called from PLs
 
* [http://archives.postgresql.org/pgsql-hackers/2007-01/msg01403.php <nowiki>Re: BUG #2917: spi_prepare doesn't accept typename aliases</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-11/msg01160.php <nowiki>RFC for adding typmods to functions</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow holdable cursors in SPI}}
 
 
{{TodoItem
 
|Tighten function permission checks
 
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00568.php <nowiki>Re: Security leak with trigger functions?</nowiki>]
 
}}
 
 
{{TodoItem
 
|Fix IS OF so it matches the ISO specification, and add documentation
 
* [http://archives.postgresql.org/pgsql-patches/2003-08/msg00060.php <nowiki>Re: [HACKERS] IS OF</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00060.php <nowiki>ToDo: add documentation for operator IS OF</nowiki>]
 
 
}}
 
}}
  
Line 688: Line 111:
 
|Some geometric types do not have the full suite of geometric operators, e.g. box @&gt; point
 
|Some geometric types do not have the full suite of geometric operators, e.g. box @&gt; point
 
* {{messageLink|4B0A8F0F.3020308@sigaev.ru|point_ops for GiST}}
 
* {{messageLink|4B0A8F0F.3020308@sigaev.ru|point_ops for GiST}}
}}
 
 
{{TodoItem
 
|Add overlaps geometric operators that ignore point overlaps
 
* http://archives.postgresql.org/pgsql-hackers/2010-03/msg00861.php
 
}}
 
 
{{TodoItem
 
|Implement Boyer-Moore searching in LIKE queries
 
* {{messageLink|27645.1220635769@sss.pgh.pa.us|TODO item: Implement Boyer-Moore searching (First time hacker)}}
 
}}
 
 
{{TodoItem
 
|Prevent malicious functions from being executed with the permissions of unsuspecting users
 
|Index functions are safe, so VACUUM and ANALYZE are safe too.  Triggers, CHECK and DEFAULT expressions, and rules are still vulnerable.
 
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00268.php <nowiki>Some notes about the index-functions security vulnerability</nowiki>]
 
}}
 
 
{{TodoItem
 
|Reduce memory usage of aggregates in set returning functions
 
* [http://archives.postgresql.org/pgsql-performance/2008-01/msg00031.php <nowiki>Re: Performance of aggregates over set-returning functions</nowiki>]
 
}}
 
 
{{TodoItem
 
|Fix /contrib/ltree operator
 
* [http://archives.postgresql.org/pgsql-bugs/2007-11/msg00044.php <nowiki>BUG #3720: wrong results at using ltree</nowiki>]
 
}}
 
 
{{TodoItem
 
|<nowiki>Fix inconsistent precedence of =, &gt;, and &lt; compared to &lt;&gt;, &gt;=, and &lt;=</nowiki>
 
* [http://archives.postgresql.org/pgsql-bugs/2007-12/msg00145.php <nowiki>BUG #3822: Nonstandard precedence for comparison operators</nowiki>]
 
}}
 
 
{{TodoItem
 
|Fix regular expression bug when using complex back-references
 
* [http://archives.postgresql.org/pgsql-bugs/2007-10/msg00000.php <nowiki>BUG #3645: regular expression back references seem broken</nowiki>]
 
}}
 
 
{{TodoItem
 
|Have /contrib/dblink reuse unnamed connections
 
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00895.php <nowiki>dblink un-named connection doesn't get re-used</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow calling of a procedure outside a SELECT that can control the transaction state
 
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg01375.php <nowiki>Proposal: real procedures again (8.4)</nowiki>]
 
 
}}
 
}}
  
Line 739: Line 116:
 
|Add has_sequence_privilege()
 
|Add has_sequence_privilege()
 
* [http://archives.postgresql.org/pgsql-hackers/2008-09/msg00032.php <nowiki>Re: [PATCH] allow has_table_privilege(..., 'usage') on sequences</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-09/msg00032.php <nowiki>Re: [PATCH] allow has_table_privilege(..., 'usage') on sequences</nowiki>]
}}
 
 
{{TodoItem
 
|Improve formatting of pg_get_viewdef() output
 
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg01648.php <nowiki>pg_get_viewdef formattiing</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01885.php <nowiki>Re: pretty print viewdefs</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add printf()-like functionality
 
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00367.php <nowiki>RfD: more powerful &quot;any&quot; types</nowiki>]
 
}}
 
 
{{TodoItem
 
|Fix to_number() handling for values not matching the format string
 
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg01447.php <nowiki>Re: numeric_to_number() function skipping some digits</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add function to dump pg_depend information cleanly
 
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00226.php <nowiki>Elementary dependency look-up</nowiki>]
 
}}
 
 
== Multi-Language Support ==
 
 
{{TodoItem
 
|Add NCHAR (as distinguished from ordinary varchar),}}
 
 
{{TodoItem
 
|Allow more fine-grained collation selection; add CREATE COLLATION.
 
|Right now the collation is fixed at database creation time.
 
* [http://archives.postgresql.org/pgsql-hackers/2005-03/msg00932.php <nowiki>Re: Patch for collation using ICU</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2005-08/msg00039.php <nowiki>FW: Win32 unicode vs ICU</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2005-08/msg00309.php <nowiki>Re: FW: Win32 unicode vs ICU</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2005-09/msg00110.php <nowiki>Proof of concept COLLATE support with patch</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2005-09/msg00020.php <nowiki>For review: Initial support for COLLATE</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2005-12/msg01121.php <nowiki>Proposed COLLATE implementation</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2006-01/msg00767.php <nowiki>TODO item: locale per database patch (new iteration)</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2006-03/msg00233.php <nowiki>Re: FW: Win32 unicode vs ICU</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2006-09/msg00662.php <nowiki>Re: Fixed length data types issue</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00557.php <nowiki>[WIP] collation support revisited (phase 1)</nowiki>]
 
* [[Todo:Collate]]
 
* [[Todo:ICU]]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg01362.php <nowiki>WIP patch: Collation support</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-09/msg00012.php <nowiki>Re: WIP patch: Collation support</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00868.php <nowiki>PGDay.it collation discussion notes</nowiki>]
 
* [http://www.unicode.org/unicode/reports/tr10/ Unicode collation algorithm]
 
}}
 
 
{{TodoItem
 
|Add a LOCALE option to CREATE DATABASE, as a shorthand
 
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00119.php <nowiki> Re: 8.4 open items list</nowiki>]
 
}}
 
 
{{TodoItem
 
|Support multiple simultaneous character sets, per SQL:2008}}
 
 
{{TodoItem
 
|Improve UTF8 combined character handling?}}
 
 
{{TodoItem
 
|Add octet_length_server() and octet_length_client()}}
 
 
{{TodoItem
 
|Make octet_length_client() the same as octet_length()?}}
 
 
{{TodoItem
 
|Fix problems with wrong runtime encoding conversion for NLS message files}}
 
 
{{TodoItem
 
|Add URL to more complete multi-byte regression tests
 
* [http://archives.postgresql.org/pgsql-hackers/2005-07/msg00272.php <nowiki>Multi-byte and client side character encoding tests for copy command..</nowiki>]
 
}}
 
 
{{TodoItem
 
|Fix contrib/fuzzystrmatch to work with multibyte encodings
 
* [http://archives.postgresql.org/pgsql-bugs/2009-04/msg00047.php <nowiki> soundex function returns UTF-16 characters</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00138.php <nowiki> dmetaphone woes</nowiki>]
 
}}
 
 
{{TodoItem
 
|Set client encoding based on the client operating system encoding
 
|Currently client_encoding is set in postgresql.conf, which defaults to the server encoding.
 
* [http://archives.postgresql.org/pgsql-hackers/2006-08/msg01696.php <nowiki>Re: [GENERAL] invalid byte sequence ?</nowiki>]
 
}}
 
 
{{TodoItem
 
|Change memory allocation for multi-byte functions so memory is allocated inside conversion functions
 
|Currently we preallocate memory based on worst-case usage.}}
 
 
{{TodoItem
 
|Add ability to use case-insensitive regular expressions on multi-byte characters
 
|ILIKE already works with multi-byte characters
 
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00433.php <nowiki>Regexps vs. locale</nowiki>]
 
* {{MessageLink|20091201210024.B1393753FB7@cvs.postgresql.org|A partial solution for UTF-8}}
 
}}
 
 
{{TodoItem
 
|Improve encoding of connection startup messages sent to the client
 
|Currently some authentication error messages are sent in the server encoding
 
* [http://archives.postgresql.org/pgsql-general/2008-12/msg00801.php <nowiki>encoding of PostgreSQL messages</nowiki>]
 
* [http://archives.postgresql.org/pgsql-general/2009-01/msg00005.php <nowiki>Re: encoding of PostgreSQL messages</nowiki>]
 
}}
 
 
{{TodoItem
 
|Have pg_stat_activity display query strings in the correct client encoding
 
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00131.php <nowiki>pg_stats queries versus per-database encodings</nowiki>]
 
}}
 
 
{{TodoItem
 
|More sensible support for Unicode combining characters, normal forms
 
* http://archives.postgresql.org/message-id/200904141532.44618.peter_e@gmx.net
 
}}
 
 
== Views / Rules ==
 
 
{{TodoItem
 
|Automatically create rules on views so they are updateable, per SQL:2008
 
|We can only auto-create rules for simple views.  For more complex cases users will still have to write rules manually.
 
* [http://archives.postgresql.org/pgsql-hackers/2006-03/msg00586.php <nowiki>Proposal for updatable views</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2006-08/msg00255.php <nowiki>Updatable views</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg01746.php <nowiki>Re: [COMMITTERS] pgsql: Automatic view update rules Bernd Helmle</nowiki>]
 
* http://wiki.postgresql.org/wiki/Updatable_views
 
}}
 
 
{{TodoItem
 
|Add the functionality for WITH CHECK OPTION clause of CREATE VIEW}}
 
 
{{TodoItem
 
|Allow VIEW/RULE recompilation when the underlying tables change
 
|This is both difficult and controversial.
 
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg01723.php Re: About "Allow VIEW/RULE recompilation when the underlying tables change"]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg01724.php Re: About "Allow VIEW/RULE recompilation when the underlying tables change"]
 
}}
 
 
{{TodoItem
 
|Make it possible to use RETURNING together with conditional DO INSTEAD rules, such as for partitioning setups
 
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00577.php <nowiki>RETURNING and DO INSTEAD ... Intentional or not?</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add the ability to automatically create materialized views
 
|Right now materialized views require the user to create triggers on the main table to keep the summary table current.  SQL syntax should be able to manage the triggers and summary table automatically.  A more sophisticated implementation would automatically retrieve from the summary table when the main table is referenced, if possible.  See [[Materialized Views]] for implementation details
 
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00479.php <nowiki>GSoC - proposal - Materialized Views in PostgreSQL</nowiki>]
 
}}
 
 
{{TodoItem
 
|Improve ability to modify views via ALTER TABLE
 
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00691.php <nowiki>Re: idea: storing view source in system catalogs</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg01410.php <nowiki>modifying views</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg00300.php <nowiki>Re: patch: Add columns via CREATE OR REPLACE VIEW</nowiki>]
 
}}
 
 
{{TodoItem
 
|Prevent low-cost functions from seeing unauthorized view rows
 
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg01346.php <nowiki>Using views for row-level access control is leaky</nowiki>]
 
 
}}
 
}}
  
 
== SQL Commands ==
 
== SQL Commands ==
 
{{TodoItem
 
|Add CORRESPONDING BY to UNION/INTERSECT/EXCEPT}}
 
 
{{TodoItem
 
|Add ROLLUP, CUBE, GROUPING SETS options to GROUP BY
 
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00838.php <nowiki>WIP: grouping sets support</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00466.php <nowiki>Implementation of GROUPING SETS (T431: Extended grouping capabilities)</nowiki>]
 
}}
 
 
{{TodoItemEasy
 
|Allow SET CONSTRAINTS to be qualified by schema/table name}}
 
 
{{TodoItemEasy
 
|Fix TRUNCATE ... RESTART IDENTITY so its effect on sequences is rolled back on transaction abort
 
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00550.php <nowiki>Re: [PATCHES] TRUNCATE TABLE with IDENTITY</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow PREPARE of cursors}}
 
 
{{TodoItem
 
|Allow finer control over the caching of prepared query plans
 
|Currently anonymous (un-named) queries prepared via the wire protocol are replanned every time bind parameters are supplied --- allow SQL PREPARE to do the same.  Also, allow control over replanning prepared queries either manually or automatically when statistics for execute parameters differ dramatically from those used during planning.
 
* http://archives.postgresql.org/message-id/201002151911.o1FJBYh22763@momjian.us
 
}}
 
 
{{TodoItem
 
|Improve logging of prepared transactions recovered during startup
 
* [http://archives.postgresql.org/pgsql-hackers/2006-11/msg00092.php <nowiki>&quot;recovering prepared transaction&quot; after server restart message</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow prepared transactions with temporary tables created and dropped in the same transaction, and when an ON COMMIT DELETE ROWS temporary  table is accessed
 
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00047.php <nowiki>Re: &quot;could not open relation 1663/16384/16584: No such file or directory&quot; in a specific combination of transactions with temp tables</nowiki>]
 
* [http://archives.postgresql.org/message-id/492543D5.9050904@enterprisedb.com A suggestion on how to implement this]
 
}}
 
 
{{TodoItem
 
|Add a GUC variable to warn about non-standard SQL usage in queries}}
 
 
{{TodoItem
 
|Add SQL-standard MERGE/REPLACE/UPSERT command
 
|MERGE is typically used to merge two tables.  REPLACE or UPSERT command does UPDATE, or on failure, INSERT. See [[SQL MERGE]] for notes on the implementation details.
 
}}
 
 
{{TodoItem
 
|Add NOVICE output level for helpful messages like automatic sequence/index creation}}
 
 
{{TodoItem
 
|Add GUC to issue notice about statements that use unjoined tables}}
 
 
{{TodoItem
 
|Allow EXPLAIN to identify tables that were skipped because of constraint_exclusion}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
 
|Allow EXPLAIN output to be more easily processed by scripts, perhaps XML
 
|Allow EXPLAIN output to be more easily processed by scripts, perhaps XML
 
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00857.php <nowiki>generic options for explain</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00857.php <nowiki>generic options for explain</nowiki>]
}}
 
 
{{TodoItem
 
|Enable standard_conforming_strings by default in 9.1?
 
|When this is done, backslash-quote should be prohibited in non-E<nowiki>''</nowiki> strings because of possible confusion over how such strings treat backslashes.  Basically, <nowiki>''</nowiki> is always safe for a literal single quote, while \' might or might not be based on the backslash handling rules.}}
 
 
{{TodoItem
 
|Simplify dropping roles that have objects in several databases}}
 
 
{{TodoItem
 
|Allow the count returned by SELECT, etc to be represented as an int64 to allow a higher range of values}}
 
 
{{TodoItem
 
|Add support for WITH RECURSIVE ... CYCLE
 
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00291.php <nowiki>WITH RECURSIVE ... CYCLE in vanilla SQL: issues with arrays of rows</nowiki>]}}
 
 
{{TodoItem
 
|Add DEFAULT .. AS OWNER so permission checks are done as the table owner
 
|This would be useful for SERIAL nextval() calls and CHECK constraints.}}
 
 
{{TodoItem
 
|Allow DISTINCT to work in multiple-argument aggregate calls}}
 
 
{{TodoItem
 
|Add column to pg_stat_activity that shows the progress of long-running commands like CREATE INDEX and VACUUM
 
* [http://archives.postgresql.org/pgsql-patches/2008-04/msg00203.php <nowiki>EXPLAIN progress info</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow INSERT/UPDATE/DELETE ... RETURNING inside a SELECT 'FROM' clause or target list
 
|Actually it would be saner to allow this in WITH
 
* [http://archives.postgresql.org/pgsql-general/2006-09/msg00803.php <nowiki>8.2: select from an INSERT returning?</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2006-10/msg00693.php <nowiki>Re: SQL functions, INSERT/UPDATE/DELETE RETURNING, and triggers</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00124.php <nowiki>cannot use result of (insert..returning)</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00979.php <nowiki>insert ... delete ... returning ... ?</nowiki>]
 
* [http://archives.postgresql.org/pgsql-general/2009-06/msg00357.php Using results from DELETE ... RETURNING]
 
}}
 
 
{{TodoItem
 
|Allow INSERT/UPDATE/DELETE ... RETURNING in common table expressions
 
*  [http://archives.postgresql.org/pgsql-hackers/2009-10/msg00472.php <nowiki>Writeable CTEs and side effects</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add comments on system tables/columns using the information in catalogs.sgml
 
|Ideally the information would be pulled from the SGML file automatically.}}
 
 
{{TodoItem
 
|Prevent the specification of conflicting transaction read/write options
 
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00684.php <nowiki>Re: SET TRANSACTION and SQL Standard</nowiki>]
 
}}
 
 
{{TodoItem
 
|Support LATERAL subqueries
 
|Lateral subqueries can reference columns of tables defined outside the subquery at the same level, i.e. ''laterally''.
 
For example, a LATERAL subquery in a FROM clause could reference tables defined in the same FROM clause.
 
Currently only the columns of tables defined ''above'' subqueries are recognized.
 
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00292.php <nowiki>LATERAL</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg00991.php <nowiki>Re: LATERAL</nowiki>]
 
 
}}
 
}}
  
Line 1,021: Line 129:
 
|Postgres currently allows comments to be placed on the columns of an index, but pg_dump doesn't handle them and the column names themselves are implementation-dependent.
 
|Postgres currently allows comments to be placed on the columns of an index, but pg_dump doesn't handle them and the column names themselves are implementation-dependent.
 
* http://archives.postgresql.org/message-id/27676.1237906577@sss.pgh.pa.us
 
* http://archives.postgresql.org/message-id/27676.1237906577@sss.pgh.pa.us
}}
 
 
{{TodoItem
 
|Add support for functional dependencies
 
|This would allow omitting GROUP BY columns when grouping by the primary key.
 
}}
 
 
{{TodoItem
 
|Optimize ON COMMIT DELETE ROWS
 
|Currently deletions are excessively performed
 
* http://archives.postgresql.org/pgsql-performance/2010-03/msg00392.php
 
* http://archives.postgresql.org/pgsql-performance/2010-04/msg00046.php
 
 
}}
 
}}
  
 
=== CREATE ===
 
=== CREATE ===
 
{{TodoSubsection}}
 
{{TodoSubsection}}
 
{{TodoItem
 
|Allow CREATE TABLE AS to determine column lengths for complex expressions like SELECT col1 || col2}}
 
 
{{TodoItem
 
|Have WITH CONSTRAINTS also create constraint indexes
 
* [http://archives.postgresql.org/pgsql-patches/2007-04/msg00149.php <nowiki>Re: CREATE TABLE LIKE INCLUDING INDEXES support</nowiki>]
 
}}
 
 
{{TodoItem
 
|Move 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?)
 
* http://archives.postgresql.org/message-id/19768.1238680878@sss.pgh.pa.us
 
* http://archives.postgresql.org/message-id/200909181005.n8IA5Ris061239@wwwmaster.postgresql.org
 
}}
 
 
{{TodoItem
 
|Prevent concurrent CREATE TABLE from sometimes returning a cryptic error message
 
* [http://archives.postgresql.org/pgsql-bugs/2007-10/msg00169.php <nowiki>BUG #3692: Conflicting create table statements throw unexpected error</nowiki>]
 
}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
 
|Add CREATE TABLE LIKE ... INCLUDING COMMENTS}}
 
|Add CREATE TABLE LIKE ... INCLUDING COMMENTS}}
 
{{TodoItem
 
|Allow CREATE TABLE to optionally create a table if it does not already exist, without throwing an error
 
|The fact that tables contain data makes this more complex than other CREATE OR REPLACE operations.
 
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg01300.php <nowiki>Add column if not exists (CINE)</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add CREATE SCHEMA ... LIKE that copies a schema}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
Line 1,076: Line 143:
 
* [http://archives.postgresql.org/pgsql-hackers/2008-09/msg00576.php <nowiki>[Patch Review] Copy column storage parameters on CREATE TABLE LIKE/INHERITS</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-09/msg00576.php <nowiki>[Patch Review] Copy column storage parameters on CREATE TABLE LIKE/INHERITS</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-09/msg00824.php <nowiki>Re: Copy column storage parameters on CREATE TABLE LIKE/INHERITS</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-09/msg00824.php <nowiki>Re: Copy column storage parameters on CREATE TABLE LIKE/INHERITS</nowiki>]
}}
 
 
{{TodoItem
 
|CREATE OR REPLACE FUNCTION might leave dependent objects depending on the function in inconsistent state
 
* [http://archives.postgresql.org/pgsql-general/2008-08/msg00985.php indexes on functions and create or replace function]
 
}}
 
 
{{TodoItem
 
|Allow temporary tables to exist as empty by default in all sessions
 
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00006.php <nowiki>what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg01329.php <nowiki>idea: global temp tables</nowiki>]
 
* [http://archives.postgresql.org//pgsql-hackers/2009-05/msg00016.php <nowiki>Re: idea: global temp tables</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg01098.php <nowiki>global temporary tables</nowiki>]
 
 
}}
 
}}
  
Line 1,094: Line 148:
 
|Add OR REPLACE to CREATE LANGUAGE
 
|Add OR REPLACE to CREATE LANGUAGE
 
* [http://archives.postgresql.org/pgsql-patches/2008-05/msg00057.php <nowiki>Re: create or replace language</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2008-05/msg00057.php <nowiki>Re: create or replace language</nowiki>]
}}
 
 
{{TodoItem
 
|Allow the creation of "distinct" types
 
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01647.php <nowiki>Distinct types</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider analyzing temporary tables when they are first used in a query
 
|Autovacuum cannot analyze or vacuum temporary tables.
 
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00416.php <nowiki>autovacuum and temp tables support</nowiki>]
 
 
}}
 
}}
 
{{TodoEndSubsection}}
 
 
=== UPDATE ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|<nowiki>Allow UPDATE tab SET ROW (col, ...) = (SELECT...)</nowiki>
 
* [http://archives.postgresql.org/pgsql-hackers/2006-07/msg01308.php <nowiki>Re: [PATCHES] extension for sql update</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg00865.php <nowiki>UPDATE using sub selects</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2007-04/msg00315.php <nowiki>UPDATE using sub selects</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2008-03/msg00237.php <nowiki>Re: UPDATE using sub selects</nowiki>]
 
}}
 
 
{{TodoItem
 
|Research self-referential UPDATEs that see inconsistent row versions in read-committed mode
 
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00507.php <nowiki>Concurrently updating an updatable view</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg00016.php <nowiki>Re: Do we need a TODO? (was Re: Concurrently updating anupdatable view)</nowiki>]
 
}}
 
 
{{TodoItem
 
|Improve 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
 
* [http://archives.postgresql.org/pgsql-bugs/2008-09/msg00045.php <nowiki>BUG #4401: concurrent updates to a table blocks one update indefinitely</nowiki>]
 
* [http://archives.postgresql.org/pgsql-bugs/2009-07/msg00302.php <nowiki>BUG #4945: Parallel update(s) gone wild</nowiki>]
 
}}
 
 
{{TodoEndSubsection}}
 
 
=== ALTER ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|Have ALTER TABLE RENAME rename SERIAL sequence names
 
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php <nowiki>Re: newbie: renaming sequences task</nowiki>]
 
}}
 
 
{{TodoItemEasy
 
|Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME
 
* [http://archives.postgresql.org/pgsql-patches/2006-02/msg00168.php <nowiki>ALTER CONSTRAINT RENAME patch reverted</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add ALTER TABLE RENAME CONSTRAINT}}
 
 
{{TodoItem
 
|Have ALTER SEQUENCE RENAME rename the sequence name stored in the sequence table
 
* [http://archives.postgresql.org/pgsql-bugs/2007-09/msg00092.php <nowiki>BUG #3619: Renaming sequence does not update its 'sequence_name' field</nowiki>]
 
* [http://archives.postgresql.org/pgsql-bugs/2007-10/msg00007.php <nowiki>Re: BUG #3619: Renaming sequence does not update its 'sequence_name' field</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php <nowiki>Re: newbie: renaming sequences task</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add ALTER DOMAIN to modify the underlying data type}}
 
 
{{TodoItemEasy
 
|Allow ALTER TABLE to change constraint deferrability and actions}}
 
 
{{TodoItem
 
|Add missing object types for ALTER ... SET SCHEMA}}
 
 
{{TodoItem
 
|Allow ALTER TABLESPACE to move to different directories}}
 
 
{{TodoItem
 
|Allow 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.}}
 
 
{{TodoItem
 
|Have ALTER INDEX update the name of a constraint using that index}}
 
 
{{TodoItem
 
|Allow column display reordering by recording a display, storage, and permanent id for every column?
 
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00782.php <nowiki>Re: column ordering, was Re: [PATCHES] Enums patch v2</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg01029.php <nowiki>Column reordering in pg_dump</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow an existing index to be marked as a table's primary key
 
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg00500.php <nowiki>Setting a pre-existing index as a primary key</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow ALTER TYPE on composite types to perform operations similar to ALTER TABLE
 
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00245.php <nowiki>ALTER composite type does not work, but ALTER TABLE which ROWTYPE is used as a type - works fine</nowiki>]
 
}}
 
 
{{TodoItem
 
|Don't require table rewrite on ALTER TABLE ... ALTER COLUMN TYPE, when the old and new data types are binary compatible
 
* http://archives.postgresql.org/message-id/200903040137.n241bAUV035002@wwwmaster.postgresql.org
 
* [http://archives.postgresql.org/pgsql-patches/2006-10/msg00154.php <nowiki>Eliminating phase 3 requirement for varlen increases via ALTER COLUMN</nowiki>]
 
}}
 
 
{{TodoItem
 
|Reduce locking required for ALTER commands
 
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg00533.php <nowiki>ALTER TABLE SET STATISTICS requires AccessExclusiveLock</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg01083.php <nowiki>Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock</nowiki>]
 
* http://archives.postgresql.org/pgsql-hackers/2008-10/msg01248.php
 
* http://archives.postgresql.org/pgsql-hackers/2008-10/msg00242.php
 
}}
 
 
{{TodoEndSubsection}}
 
 
=== CLUSTER ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|Automatically 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.
 
* [http://archives.postgresql.org/pgsql-performance/2004-08/msg00350.php <nowiki>Equivalent praxis to CLUSTERED INDEX?</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00155.php <nowiki>Re: Grouped Index Tuples</nowiki>]
 
* http://community.enterprisedb.com/git/
 
* [http://archives.postgresql.org/pgsql-performance/2009-10/msg00346.php <nowiki>Re: maintain_cluster_order_v5.patch</nowiki>]
 
}}
 
 
{{TodoItemEasy
 
|Add default clustering to system tables
 
|To do this, determine the ideal cluster index for each system table and set the cluster setting during initdb.}}
 
 
{{TodoItem
 
|Improve CLUSTER performance by sorting to reduce random I/O
 
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg01371.php <nowiki>Our CLUSTER implementation is pessimal</nowiki>]
 
}}
 
 
{{TodoItemEasy
 
|Make CLUSTER VERBOSE more verbose.
 
|It is also used by new VACUUM FULL VERBOSE.}}
 
  
 
{{TodoEndSubsection}}
 
{{TodoEndSubsection}}
Line 1,238: Line 154:
 
=== COPY ===
 
=== COPY ===
 
{{TodoSubsection}}
 
{{TodoSubsection}}
 
{{TodoItem
 
|Allow 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.
 
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00572.php <nowiki>Re: VLDB Features</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow COPY on a newly-created table to skip WAL logging
 
|On crash recovery, the table involved in the COPY would be removed or have its heap and index files truncated.  One issue is that no other backend should be able to add to the table at the same time, which is something that is currently allowed.  This currently is done if the table is created inside the same transaction block as the COPY because no other backends can see the table.}}
 
 
{{TodoItem
 
|Allow COPY FROM to create index entries in bulk
 
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00811.php <nowiki>Batch update of indexes on data loading</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow COPY in CSV mode to control whether a quoted zero-length string is treated as NULL
 
|Currently this is always treated as a zero-length string, which generates an error when loading into an integer column
 
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00905.php <nowiki>Re: [PATCHES] allow CSV quote in NULL</nowiki>]
 
}}
 
 
{{TodoItem
 
|Improve COPY performance
 
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00954.php <nowiki>Re: 8.3 / 8.2.6 restore comparison</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow COPY to report errors sooner
 
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01169.php <nowiki>Timely reporting of COPY errors</nowiki>]
 
}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
 
|Improve bytea COPY format
 
|Improve bytea COPY format
 
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00192.php <nowiki>bytea vs. pg_dump</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00192.php <nowiki>bytea vs. pg_dump</nowiki>]
}}
 
 
{{TodoItem
 
|Allow COPY to handle other number formats eg. the German notation. Best would be something like WITH DECIMAL ','.
 
}}
 
 
{{TodoItem
 
|Allow a stalled COPY to exit if the backend is terminated
 
* [http://archives.postgresql.org/pgsql-bugs/2009-04/msg00067.php <nowiki>Re: possible bug not in open items</nowiki>]
 
 
}}
 
}}
  
Line 1,299: Line 175:
 
* http://wiki.postgresql.org/wiki/DefaultACL
 
* http://wiki.postgresql.org/wiki/DefaultACL
 
}}
 
}}
 
{{TodoItem
 
|Allow SERIAL sequences to inherit permissions from the base table?}}
 
 
{{TodoItem
 
|Allow dropping of a role that has connection rights
 
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00736.php <nowiki>DROP ROLE dependency tracking ...</nowiki>]
 
}}
 
{{TodoEndSubsection}}
 
 
=== DECLARE CURSOR ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|Prevent DROP TABLE from dropping a table referenced by its own open cursor?}}
 
 
{{TodoItem
 
|Provide some guarantees about the behavior of cursors that invoke volatile functions
 
* [http://archives.postgresql.org/message-id/20997.1244563664@sss.pgh.pa.us Re: Cursor with hold emits the same row more than once across commits in 8.3.7]
 
}}
 
 
{{TodoEndSubsection}}
 
 
=== INSERT ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|Allow INSERT/UPDATE of the system-generated oid value for a row}}
 
 
{{TodoItem
 
|In rules, allow VALUES() to contain a mixture of 'old' and 'new' references}}
 
 
{{TodoEndSubsection}}
 
 
=== SHOW/SET ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|Add SET PERFORMANCE_TIPS option to suggest INDEX, VACUUM, VACUUM ANALYZE, and CLUSTER}}
 
 
{{TodoItem
 
|Rationalize the discrepancy between settings that use values in bytes and SHOW that returns the object count
 
* [http://archives.postgresql.org/pgsql-docs/2008-07/msg00007.php <nowiki>Re: [ADMIN] shared_buffers and shmmax</nowiki>]
 
}}
 
 
{{TodoEndSubsection}}
 
  
 
=== LISTEN/NOTIFY ===
 
=== LISTEN/NOTIFY ===
Line 1,356: Line 186:
 
|Add optional textual message to NOTIFY
 
|Add optional textual message to NOTIFY
 
|This would allow an informational message to be added to the notify message, perhaps indicating the row modified or other custom information.}}
 
|This would allow an informational message to be added to the notify message, perhaps indicating the row modified or other custom information.}}
 
{{TodoItem
 
|Allow NOTIFY in rules involving conditionals}}
 
  
 
{{TodoEndSubsection}}
 
{{TodoEndSubsection}}
Line 1,365: Line 192:
 
See {{messageLink|357.1230492361@sss.pgh.pa.us|TODO items for window functions}}.
 
See {{messageLink|357.1230492361@sss.pgh.pa.us|TODO items for window functions}}.
 
{{TodoSubsection}}
 
{{TodoSubsection}}
{{TodoItem
 
|Support 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?}}
 
 
{{TodoItem
 
|Implement full support for window framing clauses.
 
|In addition to done clauses described in the [http://developer.postgresql.org/pgdocs/postgres/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS latest doc], these clauses are not implemented yet.
 
* RANGE BETWEEN ... PRECEDING/FOLLOWING
 
* EXCLUDE
 
}}
 
 
{{TodoItem
 
|Look at 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.
 
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00152.php <nowiki>tuplestore potential performance problem</nowiki>]
 
}}
 
 
 
{{TodoItem|Do we really need so much duplicated code between Agg and WindowAgg?}}
 
{{TodoItem|Do we really need so much duplicated code between Agg and WindowAgg?}}
 
{{TodoItem
 
|Teach planner to evaluate multiple windows in the optimal order.
 
|Currently windows are always evaluated in the query-specified order.
 
* http://archives.postgresql.org/message-id/3CDAD71E9D70417290FCF66F0178D1E1@amd64
 
}}
 
 
{{TodoItem
 
|Implement DISTINCT clause in window aggregates.
 
|Some proprietary RDBMSs have implemented it already, so it helps with porting from those.}}
 
  
 
{{TodoEndSubsection}}
 
{{TodoEndSubsection}}
Line 1,407: Line 206:
 
* http://people.planetpostgresql.org/greg/index.php?/archives/46-Updating-unique-columns.html
 
* http://people.planetpostgresql.org/greg/index.php?/archives/46-Updating-unique-columns.html
 
* [http://archives.postgresql.org/pgsql-hackers/2006-09/msg01458.php <nowiki>Re: Unique index: update error</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2006-09/msg01458.php <nowiki>Re: Unique index: update error</nowiki>]
}}
 
 
{{TodoItem
 
|Improve 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.
 
}}
 
 
{{TodoEndSubsection}}
 
 
=== Referential Integrity ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|Add MATCH PARTIAL referential integrity}}
 
 
{{TodoItem
 
|Change foreign key constraint for array -&gt; element to mean element in array?}}
 
 
{{TodoItem
 
|Fix problem when cascading referential triggers make changes on cascaded tables, seeing the tables in an intermediate state
 
* [http://archives.postgresql.org/pgsql-hackers/2005-09/msg00174.php <nowiki>Re: [PATCHES] Work-in-progress referential action trigger timing</nowiki>]
 
}}
 
 
{{TodoItem
 
|Optimize referential integrity checks
 
* [http://archives.postgresql.org/pgsql-performance/2005-10/msg00458.php <nowiki>Re: Effects of cascading references in foreign keys</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-04/msg00744.php <nowiki>Can't ri_KeysEqual() consider two nulls as equal?</nowiki>]
 
 
}}
 
}}
  
Line 1,439: Line 211:
  
 
== Server-Side Languages ==
 
== Server-Side Languages ==
 
{{TodoItem
 
|Add support for polymorphic arguments and return types to languages other than PL/PgSQL}}
 
 
{{TodoItem
 
|Add capability to create and call PROCEDURES}}
 
 
{{TodoItem
 
|Add support for OUT and INOUT parameters to languages other than PL/PgSQL}}
 
 
{{TodoItem
 
|Add more fine-grained specification of functions taking arbitrary data types
 
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00367.php <nowiki>RfD: more powerful &quot;any&quot; types</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add support for returning multiple result sets?
 
* [http://archives.postgresql.org/pgsql-general/2008-10/msg00454.php <nowiki>PL/pgSQL stored procedure returning multiple result sets (SELECTs)?</nowiki>]
 
}}
 
  
 
=== PL/pgSQL ===
 
=== PL/pgSQL ===
Line 1,466: Line 219:
 
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg00559.php <nowiki>proposal sql: labeled function params</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg00559.php <nowiki>proposal sql: labeled function params</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00880.php <nowiki>WIP: for 8.5 named and mixed notation support</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00880.php <nowiki>WIP: for 8.5 named and mixed notation support</nowiki>]
}}
 
 
{{TodoItem
 
|Allow handling of %TYPE arrays, e.g. tab.col%TYPE[]}}
 
 
{{TodoItem
 
|<nowiki>Allow listing of record column names, and access to record columns via variables, e.g. columns := r.(*), tval2 := r.(colname)</nowiki>
 
* [http://archives.postgresql.org/pgsql-patches/2005-07/msg00458.php <nowiki>Re: PL/PGSQL: Dynamic Record Introspection</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2006-05/msg00302.php <nowiki>Re: PL/PGSQL: Dynamic Record Introspection</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2006-06/msg00031.php <nowiki>Re: PL/PGSQL: Dynamic Record Introspection</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add support for SCROLL cursors}}
 
 
{{TodoItem
 
|Add support for WITH HOLD cursors}}
 
 
{{TodoItem
 
|Allow 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.
 
* [http://archives.postgresql.org/pgsql-hackers/2006-10/msg00070.php <nowiki>NULL and plpgsql rows</nowiki>]
 
 
}}
 
}}
  
Line 1,499: Line 230:
 
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00436.php <nowiki>Re: plpgsql and qualified variable names</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00436.php <nowiki>Re: plpgsql and qualified variable names</nowiki>]
 
* * http://archives.postgresql.org/message-id/603c8f070903061741l1f11ba59q783745cc3cb79dba@mail.gmail.com
 
* * http://archives.postgresql.org/message-id/603c8f070903061741l1f11ba59q783745cc3cb79dba@mail.gmail.com
}}
 
 
{{TodoItem
 
|Consider keeping separate cached copies when search_path changes
 
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg01009.php <nowiki>pl/pgsql Plan Invalidation and search_path</nowiki>]
 
 
}}
 
}}
  
Line 1,510: Line 236:
 
* [http://archives.postgresql.org/pgsql-bugs/2008-09/msg00004.php <nowiki>Bug in RETURN QUERY</nowiki>]
 
* [http://archives.postgresql.org/pgsql-bugs/2008-09/msg00004.php <nowiki>Bug in RETURN QUERY</nowiki>]
 
}}
 
}}
 
{{TodoItem
 
|Improve handling of NULL row values vs. NULL rows
 
* [http://archives.postgresql.org/pgsql-hackers/2008-09/msg01758.php <nowiki>Null row vs. row of nulls in plpgsql</nowiki>]
 
}}
 
 
{{TodoEndSubsection}}
 
 
=== PL/Perl ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|Allow data to be passed in native language formats, rather than only text
 
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00289.php <nowiki>plperl vs. bytea</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow regex operations in plperl using UTF8 characters in non-UTF8 encoded databases.}}
 
  
 
{{TodoEndSubsection}}
 
{{TodoEndSubsection}}
Line 1,533: Line 241:
 
=== PL/Python ===
 
=== PL/Python ===
 
{{TodoSubsection}}
 
{{TodoSubsection}}
 
{{TodoItem
 
|Add table function support}}
 
 
{{TodoItem
 
|Add tracebacks
 
* [http://archives.postgresql.org/pgsql-patches/2006-02/msg00288.php <nowiki>Re: plpython tracebacks</nowiki>]
 
}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
Line 1,547: Line 247:
 
* [http://archives.postgresql.org/pgsql-hackers/2009-07/msg01519.php <nowiki>WIP: plpython3</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-07/msg01519.php <nowiki>WIP: plpython3</nowiki>]
 
}}
 
}}
 
{{TodoItem
 
|Develop a trusted variant of PL/Python.}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
 
|Allow arrays as function arguments and return values.}}
 
|Allow arrays as function arguments and return values.}}
 
{{TodoItem
 
|Create a new restricted execution class that will allow passing function arguments in as locals.  Passing them as globals means functions cannot be called recursively.}}
 
 
{{TodoItem
 
|Functions cache the input and output functions for their arguments, so the following will make PostgreSQL unhappy:
 
  
 
  create table users (first_name text, last_name text);
 
  create table users (first_name text, last_name text);
Line 1,570: Line 261:
 
(slower?), or check if the structure of the argument has been
 
(slower?), or check if the structure of the argument has been
 
altered (is this possible, easy, quick?) and recreate cache.}}
 
altered (is this possible, easy, quick?) and recreate cache.}}
 
{{TodoItem
 
|Better documentation}}
 
 
{{TodoItem
 
|Add a DB-API compliant interface on top of the SPI interface.}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
|check encoding validity of values passed back to Postgres in function returns, trigger tuple changes, or SPI calls.}}
 
 
{{TodoEndSubsection}}
 
 
=== PL/Tcl ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|Add table function support}}
 
 
{{TodoItem
 
 
|check encoding validity of values passed back to Postgres in function returns, trigger tuple changes, or SPI calls.}}
 
|check encoding validity of values passed back to Postgres in function returns, trigger tuple changes, or SPI calls.}}
  
Line 1,594: Line 268:
  
 
== Clients ==
 
== Clients ==
 
{{TodoItem
 
|Add a function like pg_get_indexdef() that report more detailed index information
 
* [http://archives.postgresql.org/pgsql-bugs/2007-12/msg00166.php <nowiki>BUG #3829: Wrong index reporting from pgAdmin III (v1.8.0 rev 6766-6767)</nowiki>]
 
}}
 
 
=== pg_ctl ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|Allow pg_ctl to work properly with configuration files located outside the PGDATA directory
 
|pg_ctl can not read the pid file because it isn't located in the config directory but in the PGDATA directory.  The solution is to allow pg_ctl to read and understand postgresql.conf to find the data_directory value.
 
* [http://archives.postgresql.org/pgsql-bugs/2009-10/msg00024.php <nowiki>BUG #5103: &quot;pg_ctl -w (re)start&quot; fails with custom unix_socket_directory</nowiki>]
 
}}
 
 
{{TodoItem
 
|Have the postmaster write a random number to a file on startup that pg_ctl checks against the contents of a pg_ping response on its initial connection (without login)
 
|This will protect against connecting to an old instance of the postmaster in a different or deleted subdirectory.
 
* [http://archives.postgresql.org/pgsql-bugs/2009-10/msg00110.php <nowiki>Re: BUG #5118: start-status-insert-fatal</nowiki>]
 
* [http://archives.postgresql.org/pgsql-bugs/2009-10/msg00156.php <nowiki>Re: BUG #5118: start-status-insert-fatal</nowiki>]
 
}}
 
 
{{TodoItem
 
|Modify pg_ctl behavior and exit codes to make it easier to write an LSB conforming init script
 
|It may be desirable to condition some of the changes on a command-line switch, to avoid breaking existing scripts.  A Linux shell (sh) script is referenced which has been tested and seems to provide a high degree of conformance in multiple environments.  Study of this script might suggest areas where pg_ctl could be modified to make writing an LSB conforming script easier; however, some aspects of that script would be unnecessary with other suggested changes to pg_ctl, and discussion on the lists did not reach consensus on support for all aspects of this script.  Further discussion of particular changes is needed before beginning any work.
 
* [[Lsb_conforming_init_script|LSB conforming init script]]
 
These threads should be studied for other ideas on improvements:
 
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01390.php <nowiki>We should Axe /contrib/start-scripts</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01843.php <nowiki>Linux LSB init script</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00008.php <nowiki>Re: Linux LSB init script</nowiki>]
 
 
}}
 
 
{{TodoEndSubsection}}
 
 
=== psql ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|Have psql \ds show all sequences and their settings
 
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00916.php <nowiki>Re: TODO item: Have psql show current values for a sequence</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00401.php <nowiki>Quick patch: Display sequence owner</nowiki>]
 
}}
 
 
{{TodoItem
 
|Have \d on a sequence indicate if the sequences is owned by a table}}
 
 
{{TodoItem
 
|Move 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.
 
* [http://archives.postgresql.org/pgsql-hackers/2004-01/msg00191.php <nowiki>Re: psql \d option list overloaded</nowiki>]
 
}}
 
 
{{TodoItem
 
|Make psql's \d commands more consistent in its handling of schemas
 
* [http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php <nowiki>Re: psql and schemas</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consistently display privilege information for all objects in psql}}
 
 
{{TodoItem
 
|Add auto-expanded mode so expanded output is used if the row length is wider than the screen width.
 
|Consider using auto-expanded mode for backslash commands like \df+.}}
 
 
{{TodoItem
 
|Prevent tab completion of SET TRANSACTION from querying the database and therefore preventing the transaction isolation level from being set.
 
|Currently SET &lt;tab&gt; causes a database lookup to check all supported session variables.  This query causes problems because setting the transaction isolation level must be the first statement of a transaction.}}
 
 
{{TodoItem
 
|Add a \set variable to control whether \s displays line numbers
 
|Another option is to add \# which lists line numbers, and allows command execution.
 
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00255.php <nowiki>Re: psql possible TODO</nowiki>]
 
}}
 
 
{{TodoItem
 
|Prevent escape string warnings when object names have backslashes
 
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00227.php <nowiki>Psql command-line completion bug</nowiki>]
 
}}
 
 
{{TodoItem
 
|Have \d show child tables that inherit from the specified parent}}
 
 
{{TodoItem
 
|Include the symbolic SQLSTATE name in verbose error reports
 
* [http://archives.postgresql.org/pgsql-general/2007-09/msg00438.php <nowiki>Re: Checking is TSearch2 query is valid</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add prompt escape to display the client and server versions
 
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00310.php <nowiki>WIP patch for TODO Item: Add prompt escape to display the client and server versions</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add option to wrap column values at whitespace boundaries, rather than chopping them at a fixed width.
 
|Currently, &quot;wrapped&quot; format chops values into fixed widths.  Perhaps the word wrapping could use the same algorithm documented in the W3C specification.
 
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00404.php <nowiki>Re: psql wrapped format default for backslash-d commands</nowiki>]
 
* http://www.w3.org/TR/CSS21/tables.html#auto-table-layout}}
 
 
{{TodoItem
 
|Add &quot;auto&quot; expanded mode that outputs in expanded format if &quot;wrapped&quot; mode can't wrap the output to the screen width
 
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00417.php <nowiki>Re: psql wrapped format default for backslash-d commands</nowiki>]
 
}}
 
 
{{TodoItem
 
|Support the ReST table output format
 
|Details about the ReST format:  http://docutils.sourceforge.net/rst.html#reference-documentation
 
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg01007.php <nowiki>Proposal: new border setting in psql</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00518.php <nowiki>Re: Proposal: new border setting in psql</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00609.php <nowiki>Re: Proposal: new border setting in psql</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add option to print advice for people familiar with other databases
 
* [http://archives.postgresql.org/pgsql-hackers/2010-01/msg01845.php <nowiki>MySQL-ism help patch for psql</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider showing TOAST and index sizes in \dt+
 
* [http://archives.postgresql.org/pgsql-general/2010-01/msg00912.php <nowiki>\dt+ sizes don't include TOAST data</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow \dd to show constraint comments
 
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00436.php <nowiki>Re: More robust pg_hba.conf parsing/error logging</nowiki>]
 
* [http://archives.postgresql.org/pgsql-general/2009-09/msg00199.php <nowiki>comment on constraint</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add ability to edit views with \ev
 
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00023.php <nowiki>Adding \ev view editor?</nowiki>]
 
}}
 
{{TodoItem
 
|Add \dL to show languages
 
* [http://archives.postgresql.org/pgsql-hackers/2009-07/msg00915.php <nowiki>Re: [PATCH] Psql List Languages</nowiki>]
 
}}
 
 
{{TodoItemEasy
 
|Distinguish between unique indexes and unique constraints in \d+
 
* http://archives.postgresql.org/message-id/8780.1271187360@sss.pgh.pa.us
 
}}
 
 
{{TodoItem
 
|Fix FETCH_COUNT to handle SELECT ... INTO and WITH queries
 
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg01565.php
 
* http://archives.postgresql.org/pgsql-bugs/2010-05/msg00192.php
 
}}
 
 
{{TodoItem
 
|Prevent psql from sending remaining single-line multi-statement queries after reconnecting
 
* http://archives.postgresql.org/pgsql-bugs/2010-05/msg00159.php
 
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg01283.php
 
}}
 
 
{{TodoEndSubsection}}
 
  
 
=== pg_dump / pg_restore ===
 
=== pg_dump / pg_restore ===
Line 1,757: Line 276:
 
* {{MessageLink|20090723225940.E35D975331E@cvs.postgresql.org|Teach pg_dump to dump comments attached to the columns of a composite type.}}
 
* {{MessageLink|20090723225940.E35D975331E@cvs.postgresql.org|Teach pg_dump to dump comments attached to the columns of a composite type.}}
 
}}
 
}}
 
{{TodoItemEasy
 
|<nowiki>Add full object name to the tag field.  eg. for operators we need '=(integer, integer)', instead of just '='.</nowiki>}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
 
| Add comments to output indicating version of pg_dump and of the database server
 
| Add comments to output indicating version of pg_dump and of the database server
}}
 
 
{{TodoItem
 
|Add pg_dumpall custom format dumps?}}
 
 
{{TodoItem
 
|Avoid using platform-dependent locale names 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.
 
* http://archives.postgresql.org/message-id/21396.1241716688@sss.pgh.pa.us
 
}}
 
 
{{TodoItem
 
|Allow selection of individual object(s) of all types, not just tables}}
 
 
{{TodoItem
 
|In a selective dump, allow dumping of an object and all its dependencies}}
 
 
{{TodoItem
 
|Add options like pg_restore -l and -L to pg_dump}}
 
 
{{TodoItem
 
|Add support for multiple pg_restore -t options, like pg_dump
 
|pg_restore's -t switch is less useful than pg_dump's in quite a few ways: no multiple switches, no pattern matching, no ability to pick up indexes and other dependent items for a selected table.  It should be made to handle this switch just like pg_dump does.}}
 
 
{{TodoItem
 
|Stop dumping CASCADE on DROP TYPE commands in clean mode}}
 
 
{{TodoItem
 
|Allow pg_dump --clean to drop roles that own objects or have privileges
 
|tgl says: if this is about pg_dumpall, it's done as of 8.4.  If it's really about pg_dump, what does it mean?  pg_dump has no business dropping roles.}}
 
 
{{TodoItem
 
|Remove unnecessary function pointer abstractions in pg_dump source code}}
 
 
{{TodoItem
 
|Allow pg_dump to utilize multiple CPUs and I/O channels by dumping multiple objects simultaneously
 
|The difficulty with this is getting multiple dump processes to produce a single dump output file.  It also would require several sessions to share the same snapshot.
 
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00205.php <nowiki>pg_dump additional options for performance</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow pg_restore to load different parts of the COPY data for a single table simultaneously}}
 
 
{{TodoItem
 
|Remove 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.}}
 
 
{{TodoItem
 
|Allow pre/data/post files when schema and data are dumped separately, for performance reasons
 
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00205.php <nowiki>pg_dump additional options for performance</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2008-07/msg00185.php <nowiki>Re: pg_dump additional options for performance</nowiki>]
 
}}
 
 
{{TodoItem
 
|Refactor 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.
 
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg01031.php <nowiki>ALTER DATABASE vs pg_dump</nowiki>]
 
* [http://archives.postgresql.org/pgsql-bugs/2010-05/msg00010.php summary of the issues]
 
}}
 
 
{{TodoItem
 
|Change 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.}}
 
 
{{TodoItem
 
|Allow parallel restore of tar dumps
 
* [http://archives.postgresql.org/pgsql-hackers/2009-02/msg01154.php <nowiki>Re: parallel restore</nowiki>]
 
 
}}
 
}}
  
Line 1,840: Line 285:
 
=== ecpg ===
 
=== ecpg ===
 
{{TodoSubsection}}
 
{{TodoSubsection}}
 
{{TodoItem
 
|Docs
 
|Document differences between ecpg and the SQL standard and information about the Informix-compatibility module.}}
 
 
{{TodoItem
 
|Solve cardinality &gt; 1 for input descriptors / variables?}}
 
 
{{TodoItem
 
|Add a semantic check level, e.g. check if a table really exists}}
 
 
{{TodoItem
 
|fix handling of DB attributes that are arrays}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
 
|Implement SQLDA
 
|Implement SQLDA
 
|{{MessageLink|20100105163823.7C70B753FB7@cvs.postgresql.org|add sqlda support to ecpg in both native and compatibility mode}}
 
|{{MessageLink|20100105163823.7C70B753FB7@cvs.postgresql.org|add sqlda support to ecpg in both native and compatibility mode}}
}}
 
 
{{TodoItem
 
|Fix nested C comments}}
 
 
{{TodoItemEasy
 
|sqlwarn[6] should be 'W' if the PRECISION or SCALE value specified}}
 
 
{{TodoItem
 
|Make SET CONNECTION thread-aware, non-standard?}}
 
 
{{TodoItem
 
|Allow multidimensional arrays}}
 
 
{{TodoItem
 
|Implement COPY FROM STDIN}}
 
 
{{TodoItem
 
|Provide a way to specify size of a bytea parameter
 
* [http://archives.postgresql.org/message-id/200906192131.n5JLVoMo044178@wwwmaster.postgresql.org <nowiki>BUG #4866: ECPG and BYTEA</nowiki>]
 
}}
 
 
{{TodoItemEasy
 
|Fix small memory leaks in ecpg
 
|Memory leaks in a short running application like ecpg are not really a problem, but make debugging more complicated}}
 
 
{{TodoItem
 
|Allow re-usage of cursor name variables
 
* [http://archives.postgresql.org/message-id/20100329113435.GA3430@feivel.credativ.lan <nowiki>Problems with variable cursorname in ecpg</nowiki>]
 
 
}}
 
}}
  
Line 1,895: Line 298:
 
{{TodoItemDone
 
{{TodoItemDone
 
|Add PQescapeIdentifier()}}
 
|Add PQescapeIdentifier()}}
 
{{TodoItem
 
|Prevent 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}}
 
 
{{TodoItem
 
|Allow statement results to be automatically batched to the client
 
|Currently all statement results are transferred to the libpq client before libpq makes the results available to the application.  This feature would allow the application to make use of the first result rows while the rest are transferred, or held on the server waiting for them to be requested by libpq. One complexity is that a statement like SELECT 1/col could error out mid-way through the result set.}}
 
 
{{TodoItem
 
|Consider disallowing multiple queries in PQexec() as an additional barrier to SQL injection attacks
 
* [http://archives.postgresql.org/pgsql-hackers/2007-01/msg00184.php <nowiki>Re: InitPostgres and flatfiles question</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add PQexecf() that allows complex parameter substitution
 
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01803.php <nowiki>Last minute mini-proposal (I know, know) for PQexecf()</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add SQLSTATE and severity to errors generated within libpq itself
 
* [http://archives.postgresql.org/pgsql-interfaces/2007-11/msg00015.php <nowiki>v8.1: Error severity on libpq PGconn*</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add code to detect client encoding and locale from the operating system environment
 
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg01040.php <nowiki>Determining client_encoding from client locale</nowiki>]
 
}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
Line 1,928: Line 303:
 
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg00611.php <nowiki>TCP keepalive support for libpq</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg00611.php <nowiki>TCP keepalive support for libpq</nowiki>]
 
* [http://archives.postgresql.org/pgsql-committers/2010-06/msg00205.php commit log]
 
* [http://archives.postgresql.org/pgsql-committers/2010-06/msg00205.php commit log]
}}
 
 
{{TodoItem
 
|Add support for interface/ipaddress binding to libpq
 
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01811.php <nowiki>SR/libpq - outbound interface/ipaddress binding</nowiki>]
 
 
}}
 
}}
  
Line 1,938: Line 308:
  
 
== Triggers ==
 
== Triggers ==
 
{{TodoItem
 
|Improve 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.
 
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00876.php <nowiki>Re: BUG #4204: COPY to table with FK has memory leak</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg00464.php <nowiki>Scaling up deferred unique checks and the after trigger queue</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow 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.}}
 
 
{{TodoItem
 
|With 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.}}
 
 
{{TodoItem
 
|Allow statement-level triggers to access modified rows}}
 
 
{{TodoItem
 
|When 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
 
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg01883.php <nowiki>Statement-level triggers and inheritance</nowiki>]
 
}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
Line 1,966: Line 313:
 
* [http://archives.postgresql.org/pgsql-patches/2005-07/msg00107.php <nowiki>Column-level triggers</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2005-07/msg00107.php <nowiki>Column-level triggers</nowiki>]
 
}}
 
}}
 
{{TodoItem
 
|Allow AFTER triggers on system tables
 
|System tables are modified in many places in the backend without going through the executor and therefore not causing triggers to fire. To complete this item, the functions that modify system tables will have to fire triggers.}}
 
 
{{TodoItem
 
|Tighten trigger permission checks
 
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00564.php <nowiki>Security leak with trigger functions?</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow BEFORE INSERT triggers on views
 
* [http://archives.postgresql.org/pgsql-general/2007-02/msg01466.php <nowiki>Re: Why can't I put a BEFORE EACH ROW trigger on a view?</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add database and transaction-level triggers
 
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00451.php <nowiki>Proposal for db level triggers</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00620.php <nowiki>triggers on prepare, commit, rollback... ?</nowiki>]
 
}}
 
 
{{TodoItem
 
|Reduce locking requirements for creating a trigger
 
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00635.php <nowiki>Re: Change lock requirements for adding a trigger</nowiki>]
 
}}
 
 
== Inheritance ==
 
 
{{TodoItem
 
|Allow inherited tables to inherit indexes, UNIQUE constraints, and primary/foreign keys
 
* [http://archives.postgresql.org/pgsql-hackers/2010-05/msg00285.php <nowiki>Partitioning/inherited tables vs FKs</nowiki>]
 
}}
 
 
{{TodoItem
 
|Honor UNIQUE INDEX on base column in INSERTs/UPDATEs on inherited table, e.g.  INSERT INTO inherit_table (unique_index_col) VALUES (dup) should fail
 
|The main difficulty with this item is the problem of creating an index that can span multiple tables.}}
 
 
{{TodoItem
 
|Determine whether ALTER TABLE / SET SCHEMA should work on inheritance hierarchies (and thus support ONLY).  If yes, implement it.}}
 
 
{{TodoItem
 
|ALTER 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.}}
 
  
 
== Indexes ==
 
== Indexes ==
 
{{TodoItem
 
|Prevent 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.}}
 
 
{{TodoItem
 
|Allow the creation of on-disk bitmap indexes which can be quickly combined with other bitmap indexes
 
|Such indexes could be more compact if there are only a few distinct values. Such indexes can also be compressed.  Keeping such indexes updated can be costly.
 
* [http://archives.postgresql.org/pgsql-patches/2005-07/msg00512.php <nowiki>Re: Bitmap index AM</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg01107.php <nowiki>Bitmap index thoughts</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg00265.php <nowiki>Stream bitmaps</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01214.php <nowiki>Re: Bitmapscan changes - Requesting further feedback</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00013.php <nowiki>Updated bitmap index patch</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00741.php <nowiki>Reviewing new index types (was Re: [PATCHES] Updated bitmap indexpatch)</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01023.php <nowiki>Bitmap Indexes: request for feedback</nowiki>]
 
* http://archives.postgresql.org/message-id/800923.27831.qm@web29010.mail.ird.yahoo.com
 
}}
 
 
{{TodoItem
 
|Allow accurate statistics to be collected on indexes with more than one column or expression indexes, perhaps using per-index statistics
 
* [http://archives.postgresql.org/pgsql-performance/2006-10/msg00222.php <nowiki>Re: Simple join optimized badly?</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01131.php <nowiki>Stats for multi-column indexes</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00741.php <nowiki>Cross-column statistics revisited</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg01431.php <nowiki>Multi-Dimensional Histograms</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider having a larger statistics target for indexed columns and expression indexes.
 
}}
 
 
{{TodoItem
 
|Consider smaller indexes that record a range of values per heap page, rather than having one index entry for every heap row
 
|This is useful if the heap is clustered by the indexed values.
 
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00341.php <nowiki>Grouped Index Tuples</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg01264.php <nowiki>Grouped Index Tuples</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg00465.php <nowiki>Grouped Index Tuples / Clustered Indexes</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2007-03/msg00163.php <nowiki>Bitmapscan changes</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00014.php <nowiki>Re: GIT patch</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00487.php <nowiki>Re: Index Tuple Compression Approach?</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01589.php <nowiki>Re: Index AM change proposals, redux</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add REINDEX CONCURRENTLY, like CREATE INDEX CONCURRENTLY
 
|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.
 
* [http://archives.postgresql.org/pgsql-performance/2007-08/msg00289.php <nowiki>Re: When/if to Reindex</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow 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.
 
}}
 
 
{{TodoItem
 
|Consider sorting entries before inserting into btree index
 
* [http://archives.postgresql.org/pgsql-general/2008-01/msg01010.php <nowiki>Re: ATTN: Clodaldo was Performance problem. Could it be related to 8.3-beta4?</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow index scans to return matching index keys, not just the matching heap locations
 
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01657.php <nowiki>Re: Is this TODO item done?</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01477.php <nowiki>Index-only quals</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow creation of an index that can do comparisons to test if a value is between two column values
 
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00757.php <nowiki>Proposal: temporal extension &quot;period&quot; data type</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider 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.
 
}}
 
 
=== GIST ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|Add more GIST index support for geometric data types}}
 
 
{{TodoItem
 
|Allow GIST indexes to create certain complex index types, like digital trees (see Aoki)}}
 
 
{{TodoItem
 
|Fix performance issues in contrib/seg and contrib/cube GiST support
 
* [http://archives.postgresql.org/message-id/alpine.DEB.2.00.0904161633160.4053@aragorn.flymine.org GiST index performance]
 
* [http://archives.postgresql.org/message-id/alpine.DEB.2.00.0904221704470.22330@aragorn.flymine.org draft patch]
 
* [http://archives.postgresql.org/pgsql-performance/2009-05/msg00069.php <nowiki>Re: GiST index performance</nowiki>]
 
* [http://archives.postgresql.org/pgsql-performance/2009-06/msg00068.php <nowiki>GiST index performance</nowiki>]
 
}}
 
 
{{TodoEndSubsection}}
 
 
=== GIN ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|Support empty indexed values (such as zero-element arrays) properly
 
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00237.php contrib/intarray vs empty arrays]
 
* [http://archives.postgresql.org/pgsql-bugs/2009-05/msg00118.php BUG #4806: Bug with GiST index and empty integer array]
 
}}
 
 
{{TodoItem
 
|Behave correctly for cases where some elements of an indexed value are NULL
 
* [http://archives.postgresql.org/pgsql-hackers/2009-03/msg01003.php <nowiki>GIN versus zero-key queries</nowiki>]
 
}}
 
 
{{TodoItem
 
|Support queries that require a full scan
 
* [http://archives.postgresql.org/pgsql-general/2009-05/msg00402.php Issue report]
 
* [http://archives.postgresql.org/pgsql-general/2007-06/msg01132.php Older issue report]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-01/msg01581.php Original discussion of issue and proposed resolution]
 
}}
 
 
{{TodoEndSubsection}}
 
  
 
=== Hash ===
 
=== Hash ===
 
{{TodoSubsection}}
 
{{TodoSubsection}}
 
{{TodoItem
 
|Add UNIQUE capability to hash indexes}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
Line 2,140: Line 326:
 
* [http://archives.postgresql.org/pgsql-committers/2008-09/msg00154.php <nowiki>pgsql: Change hash indexes to store only the hash code rather than the</nowiki>]
 
* [http://archives.postgresql.org/pgsql-committers/2008-09/msg00154.php <nowiki>pgsql: Change hash indexes to store only the hash code rather than the</nowiki>]
 
}}
 
}}
 
{{TodoItem
 
|Add hash WAL logging for crash recovery}}
 
 
{{TodoItem
 
|Allow multi-column hash indexes}}
 
  
 
{{TodoEndSubsection}}
 
{{TodoEndSubsection}}
Line 2,159: Line 339:
 
|Improve information_schema's entries for precision and scale
 
|Improve information_schema's entries for precision and scale
 
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg01485.php <nowiki>Re: information_schema.columns changes needed for OLEDB</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg01485.php <nowiki>Re: information_schema.columns changes needed for OLEDB</nowiki>]
}}
 
 
== Sorting ==
 
 
{{TodoItem
 
|Consider whether duplicate keys should be sorted by block/offset
 
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00558.php <nowiki>Remove hacks for old bad qsort() implementations?</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider being smarter about memory and external files used during sorts
 
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg01101.php <nowiki>Sorting Improvements for 8.4</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00045.php <nowiki>Re: Sorting Improvements for 8.4</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider detoasting keys before sorting}}
 
 
== Fsync ==
 
 
{{TodoItem
 
|Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options
 
|Ideally this requires a separate test program that can be run at initdb time or optionally later.  Consider O_SYNC when O_DIRECT exists.}}
 
 
{{TodoItem
 
|Add program to test if fsync has a delay compared to non-fsync}}
 
 
{{TodoItem
 
|Consider sorting writes during checkpoint
 
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg00541.php <nowiki>Sorted writes in checkpoint</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2008-07/msg00050.php <nowiki>Re: Sorting writes during checkpoint</nowiki>]
 
 
}}
 
}}
  
 
== Cache Usage ==
 
== Cache Usage ==
 
{{TodoItem
 
|Speed up COUNT(*)
 
|We could use a fixed row count and a +/- count to follow MVCC visibility rules, or a single cached value could be used and invalidated if anyone modifies the table.  Another idea is to get a count directly from a unique index, but for this to be faster than a sequential scan it must avoid access to the heap to obtain tuple visibility information.}}
 
 
{{TodoItem
 
|Provide a way to calculate an &quot;estimated COUNT(*)&quot;
 
|Perhaps by using the optimizer's cardinality estimates or random sampling.
 
* [http://archives.postgresql.org/pgsql-hackers/2005-11/msg00943.php <nowiki>Re: Improving count(*)</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow data to be pulled directly from indexes
 
|Currently indexes do not have enough tuple visibility information to allow data to be pulled from the index without also accessing the heap.  One way to allow this is to set a bit on index tuples to indicate if a tuple is currently visible to all transactions when the first valid heap lookup happens.  This bit would have to be cleared when a heap tuple is expired.
 
Another idea is to maintain a bitmap of heap pages where all rows are visible to all backends, and allow index lookups to reference that bitmap to avoid heap lookups, perhaps the same bitmap we might add someday to determine which heap pages need vacuuming.  Frequently accessed bitmaps would have to be stored in shared memory.  One 8k page of bitmaps could track 512MB of heap pages.
 
A third idea would be for a heap scan to check if all rows are visible and if so set a per-table flag which can be checked by index scans.  Any change to the table would have to clear the flag.  To detect changes during the heap scan a counter could be set at the start and checked at the end --- if it is the same, the table has not been modified --- any table change would increment the counter.
 
* [http://archives.postgresql.org/pgsql-patches/2007-10/msg00166.php <nowiki>Re: [HACKERS] Including Snapshot Info with Indexes</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2008-01/msg00049.php <nowiki>Re: [HACKERS] Including Snapshot Info with Indexes</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg01094.php <nowiki>TODO item: Allow data to be pulled directly from indexes</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-09/msg00003.php <nowiki>Re: [PATCHES] VACUUM Improvements - WIP Patch</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider automatic caching of statements at various levels:
 
* Parsed query tree
 
* Query execute plan
 
* Query results
 
  
 
:
 
:
 
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg00823.php <nowiki>Cached Query Plans (was: global prepared statements)</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg00823.php <nowiki>Cached Query Plans (was: global prepared statements)</nowiki>]
}}
 
 
{{TodoItem
 
|Consider increasing internal areas (NUM_CLOG_BUFFERS) when shared buffers is increased
 
* [http://archives.postgresql.org/pgsql-hackers/2005-10/msg01419.php <nowiki>Re: slru.c race condition (was Re: TRAP: FailedAssertion(&quot;!((itemid)-&gt;lp_flags &amp; 0x01)&quot;,)</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00030.php <nowiki>clog_buffers to 64 in 8.3?</nowiki>]
 
* [http://archives.postgresql.org/pgsql-performance/2007-08/msg00024.php <nowiki>CLOG Patch</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider decreasing the amount of memory used by PrivateRefCount
 
|
 
* [http://archives.postgresql.org/pgsql-hackers/2006-11/msg00797.php <nowiki>PrivateRefCount (for 8.3)</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-01/msg00752.php <nowiki>Re: PrivateRefCount (for 8.3)</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider allowing higher priority queries to have referenced buffer cache pages stay in memory longer
 
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00562.php <nowiki>Re: How to keep a table in memory?</nowiki>]
 
 
}}
 
}}
  
Line 2,255: Line 358:
 
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg01045.php <nowiki>Feedback on getting rid of VACUUM FULL</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg01045.php <nowiki>Feedback on getting rid of VACUUM FULL</nowiki>]
 
}}
 
}}
 
{{TodoItem
 
|Auto-fill the free space map by scanning the buffer cache or by checking pages written by the background writer
 
* [http://archives.postgresql.org/pgsql-hackers/2006-02/msg01125.php <nowiki>Dead Space Map</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2006-03/msg00011.php <nowiki>Re: Automatic free space map filling</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider having single-page pruning update the visibility map
 
* <nowiki>https://commitfest.postgresql.org/action/patch_view?id=75</nowiki>
 
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg02344.php <nowiki>Re: visibility maps and heap_prune</nowiki>]
 
}}
 
 
{{TodoItem
 
|Improve tracking of total relation tuple counts now that vacuum doesn't always scan the whole heap
 
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg00531.php Partial vacuum versus pg_class.reltuples]
 
}}
 
 
{{TodoItem
 
|Bias 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}}
 
 
{{TodoItem
 
|Make FSM return free space based on table clustering, to assist in maintaining clustering?}}
 
 
{{TodoItem
 
|Consider a more compact data representation for dead tuple locations within VACUUM
 
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00143.php <nowiki>Re: Have vacuum emit a warning when it runs out of maintenance_work_mem</nowiki>]
 
}}
 
 
{{TodoItem
 
|Provide more information in order to improve user-side estimates of dead space bloat in relations
 
* [http://archives.postgresql.org/pgsql-general/2009-05/msg01039.php <nowiki>Re: Bloated Table</nowiki>]
 
}}
 
 
=== Auto-vacuum ===
 
{{TodoSubsection}}
 
 
{{TodoItemEasy
 
|Issue log message to suggest VACUUM FULL if a table is nearly empty?}}
 
 
{{TodoItem
 
|Prevent 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 do that.
 
* [http://archives.postgresql.org/pgsql-general/2007-06/msg01645.php <nowiki>Re: AutoVacuum Behaviour Question</nowiki>]
 
}}
 
 
{{TodoItem
 
|Prevent autovacuum from running if an old transaction is still running from the last vacuum
 
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00899.php <nowiki>Re: Autovacuum and OldestXmin</nowiki>]
 
}}
 
 
{{TodoItem
 
|Have free space allocation bias away from using trailing table pages
 
|This improves the chances of truncating the table during vacuum
 
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg01124.php <nowiki>FSM search modes</nowiki>]
 
}}
 
 
{{TodoItem
 
|Have autoanalyze of parent tables occur when child tables are modified
 
* http://archives.postgresql.org/message-id/AANLkTinx8lLTEKWcyEQ1rxVz6WMJVKNezfXW5TKnNAU6@mail.gmail.com
 
}}
 
 
{{TodoEndSubsection}}
 
 
== Locking ==
 
 
{{TodoItem
 
|Fix priority ordering of read and write light-weight locks
 
* [http://archives.postgresql.org/pgsql-hackers/2004-11/msg00893.php <nowiki>lwlocks and starvation</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2004-11/msg00905.php <nowiki>Re: lwlocks and starvation</nowiki>]
 
}}
 
 
{{TodoItem
 
|Fix problem when multiple subtransactions of the same outer transaction hold different types of locks, and one subtransaction aborts
 
* [http://archives.postgresql.org/pgsql-hackers/2006-11/msg01011.php <nowiki>FOR SHARE vs FOR UPDATE locks</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00001.php <nowiki>Re: FOR SHARE vs FOR UPDATE locks</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00435.php <nowiki>Re: [PATCHES] [pgsql-patches] Phantom Command IDs, updated patch</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00773.php <nowiki>Re: savepoints and upgrading locks</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow UPDATEs on only non-referential integrity columns not to conflict with referential integrity locks
 
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00073.php <nowiki>Referential Integrity and SHARE locks</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add idle_in_transaction_timeout GUC so locks are not held for long periods of time}}
 
 
{{TodoItem
 
|Improve deadlock detection when a page cleaning lock conflicts with a shared buffer that is pinned
 
* [http://archives.postgresql.org/pgsql-bugs/2008-01/msg00138.php <nowiki>BUG #3883: Autovacuum deadlock with truncate?</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00873.php <nowiki>Thoughts about bug #3883</nowiki>]
 
* [http://archives.postgresql.org/pgsql-committers/2008-01/msg00365.php <nowiki>Re: pgsql: Add checks to TRUNCATE, CLUSTER, and REINDEX to prevent</nowiki>]
 
}}
 
 
{{TodoItem
 
|Detect deadlocks involving LockBufferForCleanup()
 
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00873.php <nowiki>Thoughts about bug #3883</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider a lock timeout parameter
 
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00485.php <nowiki>SELECT ... FOR UPDATE [WAIT integer | NOWAIT] for 8.5</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider improving serialized transaction behavior to avoid anomalies
 
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00217.php <nowiki>Serializable Isolation without blocking</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg01136.php <nowiki>User-facing aspects of serializable transactions</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg00035.php <nowiki>Re: User-facing aspects of serializable transactions</nowiki>]
 
}}
 
 
== Startup Time Improvements ==
 
 
{{TodoItem
 
|Experiment with multi-threaded backend for backend creation
 
|This would prevent the overhead associated with process creation. Most operating systems have trivial process creation time compared to database startup overhead, but a few operating systems (Win32, Solaris) might benefit from threading.  Also explore the idea of a single session using multiple threads to execute a statement faster.}}
 
  
 
== Write-Ahead Log ==
 
== Write-Ahead Log ==
 
{{TodoItem
 
|Eliminate 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.
 
* [http://archives.postgresql.org/pgsql-hackers/2002-06/msg00655.php <nowiki>Re: Index Scans become Seq Scans after VACUUM ANALYSE</nowiki>]
 
}}
 
 
{{TodoItem
 
|When 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.}}
 
 
{{TodoItem
 
|Write 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.}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
 
|Allow WAL traffic to be streamed to another server for stand-by replication}}
 
|Allow WAL traffic to be streamed to another server for stand-by replication}}
 
{{TodoItem
 
|Reduce WAL traffic so only modified values are written rather than entire rows
 
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01589.php <nowiki>Reduction in WAL for UPDATEs</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow WAL information to recover corrupted pg_controldata
 
* [http://archives.postgresql.org/pgsql-patches/2006-06/msg00025.php <nowiki>Re: [HACKERS] pg_resetxlog -r flag</nowiki>]
 
}}
 
 
{{TodoItem
 
|Find a way to reduce rotational delay when repeatedly writing last WAL page
 
|Currently fsync of WAL requires the disk platter to perform a full rotation to fsync again. One idea is to write the WAL to different offsets that might reduce the rotational delay.
 
* [http://archives.postgresql.org/pgsql-hackers/2002-11/msg00483.php <nowiki>500 tpsQL + WAL log implementation</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow WAL logging to be turned off for a table, but the table might be dropped or truncated during crash recovery
 
|Allow tables to bypass WAL writes and just fsync() dirty pages on commit.  This should be implemented using ALTER TABLE, e.g. <nowiki>ALTER TABLE PERSISTENCE [ DROP | TRUNCATE | DEFAULT ]</nowiki>.  Tables using non-default logging should not use referential integrity with default-logging tables.  A table without dirty buffers during a crash could perhaps avoid the drop/truncate.
 
* [http://archives.postgresql.org/pgsql-hackers/2005-12/msg01016.php <nowiki>Re: [Bizgres-general] WAL bypass for INSERT, UPDATE and</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow WAL logging to be turned off for a table, but the table would avoid being truncated/dropped
 
|To do this, only a single writer can modify the table, and writes must happen only on new pages so the new pages can be removed during crash recovery.  Readers can continue accessing the table.  Such tables probably cannot have indexes.  One complexity is the handling of indexes on TOAST tables.
 
* [http://archives.postgresql.org/pgsql-hackers/2005-12/msg01016.php <nowiki>Re: [Bizgres-general] WAL bypass for INSERT, UPDATE and</nowiki>]
 
}}
 
 
{{TodoItem
 
|Speed 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.
 
* [http://archives.postgresql.org/pgsql-general/2007-12/msg00683.php <nowiki>Slow PITR restore</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00497.php <nowiki>Re: [GENERAL] Slow PITR restore</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg01279.php <nowiki>Read-ahead and parallelism in redo recovery</nowiki>]
 
}}
 
 
{{TodoItem
 
|Improve WAL concurrency by increasing lock granularity
 
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00556.php <nowiki>Reworking WAL locking</nowiki>]
 
}}
 
 
{{TodoItem
 
|Be more aggressive about creating WAL files
 
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg01325.php <nowiki>Re: PANIC caused by open_sync on Linux</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2004-07/msg01075.php <nowiki>PreallocXlogFiles</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2005-04/msg00556.php <nowiki>WAL/PITR additional items</nowiki>]
 
}}
 
 
{{TodoItem
 
|Have resource managers report the duration of their status changes
 
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg01468.php <nowiki>Recovery of Multi-stage WAL actions</nowiki>]
 
}}
 
 
{{TodoItem
 
|Move pgfoundry's xlogdump to /contrib and have it rely more closely on the WAL backend code
 
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00035.php <nowiki>xlogdump</nowiki>]
 
}}
 
 
{{TodoItem
 
|Close deleted WAL files held open in *nix by long-lived read-only backends
 
* [http://archives.postgresql.org/pgsql-hackers/2009-11/msg01754.php <nowiki>Deleted WAL files held open by backends in Linux</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg00060.php <nowiki>Re: Deleted WAL files held open by backends in Linux</nowiki>]
 
}}
 
 
== Optimizer / Executor ==
 
 
{{TodoItem
 
|Improve selectivity functions for geometric operators}}
 
 
{{TodoItem
 
|Precompile SQL functions to avoid overhead}}
 
 
{{TodoItem
 
|Create utility to compute accurate random_page_cost value}}
 
 
{{TodoItem
 
|Consider increasing the default values of from_collapse_limit, join_collapse_limit, and/or geqo_threshold
 
* [http://archives.postgresql.org/message-id/4136ffa0905210551u22eeb31bn5655dbe7c9a3aed5@mail.gmail.com from_collapse_limit vs. geqo_threshold]
 
}}
 
 
{{TodoItem
 
|Improve ability to display optimizer analysis using OPTIMIZER_DEBUG}}
 
 
{{TodoItem
 
|Have EXPLAIN ANALYZE issue NOTICE messages when the estimated and actual row counts differ by a specified percentage}}
 
 
{{TodoItem
 
|Have EXPLAIN ANALYZE report rows as floating-point numbers
 
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg01363.php <nowiki>explain analyze rows=%.0f</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg00108.php <nowiki>Re: explain analyze rows=%.0f</nowiki>]
 
}}
 
 
{{TodoItem
 
|Log statements where the optimizer row estimates were dramatically different from the number of rows actually found?}}
 
 
{{TodoItem
 
|Improve how ANALYZE computes in-doubt tuples
 
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00771.php <nowiki>VACUUM/ANALYZE counting of in-doubt tuples</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider compressed annealing to search for query plans
 
|This might replace GEQO.
 
* http://archives.postgresql.org/message-id/15658.1241278636%40sss.pgh.pa.us
 
}}
 
 
{{TodoItem
 
|Consider using a hash for joining to a large IN (VALUES ...) list
 
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00450.php <nowiki>Planning large IN lists</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow single batch hash joins to preserve outer pathkeys
 
* [http://archives.postgresql.org/pgsql-hackers/2008-09/msg00806.php Re: Potential Join Performance Issue]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]
 
}}
 
 
{{TodoItem
 
|"lazy" hash tables - look up only the tuples that are actually requested
 
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]
 
}}
 
 
{{TodoItem
 
|Avoid building the same hash table more than once during the same query
 
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]
 
}}
 
 
{{TodoItem
 
|Avoid hashing for distinct and then re-hashing for hash join
 
* [http://archives.postgresql.org/message-id/4136ffa0902191346g62081081v8607f0b92c206f0a@mail.gmail.com Re: Fixing Grittner's planner issues]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]
 
}}
 
 
{{TodoItem
 
|Allow hashing to be used on arrays, if the element type is hashable
 
* http://archives.postgresql.org/message-id/11087.1244905821@sss.pgh.pa.us
 
}}
 
 
{{TodoItem
 
|Improve use of expression indexes for ORDER BY
 
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01553.php <nowiki>Resjunk sort columns, Heikki's index-only quals patch, and bug #5000</nowiki>]
 
}}
 
 
== Background Writer ==
 
 
{{TodoItem
 
|Consider 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.}}
 
 
{{TodoItem
 
|Consider adding buffers the background writer finds reusable to the free list
 
* [http://archives.postgresql.org/pgsql-hackers/2007-04/msg00781.php <nowiki>Background LRU Writer/free list</nowiki>]
 
}}
 
 
{{TodoItem
 
|Automatically tune bgwriter_delay based on activity rather then using a fixed interval
 
* [http://archives.postgresql.org/pgsql-hackers/2007-04/msg00781.php <nowiki>Background LRU Writer/free list</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider whether increasing BM_MAX_USAGE_COUNT improves performance
 
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg01007.php <nowiki>Bgwriter LRU cleaning: we've been going at this all wrong</nowiki>]
 
}}
 
 
{{TodoItem
 
|Test to see if calling PreallocXlogFiles() from the background writer will help with WAL segment creation latency
 
* [http://archives.postgresql.org/pgsql-patches/2007-06/msg00340.php <nowiki>Re: Load Distributed Checkpoints, final patch</nowiki>]
 
}}
 
 
== Concurrent Use of Resources ==
 
 
{{TodoItem
 
|Do 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.
 
* [http://archives.postgresql.org/pgsql-hackers/2006-10/msg00820.php <nowiki>Asynchronous I/O Support</nowiki>]
 
* [http://archives.postgresql.org/pgsql-performance/2007-09/msg00255.php <nowiki>Re: random_page_costs - are defaults of 4.0 realistic for SCSI RAID 1</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00027.php <nowiki>There's random access and then there's random access</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2008-01/msg00170.php <nowiki>Bitmap index scan preread using posix_fadvise (Was: There's random access and then there's random access)</nowiki>]
 
The above patch is already applied as of 8.4, but it still remains to figure out how to handle plain indexscans effectively.
 
* [http://archives.postgresql.org//pgsql-hackers/2009-01/msg00806.php Problems with the patch submitted for posix_fadvise in index scans]
 
}}
 
 
{{TodoItem
 
|Experiment with multi-threaded backend for better I/O utilization
 
|This would allow a single query to make use of multiple I/O channels simultaneously.  One idea is to create a background reader that can pre-fetch sequential and index scan pages needed by other backends. This could be expanded to allow concurrent reads from multiple devices in a partitioned table.}}
 
 
{{TodoItem
 
|Experiment with multi-threaded backend for better CPU utilization
 
|This would allow several CPUs to be used for a single query, such as for sorting or query execution.
 
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00945.php <nowiki>Multi CPU Queries - Feedback and/or suggestions wanted!</nowiki>]
 
}}
 
 
{{TodoItem
 
|SMP scalability improvements
 
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00439.php <nowiki>Straightforward changes for increased SMP scalability</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00206.php <nowiki>Re: Reducing Transaction Start/End Contention</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00361.php <nowiki>Re: Reducing Transaction Start/End Contention</nowiki>]
 
}}
 
 
== TOAST ==
 
 
{{TodoItem
 
|Allow user configuration of TOAST thresholds
 
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00213.php <nowiki>Re: Proposed adjustments in MaxTupleSize and toastthresholds</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00082.php <nowiki>pg_lzcompress strategy parameters</nowiki>]
 
}}
 
 
{{TodoItem
 
|Reduce unnecessary cases of deTOASTing
 
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00895.php <nowiki>Re: [PATCHES] Eliminate more detoast copies for packed varlenas</nowiki>]
 
}}
 
 
{{TodoItem
 
|Reduce costs of repeat de-TOASTing of values
 
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg01096.php <nowiki>WIP patch: reducing overhead for repeat de-TOASTing</nowiki>]
 
}}
 
 
== Miscellaneous Performance ==
 
 
{{TodoItem
 
|Use mmap() rather than SYSV shared memory or to write WAL files?
 
|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.}}
 
 
{{TodoItem
 
|Consider mmap()'ing 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.}}
 
 
{{TodoItem
 
|Add a script to ask system configuration questions and tune postgresql.conf}}
 
 
{{TodoItem
 
|Consider ways of storing rows more compactly on disk:
 
* Reduce the row header size?
 
* Consider reducing on-disk varlena length from four bytes to two because a heap row cannot be more than 64k in length}}
 
 
{{TodoItem
 
|Consider transaction start/end performance improvements
 
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00948.php <nowiki>Reducing Transaction Start/End Contention</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00361.php <nowiki>Re: Reducing Transaction Start/End Contention</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow 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.
 
* [http://archives.postgresql.org/pgsql-general/2007-02/msg00493.php <nowiki>Priorities for users or queries?</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider increasing the minimum allowed number of shared buffers
 
* [http://archives.postgresql.org/pgsql-bugs/2008-02/msg00157.php <nowiki>Re: [PATCH] Don't bail with legitimate -N/-B options</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider if CommandCounterIncrement() can avoid its AcceptInvalidationMessages() call
 
* [http://archives.postgresql.org/pgsql-committers/2007-11/msg00585.php <nowiki>pgsql: Avoid incrementing the CommandCounter when</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider Cartesian joins when both relations are needed to form an indexscan qualification for a third relation
 
* [http://archives.postgresql.org/pgsql-performance/2007-12/msg00090.php <nowiki>Re: TB-sized databases</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider not storing a NULL bitmap on disk if all the NULLs are trailing
 
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00624.php <nowiki>Proposal for Null Bitmap Optimization(for Trailing NULLs)</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2007-12/msg00109.php <nowiki>Re: [HACKERS] Proposal for Null Bitmap Optimization(for TrailingNULLs)</nowiki>]
 
}}
 
 
{{TodoItem
 
|Sort large UPDATE/DELETEs so it is done in heap order
 
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg01119.php <nowiki>Possible future performance improvement: sort updates/deletes by ctid</nowiki>]
 
}}
 
 
{{TodoItem
 
|Allow one transaction to see tuples using the snapshot of another transaction
 
|This would assist multiple backends in working together.
 
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00400.php <nowiki>Transaction Snapshot Cloning</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider decreasing the I/O caused by updating tuple hint bits
 
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00847.php <nowiki>Hint Bits and Write I/O</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2008-07/msg00199.php <nowiki>Re: [HACKERS] Hint Bits and Write I/O</nowiki>]
 
}}
 
 
{{TodoItem
 
|Avoid 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
 
*  http://archives.postgresql.org/message-id/4BF701CF.2090205@agliodbs.com
 
*  http://archives.postgresql.org/pgsql-hackers/2010-06/msg00082.php
 
}}
 
 
{{TodoItem
 
|Avoid reading in b-tree pages when replaying vacuum records in hot standby mode
 
* [http://archives.postgresql.org/message-id/1272571938.4161.14739.camel@ebony <nowiki>Hot Standby tuning for btree_xlog_vacuum()</nowiki>]
 
}}
 
 
== Miscellaneous Other ==
 
 
{{TodoItem
 
|Deal with encoding issues for filenames in the server filesystem
 
* {{MessageLink|20090413184335.39BE.52131E4D@oss.ntt.co.jp|a proposed patch here}}
 
* {{MessageLink|8484.1244655656@sss.pgh.pa.us|some issues about it here}}
 
* {{MessageLink|20100107103740.97A5.52131E4D@oss.ntt.co.jp|Windows-specific patch here}}
 
}}
 
 
{{TodoItem
 
|Deal with encoding issues in the output of localeconv()
 
* [http://archives.postgresql.org/message-id/40c6d9160904210658y590377cfw6dbbecb53d2b8be0@mail.gmail.com bug report]
 
* [http://archives.postgresql.org/message-id/49EF8DA0.90008@tpf.co.jp draft patch]
 
* [http://archives.postgresql.org/message-id/21710.1243620986@sss.pgh.pa.us review of patch]
 
}}
 
 
{{TodoItem
 
|Provide schema name and other fields available from SQL GET DIAGNOSTICS in error reports
 
* [http://archives.postgresql.org/message-id/dcc563d10810211907n3c59a920ia9eb7cd2a6d5ea58@mail.gmail.com <nowiki>How to get schema name which violates fk constraint</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-11/msg00846.php <nowiki>patch - Report the schema along table name in a referential failure error message</nowiki>]
 
* {{MessageLink|3191.1263306359@sss.pgh.pa.us|Re: NOT NULL violation and error-message}}
 
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg00213.php <nowiki>the case for machine-readable error fields</nowiki>]
 
}}
 
 
{{TodoItemEasy
 
| Provide [http://developer.postgresql.org/pgdocs/postgres/libpq-connect.html#LIBPQ-CONNECT-FALLBACK-APPLICATION-NAME fallback_application_name] in contrib/pgbench, oid2name, and dblink.
 
* {{MessageLink|w2g9837222c1004070216u3bc46b3ahbddfdffdbfb46212@mail.gmail.com|fallback_application_name and pgbench}}
 
}}
 
  
 
== Source Code ==
 
== Source Code ==
 
{{TodoItem
 
|Add use of 'const' for variables in source tree}}
 
 
{{TodoItemEasy
 
|Remove warnings created by -Wcast-align}}
 
 
{{TodoItem
 
|Move platform-specific ps status display info from ps_status.c to ports}}
 
 
{{TodoItem
 
|Add optional CRC checksum to heap and index pages
 
|One difficulty is how to prevent hint bit changes from affecting the computed CRC checksum.
 
* http://archives.postgresql.org/message-id/19934.1226601952%40sss.pgh.pa.us
 
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00002.php <nowiki>Re: Block-level CRC checks</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01028.php <nowiki>double-buffering page writes</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00524.php <nowiki>Re: Block-level CRC checks</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg01101.php <nowiki>Re: Block-level CRC checks</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg00011.php <nowiki>Re: Block-level CRC checks</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider a faster CRC32 algorithm
 
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg01112.php
 
}}
 
 
{{TodoItem
 
|Allow cross-compiling by generating the zic database on the target system}}
 
 
{{TodoItem
 
|Improve NLS maintenance of libpgport messages linked onto applications}}
 
 
{{TodoItem
 
|Improve the module installation experience (/contrib, etc)
 
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg00132.php <nowiki>modules</nowiki>]
 
* {{messageLink|ca33c0a30807231640n6fb4035dod8121a18aa1fa29c@mail.gmail.com|Re: PostgreSQL extensions packaging}}
 
* {{messageLink|ca33c0a30804061349s41b4d8fcsa9c579454b27ecd2@mail.gmail.com|Database owner installable modules patch}}
 
* [http://archives.postgresql.org//pgsql-hackers/2009-03/msg00855.php <nowiki>Re: contrib function naming, and upgrade issues</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00912.php <nowiki>search_path vs extensions</nowiki>]
 
}}
 
 
{{TodoItem
 
|Use UTF8 encoding for NLS messages so all server encodings can read them properly}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
Line 2,767: Line 370:
 
* [http://archives.postgresql.org/pgsql-hackers/2006-09/msg02238.php <nowiki>Darwin stuff is getting deprecated</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2006-09/msg02238.php <nowiki>Darwin stuff is getting deprecated</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2006-10/msg00048.php <nowiki>Use dns_sd.h for Bonjour</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2006-10/msg00048.php <nowiki>Use dns_sd.h for Bonjour</nowiki>]
}}
 
 
{{TodoItem
 
|Allow creation of universal binaries for Darwin
 
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00884.php <nowiki>Getting to universal binaries for Darwin</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider GnuTLS if OpenSSL license becomes a problem
 
* [http://archives.postgresql.org/pgsql-patches/2006-05/msg00040.php <nowiki>[PATCH] Add support for GnuTLS</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg01213.php <nowiki>TODO: GNU TLS</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider making NAMEDATALEN more configurable in future releases}}
 
 
{{TodoItem
 
|Research use of signals and sleep wake ups
 
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00003.php <nowiki>Restartable signals 'n all that</nowiki>]
 
 
}}
 
}}
  
Line 2,791: Line 375:
 
|Add automated check for invalid C++ source code constructs
 
|Add automated check for invalid C++ source code constructs
 
* [http://archives.postgresql.org/pgsql-patches/2007-07/msg00056.php <nowiki>Re: SPI-header-files safe for C++-compiler</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2007-07/msg00056.php <nowiki>Re: SPI-header-files safe for C++-compiler</nowiki>]
}}
 
 
{{TodoItem
 
|Allow C++ code to more easily access backend code
 
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00302.php <nowiki>Mostly Harmless: Welcoming our C++ friends</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider simplifying how memory context resets handle child contexts
 
* [http://archives.postgresql.org/pgsql-patches/2007-08/msg00067.php <nowiki>Re: Memory leak in nodeAgg</nowiki>]
 
}}
 
 
{{TodoItem
 
|Create three versions of libpgport to simplify client code
 
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00154.php <nowiki>8.4 TODO item: make src/port support libpq and ecpg directly</nowiki>]
 
}}
 
 
{{TodoItem
 
|Improve detection of shared memory segments being used by others by checking the SysV shared memory field 'nattch'
 
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00656.php <nowiki>postgresql in FreeBSD jails: proposal</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00673.php <nowiki>Re: postgresql in FreeBSD jails: proposal</nowiki>]
 
}}
 
 
{{TodoItem
 
|Implement the non-threaded Avahi service discovery protocol
 
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00939.php <nowiki>Re: [PATCHES] Avahi support for Postgresql</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2008-02/msg00097.php <nowiki>Re: Avahi support for Postgresql</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg01211.php <nowiki>Re: [PATCHES] Avahi support for Postgresql</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2008-04/msg00001.php <nowiki>Re: [HACKERS] Avahi support for Postgresql</nowiki>]
 
 
}}
 
}}
  
Line 2,825: Line 380:
 
|Allow table and index WITH options to be specified via hooks, for use with plugins like GiST index methods
 
|Allow table and index WITH options to be specified via hooks, for use with plugins like GiST index methods
 
* {{MessageLink|20090105171428.77B29754A17@cvs.postgresql.org|Change the reloptions machinery to use a table-based parser}}
 
* {{MessageLink|20090105171428.77B29754A17@cvs.postgresql.org|Change the reloptions machinery to use a table-based parser}}
}}
 
 
{{TodoItem
 
|Reduce data row alignment requirements on some 64-bit systems
 
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00369.php <nowiki>[WIP] Reduce alignment requirements on 64-bit systems.</nowiki>]
 
}}
 
 
{{TodoItem
 
|Restructure TOAST internal storage format for greater flexibility
 
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00049.php <nowiki>Re: PG_PAGE_LAYOUT_VERSION 5 - time for change</nowiki>]
 
 
}}
 
}}
  
Line 2,841: Line 386:
 
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg00401.php <nowiki>Re: Re: [Pg-migrator-general] Composite types break pg_migrated tables</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg00401.php <nowiki>Re: Re: [Pg-migrator-general] Composite types break pg_migrated tables</nowiki>]
 
}}
 
}}
 
{{TodoItem
 
| Add regression tests for pg_dump/restore
 
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01967.php <nowiki>"make install-check-pg_dump" target in src/regress]</nowiki>]
 
}}
 
 
=== Documentation ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|Convert single quotes to apostrophes in the PDF documentation
 
* [http://archives.postgresql.org/pgsql-docs/2007-12/msg00059.php <nowiki>SGML docs and pdf single-quotes</nowiki>]
 
}}
 
 
{{TodoItem
 
|Provide a manpage for postgresql.conf
 
* {{messageLink|20080819194311.GH4428@alvh.no-ip.org|A smaller default postgresql.conf}}
 
* {{messageLink|200808211910.37524.peter_e@gmx.net|A smaller default postgresql.conf}}
 
}}
 
 
{{TodoItem
 
|Change the manpage-generating toolchain to use the new XML-based docbook2x tools
 
* {{messageLink|200808211910.37524.peter_e@gmx.net|A smaller default postgresql.conf}}
 
}}
 
 
{{TodoItem
 
|Consider changing documentation format from SGML to XML
 
* [http://archives.postgresql.org/pgsql-docs/2006-12/msg00152.php <nowiki>Re: Authoring Tools WAS: Switching to XML</nowiki>]
 
}}
 
 
{{TodoItem
 
|Document support for N<nowiki>' '</nowiki> national character string literals, if it matches the SQL standard
 
* http://archives.postgresql.org/message-id/1275895438.1849.1.camel@fsopti579.F-Secure.com
 
}}
 
 
{{TodoEndSubsection}}
 
  
 
=== /contrib/pg_upgrade ===
 
=== /contrib/pg_upgrade ===
 
{{TodoSubsection}}
 
{{TodoSubsection}}
 
{{TodoItem
 
|Remove copy_dir() code, or use it
 
}}
 
 
{{TodoItem
 
|Handle large object comments
 
|This is difficult to do because the large object doesn't exist when --schema-only is loaded.
 
}}
 
 
{{TodoItem
 
|Consider using pg_depend for checking object usage in version.c
 
}}
 
 
{{TodoItem
 
|If reindex is necessary, allow it to be done in parallel with pg_dump custom format
 
}}
 
 
{{TodoItem
 
|Migrate pg_statistic by dumping it out as a flat file, so analyze is not necessary
 
|pg_class.oid is not preserved so schema.tablename must be used.
 
}}
 
 
{{TodoItem
 
|Improve testing, perhaps using the buildfarm
 
|The buildfarm has access to multiple versions of PostgreSQL.
 
}}
 
  
 
{{TodoEndSubsection}}
 
{{TodoEndSubsection}}
Line 2,912: Line 394:
 
=== Windows ===
 
=== Windows ===
 
{{TodoSubsection}}
 
{{TodoSubsection}}
 
{{TodoItem
 
|Remove configure.in check for link failure when cause is found}}
 
 
{{TodoItem
 
|Remove readdir() errno patch when runtime/mingwex/dirent.c rev 1.4 is released}}
 
 
{{TodoItem
 
|Allow psql to use readline once non-US code pages work with backslashes}}
 
 
{{TodoItem
 
|Fix problem with shared memory on the Win32 Terminal Server}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
Line 2,929: Line 399:
 
* [http://archives.postgresql.org/pgsql-general/2007-08/msg01377.php <nowiki>FATAL: could not reattach to shared memory (Win32)</nowiki>]
 
* [http://archives.postgresql.org/pgsql-general/2007-08/msg01377.php <nowiki>FATAL: could not reattach to shared memory (Win32)</nowiki>]
 
* [http://archives.postgresql.org/message-id/13271.1241561721@sss.pgh.pa.us <nowiki>Re: "could not reattach to shared memory" captured in buildfarm</nowiki>]
 
* [http://archives.postgresql.org/message-id/13271.1241561721@sss.pgh.pa.us <nowiki>Re: "could not reattach to shared memory" captured in buildfarm</nowiki>]
}}
 
 
{{TodoItem
 
|Improve signal handling
 
* [http://archives.postgresql.org/pgsql-patches/2005-06/msg00027.php <nowiki>Simplify Win32 Signaling code</nowiki>]
 
}}
 
 
{{TodoItem
 
|Convert MSVC build system to remove most batch files
 
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00961.php <nowiki>MSVC build system</nowiki>]
 
}}
 
 
{{TodoItem
 
|Support pgxs when using MSVC}}
 
 
{{TodoItem
 
|Fix MSVC NLS support, like for to_char()
 
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00485.php <nowiki>NLS on MSVC  strikes back!</nowiki>]
 
* [http://archives.postgresql.org/pgsql-patches/2008-02/msg00038.php <nowiki>Fix for 8.3 MSVC locale (Was  [HACKERS] NLS on MSVC strikes back!)</nowiki>]
 
 
}}
 
}}
  
Line 2,953: Line 404:
 
|Fix locale-aware handling (e.g. monetary) for specific server/client encoding combinations
 
|Fix locale-aware handling (e.g. monetary) for specific server/client encoding combinations
 
* [http://archives.postgresql.org/pgsql-general/2009-04/msg00799.php <nowiki>trouble with to_char('L')</nowiki>]
 
* [http://archives.postgresql.org/pgsql-general/2009-04/msg00799.php <nowiki>trouble with to_char('L')</nowiki>]
}}
 
 
{{TodoItem
 
|Find a correct rint() substitute on Windows
 
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00808.php <nowiki>Minor bug in src/port/rint.c</nowiki>]
 
 
}}
 
}}
  
Line 2,964: Line 410:
 
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00437.php <nowiki>Summary of some postgres portability issues</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00437.php <nowiki>Summary of some postgres portability issues</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00440.php <nowiki>Re: Windows 64-bit work in progress patch</nowiki>] }}
 
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00440.php <nowiki>Re: Windows 64-bit work in progress patch</nowiki>] }}
 
{{TodoItem
 
|Fix global namespace issues when using multiple terminal server sessions
 
* [http://archives.postgresql.org/message-id/48F3BFCC.8030107@dunslane.net problems with Windows global namespace]}}
 
 
{{TodoItem
 
|Change from the current autoconf/gmake build system to cmake
 
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg01869.php <nowiki>About CMake (was Re: [COMMITTERS] pgsql: Append major version number and for libraries soname major)</nowiki>]
 
}}
 
 
{{TodoItem
 
|Improve consistency of path separator usage
 
* http://archives.postgresql.org/message-id/49C0BDC5.4010002@hagander.net
 
}}
 
  
 
{{TodoItemDone
 
{{TodoItemDone
Line 2,985: Line 417:
  
 
{{TodoEndSubsection}}
 
{{TodoEndSubsection}}
 
=== Wire Protocol Changes ===
 
{{TodoSubsection}}
 
 
{{TodoItem
 
|Allow dynamic character set handling}}
 
 
{{TodoItem
 
|Add decoded type, length, precision}}
 
 
{{TodoItem
 
|Use compression?}}
 
 
{{TodoItem
 
|Update clients to use data types, typmod, schema.table.column names of result sets using new statement protocol}}
 
 
{{TodoEndSubsection}}
 
 
== Exotic Features ==
 
 
{{TodoItem
 
|Add pre-parsing phase that converts non-ISO syntax to supported syntax
 
|This could allow SQL written for other databases to run without modification.}}
 
 
{{TodoItem
 
|Allow plug-in modules to emulate features from other databases}}
 
 
{{TodoItem
 
|Add 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 &quot;packages&quot; syntax at all.
 
* [http://archives.postgresql.org/pgsql-hackers/2006-08/msg00384.php <nowiki>proposal for PL packages for 8.3.</nowiki>]
 
}}
 
 
{{TodoItem
 
|Consider allowing control of upper/lower case folding of unquoted identifiers
 
* [http://archives.postgresql.org/pgsql-hackers/2004-04/msg00818.php <nowiki>Bringing PostgreSQL torwards the standard regarding case folding</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2006-10/msg01527.php <nowiki>Re: [SQL] Case Preservation disregarding case sensitivity?</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00849.php <nowiki>TODO Item: Consider allowing control of upper/lower case folding of unquoted,  identifiers</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00415.php <nowiki>Identifier case folding notes</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00415.php <nowiki>Identifier case folding notes</nowiki>]
 
}}
 
 
{{TodoItem
 
|Add autonomous transactions
 
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00893.php <nowiki>autonomous transactions</nowiki>]
 
}}
 
 
{{TodoItem
 
|Give query progress indication
 
* [[Query progress indication]]
 
}}
 
 
{{TodoItem
 
|Rethink our type system
 
* [[Rethinking datatypes]]
 
}}
 
 
== Features We Do ''Not'' Want ==
 
 
{{TodoItem
 
|All 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.}}
 
 
{{TodoItem
 
|Optimizer hints (not wanted)
 
|Optimizer hints are used to work around problems in the optimizer and introduce upgrade and maintenance issues.  We would rather have the problems reported and fixed.  We have discussed a more sophisticated system of per-class cost adjustment instead, but a specification remains to be developed.
 
* [http://archives.postgresql.org/pgsql-hackers/2006-08/msg00506.php <nowiki>Re: An Idea for planner hints</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2006-10/msg00517.php <nowiki>Index Tuning Features</nowiki>]
 
* [http://archives.postgresql.org/pgsql-hackers/2006-10/msg00663.php <nowiki>Re: [PERFORM] Hints proposal</nowiki>]
 
}}
 
 
{{TodoItem
 
|Embedded 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.}}
 
 
{{TodoItem
 
|Obfuscated 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.
 
* [http://archives.postgresql.org/pgsql-general/2008-09/msg00668.php <nowiki>Obfuscated stored procedures (was Re: Oracle and Postgresql)</nowiki>]
 
}}
 
 
{{TodoItem
 
|Indeterminate 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.
 
* [http://archives.postgresql.org/pgsql-hackers/2010-03/msg00297.php <nowiki>Re: SQL compatibility reminder: MySQL vs PostgreSQL</nowiki>]
 
}}
 
  
 
</div>
 
</div>
  
 
[[Category:Todo]]
 
[[Category:Todo]]

Revision as of 06:25, 10 August 2010

This list contains all PostgreSQL bugs and features requests that were solved in 9.0. There is a Todo page too for bugs and features that are still not solved.

Administration

[D] Completed itemAllow more complex user/database default GUC settings
Currently ALTER USER and ALTER DATABASE support per-user and per-database defaults. Consider adding per-user-and-database defaults so things like search_path can be defaulted for a specific user connecting to a specific database.
[D] Completed itemAllow custom variables to be created only by super-users but modified by ordinary uses, where appropriate
[D] Completed itemAllow the client to set an application_name to appear in pg_stat_activity
[D] Completed itemAllow server-side enforcement of password policies
Password checks might include password complexity or non-reuse of passwords. This facility will require the client to send password creation/changes to the server in plain-text, not MD5.

Tablespaces

Point-In-Time Recovery (PITR)

[D] Completed itemAllow a warm standby system to also allow read-only statements

Standby server mode

[D] Completed item Redefine smart shutdown in standby mode to exist as soon as all read-only connections are gone.
[D] Completed item Consider changing the calculation of superused_reserved_connections so that replication connections don't consume superuser_reserved_connections slots.

Data Types

Dates and Times

[D] Completed itemRevise the src/timezone/tznames abbreviation files:

Binary Data

[D] Completed itemAdd security checks for large objects

XML

[D] Completed itemInline ORDER BY for XMLAGG. Example: "... XMLAGG(XMLELEMENT(...) ORDER BY col1) ..." (should be made to work with all aggregate functions)

Functions

[D] Completed itemAdd functions to get/set bit values
[D] Completed itemAdd missing operators for geometric data types
Some geometric types do not have the full suite of geometric operators, e.g. box @> point
[D] Completed itemAdd has_sequence_privilege()

SQL Commands

[D] Completed itemAllow EXPLAIN output to be more easily processed by scripts, perhaps XML
[D] Completed itemForbid COMMENT on columns of an index
Postgres currently allows comments to be placed on the columns of an index, but pg_dump doesn't handle them and the column names themselves are implementation-dependent.

CREATE

COPY

[D] Completed itemImprove bytea COPY format

GRANT/REVOKE

[D] Completed itemAllow GRANT/REVOKE permissions to be applied to all schema objects with one command
The proposed syntax is: GRANT SELECT ON ALL TABLES IN public TO phpuser; GRANT SELECT ON NEW TABLES IN public TO phpuser;
[D] Completed itemAllow GRANT/REVOKE permissions to be inherited by objects based on schema permissions

LISTEN/NOTIFY

[D] Completed itemAllow LISTEN/NOTIFY to store info in memory rather than tables
Currently LISTEN/NOTIFY information is stored in pg_listener. Storing such information in memory would improve performance.
[D] Completed itemAdd optional textual message to NOTIFY
This would allow an informational message to be added to the notify message, perhaps indicating the row modified or other custom information.

Window Functions

See TODO items for window functions.

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

Integrity Constraints

Keys

[D] Completed itemAllow DEFERRABLE UNIQUE constraints
This would allow UPDATE tab SET col = col + 1 to work if col has a unique index. Currently, uniqueness checks are done while the command is being executed, rather than at the end of the statement or transaction.

Server-Side Languages

PL/pgSQL

[D] Completed itemAllow function parameters to be passed by name, get_employee_salary(12345 AS emp_id, 2001 AS tax_year)
[D] Completed itemReview handling of MOVE and FETCH
[D] Completed itemImprove logic of determining if an identifier is a variable or a column name
[D] Completed itemImprove PL/pgSQL's ability to cope with rowtypes containing dropped columns

PL/Python

[D] Completed itemAdd support for Python 3
[D] Completed itemAllow arrays as function arguments and return values.
create table users (first_name text, last_name text);
create function user_name(user) returns text as 'mycode' language plpython;
select user_name(user) from users;
alter table add column user_id integer;
select user_name(user) from users;

You have to drop and create the function(s) each time its arguments are modified (not nice), or don't cache the input and output functions (slower?), or check if the structure of the argument has been altered (is this possible, easy, quick?) and recreate cache.}}

[D] Completed itemcheck encoding validity of values passed back to Postgres in function returns, trigger tuple changes, or SPI calls.

Clients

pg_dump / pg_restore

[D] Completed itemAdd dumping of comments on composite type columns
[D] Completed item Add comments to output indicating version of pg_dump and of the database server

ecpg

libpq

[D] Completed itemAdd PQescapeIdentifier()
[D] Completed itemAdd keepalive support to libpq

Triggers

[D] Completed itemSupport triggers on columns

Indexes

Hash

[D] Completed itemPack hash index buckets onto disk pages more efficiently
Currently only one hash bucket can be stored on a page. Ideally several hash buckets could be stored on a single page and greater granularity used for the hash algorithm. However, the binary searching within a hash page probably renders this issue moot.

Catalogs

[D] Completed itemImprove performance of information_schema views
[D] Completed itemImprove information_schema's entries for precision and scale

Cache Usage

}}

Vacuum

[D] Completed itemImprove VACUUM FULL's speed when major data movement is needed
For large table adjustments during VACUUM FULL, it would be faster to cluster or reindex rather than update the indexes piecemeal as it does now. Also, this behavior tends to bloat the indexes.

Write-Ahead Log

[D] Completed itemAllow WAL traffic to be streamed to another server for stand-by replication

Source Code

[D] Completed itemUpdate Bonjour to work with newer cross-platform SDK
[D] Completed itemAdd automated check for invalid C++ source code constructs
[D] Completed itemAllow table and index WITH options to be specified via hooks, for use with plugins like GiST index methods
[D] Completed itemAllow setting of system oids during object creation, for use by pg_migrator

/contrib/pg_upgrade

Windows

[D] Completed itemDiagnose problem where shared memory can sometimes not be attached by postmaster children
[D] Completed itemFix locale-aware handling (e.g. monetary) for specific server/client encoding combinations
[D] Completed itemReduce compiler warnings on 64-bit Windows
[D] Completed itemAllow compilation using MSVC 2008