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