]> granicus.if.org Git - postgresql/blob - doc/TODO
Done:
[postgresql] / doc / TODO
1 TODO list for PostgreSQL
2 ========================
3 Last updated:           Tue Jan  6 14:48:41 EST 2004
4
5 Current maintainer:     Bruce Momjian (pgman@candle.pha.pa.us)
6
7 The most recent version of this document can be viewed at
8 the PostgreSQL web site, http://www.PostgreSQL.org.
9
10 A dash (-) marks changes that will appear in the upcoming 7.5 release.
11
12 Bracketed items "[]" have more detailed.
13
14
15 Urgent
16 ======
17
18 * Add replication of distributed databases [replication]
19         o Automatic failover
20         o Load balancing
21         o Master/slave replication
22         o Multi-master replication
23         o Partition data across servers
24         o Queries across databases or servers (two-phase commit)
25         o Allow replication over unreliable or non-persistent links
26         o http://gborg.postgresql.org/project/pgreplication/projdisplay.php
27 * Point-in-time data recovery using backup and write-ahead log
28 * Create native Win32 port, http://momjian.postgresql.org/main/writings/pgsql/win32.html
29
30
31
32 Reporting
33 =========
34
35 * Show location of syntax error in query [yacc]
36
37
38 Administration
39 ==============
40
41 * Incremental backups
42 * Remove unreferenced table files and temp tables during database vacuum
43   or postmaster startup (Bruce)
44 * Remove behavior of postmaster -o after making postmaster/postgres
45   flags unique
46 * Allow configuration files to be specified in a different directory
47 * Allow limits on per-db/user connections
48 * Add group object ownership, so groups can rename/drop/grant on objects,
49   so we can implement roles
50 * Add the concept of dataspaces/tablespaces [tablespaces]
51 * Allow logging of only data definition(DDL), or DDL and modification statements
52 * Allow log lines to include session-level information, like database and user
53 * Allow server log information to be output as INSERT statements
54 * Prevent default re-use of sysids for dropped users and groups
55 * Prevent dropping user that still owns objects, or auto-drop the objects
56 * Allow pooled connections to query prepared queries
57 * Allow pooled connections to close all open WITH HOLD cursors
58 * Allow major upgrades without dump/reload, perhaps using pg_upgrade
59 * Have SHOW ALL and pg_settings show descriptions for server-side variables(Joe)
60
61
62 Data Types
63 ==========
64
65 * Remove Money type, add money formatting for decimal type
66 * -Change factorial to return a numeric (Gavin)
67 * Change NUMERIC to enforce the maximum precision, and increase it
68 * Add function to return compressed length of TOAST data values (Tom)
69 * Allow INET subnet tests using non-constants to be indexed
70 * Add transaction_timestamp(), statement_timestamp(), clock_timestamp() functionality
71 * Have sequence dependency track use of DEFAULT sequences, seqname.nextval
72 * Disallow changing default expression of a SERIAL column
73 * Allow infinite dates just like infinite timestamps
74 * Allow pg_dump to dump sequences using NO_MAXVALUE and NO_MINVALUE
75 * Allow better handling of numeric constants, type conversion [typeconv]
76 * Allow backend to output result sets in XML
77 * Prevent whole-row references from leaking memory, e.g. SELECT COUNT(tab.*)
78 * Have initdb set DateStyle based on locale?
79 * Add pg_get_acldef(), pg_get_typedefault(), and pg_get_attrdef()
80 * Add ALTER DOMAIN, AGGREGATE, CONVERSION, SEQUENCE ... OWNER TO
81 * Allow to_char to print localized month names (Karel)
82 * Allow functions to have a search path specified at creation time
83 * Make LENGTH() of CHAR() not count trailing spaces
84
85
86
87 * ARRAYS
88         o Allow nulls in arrays
89         o Allow MIN()/MAX() on arrays
90         o Delay resolution of array expression type so assignment coercion 
91           can be performed on empty array expressions (Joe)
92
93 * BINARY DATA
94         o Improve vacuum of large objects, like /contrib/vacuumlo
95         o Add security checking for large objects
96         o Make file in/out interface for TOAST columns, similar to large object
97           interface (force out-of-line storage and no compression)
98         o Auto-delete large objects when referencing row is deleted
99
100
101 Multi-Language Support
102 ======================
103
104 * Add NCHAR (as distinguished from ordinary varchar),
105 * Allow LOCALE on a per-column basis, default to ASCII
106 * Support multiple simultaneous character sets, per SQL92
107 * Improve Unicode combined character handling
108 * Optimize locale to have minimal performance impact when not used (Peter E)
109 * Add octet_length_server() and octet_length_client() (Thomas, Tatsuo)
110 * Make octet_length_client the same as octet_length() (?)
111 * Prevent mismatch of frontend/backend encodings from converting bytea
112   data from being interpreted as encoded strings
113 * Fix upper()/lower() to work for multibyte encodings
114
115
116 Views / Rules
117 =============
118
119 * Automatically create rules on views so they are updateable, per SQL92 [view]
120 * Add the functionality for WITH CHECK OPTION clause of CREATE VIEW
121 * Allow NOTIFY in rules involving conditionals
122 * Have views on temporary tables exist in the temporary namespace
123 * Move psql backslash information into views
124 * Allow RULE recompilation
125
126
127 Indexes
128 =======
129
130 * Order duplicate index entries by tid for faster heap lookups
131 * Allow inherited tables to inherit index, UNIQUE constraint, and primary
132   key, foreign key  [inheritance]
133 * UNIQUE INDEX on base column not honored on inserts from inherited table
134   INSERT INTO inherit_table (unique_index_col) VALUES (dup) should fail
135   [inheritance]
136 * Add UNIQUE capability to non-btree indexes
137 * Add rtree index support for line, lseg, path, point
138   columns and indexes with many duplicate keys
139 * Use indexes for min() and max() or convert to SELECT col FROM tab ORDER
140   BY col DESC LIMIT 1 if appropriate index exists and WHERE clause acceptible
141 * Use index to restrict rows returned by multi-key index when used with
142   non-consecutive keys or OR clauses, so fewer heap accesses
143 * Be smarter about insertion of already-ordered data into btree index
144 * Prevent index uniqueness checks when UPDATE does not modify the column
145 * Use bitmaps to fetch heap pages in sequential order [performance]
146 * Use bitmaps to combine existing indexes [performance]
147 * Allow use of indexes to search for NULLs
148 * Allow SELECT * FROM tab WHERE int2col = 4 to use int2col index, int8,
149   float4, numeric/decimal too [optimizer]
150 * Add FILLFACTOR to btree index creation
151 * Add concurrency to GIST
152 * Allow a single index to index multiple tables (for inheritance and subtables)
153
154
155 Commands
156 ========
157
158 * Add BETWEEN ASYMMETRIC/SYMMETRIC (Christopher)
159 * Change LIMIT/OFFSET to use int8
160 * CREATE TABLE AS can not determine column lengths from expressions [atttypmod]
161 * Allow UPDATE to handle complex aggregates [update]
162 * Allow command blocks to ignore certain types of errors
163 * Allow backslash handling in quoted strings to be disabled for portability
164 * Allow UPDATE, DELETE to handle table aliases for self-joins [delete]
165 * Add CORRESPONDING BY to UNION/INTERSECT/EXCEPT
166 * Allow REINDEX to rebuild all indexes, remove /contrib/reindex
167 * Add ROLLUP, CUBE, GROUPING SETS options to GROUP BY
168 * Add schema option to createlang
169 * Allow savepoints / nested transactions [transactions] (Bruce)
170 * Allow UPDATE tab SET ROW (col, ...) = (...) for updating multiple columns
171 * Allow SET CONSTRAINTS to be qualified by schema/table
172 * Prevent COMMENT ON DATABASE from using a database name
173 * Add GUC variable to prevent waiting on locks
174 * Allow TRUNCATE ... CASCADE/RESTRICT
175 * Allow PREPARE of cursors
176 * Allow LISTEN/NOTIFY to store info in memory rather than tables
177 * -COMMENT ON [ CAST | CONVERSION | OPERATOR CLASS | LARGE OBJECT | LANGUAGE ] 
178   (Christopher) 
179 * Add optional textual message to NOTIFY
180 * Allow more ISOLATION LEVELS to be accepted, but issue a warning for them
181 * Allow CREATE TABLE foo (f1 INT CHECK (f1 > 0) CHECK (f1 < 10)) to work
182   by searching for non-conflicting constraint names, and prefix with table name
183 * Use more reliable method for CREATE DATABASE to get a consistent copy of db
184 * -Have psql \dn show only visible temp schemas using current_schemas()
185 * Have psql '\i ~/<tab><tab>' actually load files it displays from home dir
186 * Ignore temporary tables from other session when processing inheritance
187 * Add GUC setting to make created tables default to WITHOUT OIDS
188 * Have pg_ctl look at PGHOST in case it is a socket directory
189
190
191 * ALTER
192         o ALTER TABLE ADD COLUMN does not honor DEFAULT and non-CHECK CONSTRAINT
193         o ALTER TABLE ADD COLUMN column DEFAULT should fill existing
194           rows with DEFAULT value
195         o ALTER TABLE ADD COLUMN column SERIAL doesn't create sequence because
196           of the item above
197         o Have ALTER TABLE rename SERIAL sequences
198         o Allow columns to be reordered using ALTER ... POSITION i col1 [,col2];
199           have SELECT * and INSERT honor such ordering
200         o Allow ALTER TABLE to modify column lengths and change to binary
201           compatible types
202         o Add ALTER DATABASE ... OWNER TO newowner
203         o Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME
204         o Allow ALTER TABLE to change constraint deferrability and actions
205
206 * CLUSTER
207         o Automatically maintain clustering on a table
208
209 * COPY
210         o Allow dump/load of CSV format
211         o Allow COPY to report error lines and continue;  optionally
212           allow error codes to be specified; requires savepoints or can
213           not be run in a multi-statement transaction
214         o Allow COPY to understand \x as hex
215         o Have COPY return number of rows loaded/unloaded
216
217 * CURSOR
218         o Allow UPDATE/DELETE WHERE CURRENT OF cursor using per-cursor tid
219           stored in the backend (Gavin)
220         o Prevent DROP of table being referenced by our own open cursor
221
222 * INSERT
223         o Allow INSERT/UPDATE of system-generated oid value for a row
224         o Allow INSERT INTO tab (col1, ..) VALUES (val1, ..), (val2, ..)
225         o Allow INSERT/UPDATE ... RETURNING new.col or old.col; handle
226           RULE cases (Philip)
227
228 * SHOW/SET
229         o Add SET PERFORMANCE_TIPS option to suggest INDEX, VACUUM, VACUUM
230           ANALYZE, and CLUSTER
231         o Add SET PATH for schemas
232
233 * SERVER-SIDE LANGUAGES
234         o Allow PL/PgSQL's RAISE function to take expressions
235         o Change PL/PgSQL to use palloc() instead of malloc()
236         o Allow Java server-side programming, http://pljava.sourceforge.net
237           [java]
238         o Fix problems with complex temporary table creation/destruction
239           without using PL/PgSQL EXECUTE, needs cache prevention/invalidation
240         o Fix PL/pgSQL RENAME to work on variables other than OLD/NEW
241         o Improve PL/PgSQL exception handling
242         o Allow parameters to be specified by name and type during definition
243         o Allow function parameters to be passed by name,
244           get_employee_salary(emp_id => 12345, tax_year => 2001)
245         o Add PL/PgSQL packages
246         o Add table function support to pltcl, plperl, plpython
247         o Add PL/PHP (Joe, Jan)
248         o Allow PL/pgSQL to name columns by ordinal position, e.g. rec.(3)
249         o Allow PL/pgSQL EXECUTE query_var INTO record_var;
250         o Add capability to create and call PROCEDURES
251         o Allow PL/pgSQL to handle %TYPE arrays, e.g. tab.col%TYPE[]
252
253
254 Clients
255 =======
256
257 * Add XML capability to pg_dump and COPY, when backend XML capability
258 * -Allow psql \du to show groups, and add \dg for groups
259 * Allow clients to query a list of WITH HOLD cursors and prepared statements
260 * Prevent unneeded quoting in psql \d output using fmtId()
261 * Add a libpq function to support Parse/DescribeStatement capability
262 * Prevent libpq's PQfnumber() from lowercasing the column name
263 * -Allow pg_dump to dump CREATE CONVERSION (Christopher)
264 * Allow fastpast to pass values in portable format
265
266
267 * JDBC
268         o Comprehensive test suite. This may be available already.
269         o JDBC-standard BLOB support
270         o Error Codes (pending backend implementation)
271         o Support both 'make' and 'ant'
272         o Fix LargeObject API to handle OIDs as unsigned ints
273         o Use cursors implicitly to avoid large results (see setCursorName())
274         o Add LISTEN/NOTIFY support to the JDBC driver (Barry)
275
276 * ECPG
277         o Docs
278         o Implement set descriptor, using descriptor
279         o Solve cardinality > 1 for input descriptors / variables
280         o Improve error handling
281         o Add a semantic check level, e.g. check if a table really exists
282         o fix handling of DB attributes that are arrays
283         o Use backend prepare/execute facility for ecpg where possible
284         o Implement SQLDA
285         o Fix nested C comments
286         o sqlwarn[6] should be 'W' if the PRECISION or SCALE value specified
287         o Make SET CONNECTION thread-aware, non-standard?
288
289 * Python
290         o Allow users to register their own types with pg_
291         o Allow SELECT to return a dictionary of dictionaries
292         o Allow COPY BINARY FROM
293
294
295 Referential Integrity
296 =====================
297
298 * Add MATCH PARTIAL referential integrity [foreign]
299 * Add deferred trigger queue file (Jan)
300 * Implement dirty reads or shared row locks and use them in RI triggers
301 * Enforce referential integrity for system tables
302 * Change foreign key constraint for array -> element to mean element
303   in array
304 * Allow DEFERRABLE UNIQUE constraints
305 * Allow triggers to be disabled [trigger]
306 * With disabled triggers, allow pg_dump to use ALTER TABLE ADD FOREIGN KEY
307 * Allow statement-level triggers to access modified rows
308 * Support triggers on columns (Neil)
309 * Have AFTER triggers execute after the appropriate SQL statement in a 
310   function, not at the end of the function
311 * Print table names with constraint names in error messages, or make constraint
312   names unique within a schema
313 * Issue NOTICE if foreign key data type doesn't match primary key
314 * Remove CREATE CONSTRAINT TRIGGER
315
316
317 Dependency Checking
318 ===================
319
320 * Flush cached query plans when their underlying catalog data changes
321 * -Use dependency information to dump data in proper order
322 * Have pg_dump -c clear the database using dependency information
323
324
325 Exotic Features
326 ===============
327
328 * Add SQL99 WITH clause to SELECT (Tom, Fernando)
329 * Add SQL99 WITH RECURSIVE to SELECT (Tom, Fernando)
330 * Allow queries across multiple databases [crossdb]
331 * Add pre-parsing phase that converts non-ANSI features to supported features
332 * Allow plug-in modules to emulate features from other databases
333 * SQL*Net listener that makes PostgreSQL appear as an Oracle database
334   to clients
335 * Add two-phase commit to all distributed transactions with 
336   offline/readonly server status or administrator notification for failure
337
338
339 PERFORMANCE
340 ===========
341
342
343 Fsync
344 =====
345
346 * Delay fsync() when other backends are about to commit too [fsync]
347         o Determine optimal commit_delay value
348 * Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options
349         o Allow multiple blocks to be written to WAL with one write()
350
351
352 Cache
353 =====
354 * Shared catalog cache, reduce lseek()'s by caching table size in shared area
355 * Add free-behind capability for large sequential scans [fadvise]
356 * Consider use of open/fcntl(O_DIRECT) to minimize OS caching
357 * Make blind writes go through the file descriptor cache
358 * Cache last known per-tuple offsets to speed long tuple access
359 * Automatically place fixed-width, NOT NULL columns first in a table
360 * Use a fixed row count and a +/- count with MVCC visibility rules 
361   to allow fast COUNT(*) queries with no WHERE clause(?) [count]
362
363
364 Vacuum
365 ======
366
367 * Improve speed with indexes (perhaps recreate index instead) [vacuum]
368 * Reduce lock time by moving tuples with read lock, then write
369   lock and truncate table [vacuum]
370 * Provide automatic running of vacuum in the background in backend
371   rather than in /contrib [vacuum]
372 * Allow free space map to be auto-sized or warn when it is too small
373 * Maintain a map of recently-expired of pages so vacuum can reclaim
374   free space without a sequential scan
375 * Have VACUUM FULL use REINDEX rather than index vacuum
376
377
378 Locking
379 =======
380
381 * Make locking of shared data structures more fine-grained
382 * Add code to detect an SMP machine and handle spinlocks accordingly
383   from distributted.net, http://www1.distributed.net/source, 
384   in client/common/cpucheck.cpp
385 * Research use of sched_yield() for spinlock acquisition failure
386
387
388 Startup Time
389 ============
390
391 * Experiment with multi-threaded backend [thread]
392 * Add connection pooling [pool]
393 * Allow persistent backends [persistent]
394 * Create a transaction processor to aid in persistent connections and
395   connection pooling
396 * Do listen() in postmaster and accept() in pre-forked backend
397 * Have pre-forked backend pre-connect to last requested database or pass
398   file descriptor to backend pre-forked for matching database
399
400
401 Write-Ahead Log
402 ===============
403
404 * Have after-change WAL write()'s write only modified data to kernel
405 * Reduce number of after-change WAL writes; they exist only to gaurd against
406   partial page writes [wal]
407 * Turn off after-change writes if fsync is disabled (?)
408 * Add WAL index reliability improvement to non-btree indexes
409 * Find proper defaults for postgresql.conf WAL entries
410 * Allow xlog directory location to be specified during initdb, perhaps
411   using symlinks
412 * Allow WAL information to recover corrupted pg_controldata
413 * Find a way to reduce rotational delay when repeatedly writing
414   last WAL page
415
416
417 Optimizer / Executor
418 ====================
419
420 * Missing optimizer selectivities for date, r-tree, etc. [optimizer]
421 * Allow ORDER BY ... LIMIT to select top values without sort or index
422   using a sequential scan for highest/lowest values (Oleg)
423 * Precompile SQL functions to avoid overhead (Neil)
424 * Add utility to compute accurate random_page_cost value
425 * Improve ability to display optimizer analysis using OPTIMIZER_DEBUG
426 * Use CHECK constraints to improve optimizer decisions
427 * Check GUC geqo_threshold to see if it is still accurate
428 * Allow sorting, temp files, temp tables to use multiple work directories
429 * Improve the planner to use CHECK constraints to prune the plan (for subtables)
430 * Have EXPLAIN ANALYZE highlight poor optimizer estimates
431
432
433 Miscellaneous
434 =============
435
436 * Do async I/O for faster random read-ahead of data
437 * Use mmap() rather than SYSV shared memory or to write WAL files (?) [mmap]
438 * Improve caching of attribute offsets when NULLs exist in the row
439 * Add a script to ask system configuration questions and tune postgresql.conf
440 * Allow partitioning of table into multiple subtables
441 * -Use background process to write dirty shared buffers to disk
442
443
444 Source Code
445 ===========
446
447 * Add use of 'const' for variables in source tree
448 * Rename some /contrib modules from pg* to pg_*
449 * Move some things from /contrib into main tree
450 * Remove warnings created by -Wcast-align
451 * Move platform-specific ps status display info from ps_status.c to ports
452 * Improve access-permissions check on data directory in Cygwin (Tom)
453 * Add documentation for perl, including mention of DBI/DBD perl location
454 * Create improved PostgreSQL introductory documentation for the PHP
455   manuals
456 * Add optional CRC checksum to heap and index pages
457 * Change representation of whole-tuple parameters to functions
458 * Clarify use of 'application' and 'command' tags in SGML docs
459 * Better document ability to build only certain interfaces (Marc)
460 * Remove or relicense modules that are not under the BSD license, if possible
461 * Remove memory/file descriptor freeing before ereport(ERROR)  (Bruce)
462 * Acquire lock on a relation before building a relcache entry for it
463 * Research interaction of setitimer() and sleep() used by statement_timeout
464 * Add checks for fclose() failure
465 * Change CVS $PostgreSQL: pgsql/doc/TODO,v 1.1184 2004/01/06 20:01:13 momjian Exp $ to $PostgreSQL: pgsql/doc/TODO,v 1.1184 2004/01/06 20:01:13 momjian Exp $
466 * Exit postmaster if postgresql.conf can not be opened
467 * Rename /scripts directory because they are all C programs now
468 * Allow the regression tests to start postmaster with -i so the tests
469   can be run on systems that don't support unix-domain sockets
470 * Allow creation of a libpq-only tarball
471 * Promote debug_query_string into a server-side function current_query()
472 * Allow the identifier length to be increased via a configure option
473
474
475 * Wire Protocol Changes
476         o Dynamic character set handling
477         o Add decoded type, length, precision
478         o Compression?
479         o Update clients to use data types, typmod, schema.table.column names of
480           result sets using new query protocol
481
482 ---------------------------------------------------------------------------
483
484
485 Developers who have claimed items are:
486 --------------------------------------
487 * Barry is Barry Lind <barry@xythos.com>
488 * Billy is Billy G. Allie <Bill.Allie@mug.org>
489 * Bruce is Bruce Momjian <pgman@candle.pha.pa.us> of Software Research Assoc.
490 * Christopher is Christopher Kings-Lynne <chriskl@familyhealth.com.au> of
491     Family Health Network
492 * D'Arcy is D'Arcy J.M. Cain <darcy@druid.net> of The Cain Gang Ltd.
493 * Dave is Dave Cramer <dave@fastcrypt.com>
494 * Edmund is Edmund Mergl <E.Mergl@bawue.de>
495 * Fernando is Fernando Nasser <fnasser@redhat.com> of Red Hat
496 * Gavin is Gavin Sherry <swm@linuxworld.com.au> of Alcove Systems Engineering
497 * Greg is Greg Sabino Mullane <greg@turnstep.com>
498 * Hiroshi is Hiroshi Inoue <Inoue@tpf.co.jp>
499 * Karel is Karel Zak <zakkr@zf.jcu.cz>
500 * Jan is Jan Wieck <JanWieck@Yahoo.com> of Afilias, Inc.
501 * Liam is Liam Stewart <liams@redhat.com> of Red Hat
502 * Marc is Marc Fournier <scrappy@hub.org> of PostgreSQL, Inc.
503 * Mark is Mark Hollomon <mhh@mindspring.com>
504 * Michael is Michael Meskes <meskes@postgresql.org> of Credativ
505 * Neil is Neil Conway <neilc@samurai.com>
506 * Oleg is Oleg Bartunov <oleg@sai.msu.su>
507 * Peter M is Peter T Mount <peter@retep.org.uk> of Retep Software
508 * Peter E is Peter Eisentraut <peter_e@gmx.net>
509 * Philip is Philip Warner <pjw@rhyme.com.au> of Albatross Consulting Pty. Ltd.
510 * Rod is Rod Taylor <pg@rbt.ca>
511 * Ross is Ross J. Reedstrom <reedstrm@wallace.ece.rice.edu>
512 * Stephan is Stephan Szabo <sszabo@megazone23.bigpanda.com>
513 * Tatsuo is Tatsuo Ishii <t-ishii@sra.co.jp> of Software Research Assoc.
514 * Thomas is Thomas Lockhart <lockhart@fourpalms.org> of Jet Propulsion Labratory
515 * Tom is Tom Lane <tgl@sss.pgh.pa.us> of Red Hat