]> granicus.if.org Git - postgresql/blob - doc/TODO
08182830e716d0599eb13245e1372f4f6d6f0e90
[postgresql] / doc / TODO
1
2 PostgreSQL TODO List
3 ====================
4 Current maintainer:     Bruce Momjian (bruce@momjian.us)
5 Last updated:           Wed Aug  9 12:35:39 EDT 2006
6
7 The most recent version of this document can be viewed at
8 http://www.postgresql.org/docs/faqs.TODO.html.
9
10 #A hyphen, "-", marks changes that will appear in the upcoming 8.2 release.#
11 #A percent sign, "%", marks items that are easier to implement.#
12
13 Bracketed items, "[]", have more detail.
14
15 This list contains all known PostgreSQL bugs and feature requests. If
16 you would like to work on an item, please read the Developer's FAQ
17 first.
18
19
20 Administration
21 ==============
22
23 * -Make postmater and postgres options distinct so the postmaster -o
24   option is no longer needed
25 * -Allow pooled connections to list all prepared statements
26
27   This would allow an application inheriting a pooled connection to know
28   the statements prepared in the current session.
29
30 * Allow major upgrades without dump/reload, perhaps using pg_upgrade 
31   [pg_upgrade]
32 * Check for unreferenced table files created by transactions that were
33   in-progress when the server terminated abruptly
34
35   http://archives.postgresql.org/pgsql-patches/2006-06/msg00096.php
36
37 * Allow administrators to safely terminate individual sessions either
38   via an SQL function or SIGTERM 
39
40   Lock table corruption following SIGTERM of an individual backend
41   has been reported in 8.0.  A possible cause was fixed in 8.1, but
42   it is unknown whether other problems exist.  This item mostly
43   requires additional testing rather than of writing any new code.
44   http://archives.postgresql.org/pgsql-hackers/2006-08/msg00174.php
45
46 * %Set proper permissions on non-system schemas during db creation
47
48   Currently all schemas are owned by the super-user because they are
49   copied from the template1 database.
50
51 * Support table partitioning that allows a single table to be stored
52   in subtables that are partitioned based on the primary key or a WHERE
53   clause
54 * Add function to report the time of the most recent server reload
55 * Allow statistics collector information to be pulled from the collector
56   process directly, rather than requiring the collector to write a
57   filesystem file twice a second?
58 * Allow log_min_messages to be specified on a per-module basis
59
60   This would allow administrators to see more detailed information from
61   specific sections of the backend, e.g. checkpoints, autovacuum, etc.
62   Another idea is to allow separate configuration files for each module,
63   or allow arbitrary SET commands to be passed to them.
64
65 * -Re-enable the GUC full_page_writes in 8.2 when reliability issues have
66   been addressed
67
68
69 * Improve replication solutions
70
71         o Load balancing
72
73           You can use any of the master/slave replication servers to use a
74           standby server for data warehousing. To allow read/write queries to
75           multiple servers, you need multi-master replication like pgcluster.
76
77         o Allow replication over unreliable or non-persistent links
78
79
80 * Configuration files
81
82         o -Add "include file" functionality in postgresql.conf
83         o %Allow commenting of variables in postgresql.conf to restore them
84           to defaults
85
86           Currently, if a variable is commented out, it keeps the
87           previous uncommented value until a server restarted.
88
89         o -Allow per-database permissions to be set via GRANT
90
91           Allow database connection checks based on GRANT rules in
92           addition to the existing access checks in pg_hba.conf.
93
94         o Allow pg_hba.conf to specify host names along with IP addresses
95
96           Host name lookup could occur when the postmaster reads the
97           pg_hba.conf file, or when the backend starts.  Another
98           solution would be to reverse lookup the connection IP and
99           check that hostname against the host names in pg_hba.conf.
100           We could also then check that the host name maps to the IP
101           address.
102
103         o %Allow postgresql.conf file values to be changed via an SQL
104           API, perhaps using SET GLOBAL
105         o Allow the server to be stopped/restarted via an SQL API
106         o -Issue a warning if a change-on-restart-only postgresql.conf value
107           is modified  and the server config files are reloaded
108         o Mark change-on-restart-only values in postgresql.conf
109
110
111 * Tablespaces
112
113         o Allow a database in tablespace t1 with tables created in
114           tablespace t2 to be used as a template for a new database created
115           with default tablespace t2
116
117           All objects in the default database tablespace must have default
118           tablespace specifications. This is because new databases are
119           created by copying directories. If you mix default tablespace
120           tables and tablespace-specified tables in the same directory,
121           creating a new database from such a mixed directory would create a
122           new database with tables that had incorrect explicit tablespaces.
123           To fix this would require modifying pg_class in the newly copied
124           database, which we don't currently do.
125
126         o Allow reporting of which objects are in which tablespaces
127
128           This item is difficult because a tablespace can contain objects
129           from multiple databases. There is a server-side function that
130           returns the databases which use a specific tablespace, so this
131           requires a tool that will call that function and connect to each
132           database to find the objects in each database for that tablespace.
133
134         o %Add a GUC variable to control the tablespace for temporary objects
135           and sort files
136
137           It could start with a random tablespace from a supplied list and
138           cycle through the list.
139
140         o Allow WAL replay of CREATE TABLESPACE to work when the directory
141           structure on the recovery computer is different from the original
142
143         o Allow per-tablespace quotas
144
145
146 * Point-In-Time Recovery (PITR)
147
148           o Add command to archive partially filled write-ahead logs? [pitr]
149
150             Currently only full WAL files are archived. This means that the
151             most recent transactions aren't available for recovery in case
152             of a disk failure.
153
154           o -Automatically force archiving of partially-filled WAL files when
155             pg_stop_backup() is called or the server is stopped
156           o -Add reporting of the current WAL file and offset, perhaps as
157             part of partial log file archiving
158           o %Create dump tool for write-ahead logs for use in determining
159             transaction id for point-in-time recovery
160           o Allow a warm standby system to also allow read-only statements
161             [pitr]
162
163             This is useful for checking PITR recovery.
164
165           o Allow the PITR process to be debugged and data examined
166
167
168 Monitoring
169 ==========
170
171 * Allow server log information to be output as INSERT statements
172
173   This would allow server log information to be easily loaded into
174   a database for analysis.
175
176 * %Add ability to monitor the use of temporary sort files
177 * -Allow server logs to be remotely read and removed using SQL commands
178 * -Allow protocol-level BIND parameter values to be logged, if text mode
179
180
181 Data Types
182 ==========
183
184 * Improve the MONEY data type
185
186   Change the MONEY data type to use DECIMAL internally, with special
187   locale-aware output formatting.
188   http://archives.postgresql.org/pgsql-general/2005-08/msg01432.php
189
190 * Change NUMERIC to enforce the maximum precision
191 * Add NUMERIC division operator that doesn't round?
192
193   Currently NUMERIC _rounds_ the result to the specified precision.  
194   This means division can return a result that multiplied by the 
195   divisor is greater than the dividend, e.g. this returns a value > 10:
196
197     SELECT (10::numeric(2,0) / 6::numeric(2,0))::numeric(2,0) * 6;
198
199   The positive modulus result returned by NUMERICs might be considered
200   inaccurate, in one sense.
201
202 * %Disallow changing DEFAULT expression of a SERIAL column?
203
204   This should be done only if the existing SERIAL problems cannot be
205   fixed.
206
207 * %Disallow ALTER SEQUENCE changes for SERIAL sequences because pg_dump
208   does not dump the changes
209 * Fix data types where equality comparison isn't intuitive, e.g. box
210 * -Zero umasked bits in conversion from INET cast to CIDR
211 * -Prevent INET cast to CIDR from dropping netmask, SELECT '1.1.1.1'::inet::cidr
212 * -Allow INET + INT8 to increment the host part of the address or
213   throw an error on overflow
214 * -Add 'tid != tid ' operator for use in corruption recovery
215 * Allow user-defined types to specify a type modifier at table creation
216   time
217 * Allow user-defined types to accept 'typmod' parameters
218
219   http://archives.postgresql.org/pgsql-hackers/2005-08/msg01142.php
220   http://archives.postgresql.org/pgsql-hackers/2005-09/msg00012.php
221
222 * Add support for public SYNONYMs
223
224   http://archives.postgresql.org/pgsql-hackers/2006-03/msg00519.php
225
226 * Fix CREATE CAST on DOMAINs
227
228   http://archives.postgresql.org/pgsql-hackers/2006-05/msg00072.php
229
230 * Add Globally/Universally Unique Identifier (GUID/UUID)
231 * Add support for SQL-standard GENERATED/IDENTITY columns
232
233   http://archives.postgresql.org/pgsql-hackers/2006-07/msg00543.php
234
235
236 * Dates and Times
237
238         o Allow infinite dates and intervals just like infinite timestamps
239         o Merge hardwired timezone names with the TZ database; allow either 
240           kind everywhere a TZ name is currently taken
241         o -Allow customization of the known set of TZ names (generalize the
242           present australian_timezones hack)
243         o Allow TIMESTAMP WITH TIME ZONE to store the original timezone
244           information, either zone name or offset from UTC [timezone]
245
246           If the TIMESTAMP value is stored with a time zone name, interval 
247           computations should adjust based on the time zone rules.
248
249         o -Allow timezone names in SQL strings, '2006-05-24 21:11
250            Americas/New_York'::timestamptz
251         o Fix SELECT '0.01 years'::interval, '0.01 months'::interval
252         o Add a GUC variable to allow output of interval values in ISO8601 
253           format
254         o Improve timestamptz subtraction to be DST-aware
255
256           Currently, subtracting one date from another that crosses a
257           daylight savings time adjustment can return '1 day 1 hour', but
258           adding that back to the first date returns a time one hour in
259           the future.  This is caused by the adjustment of '25 hours' to
260           '1 day 1 hour', and '1 day' is the same time the next day, even
261           if daylight savings adjustments are involved.
262
263         o Fix interval display to support values exceeding 2^31 hours
264         o Add overflow checking to timestamp and interval arithmetic    
265         o Add ISO INTERVAL handling
266
267                   http://archives.postgresql.org/pgsql-hackers/2006-01/msg00250.php
268                   http://archives.postgresql.org/pgsql-bugs/2006-04/msg00248.php
269
270                 o -Add support for day-time syntax, INTERVAL '1 2:03:04' DAY TO 
271                   SECOND
272                 o Support ISO INTERVAL syntax if units cannot be determined from
273                   the string, and are supplied after the string
274
275                   The SQL standard states that the units after the string
276                   specify the units of the string, e.g. INTERVAL '2' MINUTE
277                   should return '00:02:00'. The current behavior has the units
278                   restrict the interval value to the specified unit or unit
279                   range, INTERVAL '70' SECOND returns '00:00:10'.
280
281                   For syntax that isn't uniquely ISO or PG syntax, like '1' or
282                   '1:30', treat as ISO if there is a range specification clause,
283                   and as PG if there no clause is present, e.g. interpret '1:30'
284                   MINUTE TO SECOND as '1 minute 30 seconds', and interpret
285                   '1:30' as '1 hour, 30 minutes'.
286
287                   This makes common cases like SELECT INTERVAL '1' MONTH
288                   SQL-standard results. The SQL standard supports a limited
289                   number of unit combinations and doesn't support unit names in
290                   the string. The PostgreSQL syntax is more flexible in the
291                   range of units supported, e.g. PostgreSQL supports '1 year 1
292                   hour', while the SQL standard does not.
293
294                 o Add support for year-month syntax, INTERVAL '50-6' YEAR TO MONTH
295                 o Interpret INTERVAL '1 year' MONTH as CAST (INTERVAL '1 year' AS
296                   INTERVAL MONTH), and this should return '12 months'
297                 o Round or truncate values to the requested precision, e.g.
298                   INTERVAL '11 months' AS YEAR should return one or zero
299                 o Support precision, CREATE TABLE foo (a INTERVAL MONTH(3))
300
301
302 * Arrays
303
304         o -Allow NULLs in arrays
305         o Delay resolution of array expression's data type so assignment
306           coercion can be performed on empty array expressions
307
308
309 * Binary Data
310
311         o Improve vacuum of large objects, like /contrib/vacuumlo?
312         o Add security checking for large objects
313         o Auto-delete large objects when referencing row is deleted
314
315           /contrib/lo offers this functionality.
316
317         o Allow read/write into TOAST values like large objects
318
319           This requires the TOAST column to be stored EXTERNAL.
320
321         o Add API for 64-bit large object access
322
323           http://archives.postgresql.org/pgsql-hackers/2005-09/msg00781.php
324
325
326 Functions
327 =========
328
329 * Allow INET subnet tests using non-constants to be indexed
330 * -Add transaction_timestamp(), statement_timestamp(), clock_timestamp()
331   functionality
332
333   Current CURRENT_TIMESTAMP returns the start time of the current
334   transaction, and gettimeofday() returns the wallclock time. This will
335   make time reporting more consistent and will allow reporting of
336   the statement start time.
337
338 * %Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(),
339   pg_get_tabledef(), pg_get_domaindef(), pg_get_functiondef()
340 * -Allow to_char() to print localized month names
341 * Allow to_date() and to_timestamp() accept localized month names
342 * Add missing parameter handling in to_char()
343
344         http://archives.postgresql.org/pgsql-hackers/2005-12/msg00948.php
345
346 * Allow functions to have a schema search path specified at creation time
347 * Allow substring/replace() to get/set bit values
348 * Allow to_char() on interval values to accumulate the highest unit
349   requested
350
351   Some special format flag would be required to request such
352   accumulation.  Such functionality could also be added to EXTRACT. 
353   Prevent accumulation that crosses the month/day boundary because of
354   the uneven number of days in a month.
355
356         o to_char(INTERVAL '1 hour 5 minutes', 'MI') => 65
357         o to_char(INTERVAL '43 hours 20 minutes', 'MI' ) => 2600 
358         o to_char(INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI') => 0:1:19:20
359         o to_char(INTERVAL '3 years 5 months','MM') => 41
360
361 * -Add sleep() function, remove from regress.c
362 * -Allow user-defined functions retuning a domain value to enforce domain
363   constraints
364 * Add SPI_gettypmod() to return the typemod for a TupleDesc
365
366
367 Multi-Language Support
368 ======================
369
370 * Add NCHAR (as distinguished from ordinary varchar),
371 * Allow locale to be set at database creation
372
373   Currently locale can only be set during initdb.  No global tables have
374   locale-aware columns.  However, the database template used during
375   database creation might have locale-aware indexes.  The indexes would
376   need to be reindexed to match the new locale.
377
378 * Allow encoding on a per-column basis
379
380   Right now only one encoding is allowed per database.  [locale]
381   http://archives.postgresql.org/pgsql-hackers/2005-03/msg00932.php
382
383 * Add CREATE COLLATE?  [locale]
384 * Support multiple simultaneous character sets, per SQL92
385 * Improve UTF8 combined character handling?
386 * Add octet_length_server() and octet_length_client()
387 * Make octet_length_client() the same as octet_length()?
388 * Fix problems with wrong runtime encoding conversion for NLS message files
389 * Add URL to more complete multi-byte regression tests
390
391   http://archives.postgresql.org/pgsql-hackers/2005-07/msg00272.php
392
393 * Fix ILIKE and regular expressions to handle case insensitivity
394   properly in multibyte encodings
395
396   http://archives.postgresql.org/pgsql-bugs/2005-10/msg00001.php
397   http://archives.postgresql.org/pgsql-patches/2005-11/msg00173.php
398
399
400 Views / Rules
401 =============
402
403 * Automatically create rules on views so they are updateable, per SQL99
404
405   We can only auto-create rules for simple views.  For more complex
406   cases users will still have to write rules manually.
407   http://archives.postgresql.org/pgsql-hackers/2006-03/msg00586.php
408
409 * Add the functionality for WITH CHECK OPTION clause of CREATE VIEW
410 * Allow NOTIFY in rules involving conditionals
411 * Allow VIEW/RULE recompilation when the underlying tables change
412
413   Another issue is whether underlying table changes should be reflected
414   in the view, e.g. should SELECT * show additional columns if they
415   are added after the view is created.
416
417
418 SQL Commands
419 ============
420
421 * -Change LIMIT/OFFSET and FETCH/MOVE to use int8
422 * Add CORRESPONDING BY to UNION/INTERSECT/EXCEPT
423 * Add ROLLUP, CUBE, GROUPING SETS options to GROUP BY
424 * %Allow SET CONSTRAINTS to be qualified by schema/table name
425 * -Allow TRUNCATE ... CASCADE/RESTRICT
426
427   This is like DELETE CASCADE, but truncates.
428
429 * %Add a separate TRUNCATE permission
430
431   Currently only the owner can TRUNCATE a table because triggers are not
432   called, and the table is locked in exclusive mode.
433
434 * Allow PREPARE of cursors
435 * -Allow PREPARE to automatically determine parameter types based on the SQL
436   statement (Neil)
437 * Allow finer control over the caching of prepared query plans
438
439   Currently, queries prepared via the libpq API are planned on first
440   execute using the supplied parameters --- allow SQL PREPARE to do the
441   same.  Also, allow control over replanning prepared queries either
442   manually or automatically when statistics for execute parameters
443   differ dramatically from those used during planning.
444
445 * Invalidate prepared queries, like INSERT, when the table definition
446   is altered
447 * Allow LISTEN/NOTIFY to store info in memory rather than tables?
448
449   Currently LISTEN/NOTIFY information is stored in pg_listener. Storing
450   such information in memory would improve performance.
451
452 * Add optional textual message to NOTIFY
453
454   This would allow an informational message to be added to the notify
455   message, perhaps indicating the row modified or other custom
456   information.
457
458 * Add a GUC variable to warn about non-standard SQL usage in queries
459 * Add SQL-standard MERGE command, typically used to merge two tables
460   [merge]
461
462   This is similar to UPDATE, then for unmatched rows, INSERT.
463   Whether concurrent access allows modifications which could cause
464   row loss is implementation independent.
465
466 * Add REPLACE or UPSERT command that does UPDATE, or on failure, INSERT
467   [merge]
468
469   To implement this cleanly requires that the table have a unique index
470   so duplicate checking can be easily performed.  It is possible to
471   do it without a unique index if we require the user to LOCK the table
472   before the MERGE.
473
474 * Add NOVICE output level for helpful messages like automatic sequence/index
475   creation
476 * -Add COMMENT ON for all cluster global objects (roles, databases
477   and tablespaces)
478 * -Make row-wise comparisons work per SQL spec
479
480   Right now, '(a, b) < (1, 2)' is processed as 'a < 1 and b < 2', but
481   the SQL standard requires it to be processed as a column-by-column
482   comparison, so the proper comparison is '(a < 1) OR (a = 1 AND b < 2)'.
483
484 * Add RESET CONNECTION command to reset all session state
485
486   This would include resetting of all variables (RESET ALL), dropping of
487   temporary tables, removing any NOTIFYs, cursors, open transactions,
488   prepared queries, currval()s, etc.  This could be used  for connection
489   pooling.  We could also change RESET ALL to have this functionality.  
490   The difficult of this features is allowing RESET ALL to not affect 
491   changes made by the interface driver for its internal use.  One idea 
492   is for this to be a protocol-only feature.  Another approach is to 
493   notify the protocol when a RESET CONNECTION command is used.
494   http://archives.postgresql.org/pgsql-patches/2006-04/msg00192.php
495
496 * Add GUC to issue notice about statements that use unjoined tables
497 * Allow EXPLAIN to identify tables that were skipped because of 
498   constraint_exclusion
499 * Allow EXPLAIN output to be more easily processed by scripts
500 * -Enable escape_string_warning and standard_conforming_strings
501 * Make standard_conforming_strings the default in 8.3?
502
503   When this is done, backslash-quote should be prohibited in non-E''
504   strings because of possible confusion over how such strings treat
505   backslashes.  Basically, '' is always safe for a literal single
506   quote, while \' might or might not be based on the backslash
507   handling rules.
508
509 * Simplify dropping roles that have objects in several databases
510 * Allow COMMENT ON to accept an expression rather than just a string
511 * Allow the count returned by SELECT, etc to be to represent as an int64
512   to allow a higher range of values
513 * Make CLUSTER preserve recently-dead tuples per MVCC requirements
514 * Add SQL99 WITH clause to SELECT
515 * Add SQL:2003 WITH RECURSIVE (hierarchical) queries to SELECT
516 * Add DEFAULT .. AS OWNER so permission checks are done as the table
517   owner
518
519   This would be useful for SERIAL nextval() calls and CHECK constraints.
520
521 * Add a GUC to control whether BEGIN inside a transcation should abort
522   the transaction.
523 * Allow DISTINCT to work in multiple-argument aggregate calls
524 * Add column to pg_stat_activity that shows the progress of long-running
525   commands like CREATE INDEX and VACUUM
526
527
528 * CREATE
529
530         o Allow CREATE TABLE AS to determine column lengths for complex
531           expressions like SELECT col1 || col2
532         o Use more reliable method for CREATE DATABASE to get a consistent
533           copy of db?
534         o -Add ON COMMIT capability to CREATE TABLE AS ... SELECT
535
536
537 * UPDATE
538         o -Allow an alias to be provided for the target table in
539           UPDATE/DELETE (Neil)
540         o Allow UPDATE tab SET ROW (col, ...) = (...) for updating multiple
541           columns
542
543           A subselect can also be used as the value source.
544           http://archives.postgresql.org/pgsql-hackers/2006-07/msg01306.php
545
546
547 * ALTER
548
549         o %Have ALTER TABLE RENAME rename SERIAL sequence names
550         o Add ALTER DOMAIN to modify the underlying data type
551         o %Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME
552
553           http://archives.postgresql.org/pgsql-patches/2006-02/msg00168.php
554
555         o %Allow ALTER TABLE to change constraint deferrability and actions
556         o Add missing object types for ALTER ... SET SCHEMA
557         o Allow ALTER TABLESPACE to move to different directories
558         o Allow databases to be moved to different tablespaces
559         o Allow moving system tables to other tablespaces, where possible
560
561           Currently non-global system tables must be in the default database
562           tablespace. Global system tables can never be moved.
563
564         o Prevent parent tables from altering or dropping constraints
565           like CHECK that are inherited by child tables unless CASCADE
566           is used
567         o %Prevent child tables from altering or dropping constraints
568           like CHECK that were inherited from the parent table
569         o -Add ALTER TABLE tab INHERIT / NO INHERIT  parent
570         o Have ALTER INDEX update the name of a constraint using that index
571         o Add ALTER TABLE RENAME CONSTRAINT, update index name also
572
573
574 * CLUSTER
575
576         o Automatically maintain clustering on a table
577
578           This might require some background daemon to maintain clustering
579           during periods of low usage. It might also require tables to be only
580           partially filled for easier reorganization.  Another idea would
581           be to create a merged heap/index data file so an index lookup would
582           automatically access the heap data too.  A third idea would be to
583           store heap rows in hashed groups, perhaps using a user-supplied
584           hash function.
585
586         o %Add default clustering to system tables
587
588           To do this, determine the ideal cluster index for each system
589           table and set the cluster setting during initdb.
590
591
592 * COPY
593
594         o Allow COPY to report error lines and continue
595
596           This requires the use of a savepoint before each COPY line is
597           processed, with ROLLBACK on COPY failure.
598
599         o -Have COPY return the number of rows loaded/unloaded?
600         o Allow COPY on a newly-created table to skip WAL logging
601
602           On crash recovery, the table involved in the COPY would
603           be removed or have its heap and index files truncated.  One
604           issue is that no other backend should be able to add to 
605           the table at the same time, which is something that is 
606           currently allowed.
607
608         o Allow COPY to output from SELECT
609
610           COPY should also be able to output views.
611           http://archives.postgresql.org/pgsql-patches/2005-09/msg00148.php
612
613
614 * GRANT/REVOKE
615
616         o Allow column-level privileges
617         o %Allow GRANT/REVOKE permissions to be applied to all schema objects
618           with one command
619
620           The proposed syntax is:
621                 GRANT SELECT ON ALL TABLES IN public TO phpuser;
622                 GRANT SELECT ON NEW TABLES IN public TO phpuser;
623
624         o Allow GRANT/REVOKE permissions to be inherited by objects based on
625           schema permissions
626
627         o Allow SERIAL sequences to inherit permissions from the base table?
628
629
630 * CURSOR
631
632         o Allow UPDATE/DELETE WHERE CURRENT OF cursor
633
634           This requires using the row ctid to map cursor rows back to the
635           original heap row. This become more complicated if WITH HOLD cursors
636           are to be supported because WITH HOLD cursors have a copy of the row
637           and no FOR UPDATE lock.
638
639         o Prevent DROP TABLE from dropping a row referenced by its own open
640           cursor?
641
642         o -Allow pooled connections to list all open WITH HOLD cursors
643
644           Because WITH HOLD cursors exist outside transactions, this allows
645           them to be listed so they can be closed.
646
647
648 * INSERT
649
650         o Allow INSERT/UPDATE of the system-generated oid value for a row
651         o -Allow INSERT INTO tab (col1, ..) VALUES (val1, ..), (val2, ..)
652         o Allow INSERT/UPDATE ... RETURNING new.col or old.col
653
654           This is useful for returning the auto-generated key for an INSERT.
655           One complication is how to handle rules that run as part of
656           the insert.  
657           http://archives.postgresql.org/pgsql-patches/2005-07/msg00568.php
658         o In rules, allow VALUES() to contain a mixture of 'old' and 'new'
659           references
660
661
662 * SHOW/SET
663
664         o Add SET PERFORMANCE_TIPS option to suggest INDEX, VACUUM, VACUUM
665           ANALYZE, and CLUSTER
666         o Add SET PATH for schemas?
667
668           This is basically the same as SET search_path.
669
670
671 * Referential Integrity
672
673         o Add MATCH PARTIAL referential integrity
674         o Change foreign key constraint for array -> element to mean element
675           in array?
676         o Enforce referential integrity for system tables
677         o Fix problem when cascading referential triggers make changes on
678           cascaded tables, seeing the tables in an intermediate state
679
680           http://archives.postgresql.org/pgsql-hackers/2005-09/msg00174.php
681           http://archives.postgresql.org/pgsql-hackers/2005-09/msg00174.php
682
683
684 * Server-Side Languages
685
686         o PL/pgSQL
687                 o Fix RENAME to work on variables other than OLD/NEW
688                 o Allow function parameters to be passed by name,
689                   get_employee_salary(12345 AS emp_id, 2001 AS tax_year)
690                 o Add Oracle-style packages  (Pavel)
691
692                   A package would be a schema with session-local variables,
693                   public/private functions, and initialization functions.  It
694                   is also possible to implement these capabilities
695                   in all schemas and not use a separate "packages"
696                   syntax at all.
697                   http://archives.postgresql.org/pgsql-hackers/2006-08/msg00384.php
698
699                 o Allow handling of %TYPE arrays, e.g. tab.col%TYPE[]
700                 o Allow listing of record column names, and access to
701                   record columns via variables, e.g. columns := r.(*),
702                   tval2 := r.(colname)
703
704                   http://archives.postgresql.org/pgsql-patches/2005-07/msg00458.php
705                   http://archives.postgresql.org/pgsql-patches/2006-05/msg00302.php
706                   http://archives.postgresql.org/pgsql-patches/2006-06/msg00031.php
707
708                 o Add MOVE
709                 o Add single-step debugging of functions
710                 o Add support for WITH HOLD and SCROLL cursors
711
712                   PL/pgSQL cursors should support the same syntax as
713                   backend cursors.
714
715                 o Allow PL/RETURN to return row or record functions
716
717                   http://archives.postgresql.org/pgsql-patches/2005-11/msg00045.php
718
719                 o Fix memory leak from exceptions
720
721                   http://archives.postgresql.org/pgsql-performance/2006-06/msg00305.php
722
723                 o Fix problems with RETURN NEXT on tables with
724                   dropped/added columns after function creation
725
726                   http://archives.postgresql.org/pgsql-patches/2006-02/msg00165.php
727
728         o Other
729                 o Add table function support to pltcl, plpython
730                 o Add support for polymorphic arguments and return types to
731                   languages other than PL/PgSQL
732                 o Add capability to create and call PROCEDURES
733                 o Add support for OUT and INOUT parameters to languages other 
734                   than PL/PgSQL
735                 o Add PL/Python tracebacks
736
737                   http://archives.postgresql.org/pgsql-patches/2006-02/msg00288.php
738
739                 o Allow PL/python to composite types and result sets
740                   once buggy assert-enabled versions of python can be detected
741
742                   http://archives.postgresql.org/pgsql-patches/2006-04/msg00087.php
743
744 Clients
745 =======
746
747 * -Have initdb set the input DateStyle (MDY or DMY) based on locale
748 * Have pg_ctl look at PGHOST in case it is a socket directory?
749 * Allow pg_ctl to work properly with configuration files located outside
750   the PGDATA directory
751
752   pg_ctl can not read the pid file because it isn't located in the
753   config directory but in the PGDATA directory.  The solution is to
754   allow pg_ctl to read and understand postgresql.conf to find the
755   data_directory value.
756
757
758 * psql
759
760         o Have psql show current values for a sequence
761         o Move psql backslash database information into the backend, use
762           mnemonic commands? [psql]
763
764           This would allow non-psql clients to pull the same information out
765           of the database as psql.
766
767         o Fix psql's \d commands more consistent
768
769           http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php
770           http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php
771
772         o Allow psql \pset boolean variables to set to fixed values, rather
773           than toggle
774         o Consistently display privilege information for all objects in psql
775         o -Improve psql's handling of multi-line statements
776
777           Currently, while \e saves a single statement as one entry, interactive
778           statements are saved one line at a time.  Ideally all statements
779           would be saved like \e does.
780
781         o -Allow multi-line column values to align in the proper columns
782
783           If the second output column value is 'a\nb', the 'b' should appear
784           in the second display column, rather than the first column as it
785           does now.
786
787         o -Display IN, INOUT, and OUT parameters in \df
788         o Add auto-expanded mode so expanded output is used if the row
789           length is wider than the screen width.  
790
791           Consider using auto-expanded mode for backslash commands like \df+.
792
793         o Prevent tab completion of SET TRANSACTION from querying the
794           database and therefore preventing the transaction isolation
795           level from being set.
796
797           Currently, SET <tab> causes a database lookup to check all
798           supported session variables.  This query causes problems
799           because setting the transaction isolation level must be the
800           first statement of a transaction.
801
802
803 * pg_dump
804
805         o -Allow pg_dump to use multiple -t and -n switches, exclusion
806            ability, and regular expression object matching
807         o %Add dumping of comments on index columns and composite type columns
808         o %Add full object name to the tag field.  eg. for operators we need
809           '=(integer, integer)', instead of just '='.
810         o Add pg_dumpall custom format dumps?
811         o -Update pg_dump and psql to use the new COPY libpq API (Christopher)
812         o Remove unnecessary function pointer abstractions in pg_dump source
813           code
814         o Allow selection of individual object(s) of all types, not just
815           tables
816         o In a selective dump, allow dumping of an object and all its 
817           dependencies
818         o Add options like pg_restore -l and -L to pg_dump
819         o Stop dumping CASCADE on DROP TYPE commands in clean mode
820         o Allow pg_dump --clean to drop roles that own objects or have
821           privileges
822         o Add -f to pg_dumpall
823
824
825 * ecpg
826
827         o Docs
828
829           Document differences between ecpg and the SQL standard and
830           information about the Informix-compatibility module.
831
832         o Solve cardinality > 1 for input descriptors / variables?
833         o Add a semantic check level, e.g. check if a table really exists
834         o fix handling of DB attributes that are arrays
835         o Use backend PREPARE/EXECUTE facility for ecpg where possible
836         o Implement SQLDA
837         o Fix nested C comments
838         o %sqlwarn[6] should be 'W' if the PRECISION or SCALE value specified
839         o Make SET CONNECTION thread-aware, non-standard?
840         o Allow multidimensional arrays
841         o Add internationalized message strings
842         o Implement COPY FROM STDIN
843
844
845 * libpq
846
847         o Add a function to support Parse/DescribeStatement capability
848         o Add PQescapeIdentifierConn()
849         o Prevent PQfnumber() from lowercasing unquoted the column name
850
851           PQfnumber() should never have been doing lowercasing, but 
852           historically it has so we need a way to prevent it
853
854         o Allow statement results to be automatically batched to the client
855
856           Currently, all statement results are transferred to the libpq
857           client before libpq makes the results available to the 
858           application.  This feature would allow the application to make
859           use of the first result rows while the rest are transferred, or
860           held on the server waiting for them to be requested by libpq.
861           One complexity is that a statement like SELECT 1/col could error
862           out mid-way through the result set.
863
864
865 Triggers
866 ========
867 * Add deferred trigger queue file
868
869   Right now all deferred trigger information is stored in backend
870   memory.  This could exhaust memory for very large trigger queues.
871   This item involves dumping large queues into files.
872
873 * Allow DEFERRABLE UNIQUE constraints?
874 * Allow triggers to be disabled in only the current session.
875
876   This is currently possible by starting a multi-statement transaction,
877   modifying the system tables, performing the desired SQL, restoring the
878   system tables, and committing the transaction.  ALTER TABLE ...
879   TRIGGER requires a table lock so it is not ideal for this usage.
880
881 * With disabled triggers, allow pg_dump to use ALTER TABLE ADD FOREIGN KEY
882
883   If the dump is known to be valid, allow foreign keys to be added
884   without revalidating the data.
885
886 * Allow statement-level triggers to access modified rows
887 * Support triggers on columns
888
889   http://archives.postgresql.org/pgsql-patches/2005-07/msg00107.php
890
891 * Allow AFTER triggers on system tables
892
893   System tables are modified in many places in the backend without going
894   through the executor and therefore not causing triggers to fire. To
895   complete this item, the functions that modify system tables will have
896   to fire triggers.
897
898
899 Dependency Checking
900 ===================
901
902 * Flush cached query plans when the dependent objects change,
903   when the cardinality of parameters changes dramatically, or
904   when new ANALYZE statistics are available
905
906   A more complex solution would be to save multiple plans for different
907   cardinality and use the appropriate plan based on the EXECUTE values.
908
909 * Track dependencies in function bodies and recompile/invalidate
910
911   This is particularly important for references to temporary tables
912   in PL/PgSQL because PL/PgSQL caches query plans.  The only workaround
913   in PL/PgSQL is to use EXECUTE.  One complexity is that a function
914   might itself drop and recreate dependent tables, causing it to
915   invalidate its own query plan.
916
917
918 Exotic Features
919 ===============
920
921 * Add pre-parsing phase that converts non-ISO syntax to supported
922   syntax
923
924   This could allow SQL written for other databases to run without
925   modification.
926
927 * Allow plug-in modules to emulate features from other databases
928 * SQL*Net listener that makes PostgreSQL appear as an Oracle database
929   to clients
930 * Allow statements across databases or servers with transaction
931   semantics
932
933   This can be done using dblink and two-phase commit.
934
935 * Add the features of packages
936
937         o  Make private objects accessible only to objects in the same schema
938         o  Allow current_schema.objname to access current schema objects
939         o  Add session variables
940         o  Allow nested schemas
941
942 * Consider allowing control of upper/lower case folding of unquoted
943   identifiers
944
945   http://archives.postgresql.org/pgsql-hackers/2004-04/msg00818.php
946
947 Indexes
948 =======
949
950 * Allow inherited tables to inherit index, UNIQUE constraint, and primary
951   key, foreign key
952 * UNIQUE INDEX on base column not honored on INSERTs/UPDATEs from
953   inherited table:  INSERT INTO inherit_table (unique_index_col) VALUES
954   (dup) should fail
955
956   The main difficulty with this item is the problem of creating an index
957   that can span more than one table.
958
959 * Allow SELECT ... FOR UPDATE on inherited tables
960 * Add UNIQUE capability to non-btree indexes
961 * Prevent index uniqueness checks when UPDATE does not modify the column
962
963   Uniqueness (index) checks are done when updating a column even if the
964   column is not modified by the UPDATE.
965
966 * Allow the creation of on-disk bitmap indexes which can be quickly
967   combined with other bitmap indexes
968
969   Such indexes could be more compact if there are only a few distinct values.
970   Such indexes can also be compressed.  Keeping such indexes updated can be
971   costly.
972   http://archives.postgresql.org/pgsql-patches/2005-07/msg00512.php
973
974 * Allow use of indexes to search for NULLs
975
976   One solution is to create a partial index on an IS NULL expression.
977
978 * Allow accurate statistics to be collected on indexes with more than
979   one column or expression indexes, perhaps using per-index statistics
980 * -Add fillfactor to control reserved free space during index creation
981 * Allow the creation of indexes with mixed ascending/descending
982   specifiers
983
984   This is possible now by creating an operator class with reversed sort
985   operators.  One complexity is that NULLs would then appear at the start
986   of the result set, and this might affect certain sort types, like
987   merge join.
988
989 * Allow constraint_exclusion to work for UNIONs like it does for
990   inheritance, allow it to work for UPDATE and DELETE statements, and allow
991   it to be used for all statements with little performance impact
992 * Allow CREATE INDEX to take an additional parameter for use with
993   special index types
994 * Consider compressing indexes by storing key values duplicated in
995   several rows as a single index entry
996
997   This is difficult because it requires datatype-specific knowledge.
998
999
1000 * GIST
1001
1002         o Add more GIST index support for geometric data types
1003         o Allow GIST indexes to create certain complex index types, like
1004           digital trees (see Aoki)
1005
1006 * Hash
1007
1008         o Pack hash index buckets onto disk pages more efficiently
1009
1010           Currently only one hash bucket can be stored on a page. Ideally
1011           several hash buckets could be stored on a single page and greater
1012           granularity used for the hash algorithm.
1013
1014         o Consider sorting hash buckets so entries can be found using a
1015           binary search, rather than a linear scan
1016
1017         o In hash indexes, consider storing the hash value with or instead
1018           of the key itself
1019
1020         o Add WAL logging for crash recovery
1021         o Allow multi-column hash indexes
1022
1023
1024 Fsync
1025 =====
1026
1027 * Improve commit_delay handling to reduce fsync()
1028 * Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options
1029
1030   Ideally this requires a separate test program that can be run
1031   at initdb time or optionally later.  Consider O_SYNC when
1032   O_DIRECT exists.
1033
1034 * %Add an option to sync() before fsync()'ing checkpoint files
1035 * Add program to test if fsync has a delay compared to non-fsync
1036
1037
1038 Cache Usage
1039 ===========
1040
1041 * Allow free-behind capability for large sequential scans, perhaps using
1042   posix_fadvise()
1043
1044   Posix_fadvise() can control both sequential/random file caching and
1045   free-behind behavior, but it is unclear how the setting affects other
1046   backends that also have the file open, and the feature is not supported
1047   on all operating systems.
1048
1049 * Speed up COUNT(*)
1050
1051   We could use a fixed row count and a +/- count to follow MVCC
1052   visibility rules, or a single cached value could be used and
1053   invalidated if anyone modifies the table.  Another idea is to
1054   get a count directly from a unique index, but for this to be
1055   faster than a sequential scan it must avoid access to the heap
1056   to obtain tuple visibility information.
1057
1058 * Add estimated_count(*) to return an estimate of COUNT(*)
1059
1060   This would use the planner ANALYZE statistics to return an estimated
1061   count.
1062
1063 * Allow data to be pulled directly from indexes
1064
1065   Currently indexes do not have enough tuple visibility information 
1066   to allow data to be pulled from the index without also accessing 
1067   the heap.  One way to allow this is to set a bit on index tuples 
1068   to indicate if a tuple is currently visible to all transactions 
1069   when the first valid heap lookup happens.  This bit would have to 
1070   be cleared when a heap tuple is expired.  
1071
1072   Another idea is to maintain a bitmap of heap pages where all rows
1073   are visible to all backends, and allow index lookups to reference 
1074   that bitmap to avoid heap lookups, perhaps the same bitmap we might
1075   add someday to determine which heap pages need vacuuming.  Frequently
1076   accessed bitmaps would have to be stored in shared memory.  One 8k
1077   page of bitmaps could track 512MB of heap pages.
1078
1079 * Consider automatic caching of statements at various levels:
1080
1081         o Parsed query tree
1082         o Query execute plan
1083         o Query results
1084
1085 * Allow sequential scans to take advantage of other concurrent
1086   sequential scans, also called "Synchronised Scanning"
1087
1088   One possible implementation is to start sequential scans from the lowest
1089   numbered buffer in the shared cache, and when reaching the end wrap
1090   around to the beginning, rather than always starting sequential scans
1091   at the start of the table.
1092
1093 * Consider increasing internal areas when shared buffers is increased
1094
1095   http://archives.postgresql.org/pgsql-hackers/2005-10/msg01419.php
1096
1097
1098 Vacuum
1099 ======
1100
1101 * Improve speed with indexes
1102
1103   For large table adjustments during VACUUM FULL, it is faster to 
1104   reindex rather than update the index.
1105
1106 * Reduce lock time during VACUUM FULL by moving tuples with read lock,
1107   then write lock and truncate table
1108
1109   Moved tuples are invisible to other backends so they don't require a
1110   write lock. However, the read lock promotion to write lock could lead
1111   to deadlock situations.
1112
1113 * Auto-fill the free space map by scanning the buffer cache or by
1114   checking pages written by the background writer
1115
1116   http://archives.postgresql.org/pgsql-hackers/2006-02/msg01125.php
1117   http://archives.postgresql.org/pgsql-hackers/2006-03/msg00011.php
1118
1119 * Create a bitmap of pages that need vacuuming
1120
1121   Instead of sequentially scanning the entire table, have the background
1122   writer or some other process record pages that have expired rows, then
1123   VACUUM can look at just those pages rather than the entire table.  In
1124   the event of a system crash, the bitmap would probably be invalidated.
1125   One complexity is that index entries still have to be vacuumed, and
1126   doing this without an index scan (by using the heap values to find the
1127   index entry) might be slow and unreliable, especially for user-defined
1128   index functions.
1129
1130 * -Add system view to show free space map contents
1131 * Allow FSM to return free space toward the beginning of the heap file,
1132   in hopes that empty pages at the end can be truncated by VACUUM
1133 * Allow FSM page return free space based on table clustering, to assist
1134   in maintaining clustering?
1135 * Consider shrinking expired tuples to just their headers
1136
1137   http://archives.postgresql.org/pgsql-patches/2006-03/msg00142.php
1138
1139 * Allow heap reuse of UPDATEd rows if no indexed columns are changed,
1140   and old and new versions are on the same heap page?
1141
1142   While vacuum handles DELETEs fine, updating of non-indexed columns, like
1143   counters, are difficult for VACUUM to handle efficiently.  This method
1144   is possible for same-page updates because a single index row can be
1145   used to point to both old and new values.
1146   http://archives.postgresql.org/pgsql-hackers/2006-06/msg01305.php
1147   http://archives.postgresql.org/pgsql-hackers/2006-06/msg01534.php
1148
1149 * Reuse index tuples that point to heap tuples that are not visible to 
1150   anyone?
1151 * Auto-vacuum
1152
1153         o Use free-space map information to guide refilling
1154         o %Issue log message to suggest VACUUM FULL if a table is nearly
1155           empty?
1156         o Improve xid wraparound detection by recording per-table rather
1157           than per-database
1158         o Consider logging activity either to the logs or a system view
1159
1160
1161 Locking
1162 =======
1163
1164 * Fix priority ordering of read and write light-weight locks (Neil)
1165
1166
1167 Startup Time Improvements
1168 =========================
1169
1170 * Experiment with multi-threaded backend for backend creation [thread]
1171
1172   This would prevent the overhead associated with process creation. Most
1173   operating systems have trivial process creation time compared to
1174   database startup overhead, but a few operating systems (Win32,
1175   Solaris) might benefit from threading.  Also explore the idea of
1176   a single session using multiple threads to execute a statement faster.
1177
1178 * Experiment with multi-threaded backend better resource utilization
1179
1180   This would allow a single query to make use of multiple CPU's or
1181   multiple I/O channels simultaneously.  One idea is to create a
1182   background reader that can pre-fetch sequential and index scan
1183   pages needed by other backends.  This could be expanded to allow
1184   concurrent reads from multiple devices in a partitioned table.
1185
1186 * Add connection pooling
1187
1188   It is unclear if this should be done inside the backend code or done
1189   by something external like pgpool. The passing of file descriptors to
1190   existing backends is one of the difficulties with a backend approach.
1191
1192
1193 Write-Ahead Log
1194 ===============
1195
1196 * Eliminate need to write full pages to WAL before page modification [wal]
1197
1198   Currently, to protect against partial disk page writes, we write
1199   full page images to WAL before they are modified so we can correct any
1200   partial page writes during recovery.  These pages can also be
1201   eliminated from point-in-time archive files.
1202
1203         o  When off, write CRC to WAL and check file system blocks
1204            on recovery
1205
1206            If CRC check fails during recovery, remember the page in case
1207            a later CRC for that page properly matches.
1208
1209         o  Write full pages during file system write and not when
1210            the page is modified in the buffer cache
1211
1212            This allows most full page writes to happen in the background
1213            writer.  It might cause problems for applying WAL on recovery
1214            into a partially-written page, but later the full page will be
1215            replaced from WAL.
1216
1217 * Allow WAL traffic to be streamed to another server for stand-by
1218   replication
1219 * Reduce WAL traffic so only modified values are written rather than
1220   entire rows?
1221 * Allow the pg_xlog directory location to be specified during initdb
1222   with a symlink back to the /data location
1223 * Allow WAL information to recover corrupted pg_controldata
1224
1225   http://archives.postgresql.org/pgsql-patches/2006-06/msg00025.php
1226
1227 * Find a way to reduce rotational delay when repeatedly writing
1228   last WAL page
1229
1230   Currently fsync of WAL requires the disk platter to perform a full
1231   rotation to fsync again. One idea is to write the WAL to different
1232   offsets that might reduce the rotational delay.
1233
1234 * Allow buffered WAL writes and fsync
1235
1236   Instead of guaranteeing recovery of all committed transactions, this
1237   would provide improved performance by delaying WAL writes and fsync
1238   so an abrupt operating system restart might lose a few seconds of
1239   committed transactions but still be consistent.  We could perhaps
1240   remove the 'fsync' parameter (which results in an an inconsistent
1241   database) in favor of this capability.
1242
1243 * Allow WAL logging to be turned off for a table, but the table
1244   might be dropped or truncated during crash recovery [walcontrol]
1245
1246   Allow tables to bypass WAL writes and just fsync() dirty pages on
1247   commit.  This should be implemented using ALTER TABLE, e.g. ALTER 
1248   TABLE PERSISTENCE [ DROP | TRUNCATE | DEFAULT ].  Tables using 
1249   non-default logging should not use referential integrity with 
1250   default-logging tables.  A table without dirty buffers during a
1251   crash could perhaps avoid the drop/truncate.
1252
1253 * Allow WAL logging to be turned off for a table, but the table would
1254   avoid being truncated/dropped [walcontrol]
1255
1256   To do this, only a single writer can modify the table, and writes 
1257   must happen only on new pages so the new pages can be removed during
1258   crash recovery.  Readers can continue accessing the table.  Such 
1259   tables probably cannot have indexes.  One complexity is the handling 
1260   of indexes on TOAST tables.
1261
1262
1263 Optimizer / Executor
1264 ====================
1265
1266 * Improve selectivity functions for geometric operators
1267 * Allow ORDER BY ... LIMIT # to select high/low value without sort or
1268   index using a sequential scan for highest/lowest values
1269
1270   Right now, if no index exists, ORDER BY ... LIMIT # requires we sort
1271   all values to return the high/low value.  Instead The idea is to do a 
1272   sequential scan to find the high/low value, thus avoiding the sort.
1273   MIN/MAX already does this, but not for LIMIT > 1.
1274
1275 * Precompile SQL functions to avoid overhead
1276 * Create utility to compute accurate random_page_cost value
1277 * Improve ability to display optimizer analysis using OPTIMIZER_DEBUG
1278 * Have EXPLAIN ANALYZE highlight poor optimizer estimates
1279 * Consider using hash buckets to do DISTINCT, rather than sorting
1280
1281   This would be beneficial when there are few distinct values.  This is
1282   already used by GROUP BY.
1283
1284 * Log statements where the optimizer row estimates were dramatically
1285   different from the number of rows actually found?
1286 * Consider compressed annealing to search for query plans
1287
1288   This might replace GEQO, http://sixdemonbag.org/Djinni.
1289
1290
1291 Miscellaneous Performance
1292 =========================
1293
1294 * Do async I/O for faster random read-ahead of data
1295
1296   Async I/O allows multiple I/O requests to be sent to the disk with
1297   results coming back asynchronously.
1298
1299 * Use mmap() rather than SYSV shared memory or to write WAL files?
1300
1301   This would remove the requirement for SYSV SHM but would introduce
1302   portability issues. Anonymous mmap (or mmap to /dev/zero) is required
1303   to prevent I/O overhead.
1304
1305 * Consider mmap()'ing files into a backend?
1306
1307   Doing I/O to large tables would consume a lot of address space or
1308   require frequent mapping/unmapping.  Extending the file also causes
1309   mapping problems that might require mapping only individual pages,
1310   leading to thousands of mappings.  Another problem is that there is no
1311   way to _prevent_ I/O to disk from the dirty shared buffers so changes
1312   could hit disk before WAL is written.
1313
1314 * Add a script to ask system configuration questions and tune postgresql.conf
1315 * Merge xmin/xmax/cmin/cmax back into three header fields
1316
1317   Before subtransactions, there used to be only three fields needed to
1318   store these four values. This was possible because only the current
1319   transaction looks at the cmin/cmax values. If the current transaction
1320   created and expired the row the fields stored where xmin (same as
1321   xmax), cmin, cmax, and if the transaction was expiring a row from a
1322   another transaction, the fields stored were xmin (cmin was not
1323   needed), xmax, and cmax. Such a system worked because a transaction
1324   could only see rows from another completed transaction. However,
1325   subtransactions can see rows from outer transactions, and once the
1326   subtransaction completes, the outer transaction continues, requiring
1327   the storage of all four fields. With subtransactions, an outer
1328   transaction can create a row, a subtransaction expire it, and when the
1329   subtransaction completes, the outer transaction still has to have
1330   proper visibility of the row's cmin, for example, for cursors.
1331
1332   One possible solution is to create a phantom cid which represents a
1333   cmin/cmax pair and is stored in local memory.  Another idea is to
1334   store both cmin and cmax only in local memory.
1335
1336 * Research storing disk pages with no alignment/padding
1337
1338
1339 Source Code
1340 ===========
1341
1342 * Add use of 'const' for variables in source tree
1343 * Move some things from /contrib into main tree
1344 * Move some /contrib modules out to their own project sites
1345
1346   Particularly, move GPL-licensed /contrib/userlock and 
1347   /contrib/dbmirror/clean_pending.pl.
1348
1349 * %Remove warnings created by -Wcast-align
1350 * Move platform-specific ps status display info from ps_status.c to ports
1351 * Add optional CRC checksum to heap and index pages
1352 * Improve documentation to build only interfaces (Marc)
1353 * Remove or relicense modules that are not under the BSD license, if possible
1354 * %Remove memory/file descriptor freeing before ereport(ERROR)
1355 * Acquire lock on a relation before building a relcache entry for it
1356 * %Promote debug_query_string into a server-side function current_query()
1357 * %Allow the identifier length to be increased via a configure option
1358 * Allow cross-compiling by generating the zic database on the target system
1359 * Improve NLS maintenance of libpgport messages linked onto applications
1360 * Allow ecpg to work with MSVC and BCC
1361 * Add xpath_array() to /contrib/xml2 to return results as an array
1362 * Allow building in directories containing spaces
1363
1364   This is probably not possible because 'gmake' and other compiler tools
1365   do not fully support quoting of paths with spaces.
1366
1367 * -Allow installing to directories containing spaces
1368
1369   This is possible if proper quoting is added to the makefiles for the
1370   install targets.  Because PostgreSQL supports relocatable installs, it
1371   is already possible to install into a directory that doesn't contain 
1372   spaces and then copy the install to a directory with spaces.
1373
1374 * Fix sgmltools so PDFs can be generated with bookmarks
1375 * -%Clean up compiler warnings (especially with gcc version 4)
1376 * Use UTF8 encoding for NLS messages so all server encodings can
1377   read them properly
1378 * Update Bonjour to work with newer cross-platform SDK
1379 * -Remove BeOS and QNX-specific code
1380 * Split out libpq pgpass and environment documentation sections to make
1381   it easier for non-developers to find
1382 * Improve port/qsort() to handle sorts with 50% unique and 50% duplicate
1383   value [qsort]
1384
1385   This involves choosing better pivot points for the quicksort.
1386
1387 * Consider detoasting keys before sorting
1388 * Consider GnuTLS if OpenSSL license becomes a problem
1389
1390   http://archives.postgresql.org/pgsql-patches/2006-05/msg00040.php
1391
1392
1393 * Win32
1394
1395         o Remove configure.in check for link failure when cause is found
1396         o Remove readdir() errno patch when runtime/mingwex/dirent.c rev
1397           1.4 is released
1398         o Remove psql newline patch when we find out why mingw outputs an
1399           extra newline
1400         o Allow psql to use readline once non-US code pages work with
1401           backslashes
1402         o Re-enable timezone output on log_line_prefix '%t' when a
1403           shorter timezone string is available
1404         o Fix problem with shared memory on the Win32 Terminal Server
1405         o Improve signal handling
1406
1407           http://archives.postgresql.org/pgsql-patches/2005-06/msg00027.php
1408
1409         o Add long file support for binary pg_dump output
1410
1411           While Win32 supports 64-bit files, the MinGW API does not,
1412           meaning we have to build an fseeko replacement on top of the
1413           Win32 API, and we have to make sure MinGW handles it.  Another
1414           option is to wait for the MinGW project to fix it, or use the
1415           code from the LibGW32C project as a guide.
1416
1417         o -Port contrib/xml2
1418         o Check WSACancelBlockingCall() for interrupts [win32intr]
1419
1420
1421 * Wire Protocol Changes
1422
1423         o Allow dynamic character set handling
1424         o Add decoded type, length, precision
1425         o Use compression?
1426         o Update clients to use data types, typmod, schema.table.column names
1427           of result sets using new statement protocol
1428
1429
1430 Features We Do _Not_ Want
1431 =========================
1432
1433 * All backends running as threads in a single process (not want)
1434
1435   This eliminates the process protection we get from the current setup.
1436   Thread creation is usually the same overhead as process creation on
1437   modern systems, so it seems unwise to use a pure threaded model.
1438
1439 * Optimizer hints (not want)
1440
1441   Optimizer hints are used to work around problems in the optimizer.  We
1442   would rather have the problems reported and fixed.
1443   http://archives.postgresql.org/pgsql-hackers/2006-08/msg00506.php
1444
1445
1446 ---------------------------------------------------------------------------
1447
1448
1449 Developers who have claimed items are:
1450 --------------------------------------
1451 * Alvaro is Alvaro Herrera <alvherre@dcc.uchile.cl>
1452 * Andrew is Andrew Dunstan <andrew@dunslane.net>
1453 * Bruce is Bruce Momjian <bruce@momjian.us> of EnterpriseDB
1454 * Christopher is Christopher Kings-Lynne <chriskl@familyhealth.com.au> of
1455     Family Health Network
1456 * D'Arcy is D'Arcy J.M. Cain <darcy@druid.net> of The Cain Gang Ltd.
1457 * Fabien is Fabien Coelho <coelho@cri.ensmp.fr>
1458 * Gavin is Gavin Sherry <swm@linuxworld.com.au> of Alcove Systems Engineering
1459 * Greg is Greg Sabino Mullane <greg@turnstep.com>
1460 * Jan is Jan Wieck <JanWieck@Yahoo.com> of Afilias, Inc.
1461 * Joe is Joe Conway <mail@joeconway.com>
1462 * Karel is Karel Zak <zakkr@zf.jcu.cz>
1463 * Magnus is Magnus Hagander <mha@sollentuna.net>
1464 * Marc is Marc Fournier <scrappy@hub.org> of PostgreSQL, Inc.
1465 * Matthew T. O'Connor <matthew@zeut.net>
1466 * Michael is Michael Meskes <meskes@postgresql.org> of Credativ
1467 * Neil is Neil Conway <neilc@samurai.com>
1468 * Oleg is Oleg Bartunov <oleg@sai.msu.su>
1469 * Pavel is Pavel Stehule <pavel.stehule@hotmail.com>
1470 * Peter is Peter Eisentraut <peter_e@gmx.net>
1471 * Philip is Philip Warner <pjw@rhyme.com.au> of Albatross Consulting Pty. Ltd.
1472 * Rod is Rod Taylor <pg@rbt.ca>
1473 * Simon is Simon Riggs <simon@2ndquadrant.com>
1474 * Stephan is Stephan Szabo <sszabo@megazone23.bigpanda.com>
1475 * Tatsuo is Tatsuo Ishii <ishii@sraoss.co.jp> of SRA OSS, Inc. Japan
1476 * Teodor is Teodor Sigaev <teodor@sigaev.ru>
1477 * Tom is Tom Lane <tgl@sss.pgh.pa.us> of Red Hat