]> granicus.if.org Git - postgresql/blob - doc/TODO
Updates from Tom:
[postgresql] / doc / TODO
1 TODO list for PostgreSQL
2 ========================
3 Last updated:           Mon Sep  2 11:30:39 EDT 2002
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.3 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 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
30
31 Reporting
32 =========
33
34 * Allow elog() to return error codes, module name, file name, line
35   number, not just messages (Peter E)
36 * Add error codes (Peter E)
37 * Make error messages more consistent [error]
38 * -Change DEBUG startup tag to LOG (Bruce)
39 * Show location of syntax error in query [yacc]
40 * -Add getpid() function to backend
41 * -Allow logging of query durations
42
43
44 Permissions
45 ===========
46
47 * -Improve control over user privileges, including table creation
48 * -Allow user/group names to be specified directly in pg_hba.conf (Bruce)
49 * -Add PGPASSWORDFILE environment variable or ~/.pgpass to store
50   user/host/password combinations
51 * -Allow permissions for functions (Peter E)
52 * -Allow object creation to be disabled for specific users
53
54
55 Administration
56 ==============
57
58 * Incremental backups
59 * -Make it easier to create a database owned by someone who can't createdb,
60   perhaps CREATE DATABASE dbname WITH OWNER = "user" (Gavin)
61 * -Make equals sign optional in CREATE DATABASE WITH param = 'val'
62 * Remove unreferenced table files and temp tables during database vacuum
63   or postmaster startup (Bruce)
64 * Remove behavior of postmaster -o after making postmaster/postgres
65   flags unique
66 * -Prevent SIGHUP and 'pg_ctl reload' from changing command line
67   specified parameters to postgresql.conf defaults (Peter E)
68 * Allow easy display of usernames in a group
69 * Allow configuration files to be specified in a different directory
70 * -Reserve last few process slots for super-user if max_connections reached
71 * -Add GUC parameter to print queries that generate errors
72
73 Data Types
74 ==========
75
76 * -Add domain capability (Rod Taylor)
77 * Add IPv6 capability to INET/CIDR types
78 * Remove Money type, add money formatting for decimal type
79 * -SELECT cash_out(2) crashes because of opaque
80 * -Declare typein/out functions in pg_proc with a special "C string" data type
81 * -Functions returning sets do not totally work
82 * Change factorial to return a numeric
83 * Change NUMERIC data type to use base 10,000 internally
84 * Change NUMERIC to enforce the maximum precision, and increase it
85 * Add function to return compressed length of TOAST data values (Tom)
86 * -Add GUC parameter for DATESTYLE
87 * Allow INET subnet tests using non-constants
88 * -Allow bytea to handle LIKE with non-TEXT patterns
89
90
91 * CONVERSION
92         o -Store binary-compatible type information in the system
93         o Allow better handling of numeric constants, type conversion 
94           [typeconv]
95
96 * ARRAYS
97         o Allow nulls in arrays
98         o Allow arrays to be ORDER'ed
99         o -Ensure we have array-eq operators for every built-in array type
100         o Support construction of array result values in expressions
101
102 * BINARY DATA
103         o Improve vacuum of large objects, like /contrib/vacuumlo
104         o Add security checking for large objects
105         o Make file in/out interface for TOAST columns, similar to large object
106           interface (force out-of-line storage and no compression)
107         o Auto-delete large objects when referencing row is deleted
108
109
110 Multi-Language Support
111 ======================
112
113 * Add NCHAR (as distinguished from ordinary varchar),
114 * Allow LOCALE on a per-column basis, default to ASCII
115 * Support multiple simultaneous character sets, per SQL92
116 * Improve Unicode combined character handling
117 * Optimize locale to have minimal performance impact when not used (Peter E)
118 * Add octet_length_server() and octet_length_client() (Thomas, Tatsuo)
119 * Make octet_length_client the same as octet_length() (?)
120 * Prevent mismatch of frontend/backend encodings from converting bytea
121   data from being interpreted as encoded strings
122
123 Views / Rules
124 =============
125
126 * Automatically create rules on views so they are updateable, per SQL92 [view]
127 * Add the functionality for WITH CHECK OPTION clause of CREATE VIEW
128 * Allow NOTIFY in rules involving conditionals
129 * Have views on temporary tables exist in the temporary namespace
130 * Move psql backslash information into views
131 * Allow RULE recompilation
132 * -Remove brackets as multi-statement rule grouping, must use parens (Bruce)
133 * Prevent aggregates from being used in rule WHERE clauses
134
135
136 Indexes
137 =======
138
139 * Allow CREATE INDEX zman_index ON test (date_trunc( 'day', zman ) datetime_ops)
140   fails index can't store constant parameters
141 * Order duplicate index entries by tid for faster heap lookups
142 * Allow inherited tables to inherit index, UNIQUE constraint, and primary
143   key, foreign key  [inheritance]
144 * UNIQUE INDEX on base column not honored on inserts from inherited table
145   INSERT INTO inherit_table (unique_index_col) VALUES (dup) should fail
146   [inheritance]
147 * -Allow UPDATE/DELETE on inherited table
148 * Add UNIQUE capability to non-btree indexes
149 * Add btree index support for reltime, tinterval, regproc
150 * Add rtree index support for line, lseg, path, point
151 * Certain indexes will not shrink, e.g. indexes on ever-increasing
152   columns and indexes with many duplicate keys
153 * Use indexes for min() and max() or convert to SELECT col FROM tab ORDER
154   BY col DESC LIMIT 1 if appropriate index exists and WHERE clause acceptible
155 * Allow LIKE indexing optimization for non-ASCII locales
156 * Use index to restrict rows returned by multi-key index when used with
157   non-consecutive keys or OR clauses, so fewer heap accesses
158 * Be smarter about insertion of already-ordered data into btree index
159 * -Add deleted bit to index tuples to reduce heap access
160 * Prevent index uniqueness checks when UPDATE does not modifying column
161 * Use bitmaps to fetch heap pages in sequential order [performance]
162 * Use bitmaps to combine existing indexes [performance]
163 * Improve handling of index scans for NULL
164 * Allow SELECT * FROM tab WHERE int2col = 4 to use int2col index, int8,
165   float4, numeric/decimal too [optimizer]
166 * Add FILLFACTOR to btree index creation
167 * Improve concurrency in GIST
168 * Improve concurrency of hash indexes (Neil Conway)
169 * -Test hash index performance and discourage usage
170
171
172 Commands
173 ========
174
175 * -Add SIMILAR TO to allow character classes, 'pg_[a-c]%'
176 * Add BETWEEN ASYMMETRIC/SYMMETRIC (Christopher)
177 * -Remove LIMIT #,# and force use LIMIT and OFFSET clauses in 7.3 (Bruce)
178 * Allow LIMIT/OFFSET to use expressions
179 * -Disallow TRUNCATE on tables that are involved in referential constraints
180 * -Add OR REPLACE clauses to non-FUNCTION object creation
181 * CREATE TABLE AS can not determine column lengths from expressions [atttypmod]
182 * Allow UPDATE to handle complex aggregates [update]
183 * -Prevent create/drop scripts from allowing extra args (Bruce)
184 * Allow command blocks to ignore certain types of errors
185 * Allow backslash handling in quoted strings to be disabled for portability
186 * Return proper effected tuple count from complex commands [return]
187 * Allow DELETE to handle table aliases for self-joins [delete]
188 * Add CORRESPONDING BY to UNION/INTERSECT/EXCEPT
189 * Allow REINDEX to rebuild all indexes, remove /contrib/reindex
190
191 * ALTER
192         o ALTER TABLE ADD COLUMN does not honor DEFAULT and non-CHECK CONSTRAINT
193         o -Add ALTER TABLE DROP COLUMN feature
194         o -Add ALTER TABLE DROP non-CHECK CONSTRAINT
195         o -ALTER TABLE ADD PRIMARY KEY (Christopher)
196         o -ALTER TABLE ADD UNIQUE (Christopher)
197         o -ALTER TABLE ALTER COLUMN SET/DROP NOT NULL (Christopher Kings-Lynne)
198         o ALTER TABLE ADD COLUMN column SERIAL doesn't create sequence
199         o ALTER TABLE ADD COLUMN column DEFAULT should fill existing
200           rows with DEFAULT value
201         o -Have ALTER TABLE OWNER change all dependant objects like indexes
202         o Add ALTER TABLE tab SET WITHOUT OIDS
203
204 * CLUSTER
205         o -Cluster all tables at once using pg_index.indisclustered set during
206           previous CLUSTER
207         o -Prevent loss of indexes, permissions, inheritance
208         o Automatically maintain clustering on a table
209         o Allow CLUSTER to cluster all tables, remove clusterdb
210
211 * COPY
212         o -Allow specification of column names
213         o Allow dump/load of CSV format
214         o -Change syntax to WITH DELIMITER, (keep old syntax around?)
215         o Allow COPY to report error lines and continue;  optionally
216           allow error codes to be specified; requires savepoints or can
217           not be run in a multi-statement transaction
218         o -Generate failure on short COPY lines rather than pad NULLs
219
220 * CURSOR
221         o Allow BINARY option to SELECT, just like DECLARE
222         o MOVE 0 should not move to end of cursor
223         o Allow UPDATE/DELETE WHERE CURRENT OF cursor using per-cursor tid
224           stored in the backend
225         o Prevent DROP of table being referenced by our own open cursor
226         o Allow cursors outside transactions [cursor]
227
228 * INSERT
229         o Allow INSERT/UPDATE of system-generated oid value for a row
230         o Allow INSERT INTO tab (col1, ..) VALUES (val1, ..), (val2, ..)
231         o -Allow INSERT INTO my_table VALUES (a, b, c, DEFAULT, x, y, z, ...)
232         o -Disallow missing columns in INSERT ... VALUES, per ANSI
233         o Allow INSERT/UPDATE ... RETURNING new.col or old.col; handle
234           RULE cases (Philip)
235
236 * SHOW/SET
237         o -Add command to display locks
238         o -Add SET or BEGIN timeout parameter to cancel query
239         o Add SET REAL_FORMAT and SET DOUBLE_PRECISION_FORMAT using printf args
240         o -Remove SET KSQO option now that OR processing is improved (Bruce)
241         o Add SET PERFORMANCE_TIPS option to suggest INDEX, VACUUM, VACUUM
242           ANALYZE, and CLUSTER
243         o Add SHOW command to see locale
244         o -Allow SHOW to output as a query result, like EXPLAIN
245         o -Abort all SET changes made in an aborted transaction
246         o Add SET SCHEMA
247
248 * SERVER-SIDE LANGUAGES
249         o Allow PL/PgSQL's RAISE function to take expressions
250         o -Fix PL/PgSQL to handle quoted mixed-case identifiers
251         o Change PL/PgSQL to use palloc() instead of malloc()
252         o Add untrusted version of plpython
253         o Allow Java server-side programming, http://pljava.sourceforge.net
254           [java]
255         o Fix problems with complex temporary table creation/destruction
256           without using PL/PgSQL EXECUTE, needs cache prevention/invalidation
257         o Fix PL/pgSQL RENAME to work on variables other than OLD/NEW
258         o Improve PL/PgSQL exception handling
259         o Allow parameters to be specified by name and type during 
260           definition
261         o Allow function parameters to be passed by name,
262           get_employee_salary(emp_id => 12345, tax_year => 2001)
263         o Add PL/PgSQL packages
264         o Allow array declarations and other data types in PL/PgSQl DECLARE
265         o Add PL/PgSQL PROCEDURES that can return multiple values
266         o Add table function support to pltcl, plperl, plpython
267
268
269 Clients
270 =======
271
272 * -Have pg_dump use LEFT OUTER JOIN in multi-table SELECTs
273   or multiple SELECTS to avoid bad system catalog entries
274 * -Have pg_dump -C dump database location and encoding information
275 * -Allow psql \d to show foreign keys
276 * -Allow psql \d to show temporary table structure (Tom)
277 * Allow psql to show transaction status if backend protocol changes made
278 * Add XML interface:  psql, pg_dump, COPY, separate server (?)
279 * -Have pg_dump use ADD PRIMARY KEY after COPY, for performance (Neil Conway)
280
281 * JDBC
282         o Comprehensive test suite. This may be available already.
283         o -Updateable resultSet
284         o JDBC-standard BLOB support
285         o Error Codes (pending backend implementation)
286         o Support both 'make' and 'ant'
287         o Fix LargeObject API to handle OIDs as unsigned ints
288         o -Implement cancel() method on Statement
289         o Use cursors implicitly to avoid large results (see setCursorName())
290         o -Add support for CallableStatements
291         o Add LISTEN/NOTIFY support to the JDBC driver (Barry)
292         o -Compile under jdk 1.4
293
294 * ECPG
295         o Implement set descriptor, using descriptor
296         o Make casts work in variable initializations
297         o Implement SQLDA
298         o Allow multi-threaded use of SQLCA
299         o Solve cardinality > 1 for input descriptors / variables
300         o Understand structure definitions outside a declare section
301         o sqlwarn[6] should be 'W' if the PRECISION or SCALE value specified
302         o Improve error handling
303         o Allow :var[:index] or :var[<integer>] as cvariable for an array var
304         o Add a semantic check level, e.g. check if a table really exists
305         o Fix nested C comments
306         o Add SQLSTATE
307         o fix handling of DB attributes that are arrays
308
309
310 Referential Integrity
311 =====================
312
313 * Add MATCH PARTIAL referential integrity [foreign]
314 * Add deferred trigger queue file (Jan)
315 * -Allow oid to act as a foreign key
316 * Implement dirty reads and use them in RI triggers
317 * Make triggers refer to columns by number, not name
318 * Enforce referential integrity for system tables
319 * -Allow user to control trigger firing order (Tom)
320 * -Add ALTER TRIGGER ... RENAME
321 * Change foreign key constraint for array -> element to mean element
322   in array
323 * -Fix foreign key constraints to not error on intermediate db states (Stephan)
324 * Allow DEFERRABLE UNIQUE constraints
325 * Allow triggers to be disabled [trigger]
326
327
328 Dependency Checking
329 ===================
330
331 * -Add pg_depend table for dependency recording; use sysrelid, oid,
332   depend_sysrelid, depend_oid, name
333 * -Auto-destroy sequence on DROP of table with SERIAL; perhaps a separate
334   SERIAL type
335 * Have SERIAL generate non-colliding sequence names when we have 
336   auto-destruction
337 * -Prevent column dropping if column is used by foreign key
338 * -Propagate column or table renaming to foreign key constraints
339 * -Automatically drop constraints/functions when object is dropped
340 * -Make foreign key constraints clearer in dump file
341 * -Make other constraints clearer in dump file
342 * -Make foreign keys easier to identify
343 * Flush cached query plans when their underlying catalog data changes
344 * Use dependency information to dump data in proper order
345
346
347 Transactions
348 ============
349
350 * -Allow autocommit so always in a transaction block
351 * Overhaul bufmgr/lockmgr/transaction manager
352 * Allow savepoints / nested transactions [transactions]
353
354
355 Exotic Features
356 ===============
357
358 * Add sql3 recursive unions
359 * Add the concept of dataspaces/tablespaces [tablespaces]
360 * -Add SQL92 schemas (Tom)
361 * Allow queries across multiple databases [crossdb]
362 * Add pre-parsing phase that converts non-ANSI features to supported features
363 * Allow plug-in modules to emulate features from other databases
364 * SQL*Net listener that makes PostgreSQL appear as an Oracle database
365   to clients
366
367
368 PERFORMANCE
369 ===========
370
371
372 Fsync
373 =====
374
375 * Delay fsync() when other backends are about to commit too [fsync]
376         o Determine optimal commit_delay value
377 * Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options
378         o Allow multiple blocks to be written to WAL with one write()
379
380
381 Cache
382 =====
383 * -Cache most recent query plan(s) (Neil) [prepare]
384 * Shared catalog cache, reduce lseek()'s by caching table size in shared area
385 * Add free-behind capability for large sequential scans (Bruce)
386 * Allow binding query args over FE/BE protocol
387 * Consider use of open/fcntl(O_DIRECT) to minimize OS caching
388 * Make blind writes go through the file descriptor cache
389
390
391 Vacuum
392 ======
393
394 * Improve speed with indexes (perhaps recreate index instead) [vacuum]
395 * Reduce lock time by moving tuples with read lock, then write
396   lock and truncate table [vacuum]
397 * Provide automatic running of vacuum in the background (Tom)
398 * Allow free space map to be auto-sized or warn when it is too small
399
400 Locking
401 =======
402
403 * Make locking of shared data structures more fine-grained
404 * Add code to detect an SMP machine and handle spinlocks accordingly
405   from distributted.net, http://www1.distributed.net/source, 
406   in client/common/cpucheck.cpp
407 * Research use of sched_yield() for spinlock acquisition failure
408
409
410 Startup Time
411 ============
412
413 * Experiment with multi-threaded backend [thread]
414 * Add connection pooling [pool]
415 * Allow persistent backends [persistent]
416 * Create a transaction processor to aid in persistent connections and
417   connection pooling
418 * Do listen() in postmaster and accept() in pre-forked backend
419 * Have pre-forked backend pre-connect to last requested database or pass
420   file descriptor to backend pre-forked for matching database
421 * -Cache system catalog information in per-database files (Tom)
422
423
424 Write-Ahead Log
425 ===============
426
427 * Have after-change WAL write()'s write only modified data to kernel
428 * Reduce number of after-change WAL writes; they exist only to gaurd against
429   partial page writes [wal]
430 * Turn off after-change writes if fsync is disabled (?)
431 * Add WAL index reliability improvement to non-btree indexes
432 * -Reorder postgresql.conf WAL items in order of importance (Bruce)
433 * -Remove wal_files postgresql.conf option because WAL files are now recycled
434 * Find proper defaults for postgresql.conf WAL entries
435 * Add checkpoint_min_warning postgresql.conf option to warn about checkpoints
436   that are too frequent
437 * Allow xlog directory location to be specified during initdb, perhaps
438   using symlinks
439
440
441 Optimizer / Executor
442 ====================
443
444 * Improve Subplan list handling
445 * Allow Subplans to use efficient joins(hash, merge) with upper variable
446 * -Improve dynamic memory allocation by introducing tuple-context memory
447   allocation (Tom)
448 * Add hash for evaluating GROUP BY aggregates
449 * -Nested FULL OUTER JOINs don't work (Tom)
450 * Allow merge and hash joins on expressions not just simple variables (Tom)
451 * -Add new pg_proc cachable settings to specify whether function can be
452   evaluated only once or once per query
453 * -Change FIXED_CHAR_SEL to 0.20 from 0.04 to give better selectivity (Bruce)
454 * Make IN/NOT IN have similar performance to EXISTS/NOT EXISTS [exists]
455 * Missing optimizer selectivities for date, r-tree, etc. [optimizer]
456 * Allow ORDER BY ... LIMIT to select top values without sort or index
457   using a sequential scan for highest/lowest values (Oleg)
458 * Inline simple SQL functions to avoid overhead (Tom)
459 * Precompile SQL functions to avoid overhead (Neil Conway)
460 * Add utility to compute accurate random_page_cost value
461 * Improve ability to display optimizer analysis using OPTIMIZER_DEBUG
462 * Use CHECK constraints to improve optimizer decisions
463
464
465 Miscellaneous
466 =============
467
468 * Do async I/O for faster random read-ahead of data
469 * Get faster regex() code from Henry Spencer <henry@zoo.utoronto.ca>
470   when it is available
471 * Use mmap() rather than SYSV shared memory or to write WAL files (?) [mmap]
472 * Improve caching of attribute offsets when NULLs exist in the row
473 * -Add Intimate Shared Memory(ISM) for Solaris
474 * Add documentation to lock shared memory into RAM for each OS, if possible
475 * -Use faster flex flags for performance improvement (Peter E)
476 * -Add BSD-licensed qsort() for Solaris
477
478
479 Source Code
480 ===========
481
482 * Add use of 'const' for variables in source tree
483 * -Fix problems with libpq non-blocking/async code
484 * -Make sure all block numbers are unsigned to increase maximum table size
485 * -Merge LockMethodCtl and LockMethodTable into one shared structure (Bruce)
486 * -HOLDER/HOLDERTAB rename to PROCLOCK/PROCLOCKTAG (Bruce)
487 * -Remove LockMethodTable.prio field, not used (Bruce)
488 * Rename some /contrib modules from pg* to pg_*
489 * Move some things from /contrib into main tree
490 * Remove warnings created by -Wcast-align
491 * Move platform-specific ps status display info from ps_status.c to ports
492 * -Make one version of simple_prompt() in code (Bruce, Tom)
493 * -Compile in syslog functionaility by default (Tatsuo)
494 * Modify regression tests to prevent failures do to minor numeric rounding
495 * Add OpenBSD's getpeereid() call for local socket authentication (Bruce)
496 * Improve access-permissions check on data directory in Cygwin (Tom)
497 * -Report failure to find readline or zlib at end of configure run
498 * Add --port flag to regression tests
499 * -Increase identifier length (NAMEDATALEN) if small performance hit,
500 * -Increase maximum number of function parameters if little wasted space
501 * Add documentation for perl, including mention of DBI/DBD perl location
502 * Add optional CRC checksum to heap and index pages
503 * Change representation of whole-tuple parameters to functions
504 * Clarify use of 'application' and 'command' tags in SGML docs
505 * Better document ability to build only certain interfaces (Marc)
506 * Remove or relicense modules that are not under the BSD license, if possible
507 * Remove memory/file descriptor freeing befor elog(ERROR)  (Bruce)
508 * Create native Win32 port [win32]
509 * Fix glibc's mktime() to handle pre-1970's dates
510
511
512 ---------------------------------------------------------------------------
513
514
515 Developers who have claimed items are:
516 --------------------------------------
517 * Barry is Barry Lind <barry@xythos.com>
518 * Billy is Billy G. Allie <Bill.Allie@mug.org>
519 * Bruce is Bruce Momjian <pgman@candle.pha.pa.us>
520 * Christopher is Christopher Kings-Lynne <chriskl@familyhealth.com.au>
521 * D'Arcy is D'Arcy J.M. Cain <darcy@druid.net>
522 * Dave is Dave Cramer <dave@fastcrypt.com>
523 * Edmund is Edmund Mergl <E.Mergl@bawue.de>
524 * Hiroshi is Hiroshi Inoue <Inoue@tpf.co.jp>
525 * Karel is Karel Zak <zakkr@zf.jcu.cz>
526 * Jan is Jan Wieck <wieck@sapserv.debis.de>
527 * Liam is Liam Stewart <liams@redhat.com>
528 * Marc is Marc Fournier <scrappy@hub.org>
529 * Mark is Mark Hollomon <mhh@mindspring.com>
530 * Marko is Marko Kreen <marko@l-t.ee>
531 * Michael is Michael Meskes <meskes@postgresql.org>
532 * Neil is Neil Conway <nconway@klamath.dyndns.org>
533 * Oleg is Oleg Bartunov <oleg@sai.msu.su>
534 * Peter M is Peter T Mount <peter@retep.org.uk>
535 * Peter E is Peter Eisentraut <peter_e@gmx.net>
536 * Philip is Philip Warner <pjw@rhyme.com.au>
537 * Rod is Rod Taylor <rbt@zort.ca>
538 * Ross is Ross J. Reedstrom <reedstrm@wallace.ece.rice.edu>
539 * Ryan is Ryan Bradetich <rbrad@hpb50023.boi.hp.com>
540 * Stephan is Stephan Szabo <sszabo@megazone23.bigpanda.com>
541 * Tatsuo is Tatsuo Ishii <t-ishii@sra.co.jp>
542 * Thomas is Thomas Lockhart <lockhart@fourpalms.org>
543 * Tom is Tom Lane <tgl@sss.pgh.pa.us>
544 * TomH is Tom I Helbekkmo <tih@Hamartun.Priv.no>
545 * Vadim is Vadim B. Mikheev <vadim4o@email.com>