11PostgreSQL TODO List
22====================
33Current maintainer:Bruce Momjian (bruce@momjian.us)
4- Last updated:Wed Aug 1 19:13:20 EDT 2007
4+ Last updated:Mon Aug27 22:56:24 EDT 2007
55
66The most recent version of this document can be viewed at
77http://www.postgresql.org/docs/faqs.TODO.html.
@@ -20,15 +20,15 @@ http://developer.postgresql.org.
2020Administration
2121==============
2222
23- * Allow major upgrades without dump/reload, perhaps using pg_upgrade
23+ * Allow major upgrades without dump/reload, perhaps using pg_upgrade
2424 [pg_upgrade]
2525* Check for unreferenced table files created by transactions that were
2626 in-progress when the server terminated abruptly
2727
2828 http://archives.postgresql.org/pgsql-patches/2006-06/msg00096.php
2929
3030* Allow administrators to safely terminate individual sessions either
31- via an SQL function or SIGTERM
31+ via an SQL function or SIGTERM
3232
3333 Lock table corruption following SIGTERM of an individual backend
3434 has been reported in 8.0. A possible cause was fixed in 8.1, but
@@ -73,7 +73,7 @@ Administration
7373
7474 Currently ALTER USER and ALTER DATABASE support per-user and
7575 per-database defaults. Consider adding per-user-and-database
76- defaults so things like search_path can be defaulted for a
76+ defaults so things like search_path can be defaulted for a
7777 specific user connecting to a specific database.
7878
7979* Allow custom variable classes that can restrict who can set the values
@@ -171,11 +171,7 @@ Administration
171171Monitoring
172172==========
173173
174- * Allow server log information to be output as INSERT statements
175-
176- This would allow server log information to be easily loaded into
177- a database for analysis.
178-
174+ * -Allow server log information to be output as CSV format
179175* -Add ability to monitor the use of temporary sort files
180176
181177
@@ -239,16 +235,16 @@ Data Types
239235* Dates and Times
240236
241237o Allow infinite dates and intervals just like infinite timestamps
242- o Merge hardwired timezone names with the TZ database; allow either
238+ o Merge hardwired timezone names with the TZ database; allow either
243239 kind everywhere a TZ name is currently taken
244240o Allow TIMESTAMP WITH TIME ZONE to store the original timezone
245241 information, either zone name or offset from UTC [timezone]
246242
247- If the TIMESTAMP value is stored with a time zone name, interval
243+ If the TIMESTAMP value is stored with a time zone name, interval
248244 computations should adjust based on the time zone rules.
249245
250246o Fix SELECT '0.01 years'::interval, '0.01 months'::interval
251- o Add a GUC variable to allow output of interval values in ISO8601
247+ o Add a GUC variable to allow output of interval values in ISO8601
252248 format
253249o Have timestamp subtraction not call justify_hours()?
254250
@@ -358,12 +354,12 @@ Functions
358354 requested
359355
360356 Some special format flag would be required to request such
361- accumulation. Such functionality could also be added to EXTRACT.
357+ accumulation. Such functionality could also be added to EXTRACT.
362358 Prevent accumulation that crosses the month/day boundary because of
363359 the uneven number of days in a month.
364360
365361o to_char(INTERVAL '1 hour 5 minutes', 'MI') => 65
366- o to_char(INTERVAL '43 hours 20 minutes', 'MI' ) => 2600
362+ o to_char(INTERVAL '43 hours 20 minutes', 'MI' ) => 2600
367363o to_char(INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI') => 0:1:19:20
368364o to_char(INTERVAL '3 years 5 months','MM') => 41
369365
@@ -531,7 +527,7 @@ SQL Commands
531527 creation
532528* -Add RESET SESSION command to reset all session state
533529* Add GUC to issue notice about statements that use unjoined tables
534- * Allow EXPLAIN to identify tables that were skipped because of
530+ * Allow EXPLAIN to identify tables that were skipped because of
535531 constraint_exclusion
536532* Allow EXPLAIN output to be more easily processed by scripts, perhaps XML
537533* Enable standard_conforming_strings
@@ -670,8 +666,8 @@ SQL Commands
670666
671667 On crash recovery, the table involved in the COPY would
672668 be removed or have its heap and index files truncated. One
673- issue is that no other backend should be able to add to
674- the table at the same time, which is something that is
669+ issue is that no other backend should be able to add to
670+ the table at the same time, which is something that is
675671 currently allowed.
676672
677673
@@ -795,7 +791,7 @@ SQL Commands
795791o Add support for polymorphic arguments and return types to
796792 languages other than PL/PgSQL
797793o Add capability to create and call PROCEDURES
798- o Add support for OUT and INOUT parameters to languages other
794+ o Add support for OUT and INOUT parameters to languages other
799795 than PL/PgSQL
800796o Add PL/PythonU tracebacks
801797
@@ -843,7 +839,7 @@ Clients
843839 than toggle
844840o Consistently display privilege information for all objects in psql
845841o Add auto-expanded mode so expanded output is used if the row
846- length is wider than the screen width.
842+ length is wider than the screen width.
847843
848844 Consider using auto-expanded mode for backslash commands like \df+.
849845
@@ -913,13 +909,13 @@ Clients
913909o Add PQescapeIdentifierConn()
914910o Prevent PQfnumber() from lowercasing unquoted the column name
915911
916- PQfnumber() should never have been doing lowercasing, but
912+ PQfnumber() should never have been doing lowercasing, but
917913 historically it has so we need a way to prevent it
918914
919915o Allow statement results to be automatically batched to the client
920916
921917 Currently all statement results are transferred to the libpq
922- client before libpq makes the results available to the
918+ client before libpq makes the results available to the
923919 application. This feature would allow the application to make
924920 use of the first result rows while the rest are transferred, or
925921 held on the server waiting for them to be requested by libpq.
@@ -1123,20 +1119,27 @@ Cache Usage
11231119
11241120* Allow data to be pulled directly from indexes
11251121
1126- Currently indexes do not have enough tuple visibility information
1127- to allow data to be pulled from the index without also accessing
1128- the heap. One way to allow this is to set a bit on index tuples
1129- to indicate if a tuple is currently visible to all transactions
1130- when the first valid heap lookup happens. This bit would have to
1131- be cleared when a heap tuple is expired.
1122+ Currently indexes do not have enough tuple visibility information
1123+ to allow data to be pulled from the index without also accessing
1124+ the heap. One way to allow this is to set a bit on index tuples
1125+ to indicate if a tuple is currently visible to all transactions
1126+ when the first valid heap lookup happens. This bit would have to
1127+ be cleared when a heap tuple is expired.
11321128
11331129 Another idea is to maintain a bitmap of heap pages where all rows
1134- are visible to all backends, and allow index lookups to reference
1130+ are visible to all backends, and allow index lookups to reference
11351131 that bitmap to avoid heap lookups, perhaps the same bitmap we might
11361132 add someday to determine which heap pages need vacuuming. Frequently
11371133 accessed bitmaps would have to be stored in shared memory. One 8k
11381134 page of bitmaps could track 512MB of heap pages.
11391135
1136+ A third idea would be for a heap scan to check if all rows are visible
1137+ and if so set a per-table flag which can be checked by index scans.
1138+ Any change to the table would have to clear the flag. To detect
1139+ changes during the heap scan a counter could be set at the start and
1140+ checked at the end --- if it is the same, the table has not been
1141+ modified --- any table change would increment the counter.
1142+
11401143* Consider automatic caching of statements at various levels:
11411144
11421145o Parsed query tree
@@ -1215,12 +1218,17 @@ Vacuum
12151218 http://archives.postgresql.org/pgsql-hackers/2006-06/msg01305.php
12161219 http://archives.postgresql.org/pgsql-hackers/2006-06/msg01534.php
12171220
1218- * Reuse index tuples that point to heap tuples that are not visible to
1221+ * Reuse index tuples that point to heap tuples that are not visible to
12191222 anyone?
12201223* Improve dead row detection during multi-statement transactions usage
12211224
12221225 http://archives.postgresql.org/pgsql-patches/2007-03/msg00358.php
12231226
1227+ * Reduce XID consumption of read-only queries
1228+
1229+ http://archives.postgresql.org/pgsql-hackers/2007-08/msg00516.php
1230+
1231+
12241232* Auto-vacuum
12251233
12261234o Use free-space map information to guide refilling
@@ -1335,19 +1343,19 @@ Write-Ahead Log
13351343 might be dropped or truncated during crash recovery [walcontrol]
13361344
13371345 Allow tables to bypass WAL writes and just fsync() dirty pages on
1338- commit. This should be implemented using ALTER TABLE, e.g. ALTER
1339- TABLE PERSISTENCE [ DROP | TRUNCATE | DEFAULT ]. Tables using
1340- non-default logging should not use referential integrity with
1346+ commit. This should be implemented using ALTER TABLE, e.g. ALTER
1347+ TABLE PERSISTENCE [ DROP | TRUNCATE | DEFAULT ]. Tables using
1348+ non-default logging should not use referential integrity with
13411349 default-logging tables. A table without dirty buffers during a
13421350 crash could perhaps avoid the drop/truncate.
13431351
13441352* Allow WAL logging to be turned off for a table, but the table would
13451353 avoid being truncated/dropped [walcontrol]
13461354
1347- To do this, only a single writer can modify the table, and writes
1355+ To do this, only a single writer can modify the table, and writes
13481356 must happen only on new pages so the new pages can be removed during
1349- crash recovery. Readers can continue accessing the table. Such
1350- tables probably cannot have indexes. One complexity is the handling
1357+ crash recovery. Readers can continue accessing the table. Such
1358+ tables probably cannot have indexes. One complexity is the handling
13511359 of indexes on TOAST tables.
13521360
13531361
@@ -1373,7 +1381,7 @@ Optimizer / Executor
13731381
13741382 This might replace GEQO, http://sixdemonbag.org/Djinni.
13751383
1376- * Improve merge join performance by allowing mark/restore of
1384+ * Improve merge join performance by allowing mark/restore of
13771385 tuple sources
13781386
13791387 http://archives.postgresql.org/pgsql-hackers/2007-01/msg00096.php
@@ -1411,7 +1419,7 @@ Miscellaneous Performance
14111419
14121420o -Support a smaller header for short variable-length fields
14131421o Reduce the row header size?
1414- o Consider reducing on-disk varlena length from four bytes to
1422+ o Consider reducing on-disk varlena length from four bytes to
14151423 two because a heap row cannot be more than 64k in length
14161424
14171425* Consider increasing NUM_CLOG_BUFFERS
@@ -1486,7 +1494,7 @@ Source Code
14861494
14871495* -Move NAMEDATALEN from postgres_ext.h to pg_config_manual.h
14881496* Consider making NAMEDATALEN more configurable in future releases
1489- * Update our code to handle 64-bit timezone files to match the zic
1497+ * Update our code to handle 64-bit timezone files to match the zic
14901498 source code, which now uses them
14911499* Have configure choose integer datetimes by default
14921500
@@ -1597,6 +1605,6 @@ Features We Do _Not_ Want
15971605
15981606 While PostgreSQL clients runs fine in limited-resource environments, the
15991607 server requires multiple processes and a stable pool of resources to
1600- run reliabily and efficiently. Stripping down the PostgreSQL server
1601- to run in the same process address space as the client application
1608+ run reliabily and efficiently. Stripping down the PostgreSQL server
1609+ to run in the same process address space as the client application
16021610 would add too much complexity and failure cases.