]> granicus.if.org Git - postgresql/blob - doc/TODO
Done:
[postgresql] / doc / TODO
1 TODO list for PostgreSQL
2 ========================
3 Last updated:           Fri Nov 22 22:52:37 EST 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.4 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 * Show location of syntax error in query [yacc]
39
40
41 Administration
42 ==============
43
44 * Incremental backups
45 * Remove unreferenced table files and temp tables during database vacuum
46   or postmaster startup (Bruce)
47 * Remove behavior of postmaster -o after making postmaster/postgres
48   flags unique
49 * Allow easy display of usernames in a group
50 * Allow configuration files to be specified in a different directory
51 * Add start time to pg_stat_activity
52 * Allow limits on per-db/user connections
53 * Have standalone backend read postgresql.conf
54
55
56 Data Types
57 ==========
58
59 * Add IPv6 capability to INET/CIDR types
60 * Remove Money type, add money formatting for decimal type
61 * Change factorial to return a numeric
62 * Change NUMERIC data type to use base 10,000 internally
63 * Change NUMERIC to enforce the maximum precision, and increase it
64 * Add function to return compressed length of TOAST data values (Tom)
65 * Allow INET subnet tests using non-constants
66 * Add now("transaction|statement|clock") functionality
67 * -Add GUC variables to control floating number output digits (Pedro Ferreira)
68 * Have sequence dependency track use of DEFAULT sequences, seqname.nextval
69
70 * CONVERSION
71         o Allow better handling of numeric constants, type conversion 
72           [typeconv]
73
74 * ARRAYS
75         o Allow nulls in arrays
76         o Allow arrays to be ORDER'ed
77         o Support construction of array result values in expressions
78
79 * BINARY DATA
80         o Improve vacuum of large objects, like /contrib/vacuumlo
81         o Add security checking for large objects
82         o Make file in/out interface for TOAST columns, similar to large object
83           interface (force out-of-line storage and no compression)
84         o Auto-delete large objects when referencing row is deleted
85
86
87 Multi-Language Support
88 ======================
89
90 * Add NCHAR (as distinguished from ordinary varchar),
91 * Allow LOCALE on a per-column basis, default to ASCII
92 * Support multiple simultaneous character sets, per SQL92
93 * Improve Unicode combined character handling
94 * Optimize locale to have minimal performance impact when not used (Peter E)
95 * Add octet_length_server() and octet_length_client() (Thomas, Tatsuo)
96 * Make octet_length_client the same as octet_length() (?)
97 * Prevent mismatch of frontend/backend encodings from converting bytea
98   data from being interpreted as encoded strings
99 * Remove Cyrillic recode support
100
101  
102 Views / Rules
103 =============
104
105 * Automatically create rules on views so they are updateable, per SQL92 [view]
106 * Add the functionality for WITH CHECK OPTION clause of CREATE VIEW
107 * Allow NOTIFY in rules involving conditionals
108 * Have views on temporary tables exist in the temporary namespace
109 * Move psql backslash information into views
110 * Allow RULE recompilation
111
112
113 Indexes
114 =======
115
116 * Allow CREATE INDEX zman_index ON test (date_trunc( 'day', zman ) datetime_ops)
117   fails index can't store constant parameters
118 * Order duplicate index entries by tid for faster heap lookups
119 * Allow inherited tables to inherit index, UNIQUE constraint, and primary
120   key, foreign key  [inheritance]
121 * UNIQUE INDEX on base column not honored on inserts from inherited table
122   INSERT INTO inherit_table (unique_index_col) VALUES (dup) should fail
123   [inheritance]
124 * Add UNIQUE capability to non-btree indexes
125 * Add btree index support for reltime, tinterval, regproc
126 * Add rtree index support for line, lseg, path, point
127 * Certain indexes will not shrink, e.g. indexes on ever-increasing
128   columns and indexes with many duplicate keys
129 * Use indexes for min() and max() or convert to SELECT col FROM tab ORDER
130   BY col DESC LIMIT 1 if appropriate index exists and WHERE clause acceptible
131 * Allow LIKE indexing optimization for non-ASCII locales
132 * Use index to restrict rows returned by multi-key index when used with
133   non-consecutive keys or OR clauses, so fewer heap accesses
134 * Be smarter about insertion of already-ordered data into btree index
135 * Prevent index uniqueness checks when UPDATE does not modifying column
136 * Use bitmaps to fetch heap pages in sequential order [performance]
137 * Use bitmaps to combine existing indexes [performance]
138 * Improve handling of index scans for NULL
139 * Allow SELECT * FROM tab WHERE int2col = 4 to use int2col index, int8,
140   float4, numeric/decimal too [optimizer]
141 * Add FILLFACTOR to btree index creation
142 * Add concurrency to GIST
143 * Improve concurrency of hash indexes (Neil)
144
145
146 Commands
147 ========
148
149 * Add BETWEEN ASYMMETRIC/SYMMETRIC (Christopher)
150 * Allow LIMIT/OFFSET to use expressions
151 * CREATE TABLE AS can not determine column lengths from expressions [atttypmod]
152 * Allow UPDATE to handle complex aggregates [update]
153 * Allow command blocks to ignore certain types of errors
154 * Allow backslash handling in quoted strings to be disabled for portability
155 * Return proper effected tuple count from complex commands [return]
156 * Allow DELETE to handle table aliases for self-joins [delete]
157 * Add CORRESPONDING BY to UNION/INTERSECT/EXCEPT
158 * Allow REINDEX to rebuild all indexes, remove /contrib/reindex
159 * Make a transaction-safe TRUNCATE
160 * Fix SELECT ... INTO and CREATE TABLE AS to have appopriate OID column
161
162
163 * ALTER
164         o ALTER TABLE ADD COLUMN does not honor DEFAULT and non-CHECK CONSTRAINT
165         o ALTER TABLE ADD COLUMN column DEFAULT should fill existing
166           rows with DEFAULT value
167         o ALTER TABLE ADD COLUMN column SERIAL doesn't create sequence because
168           of the item above
169         o Add ALTER TABLE tab SET WITHOUT OIDS
170
171 * CLUSTER
172         o Automatically maintain clustering on a table
173         o Allow CLUSTER to cluster all tables, remove clusterdb
174
175 * COPY
176         o Allow psql \copy to specify column names
177         o Allow dump/load of CSV format
178         o Allow COPY to report error lines and continue;  optionally
179           allow error codes to be specified; requires savepoints or can
180           not be run in a multi-statement transaction
181         o Allow copy to understand \x as hex
182
183 * CURSOR
184         o Allow BINARY option to SELECT, just like DECLARE
185         o -MOVE 0 should not move to end of cursor (Bruce)
186         o Allow UPDATE/DELETE WHERE CURRENT OF cursor using per-cursor tid
187           stored in the backend
188         o Prevent DROP of table being referenced by our own open cursor
189         o Allow cursors outside transactions [cursor]
190
191 * INSERT
192         o Allow INSERT/UPDATE of system-generated oid value for a row
193         o Allow INSERT INTO tab (col1, ..) VALUES (val1, ..), (val2, ..)
194         o Allow INSERT/UPDATE ... RETURNING new.col or old.col; handle
195           RULE cases (Philip)
196
197 * SHOW/SET
198         o Add SET REAL_FORMAT and SET DOUBLE_PRECISION_FORMAT using printf args
199         o Add SET PERFORMANCE_TIPS option to suggest INDEX, VACUUM, VACUUM
200           ANALYZE, and CLUSTER
201         o Add SET SCHEMA
202         o Allow EXPLAIN EXECUTE to see prepared plans
203         o Allow SHOW of non-modifiable variables, like pg_controldata
204         o Add GUC parameter to control the maximum number of rewrite cycles
205
206 * SERVER-SIDE LANGUAGES
207         o Allow PL/PgSQL's RAISE function to take expressions
208         o Change PL/PgSQL to use palloc() instead of malloc()
209         o Add untrusted version of plpython
210         o Allow Java server-side programming, http://pljava.sourceforge.net
211           [java]
212         o Fix problems with complex temporary table creation/destruction
213           without using PL/PgSQL EXECUTE, needs cache prevention/invalidation
214         o Fix PL/pgSQL RENAME to work on variables other than OLD/NEW
215         o Improve PL/PgSQL exception handling
216         o Allow parameters to be specified by name and type during 
217           definition
218         o Allow function parameters to be passed by name,
219           get_employee_salary(emp_id => 12345, tax_year => 2001)
220         o Add PL/PgSQL packages
221         o Allow array declarations and other data types in PL/PgSQL DECLARE
222         o Add PL/PgSQL PROCEDURES that can return multiple values
223         o Add table function support to pltcl, plperl, plpython
224         o Make PL/PgSQL %TYPE schema-aware 
225
226
227 Clients
228 =======
229
230 * Allow psql to show transaction status if backend protocol changes made
231 * Add XML interface:  psql, pg_dump, COPY, separate server (?)
232 * Add schema, cast, and conversion backslash commands to psql
233 * Allow pg_dump to dump a specific schema
234 * Allow psql to do table completion for SELECT * FROM schema_part and
235   table completion for SELECT * FROM schema_name.
236
237 * JDBC
238         o Comprehensive test suite. This may be available already.
239         o JDBC-standard BLOB support
240         o Error Codes (pending backend implementation)
241         o Support both 'make' and 'ant'
242         o Fix LargeObject API to handle OIDs as unsigned ints
243         o Use cursors implicitly to avoid large results (see setCursorName())
244         o Add LISTEN/NOTIFY support to the JDBC driver (Barry)
245
246 * ECPG
247         o Implement set descriptor, using descriptor
248         o Make casts work in variable initializations
249         o Implement SQLDA
250         o Allow multi-threaded use of SQLCA
251         o Solve cardinality > 1 for input descriptors / variables
252         o Understand structure definitions outside a declare section
253         o sqlwarn[6] should be 'W' if the PRECISION or SCALE value specified
254         o Improve error handling
255         o Allow :var[:index] or :var[<integer>] as cvariable for an array var
256         o Add a semantic check level, e.g. check if a table really exists
257         o Fix nested C comments
258         o Add SQLSTATE
259         o fix handling of DB attributes that are arrays
260
261
262 Referential Integrity
263 =====================
264
265 * Add MATCH PARTIAL referential integrity [foreign]
266 * Add deferred trigger queue file (Jan)
267 * Implement dirty reads and use them in RI triggers
268 * Enforce referential integrity for system tables
269 * Change foreign key constraint for array -> element to mean element
270   in array
271 * Allow DEFERRABLE UNIQUE constraints
272 * Allow triggers to be disabled [trigger]
273 * -Support statement-level triggers and triggers on columns (Neil)
274
275
276 Dependency Checking
277 ===================
278
279 * Flush cached query plans when their underlying catalog data changes
280 * Use dependency information to dump data in proper order
281
282
283 Transactions
284 ============
285
286 * Overhaul bufmgr/lockmgr/transaction manager
287 * Allow savepoints / nested transactions [transactions] (Bruce)
288
289
290 Exotic Features
291 ===============
292
293 * Add sql3 recursive unions
294 * Add the concept of dataspaces/tablespaces [tablespaces]
295 * Allow queries across multiple databases [crossdb]
296 * Add pre-parsing phase that converts non-ANSI features to supported features
297 * Allow plug-in modules to emulate features from other databases
298 * SQL*Net listener that makes PostgreSQL appear as an Oracle database
299   to clients
300
301
302 PERFORMANCE
303 ===========
304
305
306 Fsync
307 =====
308
309 * Delay fsync() when other backends are about to commit too [fsync]
310         o Determine optimal commit_delay value
311 * Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options
312         o Allow multiple blocks to be written to WAL with one write()
313
314
315 Cache
316 =====
317 * Shared catalog cache, reduce lseek()'s by caching table size in shared area
318 * Add free-behind capability for large sequential scans (Bruce)
319 * Allow binding query args over FE/BE protocol
320 * Consider use of open/fcntl(O_DIRECT) to minimize OS caching
321 * Make blind writes go through the file descriptor cache
322
323
324 Vacuum
325 ======
326
327 * Improve speed with indexes (perhaps recreate index instead) [vacuum]
328 * Reduce lock time by moving tuples with read lock, then write
329   lock and truncate table [vacuum]
330 * Provide automatic running of vacuum in the background (Tom) [vacuum]
331 * Allow free space map to be auto-sized or warn when it is too small
332
333
334 Locking
335 =======
336
337 * Make locking of shared data structures more fine-grained
338 * Add code to detect an SMP machine and handle spinlocks accordingly
339   from distributted.net, http://www1.distributed.net/source, 
340   in client/common/cpucheck.cpp
341 * Research use of sched_yield() for spinlock acquisition failure
342
343
344 Startup Time
345 ============
346
347 * Experiment with multi-threaded backend [thread]
348 * Add connection pooling [pool]
349 * Allow persistent backends [persistent]
350 * Create a transaction processor to aid in persistent connections and
351   connection pooling
352 * Do listen() in postmaster and accept() in pre-forked backend
353 * Have pre-forked backend pre-connect to last requested database or pass
354   file descriptor to backend pre-forked for matching database
355
356
357 Write-Ahead Log
358 ===============
359
360 * Have after-change WAL write()'s write only modified data to kernel
361 * Reduce number of after-change WAL writes; they exist only to gaurd against
362   partial page writes [wal]
363 * Turn off after-change writes if fsync is disabled (?)
364 * Add WAL index reliability improvement to non-btree indexes
365 * Find proper defaults for postgresql.conf WAL entries
366 * Add checkpoint_min_warning postgresql.conf option to warn about checkpoints
367   that are too frequent
368 * Allow xlog directory location to be specified during initdb, perhaps
369   using symlinks
370 * Allow pg_xlog to be moved without symlinks
371
372
373 Optimizer / Executor
374 ====================
375
376 * Improve Subplan list handling
377 * Allow Subplans to use efficient joins(hash, merge) with upper variable
378 * -Add hash for evaluating GROUP BY aggregates (Tom)
379 * Allow merge and hash joins on expressions not just simple variables (Tom)
380 * Make IN/NOT IN have similar performance to EXISTS/NOT EXISTS [exists]
381 * Missing optimizer selectivities for date, r-tree, etc. [optimizer]
382 * Allow ORDER BY ... LIMIT to select top values without sort or index
383   using a sequential scan for highest/lowest values (Oleg)
384 * Inline simple SQL functions to avoid overhead (Tom)
385 * Precompile SQL functions to avoid overhead (Neil)
386 * Add utility to compute accurate random_page_cost value
387 * Improve ability to display optimizer analysis using OPTIMIZER_DEBUG
388 * Use CHECK constraints to improve optimizer decisions
389 * Check GUC geqo_threshold to see if it is still accurate
390 * Allow sorting, temp files, temp tables to use multiple work directories
391
392
393 Miscellaneous
394 =============
395
396 * Do async I/O for faster random read-ahead of data
397 * Get faster regex() code from Henry Spencer <henry@zoo.utoronto.ca>
398   when it is available
399 * Use mmap() rather than SYSV shared memory or to write WAL files (?) [mmap]
400 * Improve caching of attribute offsets when NULLs exist in the row
401
402
403 Source Code
404 ===========
405
406 * Add use of 'const' for variables in source tree
407 * Rename some /contrib modules from pg* to pg_*
408 * Move some things from /contrib into main tree
409 * Remove warnings created by -Wcast-align
410 * Move platform-specific ps status display info from ps_status.c to ports
411 * Modify regression tests to prevent failures do to minor numeric rounding
412 * Add OpenBSD's getpeereid() call for local socket authentication (Bruce)
413 * Improve access-permissions check on data directory in Cygwin (Tom)
414 * Add --port flag to regression tests
415 * Add documentation for perl, including mention of DBI/DBD perl location
416 * Add optional CRC checksum to heap and index pages
417 * Change representation of whole-tuple parameters to functions
418 * Clarify use of 'application' and 'command' tags in SGML docs
419 * Better document ability to build only certain interfaces (Marc)
420 * Remove or relicense modules that are not under the BSD license, if possible
421 * Remove memory/file descriptor freeing befor elog(ERROR)  (Bruce)
422 * Create native Win32 port [win32]
423 * Acquire lock on a relation before building a relcache entry for it
424 * Research interaction of setitimer() and sleep() used by statement_timeout
425
426 ---------------------------------------------------------------------------
427
428
429 Developers who have claimed items are:
430 --------------------------------------
431 * Barry is Barry Lind <barry@xythos.com>
432 * Billy is Billy G. Allie <Bill.Allie@mug.org>
433 * Bruce is Bruce Momjian <pgman@candle.pha.pa.us>
434 * Christopher is Christopher Kings-Lynne <chriskl@familyhealth.com.au>
435 * D'Arcy is D'Arcy J.M. Cain <darcy@druid.net>
436 * Dave is Dave Cramer <dave@fastcrypt.com>
437 * Edmund is Edmund Mergl <E.Mergl@bawue.de>
438 * Gavin Sherry <swm@linuxworld.com.au>
439 * Hiroshi is Hiroshi Inoue <Inoue@tpf.co.jp>
440 * Karel is Karel Zak <zakkr@zf.jcu.cz>
441 * Jan is Jan Wieck <wieck@sapserv.debis.de>
442 * Liam is Liam Stewart <liams@redhat.com>
443 * Marc is Marc Fournier <scrappy@hub.org>
444 * Mark is Mark Hollomon <mhh@mindspring.com>
445 * Marko is Marko Kreen <marko@l-t.ee>
446 * Michael is Michael Meskes <meskes@postgresql.org>
447 * Neil is Neil Conway <neilc@samurai.com>
448 * Oleg is Oleg Bartunov <oleg@sai.msu.su>
449 * Peter M is Peter T Mount <peter@retep.org.uk>
450 * Peter E is Peter Eisentraut <peter_e@gmx.net>
451 * Philip is Philip Warner <pjw@rhyme.com.au>
452 * Rod is Rod Taylor <rbt@zort.ca>
453 * Ross is Ross J. Reedstrom <reedstrm@wallace.ece.rice.edu>
454 * Ryan is Ryan Bradetich <rbrad@hpb50023.boi.hp.com>
455 * Stephan is Stephan Szabo <sszabo@megazone23.bigpanda.com>
456 * Tatsuo is Tatsuo Ishii <t-ishii@sra.co.jp>
457 * Thomas is Thomas Lockhart <lockhart@fourpalms.org>
458 * Tom is Tom Lane <tgl@sss.pgh.pa.us>
459 * TomH is Tom I Helbekkmo <tih@Hamartun.Priv.no>
460 * Vadim is Vadim B. Mikheev <vadim4o@email.com>