@@ -5,10 +5,11 @@ TODO list for PostgreSQL
5
5
Bracketed items "[]" have more detail.
6
6
7
7
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
8
- Last updated: Sat Jul 31 02:13:51 EDT 2004
8
+ Last updated: Sun Aug 1 01:15:12 EDT 2004
9
9
10
10
The most recent version of this document can be viewed at the PostgreSQL web site, http://www.PostgreSQL.org.
11
11
12
+ Remove items before beta?
12
13
13
14
Urgent
14
15
======
20
21
Administration
21
22
==============
22
23
23
- * Incremental backups
24
+ * - Incremental backups
24
25
* Remove behavior of postmaster -o after making postmaster/postgres
25
26
flags unique
26
27
* -Allow configuration files to be specified in a different directory
@@ -31,34 +32,73 @@ Administration
31
32
* -Allow logging of only data definition(DDL), or DDL and modification statements
32
33
* -Allow log lines to include session-level information, like database and user
33
34
* Allow server log information to be output as INSERT statements
35
+
36
+ This would allow server log information to be easily loaded into
37
+ a database for analysis.
38
+
34
39
* Prevent default re-use of sysids for dropped users and groups
40
+
41
+ Currently, if a user is removed while he still owns objects, a new
42
+ user given might be given their user id and inherit the
43
+ previous users objects.
44
+
35
45
* Prevent dropping user that still owns objects, or auto-drop the objects
36
- * Allow pooled connections to query prepared queries
37
- * Allow pooled connections to close all open WITH HOLD cursors
46
+ * Allow pooled connections to list all prepared queries
47
+
48
+ This would allow an application inheriting a pooled connection to know
49
+ the queries prepared in the current session.
50
+
38
51
* Allow major upgrades without dump/reload, perhaps using pg_upgrade
39
- * Have SHOW ALL and pg_settings show descriptions for server-side variables(Joe)
40
- * Allow external interfaces to extend the GUC variable set
41
- * Allow GRANT/REVOKE permissions to be given to all schema objects with one command
52
+ * Have SHOW ALL and pg_settings show descriptions for server-side variables
53
+ * -Allow external interfaces to extend the GUC variable set
54
+ * Allow GRANT/REVOKE permissions to be given to all schema objects with one
55
+ command
42
56
* Remove unreferenced table files created by transactions that were
43
57
in-progress when the server terminated abruptly
44
58
* Allow reporting of which objects are in which tablespaces
59
+
60
+ This item is difficult because a tablespace can contain objects from
61
+ multiple databases. There is a server-side function that returns the
62
+ databases which use a specific tablespace, so this requires a tool
63
+ that will call that function and connect to each database to find the
64
+ objects in each database for that tablespace.
65
+
45
66
* Allow database recovery where tablespaces can't be created
46
- * Add include functionality to postgresql.conf
47
- * Allow changing of already-created database and schema tablespaces
48
- * Allow moving system tables to other tablespaces, where possible
67
+
68
+ When a pg_dump is restored, all tablespaces will attempt to be created
69
+ in their original locations. If this fails, the user must be able to
70
+ adjust the restore process.
71
+
72
+ * Add "include file" functionality in postgresql.conf
49
73
* Add session start time and last statement time to pg_stat_activity
50
- * Allow server logs to be read using SQL commands
51
- * Allow server configuration parameters to be modified remotetly
74
+ * Allow server logs to be remotely read using SQL commands
75
+ * Allow server configuration parameters to be remotely modified
52
76
* Allow administrators to safely terminate individual sessions
53
- * Allow point-in-time recovery to archive partially filled logs
77
+
78
+ Right now, SIGTERM will terminate a session, but it is treated as
79
+ though the postmaster has paniced and shared memory might not be
80
+ cleaned up properly. A new signal is needed for safe termination.
81
+
82
+ * Allow point-in-time recovery to archive partially filled write-ahead
83
+ logs
84
+
85
+ Currently only full WAL files are archived. This means that the most
86
+ recent transactions aren't available for recovery in case of a disk
87
+ failure.
54
88
55
89
* Improve replication solutions
56
90
o Automatic failover
91
+
92
+ The proper solution to this will probably the use of a master/slave
93
+ replication solution like Sloney and a connection pooling tool like
94
+ pgpool.
95
+
57
96
o Load balancing
58
- o Master/slave replication
59
- o Multi-master replication
60
- o Partition data across servers
61
- o Queries across databases or servers (two-phase commit)
97
+
98
+ You can use any of the master/slave replication servers to use a
99
+ standby server for data warehousing. To allow read/write queries to
100
+ multiple servers, you need multi-master replication like pgcluster.
101
+
62
102
o Allow replication over unreliable or non-persistent links
63
103
64
104
@@ -68,56 +108,73 @@ Data Types
68
108
* Remove Money type, add money formatting for decimal type
69
109
* -Change factorial to return a numeric (Gavin)
70
110
* Change NUMERIC to enforce the maximum precision, and increase it
71
- * Add function to return compressed length of TOAST data values (Tom)
72
- * Allow INET subnet tests using non-constants to be indexed
111
+ * Add function to return compressed length of TOAST data values
112
+ * Allow INET subnet tests with non-constants to be indexed
73
113
* Add transaction_timestamp(), statement_timestamp(), clock_timestamp() functionality
74
- * Have sequence dependency track use of DEFAULT sequences, seqname.nextval
75
- * Disallow changing default expression of a SERIAL column
114
+
115
+ Current CURRENT_TIMESTAMP returns the start time of the current
116
+ transaction, and gettimeofday() returns the wallclock time. This will
117
+ make time reporting more consistent and will allow reporting of
118
+ the statement start time.
119
+
120
+ * Have sequence dependency track use of DEFAULT sequences,
121
+ seqname.nextval (?)
122
+ * Disallow changing default expression of a SERIAL column (?)
76
123
* Allow infinite dates just like infinite timestamps
77
124
* -Allow pg_dump to dump sequences using NO_MAXVALUE and NO_MINVALUE
78
- * Allow backend to output result sets in XML
79
125
* -Prevent whole-row references from leaking memory, e.g. SELECT COUNT(tab.*)
80
126
* Have initdb set DateStyle based on locale?
81
127
* Add pg_get_acldef(), pg_get_typedefault(), and pg_get_attrdef()
82
- * Add ALTER DOMAIN, AGGREGATE, CONVERSION, SEQUENCE ... OWNER TO
83
- * Allow to_char to print localized month names (Karel)
128
+ * Allow to_char to print localized month names
84
129
* Allow functions to have a search path specified at creation time
85
130
* -Make LENGTH() of CHAR() not count trailing spaces
86
131
* Allow substring/replace() to get/set bit values
87
132
* Add GUC variable to allow output of interval values in ISO8601 format
88
- * Support composite types as table columns
133
+ * - Support composite types as table columns
89
134
* Fix data types where equality comparison isn't intuitive, e.g. box
90
135
91
136
92
137
* ARRAYS
93
138
o Allow nulls in arrays
94
139
o Allow MIN()/MAX() on arrays
95
140
o Delay resolution of array expression type so assignment coercion
96
- can be performed on empty array expressions (Joe)
141
+ can be performed on empty array expressions
97
142
o Modify array literal representation to handle array index lower bound
98
143
of other than one
99
144
100
145
101
146
* BINARY DATA
102
- o Improve vacuum of large objects, like /contrib/vacuumlo
147
+ o Improve vacuum of large objects, like /contrib/vacuumlo (?)
103
148
o Add security checking for large objects
104
- o Make file in/out interface for TOAST columns, similar to large object
105
- interface (force out-of-line storage and no compression)
149
+
150
+ Currently large objects entries do not have owners. Permissions can
151
+ only be set at the pg_largeobject table level.
152
+
106
153
o Auto-delete large objects when referencing row is deleted
107
154
155
+ o Allow read/write into TOAST values like large objects
156
+
157
+ This requires the TOAST column to be stored EXTERNAL.
158
+
108
159
109
160
Multi-Language Support
110
161
======================
111
162
112
163
* Add NCHAR (as distinguished from ordinary varchar),
113
164
* Allow locale to be set at database creation
114
- * Allow locale on a per-column basis, default to ASCII
115
- * Optimize locale to have minimal performance impact when not used (Peter E)
165
+
166
+ Currently locale can only be set during initdb.
167
+
168
+ * Allow encoding on a per-column basis
169
+
170
+ Right now only one encoding is allowed per database.
171
+
172
+ * Optimize locale to have minimal performance impact when not used
116
173
* Support multiple simultaneous character sets, per SQL92
117
- * Improve Unicode combined character handling
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
174
+ * Improve Unicode combined character handling (?)
175
+ * Add octet_length_server() and octet_length_client()
176
+ * Make octet_length_client() the same as octet_length()?
177
+ * - Prevent mismatch of frontend/backend encodings from converting bytea
121
178
data from being interpreted as encoded strings
122
179
* -Fix upper()/lower() to work for multibyte encodings
123
180
@@ -136,69 +193,131 @@ Views / Rules
136
193
Indexes
137
194
=======
138
195
139
- * -Order duplicate index entries on creation by tid for faster heap lookups
196
+ * -Order duplicate index entries on creation by ctid for faster heap lookups
140
197
* Allow inherited tables to inherit index, UNIQUE constraint, and primary
141
198
key, foreign key [inheritance]
142
- * UNIQUE INDEX on base column not honored on inserts from inherited table
143
- INSERT INTO inherit_table (unique_index_col) VALUES (dup) should fail
144
- [inheritance]
199
+ * UNIQUE INDEX on base column not honored on inserts/updates from
200
+ inherited table: INSERT INTO inherit_table (unique_index_col) VALUES
201
+ (dup) should fail [inheritance]
202
+
203
+ The main difficulty with this item is the problem of creating an index
204
+ that can spam more than one table.
205
+
145
206
* Add UNIQUE capability to non-btree indexes
146
207
* Add rtree index support for line, lseg, path, point
147
- * Use indexes for min() and max() or convert to SELECT col FROM tab ORDER
148
- BY col DESC LIMIT 1 if appropriate index exists and WHERE clause acceptible
208
+ * Use indexes for MIN() and MAX()
209
+
210
+ MIN/MAX queries can already be rewritten as SELECT col FROM tab ORDER
211
+ BY col {DESC} LIMIT 1. Completing this item involves making this
212
+ transformation automatically.
213
+
149
214
* Use index to restrict rows returned by multi-key index when used with
150
- non-consecutive keys or OR clauses, so fewer heap accesses
151
- * Be smarter about insertion of already-ordered data into btree index
215
+ non-consecutive keys to reduce heap accesses
216
+
217
+ For an index on col1,col2,col3, and a WHERE clause of col1 = 5 and
218
+ col3 = 9, spin though the index checking for col1 and col3 matches,
219
+ rather than just col1
220
+
221
+ * -Be smarter about insertion of already-ordered data into btree index
152
222
* Prevent index uniqueness checks when UPDATE does not modify the column
153
- * Use bitmaps to fetch heap pages in sequential order [performance]
223
+
224
+ Uniqueness (index) checks are done when updating a column even if the
225
+ column is not modified by the UPDATE.
226
+
227
+ * Fetch heap pages matching index entries in sequential order [performance]
228
+
229
+ Rather than randomly accessing heap pages based on index entries, mark
230
+ heap pages needing access in a bitmap and do the lookups in sequential
231
+ order. Another method would be to sort heap ctids matching the index
232
+ before accessing the heap rows.
233
+
154
234
* Use bitmaps to combine existing indexes [performance]
235
+
236
+ Bitmap indexes allow single indexed columns to be combined to
237
+ dynamically create a composite index to match a specific query. Each
238
+ index is a bitmap, and the bitmaps are AND'ed or OR'ed to be combined.
239
+
155
240
* Allow use of indexes to search for NULLs
241
+
242
+ One solution is to create a partial index on an IS NULL expression.
243
+
156
244
* -Allow SELECT * FROM tab WHERE int2col = 4 to use int2col index, int8,
157
245
float4, numeric/decimal too
158
- * Add FILLFACTOR to btree index creation
159
246
* Add concurrency to GIST
160
- * Allow a single index to index multiple tables (for inheritance and subtables)
161
247
* Pack hash index buckets onto disk pages more efficiently
162
248
249
+ Currently no only one hash bucket can be stored on a page. Ideally
250
+ several hash buckets could be stored on a single page and greater
251
+ granularity used for the hash algorithm.
252
+
163
253
164
254
Commands
165
255
========
166
256
167
- * Add BETWEEN ASYMMETRIC/SYMMETRIC (Christopher)
257
+ * Add BETWEEN ASYMMETRIC/SYMMETRIC
168
258
* Change LIMIT/OFFSET to use int8
169
259
* CREATE TABLE AS can not determine column lengths from expressions [atttypmod]
170
- * Allow UPDATE to handle complex aggregates [update]
171
- * Allow command blocks to ignore certain types of errors
260
+ * Allow UPDATE to handle complex aggregates [update] (?)
261
+ * - Allow command blocks to ignore certain types of errors
172
262
* Allow backslash handling in quoted strings to be disabled for portability
173
- * Allow UPDATE, DELETE to handle table aliases for self-joins [delete]
263
+
264
+ The use of C-style backslashes (.e.g. \n, \r) in quoted strings is not
265
+ SQL-spec compliant, so allow such handling to be disabled.
266
+
267
+ * Allow DELETE to handle table aliases for self-joins [delete]
268
+
269
+ There is no way to specify use a table alias for the deleted table in
270
+ the DELETE WHERE clause because there is no FROM clause. Various
271
+ syntax extensions to add a FROM clause have been discussed. UPDATE
272
+ already has such an optional FROM clause.
273
+
174
274
* Add CORRESPONDING BY to UNION/INTERSECT/EXCEPT
175
- * Allow REINDEX to rebuild all indexes, remove /contrib/reindex
275
+ * Allow REINDEX to rebuild all database indexes, remove /contrib/reindex
176
276
* Add ROLLUP, CUBE, GROUPING SETS options to GROUP BY
177
- * Add schema option to createlang
178
- * Allow savepoints / nested transactions [transactions] (Alvaro)
179
- * Use nested transactions to prevent syntax errors from aborting a transaction
277
+ * Add a schema option to createlang
278
+ * - Allow savepoints / nested transactions [transactions] (Alvaro)
279
+ * - Use nested transactions to prevent syntax errors from aborting a transaction
180
280
* Allow UPDATE tab SET ROW (col, ...) = (...) for updating multiple columns
181
- * Allow SET CONSTRAINTS to be qualified by schema/table
182
- * Prevent COMMENT ON DATABASE from using a database name
281
+ * Allow SET CONSTRAINTS to be qualified by schema/table name
282
+ * - Prevent COMMENT ON DATABASE from using a database name
183
283
* -Add NO WAIT LOCKs
184
284
* Allow TRUNCATE ... CASCADE/RESTRICT
185
285
* Allow PREPARE of cursors
186
- * Allow LISTEN/NOTIFY to store info in memory rather than tables
286
+ * Allow PREPARE to automatically determine parameter types based on the SQL
287
+ statement
288
+ * Allow LISTEN/NOTIFY to store info in memory rather than tables?
289
+
290
+ Currently LISTEN/NOTIFY information is stored in pg_listener. Storing
291
+ such information in memory would improve performance.
292
+
187
293
* -COMMENT ON [ CAST | CONVERSION | OPERATOR CLASS | LARGE OBJECT | LANGUAGE ]
188
294
(Christopher)
189
295
* Dump large object comments in custom dump format
190
296
* Add optional textual message to NOTIFY
297
+
298
+ This would allow an informational message to be added to the notify
299
+ message, perhaps indicating the row modified or other custom
300
+ information.
301
+
191
302
* -Allow more ISOLATION LEVELS to be accepted
192
303
* Allow CREATE TABLE foo (f1 INT CHECK (f1 > 0) CHECK (f1 < 10)) to work
193
- by searching for non-conflicting constraint names, and prefix with table name
194
- * Use more reliable method for CREATE DATABASE to get a consistent copy of db
304
+ by searching for non-conflicting constraint names, and prefix with
305
+ table name?
306
+ * Use more reliable method for CREATE DATABASE to get a consistent copy
307
+ of db?
308
+
309
+ Currently the system uses the operating system COPY command to create
310
+ new database.
311
+
312
+ * Add C code to copy directories for use in creating new databases
195
313
* -Have psql \dn show only visible temp schemas using current_schemas()
196
314
* -Have psql '\i ~/<tab><tab>' actually load files it displays from home dir
197
- * Ignore temporary tables from other session when processing inheritance
315
+ * Ignore temporary tables from other sessions when processing
316
+ inheritance?
198
317
* -Add GUC setting to make created tables default to WITHOUT OIDS
199
- * Have pg_ctl look at PGHOST in case it is a socket directory
200
- * Allow column-level privileges
201
- * Add a session mode to warn about non-standard SQL usage
318
+ * Have pg_ctl look at PGHOST in case it is a socket directory?
319
+ * Allow column-level GRANT/REVOKE privileges
320
+ * Add a session mode to warn about non-standard SQL usage in queries
202
321
* Add MERGE command that does UPDATE/DELETE, or on failure, INSERT (rules, triggers?)
203
322
* Add ON COMMIT capability to CREATE TABLE AS SELECT
204
323
* Add NOVICE output level for helpful messages like automatic sequence/index creation
@@ -209,61 +328,106 @@ Commands
209
328
rows with DEFAULT value
210
329
o -ALTER TABLE ADD COLUMN column SERIAL doesn't create sequence because
211
330
of the item above
212
- o Have ALTER TABLE rename SERIAL sequences
331
+ o Have ALTER TABLE RENAME rename SERIAL sequence names
213
332
o -Allow ALTER TABLE to modify column lengths and change to binary
214
333
compatible types
215
- o Add ALTER DATABASE ... OWNER TO newowner
334
+ o - Add ALTER DATABASE ... OWNER TO newowner
216
335
o Add ALTER DOMAIN TYPE
217
336
o Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME
218
337
o Allow ALTER TABLE to change constraint deferrability and actions
219
338
o Disallow dropping of an inherited constraint
220
- o Allow the schema of objects to be changed
221
- o Add ALTER TABLESPACE to change location, name, owner
222
- o Allow objects to be moved between tablespaces
339
+ o Allow objects to be moved to different schemas
340
+ o Allow ALTER TABLESPACE to move to different directories
341
+ o Allow databases, schemas, and indexes to be moved to different
342
+ tablespaces
343
+ o Allow moving system tables to other tablespaces, where possible
344
+
345
+ Currently non-global system tables must be in the default database
346
+ schema. Global system tables can never be moved.
347
+
348
+ o -Add ALTER DOMAIN, AGGREGATE, CONVERSION ... OWNER TO
349
+ o -Add ALTER SEQUENCE ... OWNER TO
223
350
224
351
* CLUSTER
225
352
o Automatically maintain clustering on a table
226
- o Add ALTER TABLE table SET WITHOUT CLUSTER (Christopher)
353
+
354
+ This would require some background daemon to restore clustering
355
+ during periods of low usage. It might also require tables to be only
356
+ paritally filled for easier reorganization.
357
+
358
+ o -Add ALTER TABLE table SET WITHOUT CLUSTER (Christopher)
227
359
o Add default clustering to system tables
228
360
361
+ To do this, determine the ideal cluster index for each system
362
+ table and set the cluster setting during initdb.
363
+
229
364
* COPY
230
365
o -Allow dump/load of CSV format
231
- o Allow COPY to report error lines and continue; optionally
232
- allow error codes to be specified; requires savepoints or can
233
- not be run in a multi-statement transaction
234
- o Allow COPY to understand \x as hex
235
- o Have COPY return number of rows loaded/unloaded
366
+ o Allow COPY to report error lines and continue
367
+
368
+ This requires the use of a savepoint before each COPY line is
369
+ processed, with ROLLBACK on COPY failure.
370
+
371
+ o Allow COPY to understand \x as a hex byte
372
+ o Have COPY return the number of rows loaded/unloaded (?)
236
373
237
374
* CURSOR
238
- o Allow UPDATE/DELETE WHERE CURRENT OF cursor using per-cursor tid
239
- stored in the backend (Gavin)
240
- o Prevent DROP of table being referenced by our own open cursor
375
+ o Allow UPDATE/DELETE WHERE CURRENT OF cursor
376
+
377
+ This requires using the row ctid to map cursor rows back to the
378
+ original heap row. This become more complicated if WITH HOLD cursors
379
+ are to be supported because WITH HOLD cursors have a copy of the row
380
+ and no FOR UPDATE lock.
381
+
382
+ o Prevent DROP TABLE from dropping a row referenced by its own open
383
+ cursor (?)
384
+
385
+ o Allow pooled connections to list all open WITH HOLD cursors
386
+
387
+ Because WITH HOLD cursors exist outside transactions, this allows
388
+ them to be listed so they can be closed.
241
389
242
390
* INSERT
243
- o Allow INSERT/UPDATE of system-generated oid value for a row
391
+ o Allow INSERT/UPDATE of the system-generated oid value for a row
244
392
o Allow INSERT INTO tab (col1, ..) VALUES (val1, ..), (val2, ..)
245
- o Allow INSERT/UPDATE ... RETURNING new.col or old.col; handle
246
- RULE cases (Philip)
393
+ o Allow INSERT/UPDATE ... RETURNING new.col or old.col
394
+
395
+ This is useful for returning the auto-generated key for an INSERT.
396
+ One complication is how to handle rules that run as part of
397
+ the insert.
247
398
248
399
* SHOW/SET
249
400
o Add SET PERFORMANCE_TIPS option to suggest INDEX, VACUUM, VACUUM
250
401
ANALYZE, and CLUSTER
251
- o Add SET PATH for schemas
252
- o Enforce rules for setting combinations
402
+ o Add SET PATH for schemas (?)
403
+
404
+ This is basically the same as SET search_path.
405
+
406
+ o Prevent conflicting SET options from being set
407
+
408
+ This requires a checking function to be called after the server
409
+ configuration file is read.
253
410
254
411
* SERVER-SIDE LANGUAGES
255
- o Allow PL/PgSQL's RAISE function to take expressions
412
+ o Allow PL/PgSQL's RAISE function to take expressions (?)
413
+
414
+ Currently only constants are supported.
415
+
256
416
o Change PL/PgSQL to use palloc() instead of malloc()
257
417
o -Allow Java server-side programming
258
- o Fix problems with complex temporary table creation/destruction
259
- without using PL/PgSQL EXECUTE, needs cache prevention/invalidation
260
- o Fix PL/pgSQL RENAME to work on variables other than OLD/NEW
261
- o Improve PL/PgSQL exception handling
418
+ o Handle references to temporary tables that are created, destroyed,
419
+ then recreated during a session, and EXECUTE is not used
420
+
421
+ This requires the cached PL/PgSQL byte code to be invalidated when
422
+ an object referenced in the function is changed.
423
+
424
+ o Fix PL/pgSQL RENAME to work on variables other than OLD/NEW
425
+ o Improve PL/PgSQL exception handling using savepoints
262
426
o -Allow PL/pgSQL parameters to be specified by name and type during definition
263
427
o Allow function parameters to be passed by name,
264
428
get_employee_salary(emp_id => 12345, tax_year => 2001)
265
- o Add PL/PgSQL packages
266
- o Add table function support to pltcl, plperl, plpython
429
+ o Add Oracle-style packages
430
+ o Add table function support to pltcl, plperl, plpython (?)
267
431
o Allow PL/pgSQL to name columns by ordinal position, e.g. rec.(3)
268
432
o Allow PL/pgSQL EXECUTE query_var INTO record_var;
269
433
o Add capability to create and call PROCEDURES
@@ -273,28 +437,42 @@ Commands
273
437
Clients
274
438
=======
275
439
276
- * Add XML capability to pg_dump and COPY, when backend XML capability
440
+ * Add XML output to pg_dump and COPY
441
+
442
+ We already allow XML to be stored in the database, and XPath queries
443
+ can be used on that data using /contrib/xml2. It also supports XSLT
444
+ transformations.
445
+
277
446
* -Allow psql \du to show users, and add \dg for groups
278
- * Allow clients to query a list of WITH HOLD cursors and prepared statements
279
447
* Add a libpq function to support Parse/DescribeStatement capability
280
- * Prevent libpq's PQfnumber() from lowercasing the column name
448
+ * Prevent libpq's PQfnumber() from lowercasing the column name (?)
281
449
* -Allow pg_dump to dump CREATE CONVERSION (Christopher)
282
- * Allow libpq to return information about prepared queries
283
450
* -Make pg_restore continue after errors, so it acts more like pg_dump scripts
284
451
* Have psql show current values for a sequence
285
452
* Allow pg_dumpall to use non-text output formats
286
453
* Have pg_dump use multi-statement transactions for INSERT dumps
287
454
* Move psql backslash database information into the backend, use mnemonic
288
455
commands? [psql]
456
+
457
+ This would allow non-psql clients to pull the same information out of
458
+ the database as psql.
459
+
289
460
* Allow pg_dump to use multiple -t and -n switches
461
+
462
+ This should be done by allowing a '-t schema.table' syntax.
463
+
290
464
* Fix oid2name and dbsize for tablespaces
291
- * Consistenly display privilege information for all objects in psql
465
+ * Consistently display privilege information for all objects in psql
292
466
293
- * ECPG
467
+ * ECPG (?)
294
468
o Docs
295
- o Implement set descriptor, using descriptor
296
- o Solve cardinality > 1 for input descriptors / variables
297
- o Improve error handling
469
+
470
+ Document differences between ecpg and the SQL standard and
471
+ information about the Informix-compatibility module.
472
+
473
+ o -Implement SET DESCRIPTOR
474
+ o Solve cardinality > 1 for input descriptors / variables (?)
475
+ o Improve error handling (?)
298
476
o Add a semantic check level, e.g. check if a table really exists
299
477
o fix handling of DB attributes that are arrays
300
478
o Use backend PREPARE/EXECUTE facility for ecpg where possible
@@ -305,50 +483,85 @@ Clients
305
483
o Allow multidimensional arrays
306
484
307
485
308
-
309
486
Referential Integrity
310
487
=====================
311
488
312
489
* Add MATCH PARTIAL referential integrity
313
- * Add deferred trigger queue file (Jan)
314
- * Implement dirty reads or shared row locks and use them in RI triggers
490
+ * Add deferred trigger queue file
491
+
492
+ Right now all deferred trigger information is stored in backend
493
+ memory. This could exhaust memory for very large trigger queues.
494
+ This item involves dumping large queues into files.
495
+
496
+ * Implement dirty reads or shared row locks and use them in RI triggers (?)
315
497
* Enforce referential integrity for system tables
316
498
* Change foreign key constraint for array -> element to mean element
317
- in array
318
- * Allow DEFERRABLE UNIQUE constraints
499
+ in array (?)
500
+ * Allow DEFERRABLE UNIQUE constraints (?)
319
501
* Allow triggers to be disabled [trigger]
502
+
503
+ Currently the only way to disable triggers is to modify the system
504
+ tables.
505
+
320
506
* With disabled triggers, allow pg_dump to use ALTER TABLE ADD FOREIGN KEY
507
+
508
+ If the dump is known to be valid, allow foreign keys to be added
509
+ without revalidating the data.
510
+
321
511
* Allow statement-level triggers to access modified rows
322
- * Support triggers on columns (Neil)
512
+ * Support triggers on columns
323
513
* Have AFTER triggers execute after the appropriate SQL statement in a
324
514
function, not at the end of the function
325
515
* -Print table names with constraint names in error messages, or make constraint
326
516
names unique within a schema
327
517
* -Issue NOTICE if foreign key data requires costly test to match primary key
328
518
* Remove CREATE CONSTRAINT TRIGGER
519
+
520
+ This was used in older releases to dump referential integrity
521
+ constraints.
522
+
329
523
* Allow AFTER triggers on system tables
330
524
525
+ System tables are modified in many places in the backend without going
526
+ through the executor and therefore not causing triggers to fire. To
527
+ complete this item, the functions that modify system tables will have
528
+ to fire triggers.
529
+
331
530
332
531
Dependency Checking
333
532
===================
334
533
335
- * Flush cached query plans when their underlying catalog data changes
534
+ * Flush cached query plans when the dependent objects change
336
535
* -Use dependency information to dump data in proper order
337
536
* -Have pg_dump -c clear the database using dependency information
338
537
339
538
340
539
Exotic Features
341
540
===============
342
541
343
- * Add SQL99 WITH clause to SELECT (Tom, Fernando)
344
- * Add SQL99 WITH RECURSIVE to SELECT (Tom, Fernando)
345
- * Add pre-parsing phase that converts non-ANSI features to supported features
542
+ * Add SQL99 WITH clause to SELECT
543
+ * Add SQL99 WITH RECURSIVE to SELECT
544
+ * Add pre-parsing phase that converts non-ANSI syntax to supported
545
+ syntax
546
+
547
+ This could allow SQL written for other databases to run without
548
+ modification.
549
+
346
550
* Allow plug-in modules to emulate features from other databases
347
551
* SQL*Net listener that makes PostgreSQL appear as an Oracle database
348
552
to clients
349
- * Add two-phase commit to all distributed transactions with
350
- offline/readonly server status or administrator notification for failure
351
- * Allow cross-db queries with transaction semantics
553
+ * Allow queries across databases or servers with transaction
554
+ semantics
555
+
556
+ Right now contrib/dblink can be used to issue such queries except it
557
+ does not have locking or transaction semantics. Two-phase commit is
558
+ needed to enable transaction semantics.
559
+
560
+ * Add two-phase commit
561
+
562
+ This will involve adding a way to respond to commit failure by either
563
+ taking the server into offline/readonly mode or notifying the
564
+ administrator
352
565
353
566
354
567
PERFORMANCE
@@ -358,106 +571,172 @@ PERFORMANCE
358
571
Fsync
359
572
=====
360
573
361
- * Delay fsync() when other backends are about to commit too
362
- o Determine optimal commit_delay value
574
+ * Improve commit_delay handling to reduce fsync()
363
575
* Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options
364
- o Allow multiple blocks to be written to WAL with one write()
365
- * Add an option to sync() before fsync()'ing checkpoint files
576
+ * Allow multiple blocks to be written to WAL with one write()
577
+ * Add an option to sync() before fsync()'ing checkpoint files
366
578
367
579
368
580
Cache
369
581
=====
370
- * Shared catalog cache, reduce lseek()'s by caching table size in shared area
371
582
* Add free-behind capability for large sequential scans [fadvise]
372
583
* Consider use of open/fcntl(O_DIRECT) to minimize OS caching
373
- * Cache last known per-tuple offsets to speed long tuple access, adjusting
374
- for NULLs and TOAST values
375
- * Use a fixed row count and a +/- count with MVCC visibility rules
376
- to allow fast COUNT(*) queries with no WHERE clause(?) [count]
584
+ * Cache last known per-tuple offsets to speed long tuple access
585
+
586
+ While column offsets are already cached, the cache can not be used if
587
+ the tuple has NULLs or TOAST columns because these values change the
588
+ typical column offsets. Caching of such offsets could be accomplished
589
+ by remembering the previous offsets and use them again if the row has
590
+ the same pattern.
591
+
592
+ * Speed up COUNT(*)
593
+
594
+ We could use a fixed row count and a +/- count to follow MVCC
595
+ visibility rules, or a single cached value could be used and
596
+ invalidated if anyone modifies the table. [count]
377
597
378
598
379
599
Vacuum
380
600
======
381
601
382
- * Improve speed with indexes (perhaps recreate index instead)
602
+ * Improve speed with indexes
603
+
604
+ For large table adjustements during vacuum, it is faster to reindex
605
+ rather than update the index.
606
+
383
607
* Reduce lock time by moving tuples with read lock, then write
384
608
lock and truncate table
385
- * Provide automatic running of vacuum in the background in backend
609
+
610
+ Moved tuples are invisible to other backends so they don't require a
611
+ write lock. However, the read lock promotion to write lock could lead
612
+ to deadlock situations.
613
+
614
+ * -Provide automatic running of vacuum in the background in backend
386
615
rather than in /contrib (Matthew)
387
616
* Allow free space map to be auto-sized or warn when it is too small
388
- * Maintain a map of recently-expired of pages so vacuum can reclaim
389
- free space without a sequential scan
390
- * Have VACUUM FULL use REINDEX rather than index vacuum
617
+
618
+ The free space map is in shared memory so resizing is difficult.
619
+
620
+ * Maintain a map of recently-expired rows
621
+
622
+ This allows vacuum to reclaim free space without requiring
623
+ a sequential scan
391
624
392
625
393
626
Locking
394
627
=======
395
628
396
629
* Make locking of shared data structures more fine-grained
630
+
631
+ This requires that more locks be acquired but this would reduce lock
632
+ contention, improving concurrency.
633
+
397
634
* Add code to detect an SMP machine and handle spinlocks accordingly
398
635
from distributted.net, http://www1.distributed.net/source,
399
636
in client/common/cpucheck.cpp
637
+
638
+ On SMP machines, it is possible that locks might be released shortly,
639
+ while on non-SMP machines, the backend should sleep so the process
640
+ holding the lock can complete and release it.
641
+
642
+ * Improve SMP performance on i386 machines
643
+
644
+ i386-based SMP machines can generate excessive context switching
645
+ caused by lock failure in high concurrency situations. This may be
646
+ caused by CPU cache line invalidation inefficiencies.
647
+
400
648
* Research use of sched_yield() for spinlock acquisition failure
401
649
402
650
403
651
Startup Time
404
652
============
405
653
406
654
* Experiment with multi-threaded backend [thread]
655
+
656
+ This would prevent the overhead associated with process creation. Most
657
+ operating systems have trivial process creation time compared to
658
+ database startup overhead, but a few operating systems (WIn32,
659
+ Solaris) might benefit from threading.
660
+
407
661
* Add connection pooling [pool]
408
- * Allow persistent backends [pool]
409
- * Create a transaction processor to aid in persistent connections and
410
- connection pooling [pool]
411
- * Do listen() in postmaster and accept() in pre-forked backend
412
- * Have pre-forked backend pre-connect to last requested database or pass
413
- file descriptor to backend pre-forked for matching database
662
+
663
+ It is unclear if this should be done inside the backend code or done
664
+ by something external like pgpool. The passing of file descriptors to
665
+ existing backends is one of the difficulties with a backend approach.
414
666
415
667
416
668
Write-Ahead Log
417
669
===============
418
670
419
- * Have after-change WAL write()'s write only modified data to kernel
420
- * Reduce number of after-change WAL writes; they exist only to gaurd against
421
- partial page writes [wal]
422
- * Turn off after-change writes if fsync is disabled (?)
671
+ * Eliminate need to write full pages to WAL before page modification [wal]
672
+
673
+ Currently, to protect against partial disk page writes, we write the
674
+ full page images to WAL before they are modified so we can correct any
675
+ partial page writes during recovery.
676
+
677
+ * Reduce WAL traffic so only modified values are written rather than
678
+ entire rows (?)
679
+ * Turn off after-change writes if fsync is disabled
680
+
681
+ If fsync is off, there is no purpose in writing full pages to WAL
682
+
423
683
* Add WAL index reliability improvement to non-btree indexes
424
- * Find proper defaults for postgresql.conf WAL entries
425
- * Allow xlog directory location to be specified during initdb, perhaps
426
- using symlinks
684
+ * Allow the pg_xlog directory location to be specified during initdb
685
+ with a symlink back to the /data location
686
+
427
687
* Allow WAL information to recover corrupted pg_controldata
428
688
* Find a way to reduce rotational delay when repeatedly writing
429
689
last WAL page
690
+
691
+ Currently fsync of WAL requires the disk platter to perform a full
692
+ rotation to fsync again. One idea is to write the WAL to different
693
+ offsets that might reduce the rotational delay.
430
694
431
695
432
696
Optimizer / Executor
433
697
====================
434
698
435
- * Missing optimizer selectivities for date, r-tree, etc
436
- * Allow ORDER BY ... LIMIT to select top values without sort or index
437
- using a sequential scan for highest/lowest values (Oleg)
438
- * Precompile SQL functions to avoid overhead (Neil)
699
+ * Add missing optimizer selectivities for date, r-tree, etc
700
+ * Allow ORDER BY ... LIMIT 1 to select high/low value without sort or
701
+ index using a sequential scan for highest/lowest values
702
+
703
+ If only one value is needed, there is no need to sort the entire
704
+ table. Instead a sequential scan could get the matching value.
705
+
706
+ * Precompile SQL functions to avoid overhead
439
707
* Add utility to compute accurate random_page_cost value
440
708
* Improve ability to display optimizer analysis using OPTIMIZER_DEBUG
441
- * Use CHECK constraints to improve optimizer decisions
442
- * Check GUC geqo_threshold to see if it is still accurate
443
709
* Allow sorting, temp files, temp tables to use multiple work directories
444
- * Improve the planner to use CHECK constraints to prune the plan (for subtables)
710
+
711
+ This allows the I/O load to be spread across multiple disk drives.
445
712
* Have EXPLAIN ANALYZE highlight poor optimizer estimates
713
+ * Use CHECK constraints to influence optimizer decisions
714
+
715
+ CHECK constraints contain information about the distribution of values
716
+ within the table. This is also useful for implementing subtables where
717
+ a tables content is distributed across several subtables.
446
718
447
719
448
720
Miscellaneous
449
721
=============
450
722
451
723
* Do async I/O for faster random read-ahead of data
724
+
725
+ Async I/O allows multiple I/O requests to be sent to the disk with
726
+ results coming back asynchronously.
727
+
452
728
* Use mmap() rather than SYSV shared memory or to write WAL files (?) [mmap]
453
- * Improve caching of attribute offsets when NULLs exist in the row
729
+
730
+ This would remove the requirement for SYSV SHM but would introduce
731
+ portability issues. Anonymous mmap is required to prevent I/O
732
+ overhead.
733
+
454
734
* Add a script to ask system configuration questions and tune postgresql.conf
455
- * Allow partitioning of table into multiple subtables
456
735
* -Use background process to write dirty shared buffers to disk
457
- * Investigate SMP context switching issues
458
736
* Use a phantom command counter for nested subtransactions to reduce
459
737
tuple overhead
460
738
739
+
461
740
Source Code
462
741
===========
463
742
@@ -467,69 +746,63 @@ Source Code
467
746
* Remove warnings created by -Wcast-align
468
747
* Move platform-specific ps status display info from ps_status.c to ports
469
748
* Improve access-permissions check on data directory in Cygwin (Tom)
470
- * Add documentation for perl, including mention of DBI/DBD perl location
471
- * Create improved PostgreSQL introductory documentation for the PHP
472
- manuals
473
749
* Add optional CRC checksum to heap and index pages
474
750
* -Change representation of whole-tuple parameters to functions
475
751
* Clarify use of 'application' and 'command' tags in SGML docs
476
752
* Better document ability to build only certain interfaces (Marc)
477
753
* Remove or relicense modules that are not under the BSD license, if possible
478
- * Remove memory/file descriptor freeing before ereport(ERROR) (Bruce)
754
+ * Remove memory/file descriptor freeing before ereport(ERROR)
479
755
* Acquire lock on a relation before building a relcache entry for it
480
756
* Research interaction of setitimer() and sleep() used by statement_timeout
481
757
* -Add checks for fclose() failure (Tom)
482
758
* -Change CVS ID to PostgreSQL
483
759
* -Exit postmaster if postgresql.conf can not be opened
484
760
* Rename /scripts directory because they are all C programs now
485
- * Allow creation of a libpq-only tarball
486
761
* Promote debug_query_string into a server-side function current_query()
487
762
* Allow the identifier length to be increased via a configure option
488
- * Improve CREATE SCHEMA regression test
489
763
* Allow binaries to be statically linked so they are more easily relocated
490
764
491
765
492
766
* Wire Protocol Changes
493
- o Dynamic character set handling
767
+ o Allow dynamic character set handling
494
768
o Add decoded type, length, precision
495
- o Compression ?
769
+ o Use compression ?
496
770
o Update clients to use data types, typmod, schema.table.column names of
497
771
result sets using new query protocol
498
772
773
+
499
774
---------------------------------------------------------------------------
500
775
501
776
502
777
Developers who have claimed items are:
503
778
--------------------------------------
504
779
* Alvaro is Alvaro Herrera <alvherre@dcc.uchile.cl>
505
- * Barry is Barry Lind <barry@xythos.com>
506
- * Billy is Billy G. Allie <Bill.Allie@mug.org>
780
+ * Andrew is Andrew Dunstan
507
781
* Bruce is Bruce Momjian <pgman@candle.pha.pa.us> of Software Research Assoc.
508
782
* Christopher is Christopher Kings-Lynne <chriskl@familyhealth.com.au> of
509
783
Family Health Network
784
+ * Claudio is ?
510
785
* D'Arcy is D'Arcy J.M. Cain <darcy@druid.net> of The Cain Gang Ltd.
511
- * Dave is Dave Cramer <dave@fastcrypt.com>
512
- * Edmund is Edmund Mergl <E.Mergl@bawue.de>
513
- * Fernando is Fernando Nasser <fnasser@redhat.com> of Red Hat
786
+ * Fabien is Fabien Coelho
514
787
* Gavin is Gavin Sherry <swm@linuxworld.com.au> of Alcove Systems Engineering
515
788
* Greg is Greg Sabino Mullane <greg@turnstep.com>
516
789
* Hiroshi is Hiroshi Inoue <Inoue@tpf.co.jp>
517
- * Karel is Karel Zak <zakkr@zf.jcu.cz>
518
790
* Jan is Jan Wieck <JanWieck@Yahoo.com> of Afilias, Inc.
519
791
* Joe is Joe Conway <mail@joeconway.com>
520
- * Liam is Liam Stewart <liams@redhat.com> of Red Hat
792
+ * Karel is Karel Zak <zakkr@zf.jcu.cz>
793
+ * Kris is Kris Jurka
794
+ * Magnus is Magnus Haglander (?)
795
+ * Manfred is Manfred Koizar <
521
796
* Marc is Marc Fournier <scrappy@hub.org> of PostgreSQL, Inc.
522
- * Mark is Mark Hollomon <mhh@mindspring.com>
523
797
* Matthew T. O'Connor <matthew@zeut.net>
524
798
* Michael is Michael Meskes <meskes@postgresql.org> of Credativ
525
799
* Neil is Neil Conway <neilc@samurai.com>
526
800
* Oleg is Oleg Bartunov <oleg@sai.msu.su>
527
- * Peter M is Peter T Mount <peter@retep.org.uk> of Retep Software
528
- * Peter E is Peter Eisentraut <peter_e@gmx.net>
801
+ * Peter is Peter Eisentraut <peter_e@gmx.net>
529
802
* Philip is Philip Warner <pjw@rhyme.com.au> of Albatross Consulting Pty. Ltd.
530
803
* Rod is Rod Taylor <pg@rbt.ca>
531
- * Ross is Ross J. Reedstrom <reedstrm@wallace.ece.rice.edu>
804
+ * Simon is Simon Riggs
532
805
* Stephan is Stephan Szabo <sszabo@megazone23.bigpanda.com>
533
806
* Tatsuo is Tatsuo Ishii <t-ishii@sra.co.jp> of Software Research Assoc.
534
- * Thomas is Thomas Lockhart <lockhart@fourpalms.org> of Jet Propulsion Labratory
807
+ * Teodor is
535
808
* Tom is Tom Lane <tgl@sss.pgh.pa.us> of Red Hat
0 commit comments