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