Restructure TODO sections.
authorBruce Momjian
Mon, 4 Jul 2005 17:00:32 +0000 (17:00 +0000)
committerBruce Momjian
Mon, 4 Jul 2005 17:00:32 +0000 (17:00 +0000)
doc/TODO
doc/src/FAQ/TODO.html

index 394ea9129ec7b2546cc0bf5252673c1db0827b53..34256dc2b2eb39749c1a4b14ebe781786095f054 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -2,7 +2,7 @@
 PostgreSQL TODO List
 ====================
 Current maintainer:    Bruce Momjian ([email protected])
-Last updated:      Mon Jul  4 08:32:37 EDT 2005
+Last updated:      Mon Jul  4 13:00:23 EDT 2005
 
 The most recent version of this document can be viewed at
 http://www.postgresql.org/docs/faqs.TODO.html.
@@ -22,12 +22,6 @@ Administration
 * Remove behavior of postmaster -o after making postmaster/postgres
   flags unique
 * Allow limits on per-db/role connections
-* Allow server log information to be output as INSERT statements
-
-  This would allow server log information to be easily loaded into
-  a database for analysis.
-
-* Prevent dropping user that still owns objects, or auto-drop the objects
 * Allow pooled connections to list all prepared queries
 
   This would allow an application inheriting a pooled connection to know
@@ -35,109 +29,119 @@ Administration
 
 * Allow major upgrades without dump/reload, perhaps using pg_upgrade 
   [pg_upgrade]
-* Allow 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;
-
-* Allow GRANT/REVOKE permissions to be inherited by objects based on
-  schema permissions
 * Check for unreferenced table files created by transactions that were
   in-progress when the server terminated abruptly
-* Allow reporting of which objects are in which tablespaces
+* Allow administrators to safely terminate individual sessions either
+  via an SQL function or SIGTERM 
 
-  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.
+  Currently SIGTERM of a backend can lead to lock table corruption.
 
-* 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
+* Prevent dropping user that still owns objects, or auto-drop the objects
+* Set proper permissions on non-system schemas during db creation
 
-  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.
+  Currently all schemas are owned by the super-user because they are
+  copied from the template1 database.
 
-* Add a GUC variable to control the tablespace for temporary objects and
-  sort files
+* -Add the client IP address and port to pg_stat_activity
+* Support table partitioning that allows a single table to be stored
+  in subtables that are partitioned based on the primary key or a WHERE
+  clause
 
-  It could start with a random tablespace from a supplied list and cycle
-  through the list.
 
-* Add ability to monitor the use of temporary sort files
-* Allow WAL replay of CREATE TABLESPACE to work when the directory
-  structure on the recovery computer is different from the original
-* Add "include file" functionality in postgresql.conf
-* -Add session start time and last statement time to pg_stat_activity
-* Allow server logs to be remotely read using SQL commands
-* Allow pg_hba.conf settings to be controlled via SQL
+* Improve replication solutions
+   o Load balancing
 
-  This would require a new global table that is dumped to flat file for
-  use by the postmaster.  We do a similar thing for pg_shadow currently.
+     You can use any of the master/slave replication servers to use a
+     standby server for data warehousing. To allow read/write queries to
+     multiple servers, you need multi-master replication like pgcluster.
 
-* Allow administrators to safely terminate individual sessions either
-  via an SQL function or SIGTERM 
+   o Allow replication over unreliable or non-persistent links
 
-  Currently SIGTERM of a backend can lead to lock table corruption.
 
-* Un-comment all variables in postgresql.conf
+* Configuration files
+   o Add "include file" functionality in postgresql.conf
+   o Allow postgresql.conf values to be set so they can not be changed
+     by the user
+   o Allow commenting of variables in postgresql.conf to restore them
+     to defaults
+   o Allow pg_hba.conf settings to be controlled via SQL
 
-  By not showing commented-out variables, we discourage people from
-  thinking that re-commenting a variable returns it to its default.
-  This has to address environment variables that are then overridden
-  by config file values.  Another option is to allow commented values
-  to return to their default values.
+     This would require a new global table that is dumped to flat file for
+     use by the postmaster.  We do a similar thing for pg_shadow currently.
 
-* Allow point-in-time recovery to archive partially filled write-ahead
-  logs [pitr]
 
-  Currently only full WAL files are archived. This means that the most
-  recent transactions aren't available for recovery in case of a disk
-  failure.  This could be triggered by a user command or a timer.
+* Tablespaces
+   * 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
 
-* Automatically force archiving of partially-filled WAL files when 
-  pg_stop_backup() is called or the server is stopped
+     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.
 
-  Doing this will allow administrators to know more easily when the
-  archive contins all the files needed for point-in-time recovery.
+   * Allow reporting of which objects are in which tablespaces
 
-* Create dump tool for write-ahead logs for use in determining
-  transaction id for point-in-time recovery
-* Set proper permissions on non-system schemas during db creation
+     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.
 
-  Currently all schemas are owned by the super-user because they are
-  copied from the template1 database.
+   o Add a GUC variable to control the tablespace for temporary objects
+     and sort files
 
-* Add a function that returns the 'uptime' of the postmaster
-* Allow a warm standby system to also allow read-only queries [pitr]
+     It could start with a random tablespace from a supplied list and
+     cycle through the list.
 
-  This is useful for checking PITR recovery.
+   o Allow WAL replay of CREATE TABLESPACE to work when the directory
+     structure on the recovery computer is different from the original
 
-* Allow the PITR process to be debugged and data examined
-* -Add the client IP address and port to pg_stat_activity
-* Improve replication solutions
-   o Load balancing
+   o Allow per-tablespace quotas
 
-     You can use any of the master/slave replication servers to use a
-     standby server for data warehousing. To allow read/write queries to
-     multiple servers, you need multi-master replication like pgcluster.
 
-   o Allow replication over unreliable or non-persistent links
+* Point-in-time Recovery (PITR)
+     o Allow point-in-time recovery to archive partially filled
+       write-ahead logs [pitr]
 
-* Support table partitioning that allows a single table to be stored
-  in subtables that are partitioned based on the primary key or a WHERE
-  clause
-* Allow postgresql.conf values to be set so they can not be changed by
-  the user
-* Allow per-tablespace quotas
+       Currently only full WAL files are archived. This means that the
+       most recent transactions aren't available for recovery in case
+       of a disk failure. This could be triggered by a user command or
+       a timer.
+
+     o Automatically force archiving of partially-filled WAL files when
+       pg_stop_backup() is called or the server is stopped
+
+       Doing this will allow administrators to know more easily when
+       the archive contins all the files needed for point-in-time
+       recovery.
+
+     o Create dump tool for write-ahead logs for use in determining
+       transaction id for point-in-time recovery
+     o Allow a warm standby system to also allow read-only queries
+       [pitr]
+
+       This is useful for checking PITR recovery.
+
+     o Allow the PITR process to be debugged and data examined
+
+
+Monitoring
+==========
+
+* Allow server log information to be output as INSERT statements
+
+  This would allow server log information to be easily loaded into
+  a database for analysis.
+
+* Add ability to monitor the use of temporary sort files
+* -Add session start time and last statement time to pg_stat_activity
+* Allow server logs to be remotely read using SQL commands
+* -Add a function that returns the start time of the postmaster
 
 
 Data Types
@@ -156,25 +160,10 @@ Data Types
   The positive modulus result returned by NUMERICs might be considered
   inaccurate, in one sense.
 
-* Add function to return compressed length of TOAST data values
-* Allow INET subnet tests using non-constants to be indexed
-* Add transaction_timestamp(), statement_timestamp(), clock_timestamp()
-  functionality
-
-  Current CURRENT_TIMESTAMP returns the start time of the current
-  transaction, and gettimeofday() returns the wallclock time. This will
-  make time reporting more consistent and will allow reporting of
-  the statement start time.
-
 * Have sequence dependency track use of DEFAULT sequences,
-  seqname.nextval (?)
-* Disallow changing default expression of a SERIAL column (?)
+  seqname.nextval?
+* Disallow changing default expression of a SERIAL column?
 * Allow infinite dates just like infinite timestamps
-* Have initdb set DateStyle based on locale?
-* Add pg_get_acldef(), pg_get_typedefault(), and pg_get_attrdef()
-* Allow to_char() to print localized month names
-* Allow functions to have a schema search path specified at creation time
-* Allow substring/replace() to get/set bit values
 * Add a GUC variable to allow output of interval values in ISO8601 format
 * Fix data types where equality comparison isn't intuitive, e.g. box
 * Merge hardwired timezone names with the TZ database; allow either kind
@@ -195,24 +184,7 @@ Data Types
 * Allow INET + INT4 to increment the host part of the address, or
   throw an error on overflow
 * Add 'tid != tid ' operator for use in corruption recovery
-* Prevent to_char() on interval from returning meaningless values
-
-  For example, to_char('1 month', 'mon') is meaningless.  Basically,
-  most date-related parameters to to_char() are meaningless for
-  intervals because interval is not anchored to a date.
 
-* Allow to_char() on interval values to accumulate the highest unit
-  requested
-
-  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.
-
-   o to_char(INTERVAL '1 hour 5 minutes', 'MI') => 65
-   o to_char(INTERVAL '43 hours 20 minutes', 'MI' ) => 2600 
-   o to_char(INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI') => 0:1:19:20
-   o to_char(INTERVAL '3 years 5 months','MM') => 41
 
 * Add ISO INTERVAL handling
    o Add support for day-time syntax, INTERVAL '1 2:03:04' DAY TO SECOND
@@ -228,6 +200,7 @@ Data Types
      INTERVAL '11 months' AS YEAR should return one or zero
    o Support precision, CREATE TABLE foo (a INTERVAL MONTH(3))
 
+
 * ARRAYS
    o Allow NULLs in arrays
    o Allow MIN()/MAX() on arrays
@@ -238,7 +211,7 @@ Data Types
 
 
 * BINARY DATA
-   o Improve vacuum of large objects, like /contrib/vacuumlo (?)
+   o Improve vacuum of large objects, like /contrib/vacuumlo?
    o Add security checking for large objects
 
      Currently large objects entries do not have owners. Permissions can
@@ -251,6 +224,43 @@ Data Types
      This requires the TOAST column to be stored EXTERNAL.
 
 
+Functions
+=========
+
+* Add function to return compressed length of TOAST data values
+* Allow INET subnet tests using non-constants to be indexed
+* Add transaction_timestamp(), statement_timestamp(), clock_timestamp()
+  functionality
+
+  Current CURRENT_TIMESTAMP returns the start time of the current
+  transaction, and gettimeofday() returns the wallclock time. This will
+  make time reporting more consistent and will allow reporting of
+  the statement start time.
+
+* Add pg_get_acldef(), pg_get_typedefault(), and pg_get_attrdef()
+* Allow to_char() to print localized month names
+* Allow functions to have a schema search path specified at creation time
+* Allow substring/replace() to get/set bit values
+* Allow to_char() on interval values to accumulate the highest unit
+  requested
+
+  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.
+
+   o to_char(INTERVAL '1 hour 5 minutes', 'MI') => 65
+   o to_char(INTERVAL '43 hours 20 minutes', 'MI' ) => 2600 
+   o to_char(INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI') => 0:1:19:20
+   o to_char(INTERVAL '3 years 5 months','MM') => 41
+
+* Prevent to_char() on interval from returning meaningless values
+
+  For example, to_char('1 month', 'mon') is meaningless.  Basically,
+  most date-related parameters to to_char() are meaningless for
+  intervals because interval is not anchored to a date.
+
+
 Multi-Language Support
 ======================
 
@@ -267,7 +277,7 @@ Multi-Language Support
   Right now only one encoding is allowed per database.
 
 * Support multiple simultaneous character sets, per SQL92
-* Improve UTF8 combined character handling (?)
+* Improve UTF8 combined character handling?
 * Add octet_length_server() and octet_length_client()
 * Make octet_length_client() the same as octet_length()?
 
@@ -287,87 +297,6 @@ Views / Rules
 * Allow RULE recompilation
 
 
-Indexes
-=======
-
-* Allow inherited tables to inherit index, UNIQUE constraint, and primary
-  key, foreign key
-* UNIQUE INDEX on base column not honored on INSERTs/UPDATEs from
-  inherited table:  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 more than one table.
-
-* Add UNIQUE capability to non-btree indexes
-* Add more gist index support for geometric data types
-* -Use indexes for MIN() and MAX()
-
-  MIN/MAX queries can already be rewritten as SELECT col FROM tab ORDER
-  BY col {DESC} LIMIT 1. Completing this item involves doing this
-  transformation automatically.
-
-* -Use index to restrict rows returned by multi-key index when used with
-  non-consecutive keys to reduce heap accesses
-
-  For an index on col1,col2,col3, and a WHERE clause of col1 = 5 and
-  col3 = 9, spin though the index checking for col1 and col3 matches,
-  rather than just col1; also called skip-scanning.
-
-* 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.
-
-* Fetch heap pages matching index entries in sequential order
-
-  Rather than randomly accessing heap pages based on index entries, mark
-  heap pages needing access in a bitmap and do the lookups in sequential
-  order. Another method would be to sort heap ctids matching the index
-  before accessing the heap rows.
-
-* -Allow non-bitmap indexes to be combined by creating bitmaps in memory
-
-  This feature allows separate indexes to be ANDed or ORed together.  This
-  is particularly useful for data warehousing applications that need to
-  query the database in an many permutations.  This feature scans an index
-  and creates an in-memory bitmap, and allows that bitmap to be combined
-  with other bitmap created in a similar way.  The bitmap can either index
-  all TIDs, or be lossy, meaning it records just page numbers and each
-  page tuple has to be checked for validity in a separate pass.
-
-* 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.
-
-* Allow use of indexes to search for NULLs
-
-  One solution is to create a partial index on an IS NULL expression.
-
-* -Add concurrency to GIST
-* Pack hash index buckets onto disk pages more efficiently
-
-  Currently no 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.
-
-* Consider sorting hash buckets so entries can be found using a binary
-  search, rather than a linear scan
-* In hash indexes, consider storing the hash value with or instead
-  of the key itself
-* Allow accurate statistics to be collected on indexes with more than
-  one column or expression indexes, perhaps using per-index statistics
-* Add fillfactor to control reserved free space during index creation
-* Allow the creation of indexes with mixed ascending/descending specifiers
-* -Fix incorrect rtree results due to wrong assumptions about "over"
-  operator semantics
-* Allow GIST indexes to create certain complex index types, like digital
-  trees (see Aoki)
-
-
 Commands
 ========
 
@@ -375,12 +304,9 @@ Commands
 * Change LIMIT/OFFSET and FETCH/MOVE to use int8
 * Allow CREATE TABLE AS to determine column lengths for complex
   expressions like SELECT col1 || col2
-* Allow UPDATE to handle complex aggregates [update] (?)
-* Allow backslash handling in quoted strings to be disabled for portability
-
-  The use of C-style backslashes (.e.g. \n, \r) in quoted strings is not
-  SQL-spec compliant, so allow such handling to be disabled.  However,
-  disabling backslashes could break many third-party applications and tools.
+* Allow UPDATE to handle complex aggregates [update]?
+* -Add E'' escape string marker so eventually ordinary strings can treat
+  backslashes literally, for portability
 
 * Allow an alias to be provided for the target table in UPDATE/DELETE
 
@@ -392,6 +318,7 @@ Commands
   functionality in DELETE.  It's been agreed that the keyword should
   be USING, to avoid anything as confusing as DELETE FROM a FROM b.
 
+* Have initdb set DateStyle based on locale?
 * Add CORRESPONDING BY to UNION/INTERSECT/EXCEPT
 * -Allow REINDEX to rebuild all database indexes
 * Add ROLLUP, CUBE, GROUPING SETS options to GROUP BY
@@ -427,7 +354,7 @@ Commands
   Currently the system uses the operating system COPY command to create
   a new database.
 
-* Add C code to copy directories for use in creating new databases
+* Add C code on Unix to copy directories for use in creating new databases
 * Have pg_ctl look at PGHOST in case it is a socket directory?
 * Allow pg_ctl to work properly with configuration files located outside
   the PGDATA directory
@@ -437,7 +364,6 @@ Commands
   allow pg_ctl to read and understand postgresql.conf to find the
   data_directory value.
 
-* Allow column-level GRANT/REVOKE privileges
 * Add a GUC variable to warn about non-standard SQL usage in queries
 * Add MERGE command that does UPDATE/DELETE, or on failure, INSERT (rules,
   triggers?)
@@ -446,7 +372,7 @@ Commands
   creation
 * Add COMMENT ON for all cluster global objects (roles, databases
   and tablespaces)
-* Add an option to automatically use savepoints for each statement in a
+* -Add an option to automatically use savepoints for each statement in a
   multi-statement transaction.
 
   When enabled, this would allow errors in multi-statement transactions
@@ -467,6 +393,7 @@ Commands
 * Allow FOR UPDATE queries to do NOWAIT locks
 * Add GUC to issue notice about queries that use unjoined tables
 
+
 * ALTER
    o Have ALTER TABLE RENAME rename SERIAL sequence names
    o Add ALTER DOMAIN TYPE
@@ -509,12 +436,25 @@ Commands
      processed, with ROLLBACK on COPY failure.
 
    o -Allow COPY to understand \x as a hex byte
-   o Have COPY return the number of rows loaded/unloaded (?)
+   o Have COPY return the number of rows loaded/unloaded?
    o -Allow COPY to optionally include column headings in the first line
    o -Allow COPY FROM ... CSV to interpret newlines and carriage
      returns in data
 
 
+* GRANT/REVOKE
+   o Allow column-level privileges
+   * Allow 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;
+
+   * Allow GRANT/REVOKE permissions to be inherited by objects based on
+     schema permissions
+
+
 * CURSOR
    o Allow UPDATE/DELETE WHERE CURRENT OF cursor
 
@@ -524,7 +464,7 @@ Commands
      and no FOR UPDATE lock.
 
    o Prevent DROP TABLE from dropping a row referenced by its own open
-     cursor (?)
+     cursor?
 
    o Allow pooled connections to list all open WITH HOLD cursors
 
@@ -546,7 +486,7 @@ Commands
    o -Have SHOW ALL show descriptions for server-side variables
    o Add SET PERFORMANCE_TIPS option to suggest INDEX, VACUUM, VACUUM
      ANALYZE, and CLUSTER
-   o Add SET PATH for schemas (?)
+   o Add SET PATH for schemas?
 
      This is basically the same as SET search_path.
 
@@ -567,7 +507,7 @@ Commands
    o Allow function parameters to be passed by name,
      get_employee_salary(emp_id => 12345, tax_year => 2001)
    o Add Oracle-style packages
-   o Add table function support to pltcl, plperl, plpython (?)
+   o Add table function support to pltcl, plperl, plpython?
    o Allow PL/pgSQL to name columns by ordinal position, e.g. rec.(3)
    o -Allow PL/pgSQL EXECUTE query_var INTO record_var;
    o Add capability to create and call PROCEDURES
@@ -581,7 +521,7 @@ Clients
 =======
 
 * Add a libpq function to support Parse/DescribeStatement capability
-* Prevent libpq's PQfnumber() from lowercasing the column name (?)
+* Prevent libpq's PQfnumber() from lowercasing the column name?
 * Allow libpq to access SQLSTATE so pg_ctl can test for connection failure
 
   This would be used for checking if the server is up.
@@ -597,6 +537,8 @@ Clients
 * Allow psql \pset boolean variables to set to fixed values, rather than toggle
 * Consistently display privilege information for all objects in psql
 * Improve psql's handling of multi-line queries
+
+
 * pg_dump
    o Have pg_dump use multi-statement transactions for INSERT dumps
    o Allow pg_dump to use multiple -t and -n switches [pg_dump]
@@ -616,13 +558,14 @@ Clients
    o Add CSV output format
    o Update pg_dump and psql to use the new COPY libpq API (Christopher)
 
+
 * ECPG
    o Docs
 
      Document differences between ecpg and the SQL standard and
      information about the Informix-compatibility module.
 
-   o Solve cardinality > 1 for input descriptors / variables (?)
+   o Solve cardinality > 1 for input descriptors / variables?
    o Add a semantic check level, e.g. check if a table really exists
    o fix handling of DB attributes that are arrays
    o Use backend PREPARE/EXECUTE facility for ecpg where possible
@@ -647,8 +590,8 @@ Referential Integrity
 * -Implement shared row locks and use them in RI triggers
 * Enforce referential integrity for system tables
 * Change foreign key constraint for array -> element to mean element
-  in array (?)
-* Allow DEFERRABLE UNIQUE constraints (?)
+  in array?
+* Allow DEFERRABLE UNIQUE constraints?
 * Allow triggers to be disabled [trigger]
 
   Currently the only way to disable triggers is to modify the system
@@ -710,8 +653,89 @@ Exotic Features
    o  Allow nested schemas
 
 
-PERFORMANCE
-===========
+Indexes
+=======
+
+* Allow inherited tables to inherit index, UNIQUE constraint, and primary
+  key, foreign key
+* UNIQUE INDEX on base column not honored on INSERTs/UPDATEs from
+  inherited table:  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 more than one table.
+
+* Add UNIQUE capability to non-btree indexes
+* Add more GIST index support for geometric data types
+* -Use indexes for MIN() and MAX()
+
+  MIN/MAX queries can already be rewritten as SELECT col FROM tab ORDER
+  BY col {DESC} LIMIT 1. Completing this item involves doing this
+  transformation automatically.
+
+* -Use index to restrict rows returned by multi-key index when used with
+  non-consecutive keys to reduce heap accesses
+
+  For an index on col1,col2,col3, and a WHERE clause of col1 = 5 and
+  col3 = 9, spin though the index checking for col1 and col3 matches,
+  rather than just col1; also called skip-scanning.
+
+* 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.
+
+* Fetch heap pages matching index entries in sequential order
+
+  Rather than randomly accessing heap pages based on index entries, mark
+  heap pages needing access in a bitmap and do the lookups in sequential
+  order. Another method would be to sort heap ctids matching the index
+  before accessing the heap rows.
+
+* -Allow non-bitmap indexes to be combined by creating bitmaps in memory
+
+  This feature allows separate indexes to be ANDed or ORed together.  This
+  is particularly useful for data warehousing applications that need to
+  query the database in an many permutations.  This feature scans an index
+  and creates an in-memory bitmap, and allows that bitmap to be combined
+  with other bitmap created in a similar way.  The bitmap can either index
+  all TIDs, or be lossy, meaning it records just page numbers and each
+  page tuple has to be checked for validity in a separate pass.
+
+* 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.
+
+* Allow use of indexes to search for NULLs
+
+  One solution is to create a partial index on an IS NULL expression.
+
+* -Add concurrency to GIST
+* Allow accurate statistics to be collected on indexes with more than
+  one column or expression indexes, perhaps using per-index statistics
+* Add fillfactor to control reserved free space during index creation
+* Allow the creation of indexes with mixed ascending/descending specifiers
+* -Fix incorrect rtree results due to wrong assumptions about "over"
+  operator semantics
+* Allow GIST indexes to create certain complex index types, like digital
+  trees (see Aoki)
+
+
+* Hash
+   o Pack hash index buckets onto disk pages more efficiently
+
+     Currently no 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.
+
+   o Consider sorting hash buckets so entries can be found using a
+     binary search, rather than a linear scan
+
+   o In hash indexes, consider storing the hash value with or instead
+     of the key itself
 
 
 Fsync
@@ -724,8 +748,8 @@ Fsync
 * Add program to test if fsync has a delay compared to non-fsync
 
 
-Cache
-=====
+Cache Usage
+===========
 
 * Allow free-behind capability for large sequential scans, perhaps using
   posix_fadvise()
@@ -848,8 +872,8 @@ Locking
 * Fix priority ordering of read and write light-weight locks (Neil)
 
 
-Startup Time
-============
+Startup Time Improvements
+=========================
 
 * Experiment with multi-threaded backend [thread]
 
@@ -877,7 +901,7 @@ Write-Ahead Log
   eliminated from point-in-time archive files.
 
 * Reduce WAL traffic so only modified values are written rather than
-  entire rows (?)
+  entire rows?
 * Turn off full page writes if fsync is disabled
 
   If fsync is off, there is no purpose in writing full pages to WAL
@@ -934,18 +958,18 @@ Optimizer / Executor
 
 * ANALYZE should record a pg_statistic entry for an all-NULL column
 * Log queries where the optimizer row estimates were dramatically
-  different from the number of rows actually found (?)
+  different from the number of rows actually found?
 
 
-Miscellaneous
-=============
+Miscellaneous Performance
+=========================
 
 * 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.
 
-* Use mmap() rather than SYSV shared memory or to write WAL files (?)
+* 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
index e37a84b95f445ee5c2d81d4d8d926f81912d1684..7f1546e9c4aa117ab98598eb7096e278c3d14376 100644 (file)
@@ -8,7 +8,7 @@
 
 

PostgreSQL TODO List

 

Current maintainer:     Bruce Momjian ([email protected])

-Last updated:           Mon Jul  4 08:32:37 EDT 2005
+Last updated:           Mon Jul  4 13:00:23 EDT 2005
 

 

The most recent version of this document can be viewed at

 http://www.postgresql.org/docs/faqs.TODO.html.
@@ -27,94 +27,27 @@ first.
   
  • Remove behavior of postmaster -o after making postmaster/postgres
  •    flags unique
       
  • Allow limits on per-db/role connections
  • -  
  • Allow server log information to be output as INSERT statements
  • -

      This would allow server log information to be easily loaded into

    -  a database for analysis.
    -

    -  
  • Prevent dropping user that still owns objects, or auto-drop the objects
  •    
  • Allow pooled connections to list all prepared queries
  •  

      This would allow an application inheriting a pooled connection to know

       the queries prepared in the current session.
     

       
  • Allow major upgrades without dump/reload, perhaps using pg_upgrade 
  •    [pg_upgrade]
    -  
  • Allow 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;
    -

    -  
  • Allow GRANT/REVOKE permissions to be inherited by objects based on
  • -  schema permissions
       
  • Check for unreferenced table files created by transactions that were
  •    in-progress when the server terminated abruptly
    -  
  • 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.
    -

    -  
  • 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
    -

      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.
    -

    -  
  • Add a GUC variable to control the tablespace for temporary objects and
  • -  sort files
    -

      It could start with a random tablespace from a supplied list and cycle

    -  through the list.
    -

    -  
  • Add ability to monitor the use of temporary sort files
  • -  
  • Allow WAL replay of CREATE TABLESPACE to work when the directory
  • -  structure on the recovery computer is different from the original
    -  
  • Add "include file" functionality in postgresql.conf
  • -  
  • -Add session start time and last statement time to pg_stat_activity
  • -  
  • Allow server logs to be remotely read using SQL commands
  • -  
  • Allow pg_hba.conf settings to be controlled via SQL
  • -

      This would require a new global table that is dumped to flat file for

    -  use by the postmaster.  We do a similar thing for pg_shadow currently.
    -

       
  • Allow administrators to safely terminate individual sessions either
  •    via an SQL function or SIGTERM 
     

      Currently SIGTERM of a backend can lead to lock table corruption.

     

    -  
  • Un-comment all variables in postgresql.conf
  • -

      By not showing commented-out variables, we discourage people from

    -  thinking that re-commenting a variable returns it to its default.
    -  This has to address environment variables that are then overridden
    -  by config file values.  Another option is to allow commented values
    -  to return to their default values.
    -

    -  
  • Allow point-in-time recovery to archive partially filled write-ahead
  • -  logs [pitr]
    -

      Currently only full WAL files are archived. This means that the most

    -  recent transactions aren't available for recovery in case of a disk
    -  failure.  This could be triggered by a user command or a timer.
    -

    -  
  • Automatically force archiving of partially-filled WAL files when 
  • -  pg_stop_backup() is called or the server is stopped
    -

      Doing this will allow administrators to know more easily when the

    -  archive contins all the files needed for point-in-time recovery.
    -

    -  
  • Create dump tool for write-ahead logs for use in determining
  • -  transaction id for point-in-time recovery
    +  
  • Prevent dropping user that still owns objects, or auto-drop the objects
  •    
  • 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.
     

    -  
  • Add a function that returns the 'uptime' of the postmaster
  • -  
  • Allow a warm standby system to also allow read-only queries [pitr]
  • -

      This is useful for checking PITR recovery.

    -

    -  
  • Allow the PITR process to be debugged and data examined
  •    
  • -Add the client IP address and port to pg_stat_activity
  • +  
  • Support table partitioning that allows a single table to be stored
  • +  in subtables that are partitioned based on the primary key or a WHERE
    +  clause
       
  • Improve replication solutions
  •    
           
    • Load balancing
    • @@ -124,14 +57,87 @@ first.
       

           
    • Allow replication over unreliable or non-persistent links
    •    
      -  
    • Support table partitioning that allows a single table to be stored
    • -  in subtables that are partitioned based on the primary key or a WHERE
      -  clause
      -  
    • Allow postgresql.conf values to be set so they can not be changed by
    • -  the user
      -  
    • Allow per-tablespace quotas
    • +  
    • Configuration files
    • +  
        +    
      • Add "include file" functionality in postgresql.conf
      • +    
      • Allow postgresql.conf values to be set so they can not be changed
      • +          by the user
        +    
      • Allow commenting of variables in postgresql.conf to restore them
      • +          to defaults
        +    
      • Allow pg_hba.conf settings to be controlled via SQL
      • +

                  This would require a new global table that is dumped to flat file for

        +          use by the postmaster.  We do a similar thing for pg_shadow currently.
        +

        +  
        +  
      • Tablespaces
      • +  
          +    
        • 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
          +

                    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.
          +

          +    
        • 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.
          +

          +    
            +      
          • Add a GUC variable to control the tablespace for temporary objects
          • +          and sort files
            +

                      It could start with a random tablespace from a supplied list and

            +          cycle through the list.
            +

            +      
          • Allow WAL replay of CREATE TABLESPACE to work when the directory
          • +          structure on the recovery computer is different from the original
            +      
          • Allow per-tablespace quotas
          • +    
            +  
            +  
          • Point-in-time Recovery (PITR)
          • +  
              +    
            • Allow point-in-time recovery to archive partially filled
            • +            write-ahead logs [pitr]
              +

                          Currently only full WAL files are archived. This means that the

              +            most recent transactions aren't available for recovery in case
              +            of a disk failure. This could be triggered by a user command or
              +            a timer.
              +

              +    
            • Automatically force archiving of partially-filled WAL files when
            • +            pg_stop_backup() is called or the server is stopped
              +

                          Doing this will allow administrators to know more easily when

              +            the archive contins all the files needed for point-in-time
              +            recovery.
              +

              +    
            • Create dump tool for write-ahead logs for use in determining
            • +            transaction id for point-in-time recovery
              +    
            • Allow a warm standby system to also allow read-only queries
            • +            [pitr]
              +

                          This is useful for checking PITR recovery.

              +

              +    
            • Allow the PITR process to be debugged and data examined
            • +  
              +
              +

              Monitoring

              +
              +
                +  
              • Allow server log information to be output as INSERT statements
              • +

                  This would allow server log information to be easily loaded into

                +  a database for analysis.
                +

                +  
              • Add ability to monitor the use of temporary sort files
              • +  
              • -Add session start time and last statement time to pg_stat_activity
              • +  
              • Allow server logs to be remotely read using SQL commands
              • +  
              • -Add a function that returns the start time of the postmaster
              •  
                -

                3">Data Types

                +

                4">Data Types

                 
                 
                     
                • Remove Money type, add money formatting for decimal type
                • @@ -148,24 +154,10 @@ first.
                     inaccurate, in one sense.
                   

                   
                    -  
                  • Add function to return compressed length of TOAST data values
                  • -  
                  • Allow INET subnet tests using non-constants to be indexed
                  • -  
                  • Add transaction_timestamp(), statement_timestamp(), clock_timestamp()
                  • -  functionality
                    -

                      Current CURRENT_TIMESTAMP returns the start time of the current

                    -  transaction, and gettimeofday() returns the wallclock time. This will
                    -  make time reporting more consistent and will allow reporting of
                    -  the statement start time.
                    -

                    -  
                  • Have sequence dependency track use of DEFAULT sequences,
                  • -  seqname.nextval (?)
                    -  
                  • Disallow changing default expression of a SERIAL column (?)
                  • +  
                  • Have sequence dependency track use of DEFAULT sequences,
                  • +  seqname.nextval?
                    +  
                  • Disallow changing default expression of a SERIAL column?
                  •    
                  • Allow infinite dates just like infinite timestamps
                  • -  
                  • Have initdb set DateStyle based on locale?
                  • -  
                  • Add pg_get_acldef(), pg_get_typedefault(), and pg_get_attrdef()
                  • -  
                  • Allow to_char() to print localized month names
                  • -  
                  • Allow functions to have a schema search path specified at creation time
                  • -  
                  • Allow substring/replace() to get/set bit values
                  •    
                  • Add a GUC variable to allow output of interval values in ISO8601 format
                  •    
                  • Fix data types where equality comparison isn't intuitive, e.g. box
                  •    
                  • Merge hardwired timezone names with the TZ database; allow either kind
                  • @@ -185,24 +177,6 @@ first.
                       
                  • Allow INET + INT4 to increment the host part of the address, or
                  •    throw an error on overflow
                       
                  • Add 'tid != tid ' operator for use in corruption recovery
                  • -  
                  • Prevent to_char() on interval from returning meaningless values
                  • -

                      For example, to_char('1 month', 'mon') is meaningless.  Basically,

                    -  most date-related parameters to to_char() are meaningless for
                    -  intervals because interval is not anchored to a date.
                    -

                    -  
                  • Allow to_char() on interval values to accumulate the highest unit
                  • -  requested
                    -

                      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') => 65
                    • -    
                    • to_char(INTERVAL '43 hours 20 minutes', 'MI' ) => 2600 
                    • -    
                    • to_char(INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI') => 0:1:19:20
                    • -    
                    • to_char(INTERVAL '3 years 5 months','MM') => 41
                    • -  
                         
                    • Add ISO INTERVAL handling
                    •    
                             
                      • Add support for day-time syntax, INTERVAL '1 2:03:04' DAY TO SECOND
                      • @@ -229,7 +203,7 @@ first.
                           
                           
                      • BINARY DATA
                      •    
                          -    
                        • Improve vacuum of large objects, like /contrib/vacuumlo (?)
                        • +    
                        • Improve vacuum of large objects, like /contrib/vacuumlo?
                        •      
                        • Add security checking for large objects
                        •  

                                    Currently large objects entries do not have owners. Permissions can

                                     only be set at the pg_largeobject table level.
                          @@ -240,7 +214,42 @@ first.
                           

                             
                           
                          -

                          Multi-Language Support

                          +

                          Functions

                          +
                          +
                            +  
                          • Add function to return compressed length of TOAST data values
                          • +  
                          • Allow INET subnet tests using non-constants to be indexed
                          • +  
                          • Add transaction_timestamp(), statement_timestamp(), clock_timestamp()
                          • +  functionality
                            +

                              Current CURRENT_TIMESTAMP returns the start time of the current

                            +  transaction, and gettimeofday() returns the wallclock time. This will
                            +  make time reporting more consistent and will allow reporting of
                            +  the statement start time.
                            +

                            +  
                          • Add pg_get_acldef(), pg_get_typedefault(), and pg_get_attrdef()
                          • +  
                          • Allow to_char() to print localized month names
                          • +  
                          • Allow functions to have a schema search path specified at creation time
                          • +  
                          • Allow substring/replace() to get/set bit values
                          • +  
                          • Allow to_char() on interval values to accumulate the highest unit
                          • +  requested
                            +

                              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') => 65
                            • +    
                            • to_char(INTERVAL '43 hours 20 minutes', 'MI' ) => 2600 
                            • +    
                            • to_char(INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI') => 0:1:19:20
                            • +    
                            • to_char(INTERVAL '3 years 5 months','MM') => 41
                            • +  
                              +  
                            • Prevent to_char() on interval from returning meaningless values
                            • +

                                For example, to_char('1 month', 'mon') is meaningless.  Basically,

                              +  most date-related parameters to to_char() are meaningless for
                              +  intervals because interval is not anchored to a date.
                              +

                              +
                              +

                              Multi-Language Support

                               
                               
                                   
                              • Add NCHAR (as distinguished from ordinary varchar),
                              • @@ -254,11 +263,11 @@ first.
                                 

                                  Right now only one encoding is allowed per database.

                                 

                                   
                              • Support multiple simultaneous character sets, per SQL92
                              • -  
                              • Improve UTF8 combined character handling (?)
                              • +  
                              • Improve UTF8 combined character handling?
                              •    
                              • Add octet_length_server() and octet_length_client()
                              •    
                              • Make octet_length_client() the same as octet_length()?
                              •  
                                -

                                5">Views / Rules

                                +

                                7">Views / Rules

                                 
                                 
                                     
                                • Automatically create rules on views so they are updateable, per SQL99
                                • @@ -271,90 +280,16 @@ first.
                                     
                                • Allow temporary views on non-temporary tables
                                •    
                                • Allow RULE recompilation
                                •  
                                  -

                                  Indexes

                                  -
                                  -
                                    -  
                                  • Allow inherited tables to inherit index, UNIQUE constraint, and primary
                                  • -  key, foreign key
                                    -  
                                  • UNIQUE INDEX on base column not honored on INSERTs/UPDATEs from
                                  • -  inherited table:  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 more than one table.
                                    -

                                    -  
                                  • Add UNIQUE capability to non-btree indexes
                                  • -  
                                  • Add more gist index support for geometric data types
                                  • -  
                                  • -Use indexes for MIN() and MAX()
                                  • -

                                      MIN/MAX queries can already be rewritten as SELECT col FROM tab ORDER

                                    -  BY col {DESC} LIMIT 1. Completing this item involves doing this
                                    -  transformation automatically.
                                    -

                                    -  
                                  • -Use index to restrict rows returned by multi-key index when used with
                                  • -  non-consecutive keys to reduce heap accesses
                                    -

                                      For an index on col1,col2,col3, and a WHERE clause of col1 = 5 and

                                    -  col3 = 9, spin though the index checking for col1 and col3 matches,
                                    -  rather than just col1; also called skip-scanning.
                                    -

                                    -  
                                  • 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.
                                    -

                                    -  
                                  • Fetch heap pages matching index entries in sequential order
                                  • -

                                      Rather than randomly accessing heap pages based on index entries, mark

                                    -  heap pages needing access in a bitmap and do the lookups in sequential
                                    -  order. Another method would be to sort heap ctids matching the index
                                    -  before accessing the heap rows.
                                    -

                                    -  
                                  • -Allow non-bitmap indexes to be combined by creating bitmaps in memory
                                  • -

                                      This feature allows separate indexes to be ANDed or ORed together.  This

                                    -  is particularly useful for data warehousing applications that need to
                                    -  query the database in an many permutations.  This feature scans an index
                                    -  and creates an in-memory bitmap, and allows that bitmap to be combined
                                    -  with other bitmap created in a similar way.  The bitmap can either index
                                    -  all TIDs, or be lossy, meaning it records just page numbers and each
                                    -  page tuple has to be checked for validity in a separate pass.
                                    -

                                    -  
                                  • 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.
                                    -

                                    -  
                                  • Allow use of indexes to search for NULLs
                                  • -

                                      One solution is to create a partial index on an IS NULL expression.

                                    -

                                    -  
                                  • -Add concurrency to GIST
                                  • -  
                                  • Pack hash index buckets onto disk pages more efficiently
                                  • -

                                      Currently no 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.
                                    -

                                    -  
                                  • Consider sorting hash buckets so entries can be found using a binary
                                  • -  search, rather than a linear scan
                                    -  
                                  • In hash indexes, consider storing the hash value with or instead
                                  • -  of the key itself
                                    -  
                                  • Allow accurate statistics to be collected on indexes with more than
                                  • -  one column or expression indexes, perhaps using per-index statistics
                                    -  
                                  • Add fillfactor to control reserved free space during index creation
                                  • -  
                                  • Allow the creation of indexes with mixed ascending/descending specifiers
                                  • -  
                                  • -Fix incorrect rtree results due to wrong assumptions about "over"
                                  • -  operator semantics
                                    -  
                                  • Allow GIST indexes to create certain complex index types, like digital
                                  • -  trees (see Aoki)
                                    -
                                    -

                                    Commands

                                    +

                                    Commands

                                     
                                     
                                         
                                    • -Add BETWEEN SYMMETRIC/ASYMMETRIC
                                    •    
                                    • Change LIMIT/OFFSET and FETCH/MOVE to use int8
                                    •    
                                    • Allow CREATE TABLE AS to determine column lengths for complex
                                    •    expressions like SELECT col1 || col2
                                      -  
                                    • Allow UPDATE to handle complex aggregates [update] (?)
                                    • -  
                                    • Allow backslash handling in quoted strings to be disabled for portability
                                    • -

                                        The use of C-style backslashes (.e.g. \n, \r) in quoted strings is not

                                      -  SQL-spec compliant, so allow such handling to be disabled.  However,
                                      -  disabling backslashes could break many third-party applications and tools.
                                      -

                                      +  
                                    • Allow UPDATE to handle complex aggregates [update]?
                                    • +  
                                    • -Add E'' escape string marker so eventually ordinary strings can treat
                                    • +  backslashes literally, for portability
                                         
                                    • Allow an alias to be provided for the target table in UPDATE/DELETE
                                    •  

                                        This is not SQL-spec but many DBMSs allow it.

                                       

                                      @@ -363,6 +298,7 @@ first.
                                         functionality in DELETE.  It's been agreed that the keyword should
                                         be USING, to avoid anything as confusing as DELETE FROM a FROM b.
                                       

                                      +  
                                    • Have initdb set DateStyle based on locale?
                                    •    
                                    • Add CORRESPONDING BY to UNION/INTERSECT/EXCEPT
                                    •    
                                    • -Allow REINDEX to rebuild all database indexes
                                    •    
                                    • Add ROLLUP, CUBE, GROUPING SETS options to GROUP BY
                                    • @@ -394,7 +330,7 @@ first.
                                       

                                        Currently the system uses the operating system COPY command to create

                                         a new database.
                                       

                                      -  
                                    • Add C code to copy directories for use in creating new databases
                                    • +  
                                    • Add C code on Unix to copy directories for use in creating new databases
                                    •    
                                    • Have pg_ctl look at PGHOST in case it is a socket directory?
                                    •    
                                    • Allow pg_ctl to work properly with configuration files located outside
                                    •    the PGDATA directory
                                      @@ -403,7 +339,6 @@ first.
                                         allow pg_ctl to read and understand postgresql.conf to find the
                                         data_directory value.
                                       

                                      -  
                                    • Allow column-level GRANT/REVOKE privileges
                                    •    
                                    • Add a GUC variable to warn about non-standard SQL usage in queries
                                    •    
                                    • Add MERGE command that does UPDATE/DELETE, or on failure, INSERT (rules,
                                    •    triggers?)
                                      @@ -412,7 +347,7 @@ first.
                                         creation
                                         
                                    • Add COMMENT ON for all cluster global objects (roles, databases
                                    •    and tablespaces)
                                      -  
                                    • Add an option to automatically use savepoints for each statement in a
                                    • +  
                                    • -Add an option to automatically use savepoints for each statement in a
                                    •    multi-statement transaction.
                                       

                                        When enabled, this would allow errors in multi-statement transactions

                                         to be automatically ignored.
                                      @@ -470,11 +405,25 @@ first.
                                                 processed, with ROLLBACK on COPY failure.
                                       

                                           
                                    • -Allow COPY to understand \x as a hex byte
                                    • -    
                                    • Have COPY return the number of rows loaded/unloaded (?)
                                    • +    
                                    • Have COPY return the number of rows loaded/unloaded?
                                    •      
                                    • -Allow COPY to optionally include column headings in the first line
                                    •      
                                    • -Allow COPY FROM ... CSV to interpret newlines and carriage
                                    •            returns in data
                                         
                                      +  
                                    • GRANT/REVOKE
                                    • +  
                                        +    
                                      • Allow column-level privileges
                                      • +    
                                          +      
                                        • Allow 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;
                                          +

                                          +      
                                        • Allow GRANT/REVOKE permissions to be inherited by objects based on
                                        • +          schema permissions
                                          +    
                                          +  
                                             
                                        • CURSOR
                                        •    
                                                 
                                          • Allow UPDATE/DELETE WHERE CURRENT OF cursor
                                          • @@ -484,7 +433,7 @@ first.
                                                       and no FOR UPDATE lock.
                                             

                                                 
                                          • Prevent DROP TABLE from dropping a row referenced by its own open
                                          • -          cursor (?)
                                            +          cursor?
                                                 
                                          • Allow pooled connections to list all open WITH HOLD cursors
                                          •  

                                                      Because WITH HOLD cursors exist outside transactions, this allows

                                                       them to be listed so they can be closed.
                                            @@ -505,7 +454,7 @@ first.
                                                 
                                          • -Have SHOW ALL show descriptions for server-side variables
                                          •      
                                          • Add SET PERFORMANCE_TIPS option to suggest INDEX, VACUUM, VACUUM
                                          •            ANALYZE, and CLUSTER
                                            -    
                                          • Add SET PATH for schemas (?)
                                          • +    
                                          • Add SET PATH for schemas?
                                          •  

                                                      This is basically the same as SET search_path.

                                             

                                               
                                            @@ -524,7 +473,7 @@ first.
                                                 
                                          • Allow function parameters to be passed by name,
                                          •            get_employee_salary(emp_id => 12345, tax_year => 2001)
                                                 
                                          • Add Oracle-style packages
                                          • -    
                                          • Add table function support to pltcl, plperl, plpython (?)
                                          • +    
                                          • Add table function support to pltcl, plperl, plpython?
                                          •      
                                          • Allow PL/pgSQL to name columns by ordinal position, e.g. rec.(3)
                                          •      
                                          • -Allow PL/pgSQL EXECUTE query_var INTO record_var;
                                          •      
                                          • Add capability to create and call PROCEDURES
                                          • @@ -534,11 +483,11 @@ first.
                                                 
                                          • Add support for polymorphic arguments and return types to plperl
                                          •    
                                             
                                            -

                                            8">Clients

                                            +

                                            9">Clients

                                             
                                             
                                                 
                                            • Add a libpq function to support Parse/DescribeStatement capability
                                            • -  
                                            • Prevent libpq's PQfnumber() from lowercasing the column name (?)
                                            • +  
                                            • Prevent libpq's PQfnumber() from lowercasing the column name?
                                            •    
                                            • Allow libpq to access SQLSTATE so pg_ctl can test for connection failure
                                            •  

                                                This would be used for checking if the server is up.

                                               

                                              @@ -577,7 +526,7 @@ first.
                                               

                                                        Document differences between ecpg and the SQL standard and

                                                         information about the Informix-compatibility module.
                                               

                                              -    
                                            • Solve cardinality > 1 for input descriptors / variables (?)
                                            • +    
                                            • Solve cardinality > 1 for input descriptors / variables?
                                            •      
                                            • Add a semantic check level, e.g. check if a table really exists
                                            •      
                                            • fix handling of DB attributes that are arrays
                                            •      
                                            • Use backend PREPARE/EXECUTE facility for ecpg where possible
                                            • @@ -589,7 +538,7 @@ first.
                                                   
                                            • Add internationalized message strings
                                            •    
                                               
                                              -

                                              9">Referential Integrity

                                              +

                                              10">Referential Integrity

                                               
                                               
                                                   
                                              • Add MATCH PARTIAL referential integrity
                                              • @@ -601,8 +550,8 @@ first.
                                                   
                                              • -Implement shared row locks and use them in RI triggers
                                              •    
                                              • Enforce referential integrity for system tables
                                              •    
                                              • Change foreign key constraint for array -> element to mean element
                                              • -  in array (?)
                                                -  
                                              • Allow DEFERRABLE UNIQUE constraints (?)
                                              • +  in array?
                                                +  
                                              • Allow DEFERRABLE UNIQUE constraints?
                                              •    
                                              • Allow triggers to be disabled [trigger]
                                              •  

                                                  Currently the only way to disable triggers is to modify the system

                                                   tables.
                                                @@ -624,13 +573,13 @@ first.
                                                   to fire triggers.
                                                 

                                                 
                                                -

                                                0">Dependency Checking

                                                +

                                                1">Dependency Checking

                                                 
                                                 
                                                     
                                                • Flush cached query plans when the dependent objects change
                                                •    
                                                • Track dependencies in function bodies and recompile/invalidate
                                                •  
                                                  -

                                                  1">Exotic Features

                                                  +

                                                  2">Exotic Features

                                                   
                                                   
                                                       
                                                  • Add SQL99 WITH clause to SELECT
                                                  • @@ -658,9 +607,81 @@ first.
                                                         
                                                  • Allow nested schemas
                                                  •    
                                                     
                                                    -2>PERFORMANCE>
                                                    +1>Indexes>
                                                     
                                                    -

                                                    Fsync

                                                    +
                                                      +  
                                                    • Allow inherited tables to inherit index, UNIQUE constraint, and primary
                                                    • +  key, foreign key
                                                      +  
                                                    • UNIQUE INDEX on base column not honored on INSERTs/UPDATEs from
                                                    • +  inherited table:  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 more than one table.
                                                      +

                                                      +  
                                                    • Add UNIQUE capability to non-btree indexes
                                                    • +  
                                                    • Add more GIST index support for geometric data types
                                                    • +  
                                                    • -Use indexes for MIN() and MAX()
                                                    • +

                                                        MIN/MAX queries can already be rewritten as SELECT col FROM tab ORDER

                                                      +  BY col {DESC} LIMIT 1. Completing this item involves doing this
                                                      +  transformation automatically.
                                                      +

                                                      +  
                                                    • -Use index to restrict rows returned by multi-key index when used with
                                                    • +  non-consecutive keys to reduce heap accesses
                                                      +

                                                        For an index on col1,col2,col3, and a WHERE clause of col1 = 5 and

                                                      +  col3 = 9, spin though the index checking for col1 and col3 matches,
                                                      +  rather than just col1; also called skip-scanning.
                                                      +

                                                      +  
                                                    • 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.
                                                      +

                                                      +  
                                                    • Fetch heap pages matching index entries in sequential order
                                                    • +

                                                        Rather than randomly accessing heap pages based on index entries, mark

                                                      +  heap pages needing access in a bitmap and do the lookups in sequential
                                                      +  order. Another method would be to sort heap ctids matching the index
                                                      +  before accessing the heap rows.
                                                      +

                                                      +  
                                                    • -Allow non-bitmap indexes to be combined by creating bitmaps in memory
                                                    • +

                                                        This feature allows separate indexes to be ANDed or ORed together.  This

                                                      +  is particularly useful for data warehousing applications that need to
                                                      +  query the database in an many permutations.  This feature scans an index
                                                      +  and creates an in-memory bitmap, and allows that bitmap to be combined
                                                      +  with other bitmap created in a similar way.  The bitmap can either index
                                                      +  all TIDs, or be lossy, meaning it records just page numbers and each
                                                      +  page tuple has to be checked for validity in a separate pass.
                                                      +

                                                      +  
                                                    • 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.
                                                      +

                                                      +  
                                                    • Allow use of indexes to search for NULLs
                                                    • +

                                                        One solution is to create a partial index on an IS NULL expression.

                                                      +

                                                      +  
                                                    • -Add concurrency to GIST
                                                    • +  
                                                    • Allow accurate statistics to be collected on indexes with more than
                                                    • +  one column or expression indexes, perhaps using per-index statistics
                                                      +  
                                                    • Add fillfactor to control reserved free space during index creation
                                                    • +  
                                                    • Allow the creation of indexes with mixed ascending/descending specifiers
                                                    • +  
                                                    • -Fix incorrect rtree results due to wrong assumptions about "over"
                                                    • +  operator semantics
                                                      +  
                                                    • Allow GIST indexes to create certain complex index types, like digital
                                                    • +  trees (see Aoki)
                                                      +  
                                                    • Hash
                                                    • +  
                                                        +    
                                                      • Pack hash index buckets onto disk pages more efficiently
                                                      • +

                                                                  Currently no 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.
                                                        +

                                                        +    
                                                      • Consider sorting hash buckets so entries can be found using a
                                                      • +          binary search, rather than a linear scan
                                                        +    
                                                      • In hash indexes, consider storing the hash value with or instead
                                                      • +          of the key itself
                                                        +  
                                                        +
                                                        +

                                                        Fsync

                                                         
                                                         
                                                             
                                                        • Improve commit_delay handling to reduce fsync()
                                                        • @@ -669,7 +690,7 @@ first.
                                                             
                                                        • Add an option to sync() before fsync()'ing checkpoint files
                                                        •    
                                                        • Add program to test if fsync has a delay compared to non-fsync
                                                        •  
                                                          -

                                                          3">Cache

                                                          +

                                                          5">Cache Usage

                                                           
                                                           
                                                               
                                                          • Allow free-behind capability for large sequential scans, perhaps using
                                                          • @@ -725,7 +746,7 @@ first.
                                                               at the start of the table.
                                                             

                                                             
                                                            -

                                                            4">Vacuum

                                                            +

                                                            6">Vacuum

                                                             
                                                             
                                                                 
                                                            • Improve speed with indexes
                                                            • @@ -758,7 +779,7 @@ first.
                                                                   
                                                            • Do VACUUM FULL if table is nearly empty?
                                                            •    
                                                               
                                                              -

                                                              5">Locking

                                                              +

                                                              7">Locking

                                                               
                                                               
                                                                   
                                                              • Make locking of shared data structures more fine-grained
                                                              • @@ -780,7 +801,7 @@ first.
                                                                   
                                                              • Research use of sched_yield() for spinlock acquisition failure
                                                              •    
                                                              • Fix priority ordering of read and write light-weight locks (Neil)
                                                              •  
                                                                -

                                                                6">Startup Time

                                                                +

                                                                8">Startup Time Improvements

                                                                 
                                                                 
                                                                     
                                                                • Experiment with multi-threaded backend [thread]
                                                                • @@ -796,7 +817,7 @@ first.
                                                                     existing backends is one of the difficulties with a backend approach.
                                                                   

                                                                   
                                                                  -

                                                                  7">Write-Ahead Log

                                                                  +

                                                                  9">Write-Ahead Log

                                                                   
                                                                   
                                                                       
                                                                  • Eliminate need to write full pages to WAL before page modification [wal]
                                                                  • @@ -806,7 +827,7 @@ first.
                                                                       eliminated from point-in-time archive files.
                                                                     

                                                                       
                                                                  • Reduce WAL traffic so only modified values are written rather than
                                                                  • -  entire rows (?)
                                                                    +  entire rows?
                                                                       
                                                                  • Turn off full page writes if fsync is disabled
                                                                  •  

                                                                      If fsync is off, there is no purpose in writing full pages to WAL

                                                                     

                                                                    @@ -831,7 +852,7 @@ first.
                                                                       
                                                                  • Eliminate WAL logging for CREATE TABLE AS when not doing WAL archiving
                                                                  •    
                                                                  • -Change WAL to use 32-bit CRC, for performance reasons
                                                                  •  
                                                                    -

                                                                    18">Optimizer / Executor

                                                                    +

                                                                    20">Optimizer / Executor

                                                                     
                                                                     
                                                                         
                                                                    • Add missing optimizer selectivities for date, r-tree, etc
                                                                    • @@ -856,16 +877,16 @@ first.
                                                                       

                                                                         
                                                                    • ANALYZE should record a pg_statistic entry for an all-NULL column
                                                                    •    
                                                                    • Log queries where the optimizer row estimates were dramatically
                                                                    • -  different from the number of rows actually found (?)
                                                                      +  different from the number of rows actually found?
                                                                       
                                                                      -

                                                                      19">Miscellaneous

                                                                      +

                                                                      21">Miscellaneous Performance

                                                                       
                                                                       
                                                                           
                                                                      • 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.
                                                                         

                                                                        -  
                                                                      • Use mmap() rather than SYSV shared memory or to write WAL files (?)
                                                                      • +  
                                                                      • 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.
                                                                        @@ -882,7 +903,7 @@ first.
                                                                           
                                                                      • Use a phantom command counter for nested subtransactions to reduce
                                                                      •    per-tuple overhead
                                                                         
                                                                        -

                                                                        0">Source Code

                                                                        +

                                                                        2">Source Code

                                                                         
                                                                         
                                                                             
                                                                        • Add use of 'const' for variables in source tree
                                                                        • @@ -948,7 +969,7 @@ first.
                                                                           
                                                                           
                                                                           
                                                                          -3>Developers who have claimed items are:>
                                                                          +2>Developers who have claimed items are:>
                                                                           
                                                                               
                                                                          • Alvaro is Alvaro Herrera <[email protected]>
                                                                          •    
                                                                          • Andrew is Andrew Dunstan <[email protected]>