1 TODO list for PostgreSQL
2 ========================
3 Last updated: Mon Sep 8 18:48:19 EDT 2003
5 Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
7 The most recent version of this document can be viewed at
8 the PostgreSQL web site, http://www.PostgreSQL.org.
10 A dash (-) marks changes that will appear in the upcoming 7.4 release.
12 Bracketed items "[]" have more detailed.
18 * Add replication of distributed databases [replication]
21 o Master/slave replication
22 o Multi-master replication
23 o Partition data across servers
24 o Sample implementation in contrib/rserv
25 o Queries across databases or servers (two-phase commit)
26 o Allow replication over unreliable or non-persistent links
27 o http://gborg.postgresql.org/project/pgreplication/projdisplay.php
28 * Point-in-time data recovery using backup and write-ahead log
29 * Create native Win32 port [win32]
35 * -Allow elog() to return error codes, module name, file name, line
36 number, not just messages (Tom)
37 * -Add error codes (Tom)
38 * -Make error messages more consistent
39 * Show location of syntax error in query [yacc]
40 * -Add GUC log_statement_and_duration to print statement and >= min duration
47 * Remove unreferenced table files and temp tables during database vacuum
48 or postmaster startup (Bruce)
49 * Remove behavior of postmaster -o after making postmaster/postgres
51 * -Allow easy display of usernames in a group
52 * Allow configuration files to be specified in a different directory
53 * -Add start time to pg_stat_activity
54 * Allow limits on per-db/user connections
55 * -Have standalone backend read postgresql.conf (Tom)
56 * Add group object ownership, so groups can rename/drop/grant on objects,
57 so we can implement roles
58 * Add the concept of dataspaces/tablespaces [tablespaces]
59 * -Allow CIDR format to be used in pg_hba.conf
60 * Allow logging of only data definition(DDL), or DDL and modification statements
61 * Allow log lines to include session-level information, like database and user
62 * Allow server log information to be output as INSERT statements
63 * Prevent default re-use of sysids for dropped users and groups
64 * Prevent dropping user that still owns objects, or auto-drop the objects
65 * Allow pooled connections to query prepared queries
66 * Allow pooled connections to close all open WITH HOLD cursors
73 * -Add IPv6 capability to INET/CIDR types
74 * Remove Money type, add money formatting for decimal type
75 * Change factorial to return a numeric
76 * -Change NUMERIC data type to use base 10,000 internally
77 * Change NUMERIC to enforce the maximum precision, and increase it
78 * Add function to return compressed length of TOAST data values (Tom)
79 * Allow INET subnet tests using non-constants
80 * Add transaction_timestamp(), statement_timestamp(), clock_timestamp() functionality
81 * -Add GUC variables to control floating number output digits (Pedro Ferreira)
82 * Have sequence dependency track use of DEFAULT sequences, seqname.nextval
83 * Disallow changing default expression of a SERIAL column
84 * Allow infinite dates just like infinite timestamps
85 * Allow pg_dump to dump sequences using NO_MAXVALUE and NO_MINVALUE
86 * Allow better handling of numeric constants, type conversion [typeconv]
87 * Allow backend to output result sets in XML
88 * Prevent whole-row references from leaking memory, e.g. SELECT COUNT(tab.*)
89 * -Allow current datestyle to restrict dates; prevent month/day swapping
90 from making invalid dates valid
91 * -Prevent month/day swapping of ISO dates to make invalid dates valid
92 * Have initdb set DateStyle based on locale?
93 * Add pg_get_acldef(), pg_get_typedefault(), and pg_get_attrdef()
94 * Add ALTER DOMAIN, AGGREGATE, CONVERSION, SEQUENCE ... OWNER TO
95 * Allow to_char to print localized month names (Karel)
99 o Allow nulls in arrays
100 o -Allow arrays to be ORDER'ed
101 o -Support construction of array result values in expressions (Joe)
102 o Delay resolution of array expression type so assignment coercion
103 can be performed on empty array expressions (Joe)
106 o Improve vacuum of large objects, like /contrib/vacuumlo
107 o Add security checking for large objects
108 o Make file in/out interface for TOAST columns, similar to large object
109 interface (force out-of-line storage and no compression)
110 o Auto-delete large objects when referencing row is deleted
113 Multi-Language Support
114 ======================
116 * Add NCHAR (as distinguished from ordinary varchar),
117 * Allow LOCALE on a per-column basis, default to ASCII
118 * Support multiple simultaneous character sets, per SQL92
119 * Improve Unicode combined character handling
120 * Optimize locale to have minimal performance impact when not used (Peter E)
121 * Add octet_length_server() and octet_length_client() (Thomas, Tatsuo)
122 * Make octet_length_client the same as octet_length() (?)
123 * Prevent mismatch of frontend/backend encodings from converting bytea
124 data from being interpreted as encoded strings
125 * -Remove Cyrillic recode support
126 * Fix upper()/lower() to work for multibyte encodings
133 * Automatically create rules on views so they are updateable, per SQL92 [view]
134 * Add the functionality for WITH CHECK OPTION clause of CREATE VIEW
135 * Allow NOTIFY in rules involving conditionals
136 * Have views on temporary tables exist in the temporary namespace
137 * Move psql backslash information into views
138 * Allow RULE recompilation
144 * Allow CREATE INDEX zman_index ON test (date_trunc( 'day', zman ) datetime_ops)
145 fails index can't store constant parameters
146 * Order duplicate index entries by tid for faster heap lookups
147 * Allow inherited tables to inherit index, UNIQUE constraint, and primary
148 key, foreign key [inheritance]
149 * UNIQUE INDEX on base column not honored on inserts from inherited table
150 INSERT INTO inherit_table (unique_index_col) VALUES (dup) should fail
152 * Add UNIQUE capability to non-btree indexes
153 * -Add btree index support for reltime, tinterval, regproc (Tom)
154 * Add rtree index support for line, lseg, path, point
155 * -Certain indexes will not shrink, e.g. indexes on ever-increasing
156 columns and indexes with many duplicate keys
157 * Use indexes for min() and max() or convert to SELECT col FROM tab ORDER
158 BY col DESC LIMIT 1 if appropriate index exists and WHERE clause acceptible
159 * -Allow LIKE indexing optimization for non-ASCII locales using special index
160 * Use index to restrict rows returned by multi-key index when used with
161 non-consecutive keys or OR clauses, so fewer heap accesses
162 * Be smarter about insertion of already-ordered data into btree index
163 * Prevent index uniqueness checks when UPDATE does not modify the column
164 * Use bitmaps to fetch heap pages in sequential order [performance]
165 * Use bitmaps to combine existing indexes [performance]
166 * Improve handling of index scans for NULL
167 * Allow SELECT * FROM tab WHERE int2col = 4 to use int2col index, int8,
168 float4, numeric/decimal too [optimizer]
169 * Add FILLFACTOR to btree index creation
170 * Add concurrency to GIST
171 * -Improve concurrency of hash indexes (Tom)
172 * Allow a single index to index multiple tables (for inheritance and subtables)
178 * Add BETWEEN ASYMMETRIC/SYMMETRIC (Christopher)
179 * -Allow LIMIT/OFFSET to use expressions (Tom)
180 * CREATE TABLE AS can not determine column lengths from expressions [atttypmod]
181 * Allow UPDATE to handle complex aggregates [update]
182 * Allow command blocks to ignore certain types of errors
183 * Allow backslash handling in quoted strings to be disabled for portability
184 * -Return proper effected tuple count from complex commands [return]
185 * Allow UPDATE, DELETE to handle table aliases for self-joins [delete]
186 * Add CORRESPONDING BY to UNION/INTERSECT/EXCEPT
187 * Allow REINDEX to rebuild all indexes, remove /contrib/reindex
188 * -Make a transaction-safe TRUNCATE (Rod)
189 * Add ROLLUP, CUBE, GROUPING SETS options to GROUP BY
190 * Add schema option to createlang
191 * Allow savepoints / nested transactions [transactions] (Bruce)
192 * Allow UPDATE tab SET ROW (col, ...) = (...) for updating multiple columns
193 * -Allow UPDATE to use SET col = DEFAULT
194 * -Add config variable to prevent auto-adding missing FROM-clause tables
195 * Allow SET CONSTRAINTS to be qualified by schema/table
196 * -Have SELECT '13 minutes'::interval display zero seconds in ISO datestyle
197 * Prevent COMMENT ON DATABASE from using a database name
198 * Add GUC variable to prevent waiting on locks
199 * Allow TRUNCATE ... CASCADE/RESTRICT
200 * Allow PREPARE of cursors
204 o ALTER TABLE ADD COLUMN does not honor DEFAULT and non-CHECK CONSTRAINT
205 o ALTER TABLE ADD COLUMN column DEFAULT should fill existing
206 rows with DEFAULT value
207 o ALTER TABLE ADD COLUMN column SERIAL doesn't create sequence because
209 o --Add ALTER TABLE tab SET WITHOUT OIDS (Rod)
210 o -Add ALTER SEQUENCE to modify min/max/increment/cache/cycle values
211 o Have ALTER TABLE rename SERIAL sequences
212 o Allow columns to be reordered using ALTER ... POSITION i col1 [,col2];
213 have SELECT * and INSERT honor such ordering
214 o Allow ALTER TABLE to modify column lengths and change to binary
216 o Add ALTER DATABASE ... OWNER TO newowner
217 o Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME
218 o Allow ALTER TABLE to change constraint deferrability and actions
221 o Automatically maintain clustering on a table
222 o -Allow CLUSTER to cluster all tables (Alvaro Herrera)
225 o Allow dump/load of CSV format
226 o Allow COPY to report error lines and continue; optionally
227 allow error codes to be specified; requires savepoints or can
228 not be run in a multi-statement transaction
229 o Allow COPY to understand \x as hex
230 o Have COPY return number of rows loaded/unloaded
233 o Allow BINARY option to SELECT, just like DECLARE
234 o -MOVE 0 should not move to end of cursor (Bruce)
235 o Allow UPDATE/DELETE WHERE CURRENT OF cursor using per-cursor tid
236 stored in the backend (Gavin)
237 o Prevent DROP of table being referenced by our own open cursor
238 o -Allow cursors outside transactions
241 o Allow INSERT/UPDATE of system-generated oid value for a row
242 o Allow INSERT INTO tab (col1, ..) VALUES (val1, ..), (val2, ..)
243 o Allow INSERT/UPDATE ... RETURNING new.col or old.col; handle
247 o Add SET PERFORMANCE_TIPS option to suggest INDEX, VACUUM, VACUUM
250 o -Allow EXPLAIN EXECUTE to see prepared plans
251 o -Allow SHOW of some non-modifiable variables, like pg_controldata
253 * SERVER-SIDE LANGUAGES
254 o Allow PL/PgSQL's RAISE function to take expressions
255 o Change PL/PgSQL to use palloc() instead of malloc()
256 o Allow Java server-side programming, http://pljava.sourceforge.net
258 o Fix problems with complex temporary table creation/destruction
259 without using PL/PgSQL EXECUTE, needs cache prevention/invalidation
260 o Fix PL/pgSQL RENAME to work on variables other than OLD/NEW
261 o Improve PL/PgSQL exception handling
262 o Allow parameters to be specified by name and type during definition
263 o Allow function parameters to be passed by name,
264 get_employee_salary(emp_id => 12345, tax_year => 2001)
265 o Add PL/PgSQL packages
266 o -Allow array declarations and other data types in PL/PgSQL DECLARE
267 o Add table function support to pltcl, plperl, plpython
268 o -Make PL/PgSQL %TYPE schema-aware
269 o -Allow PL/PgSQL to support array element assignment (Joe)
270 o Add PL/PHP (Joe, Jan)
271 o Allow PL/pgSQL to name columns by ordinal position, e.g. rec.(3)
272 o Allow PL/pgSQL EXECUTE query_var INTO record_var;
273 o Add capability to create and call PROCEDURES
279 * -Allow psql to show transaction status if backend protocol changes made
280 * -Add schema, cast, and conversion backslash commands to psql (Christopher)
281 * -Allow pg_dump to dump a specific schema (Neil Conway)
282 * -Allow psql to do table completion for SELECT * FROM schema_part and
283 table completion for SELECT * FROM schema_name.
284 * Add XML capability to pg_dump and COPY, when backend XML capability
285 * -Allow SSL-enabled clients to turn off SSL transfers
286 * -Modify pg_get_triggerdef() to take a boolean to pretty-print,
287 and use that as part of pg_dump along with psql
288 * Allow psql \du to show groups, and add \dg for groups
289 * Allow clients to query WITH HOLD cursors and prepared statements
290 * Prevent unneeded quoting in psql \d output using fmtId()
291 * Add a libpq function to support Parse/DescribeStatement capability
295 o Comprehensive test suite. This may be available already.
296 o JDBC-standard BLOB support
297 o Error Codes (pending backend implementation)
298 o Support both 'make' and 'ant'
299 o Fix LargeObject API to handle OIDs as unsigned ints
300 o Use cursors implicitly to avoid large results (see setCursorName())
301 o Add LISTEN/NOTIFY support to the JDBC driver (Barry)
305 o Implement set descriptor, using descriptor
306 o Solve cardinality > 1 for input descriptors / variables
307 o Improve error handling
308 o Add a semantic check level, e.g. check if a table really exists
310 o fix handling of DB attributes that are arrays
311 o Use backend prepare/execute facility for ecpg where possible
312 o -Make casts work in variable initializations
314 o Fix nested C comments
315 o sqlwarn[6] should be 'W' if the PRECISION or SCALE value specified
316 o -Allow multi-threaded use of SQLCA
317 o -Understand structure definitions outside a declare section
318 o -Allow :var[:index] or :var[<integer>] as cvariable for an array var
321 o Allow users to register their own types with pg_
322 o Allow SELECT to return a dictionary of dictionaries
323 o Allow COPY BINARY FROM
326 Referential Integrity
327 =====================
329 * Add MATCH PARTIAL referential integrity [foreign]
330 * Add deferred trigger queue file (Jan)
331 * Implement dirty reads or shared row locks and use them in RI triggers
332 * Enforce referential integrity for system tables
333 * Change foreign key constraint for array -> element to mean element
335 * Allow DEFERRABLE UNIQUE constraints
336 * Allow triggers to be disabled [trigger]
337 * With disabled triggers, allow pg_dump to use ALTER TABLE ADD FOREIGN KEY
338 * -Support statement-level triggers (Neil)
339 * Support triggers on columns (Neil)
340 * Have AFTER triggers execute after the appropriate SQL statement in a
341 function, not at the end of the function
342 * Print table names with constraint names in error messages, or make constraint
343 names unique within a schema
348 * Flush cached query plans when their underlying catalog data changes
349 * Use dependency information to dump data in proper order
355 * Add SQL99 WITH clause to SELECT (Tom, Fernando)
356 * Add SQL99 WITH RECURSIVE to SELECT (Tom, Fernando)
357 * Allow queries across multiple databases [crossdb]
358 * Add pre-parsing phase that converts non-ANSI features to supported features
359 * Allow plug-in modules to emulate features from other databases
360 * SQL*Net listener that makes PostgreSQL appear as an Oracle database
362 * Two-phase commit to implement distributed transactions
372 * Delay fsync() when other backends are about to commit too [fsync]
373 o Determine optimal commit_delay value
374 * Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options
375 o Allow multiple blocks to be written to WAL with one write()
380 * Shared catalog cache, reduce lseek()'s by caching table size in shared area
381 * Add free-behind capability for large sequential scans (Bruce)
382 * Consider use of open/fcntl(O_DIRECT) to minimize OS caching
383 * Make blind writes go through the file descriptor cache
384 * Cache last known per-tuple offsets to speed long tuple access
385 * Automatically place fixed-width, NOT NULL columns first in a table
386 * Consider using MVCC to cache count(*) queries with no WHERE clause
392 * Improve speed with indexes (perhaps recreate index instead) [vacuum]
393 * Reduce lock time by moving tuples with read lock, then write
394 lock and truncate table [vacuum]
395 * Provide automatic running of vacuum in the background in backend
396 rather than in /contrib [vacuum]
397 * Allow free space map to be auto-sized or warn when it is too small
398 * Maintain a map of recently-expired of pages so vacuum can reclaim
399 free space without a sequential scan
405 * Make locking of shared data structures more fine-grained
406 * Add code to detect an SMP machine and handle spinlocks accordingly
407 from distributted.net, http://www1.distributed.net/source,
408 in client/common/cpucheck.cpp
409 * Research use of sched_yield() for spinlock acquisition failure
415 * Experiment with multi-threaded backend [thread]
416 * Add connection pooling [pool]
417 * Allow persistent backends [persistent]
418 * Create a transaction processor to aid in persistent connections and
420 * Do listen() in postmaster and accept() in pre-forked backend
421 * Have pre-forked backend pre-connect to last requested database or pass
422 file descriptor to backend pre-forked for matching database
428 * Have after-change WAL write()'s write only modified data to kernel
429 * Reduce number of after-change WAL writes; they exist only to gaurd against
430 partial page writes [wal]
431 * Turn off after-change writes if fsync is disabled (?)
432 * Add WAL index reliability improvement to non-btree indexes
433 * Find proper defaults for postgresql.conf WAL entries
434 * -Add checkpoint_min_warning postgresql.conf option to warn about checkpoints
435 that are too frequent (Bruce)
436 * Allow xlog directory location to be specified during initdb, perhaps
438 * Allow WAL information to recover corrupted pg_controldata
439 * Find a way to reduce rotational delay when repeatedly writing
446 * -Improve Subplan list handling
447 * -Allow Subplans to use efficient joins(hash, merge) with upper variable
448 * -Add hash for evaluating GROUP BY aggregates (Tom)
449 * -Allow merge and hash joins on expressions not just simple variables (Tom)
450 * -Make IN/NOT IN have similar performance to EXISTS/NOT EXISTS (Tom)
451 * Missing optimizer selectivities for date, r-tree, etc. [optimizer]
452 * Allow ORDER BY ... LIMIT to select top values without sort or index
453 using a sequential scan for highest/lowest values (Oleg)
454 * -Inline simple SQL functions to avoid overhead (Tom)
455 * Precompile SQL functions to avoid overhead (Neil)
456 * Add utility to compute accurate random_page_cost value
457 * Improve ability to display optimizer analysis using OPTIMIZER_DEBUG
458 * Use CHECK constraints to improve optimizer decisions
459 * Check GUC geqo_threshold to see if it is still accurate
460 * Allow sorting, temp files, temp tables to use multiple work directories
461 * Improve the planner to use CHECK constraints to prune the plan (for subtables)
467 * Do async I/O for faster random read-ahead of data
468 * -Get faster regex() code from Henry Spencer <henry@zoo.utoronto.ca>
469 * Use mmap() rather than SYSV shared memory or to write WAL files (?) [mmap]
470 * Improve caching of attribute offsets when NULLs exist in the row
471 * Add a script to ask system configuration questions and tune postgresql.conf
472 * Allow partitioning of table into multiple subtables
478 * Add use of 'const' for variables in source tree
479 * Rename some /contrib modules from pg* to pg_*
480 * Move some things from /contrib into main tree
481 * Remove warnings created by -Wcast-align
482 * Move platform-specific ps status display info from ps_status.c to ports
483 * -Modify regression tests to prevent failures do to minor numeric rounding
484 * -Add OpenBSD's getpeereid() call for local socket authentication
485 * Improve access-permissions check on data directory in Cygwin (Tom)
486 * Add documentation for perl, including mention of DBI/DBD perl location
487 * Create improved PostgreSQL introductory documentation for the PHP
489 * Add optional CRC checksum to heap and index pages
490 * Change representation of whole-tuple parameters to functions
491 * Clarify use of 'application' and 'command' tags in SGML docs
492 * Better document ability to build only certain interfaces (Marc)
493 * Remove or relicense modules that are not under the BSD license, if possible
494 * Remove memory/file descriptor freeing before ereport(ERROR) (Bruce)
495 * Acquire lock on a relation before building a relcache entry for it
496 * Research interaction of setitimer() and sleep() used by statement_timeout
497 * Add checks for fclose() failure
498 * Change CVS $Id: TODO,v 1.1133 2003/09/08 22:48:21 momjian Exp $ to $PostgreSQL: pgsql/doc/TODO,v 1.1133 2003/09/08 22:48:21 momjian Exp $
499 * Exit postmaster if postgresql.conf can not be opened
500 * Rename /scripts directory because they are all C programs now
501 * Allow the regression tests to start postmaster with -i so the tests
502 can be run on systems that don't support unix-domain sockets
503 * Allow creation of a libpq-only tarball
504 * Promote debug_query_string into a server-side function current_query()
505 * Allow the identifier length to be increased via a configure option
508 * Wire Protocol Changes
509 o -Show transaction status in psql
510 o -Allow binding of query parameters, support for prepared queries
511 o Add optional textual message to NOTIFY
512 o -Remove hard-coded limits on user/db/password names
513 o -Remove unused elements of startup packet (unused, tty, passlength)
514 o -Fix COPY/fastpath protocol
515 o Allow fastpast to pass values in portable format
517 o Dynamic character set handling
518 o Special passing of binary values in platform-neutral format (bytea?)
519 o Add decoded type, length, precision
521 o -Report server version number, database encoding, client encoding
522 o Update clients to use data types, typmod, schema.table.column names of
523 result sets using new query protocol
525 ---------------------------------------------------------------------------
528 Developers who have claimed items are:
529 --------------------------------------
530 * Barry is Barry Lind <barry@xythos.com>
531 * Billy is Billy G. Allie <Bill.Allie@mug.org>
532 * Bruce is Bruce Momjian <pgman@candle.pha.pa.us> of Software Research Assoc.
533 * Christopher is Christopher Kings-Lynne <chriskl@familyhealth.com.au> of
534 Family Health Network
535 * D'Arcy is D'Arcy J.M. Cain <darcy@druid.net> of The Cain Gang Ltd.
536 * Dave is Dave Cramer <dave@fastcrypt.com>
537 * Edmund is Edmund Mergl <E.Mergl@bawue.de>
538 * Fernando is Fernando Nasser <fnasser@redhat.com> of Red Hat
539 * Gavin is Gavin Sherry <swm@linuxworld.com.au> of Alcove Systems Engineering
540 * Greg is Greg Sabino Mullane <greg@turnstep.com>
541 * Hiroshi is Hiroshi Inoue <Inoue@tpf.co.jp>
542 * Karel is Karel Zak <zakkr@zf.jcu.cz>
543 * Jan is Jan Wieck <JanWieck@Yahoo.com> of PeerDirect Corp.
544 * Liam is Liam Stewart <liams@redhat.com> of Red Hat
545 * Marc is Marc Fournier <scrappy@hub.org> of PostgreSQL, Inc.
546 * Mark is Mark Hollomon <mhh@mindspring.com>
547 * Michael is Michael Meskes <meskes@postgresql.org> of Credativ
548 * Neil is Neil Conway <neilc@samurai.com>
549 * Oleg is Oleg Bartunov <oleg@sai.msu.su>
550 * Peter M is Peter T Mount <peter@retep.org.uk> of Retep Software
551 * Peter E is Peter Eisentraut <peter_e@gmx.net>
552 * Philip is Philip Warner <pjw@rhyme.com.au> of Albatross Consulting Pty. Ltd.
553 * Rod is Rod Taylor <pg@rbt.ca>
554 * Ross is Ross J. Reedstrom <reedstrm@wallace.ece.rice.edu>
555 * Stephan is Stephan Szabo <sszabo@megazone23.bigpanda.com>
556 * Tatsuo is Tatsuo Ishii <t-ishii@sra.co.jp> of Software Research Assoc.
557 * Thomas is Thomas Lockhart <lockhart@fourpalms.org> of Jet Propulsion Labratory
558 * Tom is Tom Lane <tgl@sss.pgh.pa.us> of Red Hat
559 * Vadim is Vadim B. Mikheev <vadim4o@email.com> of Sector Data