PostgreSQL TODO List
====================
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
-Last updated: Sat Mar 4 00:02:00 EST 2006
+Last updated: Sat Apr 29 22:10:37 EDT 2006
The most recent version of this document can be viewed at
http://www.postgresql.org/docs/faqs.TODO.html.
* Allow statistics collector information to be pulled from the collector
process directly, rather than requiring the collector to write a
filesystem file twice a second?
+* Allow log_min_messages to be specified on a per-module basis
+
+ This would allow administrators to see more detailed information from
+ specific sections of the backend, e.g. checkpoints, autovacuum, etc.
+ Another idea is to allow separate configuration files for each module,
+ or allow arbitrary SET commands to be passed to them.
+
+* -Re-enable the GUC full_page_writes in 8.2 when reliability issues have
+ been addressed
* Improve replication solutions
* Configuration files
- o %Add "include file" functionality in postgresql.conf
+ o -Add "include file" functionality in postgresql.conf
o %Allow commenting of variables in postgresql.conf to restore them
to defaults
Currently, if a variable is commented out, it keeps the
previous uncommented value until a server restarted.
- o %Allow pg_hba.conf settings to be controlled via SQL
+ o -Allow per-database permissions to be set via GRANT
- This would add a function to load the SQL table from
- pg_hba.conf, and one to writes its contents to the flat file.
- The table should have a line number that is a float so rows
- can be inserted between existing rows, e.g. row 2.5 goes
- between row 2 and row 3.
+ Allow database connection checks based on GRANT rules in
+ addition to the existing access checks in pg_hba.conf.
o Allow pg_hba.conf to specify host names along with IP addresses
This is useful for checking PITR recovery.
o Allow the PITR process to be debugged and data examined
+ o Add reporting of the current WAL file, perhaps as part of
+ partial log file archiving
Monitoring
The positive modulus result returned by NUMERICs might be considered
inaccurate, in one sense.
-* %Disallow changing default expression of a SERIAL column
+* %Disallow changing default expression of a SERIAL column?
+* %Disallow ALTER SEQUENCE changes for SERIAL sequences because pg_dump
+ does not dump the changes
* Fix data types where equality comparison isn't intuitive, e.g. box
* -Zero umasked bits in conversion from INET cast to CIDR
* -Prevent INET cast to CIDR from dropping netmask, SELECT '1.1.1.1'::inet::cidr
computations should adjust based on the time zone rules.
o Fix SELECT '0.01 years'::interval, '0.01 months'::interval
- o Fix SELECT INTERVAL '1' MONTH
o Add a GUC variable to allow output of interval values in ISO8601
format
o Improve timestamptz subtraction to be DST-aware
o Fix interval display to support values exceeding 2^31 hours
o Add overflow checking to timestamp and interval arithmetic
o Add ISO INTERVAL handling
- o Add support for day-time syntax, INTERVAL '1 2:03:04' DAY TO
+ o -Add support for day-time syntax, INTERVAL '1 2:03:04' DAY TO
SECOND
+ o Support ISO INTERVAL syntax if units cannot be determined from
+ the string, and are supplied after the string
+
+ The SQL standard states that the units after the string
+ specify the units of the string, e.g. INTERVAL '2' MINUTE
+ should return '00:02:00'. The current behavior has the units
+ restrict the interval value to the specified unit or unit
+ range, INTERVAL '70' SECOND returns '00:00:10'.
+
+ For syntax that isn't uniquely ISO or PG syntax, like '1' or
+ '1:30', treat as ISO if there is a range specification clause,
+ and as PG if there no clause is present, e.g. interpret '1:30'
+ MINUTE TO SECOND as '1 minute 30 seconds', and interpret
+ '1:30' as '1 hour, 30 minutes'.
+
+ This makes common cases like SELECT INTERVAL '1' MONTH
+ SQL-standard results. The SQL standard supports a limited
+ number of unit combinations and doesn't support unit names in
+ the string. The PostgreSQL syntax is more flexible in the
+ range of units supported, e.g. PostgreSQL supports '1 year 1
+ hour', while the SQL standard does not.
+
o Add support for year-month syntax, INTERVAL '50-6' YEAR TO MONTH
- o For syntax that isn't uniquely ISO or PG syntax, like '1:30' or
- '1', treat as ISO if there is a range specification clause,
- and as PG if there no clause is present, e.g. interpret
- '1:30' MINUTE TO SECOND as '1 minute 30 seconds', and
- interpret '1:30' as '1 hour, 30 minutes'
o Interpret INTERVAL '1 year' MONTH as CAST (INTERVAL '1 year' AS
INTERVAL MONTH), and this should return '12 months'
o Round or truncate values to the requested precision, e.g.
=========
* Allow INET subnet tests using non-constants to be indexed
-* Add transaction_timestamp(), statement_timestamp(), clock_timestamp()
+* -Add transaction_timestamp(), statement_timestamp(), clock_timestamp()
functionality
Current CURRENT_TIMESTAMP returns the start time of the current
o to_char(INTERVAL '3 years 5 months','MM') => 41
* -Add sleep() function, remove from regress.c
-* Allow user-defined functions retuning a domain value to enforce domain
+* -Allow user-defined functions retuning a domain value to enforce domain
constraints
* Add SPI_gettypmod() to return the typemod for a TupleDesc
manually or automatically when statistics for execute parameters
differ dramatically from those used during planning.
+* Invalidate prepared queries, like INSERT, when the table definition
+ is altered
* Allow LISTEN/NOTIFY to store info in memory rather than tables?
Currently LISTEN/NOTIFY information is stored in pg_listener. Storing
* Allow EXPLAIN to identify tables that were skipped because of
constraint_exclusion
* Allow EXPLAIN output to be more easily processed by scripts
-* Eventually enable escape_string_warning and standard_conforming_strings
+* -Enable escape_string_warning and standard_conforming_strings
+* Make standard_conforming_strings the default in 8.3?
+
+ When this is done, backslash-quote should be prohibited in non-E''
+ strings because of possible confusion over how such strings treat
+ backslashes. Basically, '' is always safe for a literal single
+ quote, while \' might or might not be based on the backslash
+ handling rules.
+
* Simplify dropping roles that have objects in several databases
* Allow COMMENT ON to accept an expression rather than just a string
* Allow the count returned by SELECT, etc to be to represent as an int64
Currently non-global system tables must be in the default database
tablespace. Global system tables can never be moved.
- o %Prevent child tables from altering or dropping constraints
+ o Prevent parent tables from altering or dropping constraints
+ like CHECK that are inherited by child tables unless CASCADE
+ is used
+ o %Prevent child tables from altering or dropping constraints
like CHECK that were inherited from the parent table
o Have ALTER INDEX update the name of a constraint using that index
o Add ALTER TABLE RENAME CONSTRAINT, update index name also
This would allow non-psql clients to pull the same information out
of the database as psql.
- o Fix psql's display of schema information (Neil)
+ o Fix psql's \d commands more consistent
+
+ http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php
+ http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php
+
o Allow psql \pset boolean variables to set to fixed values, rather
than toggle
o Consistently display privilege information for all objects in psql
* pg_dump
- o %Have pg_dump use multi-statement transactions for INSERT dumps
o %Allow pg_dump to use multiple -t and -n switches [pg_dump]
o %Add dumping of comments on index columns and composite type columns
o %Add full object name to the tag field. eg. for operators we need
'=(integer, integer)', instead of just '='.
o Add pg_dumpall custom format dumps?
o %Add CSV output format
- o Update pg_dump and psql to use the new COPY libpq API (Christopher)
+ o -Update pg_dump and psql to use the new COPY libpq API (Christopher)
o Remove unnecessary function pointer abstractions in pg_dump source
code
o Allow selection of individual object(s) of all types, not just
o Make SET CONNECTION thread-aware, non-standard?
o Allow multidimensional arrays
o Add internationalized message strings
+ o Add COPY TO STDIN / STDOUT handling
-libpq
+* libpq
o Add a function to support Parse/DescribeStatement capability
o Add PQescapeIdentifier()
One complexity is that a statement like SELECT 1/col could error
out mid-way through the result set.
+ o Add new version of PQescapeString() that doesn't double backslashes
+ that are part of a client-only multibyte sequence
+
+ Single-quote is not a valid byte in any supported client-only
+ encoding. This requires using mblen() to determine if the
+ backslash is inside or outside a multi-byte sequence.
+
+ o Add new version of PQescapeString() that doesn't double
+ backslashes when standard_conforming_strings is true and
+ non-E strings are used
+
Referential Integrity
=====================
* Allow accurate statistics to be collected on indexes with more than
one column or expression indexes, perhaps using per-index statistics
* Add fillfactor to control reserved free space during index creation
-* Allow the creation of indexes with mixed ascending/descending specifiers
+* Allow the creation of indexes with mixed ascending/descending
+ specifiers
+
+ This is possible now by creating an operator class with reversed sort
+ operators. One complexity is that NULLs would then appear at the start
+ of the result set, and this might affect certain sort types, like
+ merge join.
+
* Allow constraint_exclusion to work for UNIONs like it does for
inheritance, allow it to work for UPDATE and DELETE statements, and allow
it to be used for all statements with little performance impact
Startup Time Improvements
=========================
-* Experiment with multi-threaded backend [thread]
+* Experiment with multi-threaded backend for backend creation [thread]
This would prevent the overhead associated with process creation. Most
operating systems have trivial process creation time compared to
Solaris) might benefit from threading. Also explore the idea of
a single session using multiple threads to execute a statement faster.
+* Experiment with multi-threaded backend better resource utilization
+
+ This would allow a single query to make use of multiple CPU's or
+ multiple I/O channels simultaneously. One idea is to create a
+ background reader that can pre-fetch sequential and index scan
+ pages needed by other backends. This could be expanded to allow
+ concurrent reads from multiple devices in a partitioned table.
+
* Add connection pooling
It is unclear if this should be done inside the backend code or done
entire rows?
* Allow the pg_xlog directory location to be specified during initdb
with a symlink back to the /data location
-* Allow WAL information to recover corrupted pg_controldata
+* -Allow WAL information to recover corrupted pg_controldata
* Find a way to reduce rotational delay when repeatedly writing
last WAL page
option is to wait for the MinGW project to fix it, or use the
code from the LibGW32C project as a guide.
+ o Port contrib/xml2
+ o Check WSACancelBlockingCall() for interrupts (win32intr)
+
* Wire Protocol Changes