TODO.html 45.6 KB
Newer Older
1 2 3 4
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
Bruce Momjian's avatar
Bruce Momjian committed
5
<title>PostgreSQL TODO List</title>
6 7 8
<meta name="generator" content="HTML::TextToHTML v2.25"/>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#FF0000" vlink="#A00000" alink="#0000FF">
Bruce Momjian's avatar
Bruce Momjian committed
9
<h1><a name="section_1">PostgreSQL TODO List</a></h1>
10
<p>Current maintainer:     Bruce Momjian (<a href="mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</a>)<br/>
11
Last updated:           Fri Aug 26 15:32:39 EDT 2005
12
</p>
Bruce Momjian's avatar
Bruce Momjian committed
13 14
<p>The most recent version of this document can be viewed at<br/>
<a href="http://www.postgresql.org/docs/faqs.TODO.html">http://www.postgresql.org/docs/faqs.TODO.html</a>.
15
</p>
Bruce Momjian's avatar
Bruce Momjian committed
16 17
<p><strong>A hyphen, "-", marks changes that will appear in the upcoming 8.1 release.</strong><br/>
<strong>A percent sign, "%", marks items that are easier to implement.</strong>
18 19 20 21 22 23 24 25 26 27
</p>
<p>Bracketed items, "[<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?"></a>]", have more detail.
</p>
<p>This list contains all known PostgreSQL bugs and feature requests. If<br/>
you would like to work on an item, please read the Developer's FAQ<br/>
first.
</p>
<h1><a name="section_2">Administration</a></h1>

<ul>
Bruce Momjian's avatar
Bruce Momjian committed
28
  <li>%Remove behavior of postmaster -o after making postmaster/postgres
29
  flags unique
Bruce Momjian's avatar
Bruce Momjian committed
30
  </li><li>%Allow pooled connections to list all prepared queries
31 32 33
<p>  This would allow an application inheriting a pooled connection to know
  the queries prepared in the current session.
</p>
Bruce Momjian's avatar
Bruce Momjian committed
34 35
  </li><li>Allow major upgrades without dump/reload, perhaps using pg_upgrade 
  [<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?pg_upgrade">pg_upgrade</a>]
Bruce Momjian's avatar
Bruce Momjian committed
36
  </li><li>Check for unreferenced table files created by transactions that were
37
  in-progress when the server terminated abruptly
Bruce Momjian's avatar
Bruce Momjian committed
38 39
  </li><li>Allow administrators to safely terminate individual sessions either
  via an SQL function or SIGTERM 
Bruce Momjian's avatar
Bruce Momjian committed
40 41 42 43
<p>  Lock table corruption following SIGTERM of an individual backend
  has been reported in 8.0.  A possible cause was fixed in 8.1, but
  it is unknown whether other problems exist.  This item mostly
  requires additional testing rather than of writing any new code.
44
</p>
Bruce Momjian's avatar
Bruce Momjian committed
45
  </li><li>%Set proper permissions on non-system schemas during db creation
46 47 48
<p>  Currently all schemas are owned by the super-user because they are
  copied from the template1 database.
</p>
Bruce Momjian's avatar
Bruce Momjian committed
49 50 51
  </li><li>Support table partitioning that allows a single table to be stored
  in subtables that are partitioned based on the primary key or a WHERE
  clause
52 53 54 55 56 57 58 59 60
  </li><li>Improve replication solutions
  <ul>
    <li>Load balancing
<p>          You can use any of the master/slave replication servers to use a
          standby server for data warehousing. To allow read/write queries to
          multiple servers, you need multi-master replication like pgcluster.
</p>
    </li><li>Allow replication over unreliable or non-persistent links
  </li></ul>
Bruce Momjian's avatar
Bruce Momjian committed
61 62
  </li><li>Configuration files
  <ul>
Bruce Momjian's avatar
Bruce Momjian committed
63 64
    <li>%Add "include file" functionality in postgresql.conf
    </li><li>%Allow commenting of variables in postgresql.conf to restore them
Bruce Momjian's avatar
Bruce Momjian committed
65
          to defaults
Bruce Momjian's avatar
Bruce Momjian committed
66 67 68
<p>          Currently, if a variable is commented out, it keeps the
          previous uncommented value until a server restarted.
</p>
Bruce Momjian's avatar
Bruce Momjian committed
69
    </li><li>%Allow pg_hba.conf settings to be controlled via SQL
Bruce Momjian's avatar
Bruce Momjian committed
70 71 72 73 74
<p>          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.
Bruce Momjian's avatar
Bruce Momjian committed
75
</p>
Bruce Momjian's avatar
Bruce Momjian committed
76
    </li><li>%Allow postgresql.conf file values to be changed via an SQL
Bruce Momjian's avatar
Bruce Momjian committed
77
          API, perhaps using SET GLOBAL
Bruce Momjian's avatar
Add:  
Bruce Momjian committed
78
    </li><li>Allow the server to be stopped/restarted via an SQL API
Bruce Momjian's avatar
Bruce Momjian committed
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
  </li></ul>
  </li><li>Tablespaces
  <ul>
    <li>Allow a database in tablespace t1 with tables created in
          tablespace t2 to be used as a template for a new database created
          with default tablespace t2
<p>          All objects in the default database tablespace must have default
          tablespace specifications. This is because new databases are
          created by copying directories. If you mix default tablespace
          tables and tablespace-specified tables in the same directory,
          creating a new database from such a mixed directory would create a
          new database with tables that had incorrect explicit tablespaces.
          To fix this would require modifying pg_class in the newly copied
          database, which we don't currently do.
</p>
    </li><li>Allow reporting of which objects are in which tablespaces
<p>          This item is difficult because a tablespace can contain objects
          from multiple databases. There is a server-side function that
          returns the databases which use a specific tablespace, so this
          requires a tool that will call that function and connect to each
          database to find the objects in each database for that tablespace.
</p>
    <ul>
Bruce Momjian's avatar
Bruce Momjian committed
102
      <li>%Add a GUC variable to control the tablespace for temporary objects
Bruce Momjian's avatar
Bruce Momjian committed
103 104 105 106 107 108 109 110 111
          and sort files
<p>          It could start with a random tablespace from a supplied list and
          cycle through the list.
</p>
      </li><li>Allow WAL replay of CREATE TABLESPACE to work when the directory
          structure on the recovery computer is different from the original
      </li><li>Allow per-tablespace quotas
    </li></ul>
  </li></ul>
112
  </li><li>Point-In-Time Recovery (PITR)
Bruce Momjian's avatar
Bruce Momjian committed
113 114 115 116 117 118 119 120 121 122 123 124 125 126
  <ul>
    <li>Allow point-in-time recovery to archive partially filled
            write-ahead logs [<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?pitr">pitr</a>]
<p>            Currently only full WAL files are archived. This means that the
            most recent transactions aren't available for recovery in case
            of a disk failure. This could be triggered by a user command or
            a timer.
</p>
    </li><li>Automatically force archiving of partially-filled WAL files when
            pg_stop_backup() is called or the server is stopped
<p>            Doing this will allow administrators to know more easily when
            the archive contins all the files needed for point-in-time
            recovery.
</p>
Bruce Momjian's avatar
Bruce Momjian committed
127
    </li><li>%Create dump tool for write-ahead logs for use in determining
Bruce Momjian's avatar
Bruce Momjian committed
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
            transaction id for point-in-time recovery
    </li><li>Allow a warm standby system to also allow read-only queries
            [<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?pitr">pitr</a>]
<p>            This is useful for checking PITR recovery.
</p>
    </li><li>Allow the PITR process to be debugged and data examined
  </li></ul>
</li></ul>
<h1><a name="section_3">Monitoring</a></h1>

<ul>
  <li>Allow server log information to be output as INSERT statements
<p>  This would allow server log information to be easily loaded into
  a database for analysis.
</p>
Bruce Momjian's avatar
Bruce Momjian committed
143
  </li><li>%Add ability to monitor the use of temporary sort files
Bruce Momjian's avatar
Bruce Momjian committed
144
  </li><li>Allow server logs to be remotely read and removed using SQL commands
145
</li></ul>
Bruce Momjian's avatar
Bruce Momjian committed
146
<h1><a name="section_4">Data Types</a></h1>
147 148

<ul>
Bruce Momjian's avatar
Bruce Momjian committed
149 150 151 152
  <li>Improve the MONEY data type
<p>  Change the MONEY data type to use DECIMAL internally, with special
  locale-aware output formatting.
</p>
153
  </li><li>Change NUMERIC to enforce the maximum precision, and increase it
Bruce Momjian's avatar
Bruce Momjian committed
154 155 156 157 158 159 160 161 162 163 164 165
  </li><li>Add NUMERIC division operator that doesn't round?
<p>  Currently NUMERIC _rounds_ the result to the specified precision.  
  This means division can return a result that multiplied by the 
  divisor is greater than the dividend, e.g. this returns a value &gt; 10:
</p>
</li></ul>
<p>    SELECT (10::numeric(2,0) / 6::numeric(2,0))::numeric(2,0) * 6;
</p>
<p>  The positive modulus result returned by NUMERICs might be considered<br/>
  inaccurate, in one sense.
</p>
<ul>
Bruce Momjian's avatar
Bruce Momjian committed
166 167
  <li>Have sequence dependency track use of DEFAULT sequences,
  seqname.nextval?
Bruce Momjian's avatar
Bruce Momjian committed
168
  </li><li>%Disallow changing default expression of a SERIAL column?
169
  </li><li>Fix data types where equality comparison isn't intuitive, e.g. box
Bruce Momjian's avatar
Bruce Momjian committed
170
  </li><li>%Prevent INET cast to CIDR if the unmasked bits are not zero, or
171
  zero the bits
Bruce Momjian's avatar
Bruce Momjian committed
172
  </li><li>%Prevent INET cast to CIDR from droping netmask, SELECT '<a href="telnet://1.1.1.1">1.1.1.1</a>'::inet::cidr
Bruce Momjian's avatar
Bruce Momjian committed
173
  </li><li>Allow INET + INT4 to increment the host part of the address, or
Bruce Momjian's avatar
Bruce Momjian committed
174
  throw an error on overflow
Bruce Momjian's avatar
Bruce Momjian committed
175
  </li><li>%Add 'tid != tid ' operator for use in corruption recovery
176
  </li><li>Dates and Times
177
  <ul>
178 179 180 181 182 183 184 185 186 187
    <li>Allow infinite dates just like infinite timestamps
    </li><li>Add a GUC variable to allow output of interval values in ISO8601 
          format
    </li><li>Merge hardwired timezone names with the TZ database; allow either 
          kind everywhere a TZ name is currently taken
    </li><li>Allow customization of the known set of TZ names (generalize the
          present australian_timezones hack)
    </li><li>Allow TIMESTAMP WITH TIME ZONE to store the original timezone
          information, either zone name or offset from UTC [<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?timezone">timezone</a>]
<p>          If the TIMESTAMP value is stored with a time zone name, interval 
Bruce Momjian's avatar
Bruce Momjian committed
188
          computations should adjust based on the time zone rules.
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
</p>
    </li><li>Add ISO INTERVAL handling
    <ul>
      <li>Add support for day-time syntax, INTERVAL '1 2:03:04' DAY TO 
                  SECOND
      </li><li>Add support for year-month syntax, INTERVAL '50-6' YEAR TO MONTH
      </li><li>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 
<p>                          '1:30' MINUTE TO SECOND as '1 minute 30 seconds', and 
                          interpret '1:30' as '1 hour, 30 minutes'
      <li>Interpret INTERVAL '1 year' MONTH as CAST (INTERVAL '1 year' AS
                  INTERVAL MONTH), and this should return '12 months'
      </li><li>Round or truncate values to the requested precision, e.g.
                  INTERVAL '11 months' AS YEAR should return one or zero
      </li><li>Support precision, CREATE TABLE foo (a INTERVAL MONTH(3))
    </li></ul>
  </p></ul>
  </li><li>Arrays
208 209 210 211 212
  <ul>
    <li>Allow NULLs in arrays
    </li><li>Delay resolution of array expression's data type so assignment
          coercion can be performed on empty array expressions
  </li></ul>
213
  </li><li>Binary Data
214
  <ul>
Bruce Momjian's avatar
Bruce Momjian committed
215
    <li>Improve vacuum of large objects, like /contrib/vacuumlo?
216 217
    </li><li>Add security checking for large objects
    </li><li>Auto-delete large objects when referencing row is deleted
Bruce Momjian's avatar
Bruce Momjian committed
218 219
<p>          /contrib/lo offers this functionality.
</p>
220 221 222 223 224
    </li><li>Allow read/write into TOAST values like large objects
<p>          This requires the TOAST column to be stored EXTERNAL.
</p>
  </li></ul>
</li></ul>
Bruce Momjian's avatar
Bruce Momjian committed
225 226 227
<h1><a name="section_5">Functions</a></h1>

<ul>
Bruce Momjian's avatar
Bruce Momjian committed
228
  <li>Allow INET subnet tests using non-constants to be indexed
Bruce Momjian's avatar
Bruce Momjian committed
229 230 231 232 233 234 235
  </li><li>Add transaction_timestamp(), statement_timestamp(), clock_timestamp()
  functionality
<p>  Current CURRENT_TIMESTAMP returns the start time of the current
  transaction, and gettimeofday() returns the wallclock time. This will
  make time reporting more consistent and will allow reporting of
  the statement start time.
</p>
Bruce Momjian's avatar
Bruce Momjian committed
236
  </li><li>%Add pg_get_acldef(), pg_get_typedefault(), and pg_get_attrdef()
Bruce Momjian's avatar
Bruce Momjian committed
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252
  </li><li>Allow to_char() to print localized month names
  </li><li>Allow functions to have a schema search path specified at creation time
  </li><li>Allow substring/replace() to get/set bit values
  </li><li>Allow to_char() on interval values to accumulate the highest unit
  requested
<p>  Some special format flag would be required to request such
  accumulation.  Such functionality could also be added to EXTRACT. 
  Prevent accumulation that crosses the month/day boundary because of
  the uneven number of days in a month.
</p>
  <ul>
    <li>to_char(INTERVAL '1 hour 5 minutes', 'MI') =&gt; 65
    </li><li>to_char(INTERVAL '43 hours 20 minutes', 'MI' ) =&gt; 2600 
    </li><li>to_char(INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI') =&gt; 0:1:19:20
    </li><li>to_char(INTERVAL '3 years 5 months','MM') =&gt; 41
  </li></ul>
Bruce Momjian's avatar
Bruce Momjian committed
253
  </li><li>Add sleep() function, remove from regress.c
Bruce Momjian's avatar
Bruce Momjian committed
254 255
</li></ul>
<h1><a name="section_6">Multi-Language Support</a></h1>
256 257 258 259

<ul>
  <li>Add NCHAR (as distinguished from ordinary varchar),
  </li><li>Allow locale to be set at database creation
Bruce Momjian's avatar
Bruce Momjian committed
260 261 262 263
<p>  Currently locale can only be set during initdb.  No global tables have
  locale-aware columns.  However, the database template used during
  database creation might have locale-aware indexes.  The indexes would
  need to be reindexed to match the new locale.
264 265 266 267 268
</p>
  </li><li>Allow encoding on a per-column basis
<p>  Right now only one encoding is allowed per database.
</p>
  </li><li>Support multiple simultaneous character sets, per SQL92
Bruce Momjian's avatar
Bruce Momjian committed
269
  </li><li>Improve UTF8 combined character handling?
270 271
  </li><li>Add octet_length_server() and octet_length_client()
  </li><li>Make octet_length_client() the same as octet_length()?
Bruce Momjian's avatar
Add:  
Bruce Momjian committed
272
  </li><li>Fix problems with wrong runtime encoding conversion for NLS message files
273
</li></ul>
Bruce Momjian's avatar
Bruce Momjian committed
274
<h1><a name="section_7">Views / Rules</a></h1>
275 276

<ul>
Bruce Momjian's avatar
Bruce Momjian committed
277
  <li>%Automatically create rules on views so they are updateable, per SQL99
278 279 280 281 282
<p>  We can only auto-create rules for simple views.  For more complex
  cases users will still have to write rules.
</p>
  </li><li>Add the functionality for WITH CHECK OPTION clause of CREATE VIEW
  </li><li>Allow NOTIFY in rules involving conditionals
Bruce Momjian's avatar
Bruce Momjian committed
283
  </li><li>Allow VIEW/RULE recompilation when the underlying tables change
284
</li></ul>
285
<h1><a name="section_8">SQL Commands</a></h1>
286 287

<ul>
Bruce Momjian's avatar
Bruce Momjian committed
288
  <li>Change LIMIT/OFFSET and FETCH/MOVE to use int8
289 290
  </li><li>Add CORRESPONDING BY to UNION/INTERSECT/EXCEPT
  </li><li>Add ROLLUP, CUBE, GROUPING SETS options to GROUP BY
Bruce Momjian's avatar
Bruce Momjian committed
291 292
  </li><li>%Allow SET CONSTRAINTS to be qualified by schema/table name
  </li><li>%Allow TRUNCATE ... CASCADE/RESTRICT
Bruce Momjian's avatar
Bruce Momjian committed
293 294
<p>  This is like DELETE CASCADE, but truncates.
</p>
Bruce Momjian's avatar
Bruce Momjian committed
295
  </li><li>%Add a separate TRUNCATE permission
Bruce Momjian's avatar
Add:  
Bruce Momjian committed
296 297 298
<p>  Currently only the owner can TRUNCATE a table because triggers are not
  called, and the table is locked in exclusive mode.
</p>
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316
  </li><li>Allow PREPARE of cursors
  </li><li>Allow PREPARE to automatically determine parameter types based on the SQL
  statement
  </li><li>Allow finer control over the caching of prepared query plans
<p>  Currently, queries prepared via the libpq API are planned on first
  execute using the supplied parameters --- allow SQL PREPARE to do the
  same.  Also, allow control over replanning prepared queries either
  manually or automatically when statistics for execute parameters
  differ dramatically from those used during planning.
</p>
  </li><li>Allow LISTEN/NOTIFY to store info in memory rather than tables?
<p>  Currently LISTEN/NOTIFY information is stored in pg_listener. Storing
  such information in memory would improve performance.
</p>
  </li><li>Add optional textual message to NOTIFY
<p>  This would allow an informational message to be added to the notify
  message, perhaps indicating the row modified or other custom
  information.
Bruce Momjian's avatar
Add:  
Bruce Momjian committed
317
</p>
318 319 320 321 322
  </li><li>Add a GUC variable to warn about non-standard SQL usage in queries
  </li><li>Add MERGE command that does UPDATE/DELETE, or on failure, INSERT (rules,
  triggers?)
  </li><li>Add NOVICE output level for helpful messages like automatic sequence/index
  creation
Bruce Momjian's avatar
Bruce Momjian committed
323
  </li><li>%Add COMMENT ON for all cluster global objects (roles, databases
324
  and tablespaces)
Bruce Momjian's avatar
Bruce Momjian committed
325
  </li><li>%Make row-wise comparisons work per SQL spec
326 327
  </li><li>Add RESET CONNECTION command to reset all session state
<p>  This would include resetting of all variables (RESET ALL), dropping of
328 329 330 331
  temporary tables, removing any NOTIFYs, cursors, open transactions,
  prepared queries, currval()s, etc.  This could be used  for connection
  pooling.  We could also change RESET ALL to have this functionality.  
  The difficult of this features is allowing RESET ALL to not affect 
Bruce Momjian's avatar
Bruce Momjian committed
332 333 334
  changes made by the interface driver for its internal use.  One idea 
  is for this to be a protocol-only feature.  Another approach is to 
  notify the protocol when a RESET CONNECTION command is used.
335 336
</p>
  </li><li>Add GUC to issue notice about queries that use unjoined tables
337
  </li><li>Allow EXPLAIN to identify tables that were skipped because of 
338
  constraint_exclusion
339
  </li><li>Allow EXPLAIN output to be more easily processed by scripts
340 341 342 343 344 345
  </li><li>CREATE
  <ul>
    <li>Allow CREATE TABLE AS to determine column lengths for complex
          expressions like SELECT col1 || col2
    </li><li>Use more reliable method for CREATE DATABASE to get a consistent
          copy of db?
Bruce Momjian's avatar
Bruce Momjian committed
346
    </li><li>Add ON COMMIT capability to CREATE TABLE AS ... SELECT
347 348 349 350 351 352 353 354 355 356 357
  </li></ul>
  </li><li>UPDATE
  <ul>
    <li>Allow UPDATE to handle complex aggregates [<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?update">update</a>]?
    </li><li>Allow an alias to be provided for the target table in
          UPDATE/DELETE
<p>          This is not SQL-spec but many DBMSs allow it.
</p>
    </li><li>Allow UPDATE tab SET ROW (col, ...) = (...) for updating multiple
          columns
  </li></ul>
358 359
  </li><li>ALTER
  <ul>
Bruce Momjian's avatar
Bruce Momjian committed
360
    <li>%Have ALTER TABLE RENAME rename SERIAL sequence names
Bruce Momjian's avatar
Bruce Momjian committed
361
    </li><li>Add ALTER DOMAIN to modify the underlying data type
Bruce Momjian's avatar
Bruce Momjian committed
362 363
    </li><li>%Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME
    </li><li>%Allow ALTER TABLE to change constraint deferrability and actions
Bruce Momjian's avatar
Bruce Momjian committed
364
    </li><li>Add missing object types for ALTER ... SET SCHEMA
365
    </li><li>Allow ALTER TABLESPACE to move to different directories
366
    </li><li>Allow databases to be moved to different tablespaces
367 368
    </li><li>Allow moving system tables to other tablespaces, where possible
<p>          Currently non-global system tables must be in the default database
369
          tablespace. Global system tables can never be moved.
370
</p>
Bruce Momjian's avatar
Bruce Momjian committed
371 372 373
    </li><li>%Disallow dropping of an inherited constraint
    </li><li>%Prevent child tables from altering or dropping constraints 
          like CHECK that were inherited from the parent table
374 375 376 377 378 379 380 381 382 383 384 385
  </li></ul>
  </li><li>CLUSTER
  <ul>
    <li>Automatically maintain clustering on a table
<p>          This might require some background daemon to maintain clustering
          during periods of low usage. It might also require tables to be only
          paritally filled for easier reorganization.  Another idea would
          be to create a merged heap/index data file so an index lookup would
          automatically access the heap data too.  A third idea would be to
          store heap rows in hashed groups, perhaps using a user-supplied
          hash function.
</p>
Bruce Momjian's avatar
Bruce Momjian committed
386
    </li><li>%Add default clustering to system tables
387 388 389 390 391 392 393 394 395 396
<p>          To do this, determine the ideal cluster index for each system
          table and set the cluster setting during initdb.
</p>
  </li></ul>
  </li><li>COPY
  <ul>
    <li>Allow COPY to report error lines and continue
<p>          This requires the use of a savepoint before each COPY line is
          processed, with ROLLBACK on COPY failure.
</p>
Bruce Momjian's avatar
Bruce Momjian committed
397
    </li><li>%Have COPY return the number of rows loaded/unloaded?
398
  </li></ul>
Bruce Momjian's avatar
Bruce Momjian committed
399 400 401
  </li><li>GRANT/REVOKE
  <ul>
    <li>Allow column-level privileges
Bruce Momjian's avatar
Bruce Momjian committed
402
    </li><li>%Allow GRANT/REVOKE permissions to be applied to all schema objects
Bruce Momjian's avatar
Done:  
Bruce Momjian committed
403
          with one command
Bruce Momjian's avatar
Bruce Momjian committed
404 405 406 407
<p>          The proposed syntax is:
</p><p>                GRANT SELECT ON ALL TABLES IN public TO phpuser;
                GRANT SELECT ON NEW TABLES IN public TO phpuser;
</p>
Bruce Momjian's avatar
Done:  
Bruce Momjian committed
408 409
    <ul>
      <li>Allow GRANT/REVOKE permissions to be inherited by objects based on
Bruce Momjian's avatar
Bruce Momjian committed
410 411 412
          schema permissions
    </li></ul>
  </li></ul>
413 414 415 416 417 418 419 420 421
  </li><li>CURSOR
  <ul>
    <li>Allow UPDATE/DELETE WHERE CURRENT OF cursor
<p>          This requires using the row ctid to map cursor rows back to the
          original heap row. This become more complicated if WITH HOLD cursors
          are to be supported because WITH HOLD cursors have a copy of the row
          and no FOR UPDATE lock.
</p>
    </li><li>Prevent DROP TABLE from dropping a row referenced by its own open
Bruce Momjian's avatar
Bruce Momjian committed
422
          cursor?
Bruce Momjian's avatar
Bruce Momjian committed
423
    </li><li>%Allow pooled connections to list all open WITH HOLD cursors
424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439
<p>          Because WITH HOLD cursors exist outside transactions, this allows
          them to be listed so they can be closed.
</p>
  </li></ul>
  </li><li>INSERT
  <ul>
    <li>Allow INSERT/UPDATE of the system-generated oid value for a row
    </li><li>Allow INSERT INTO tab (col1, ..) VALUES (val1, ..), (val2, ..)
    </li><li>Allow INSERT/UPDATE ... RETURNING new.col or old.col
<p>          This is useful for returning the auto-generated key for an INSERT.
          One complication is how to handle rules that run as part of
          the insert.
</p>
  </li></ul>
  </li><li>SHOW/SET
  <ul>
Bruce Momjian's avatar
Bruce Momjian committed
440
    <li>Add SET PERFORMANCE_TIPS option to suggest INDEX, VACUUM, VACUUM
441
          ANALYZE, and CLUSTER
Bruce Momjian's avatar
Bruce Momjian committed
442
    </li><li>Add SET PATH for schemas?
443 444 445
<p>          This is basically the same as SET search_path.
</p>
  </li></ul>
446
  </li><li>Server-Side Languages
447
  <ul>
Bruce Momjian's avatar
Bruce Momjian committed
448
    <li>Fix PL/pgSQL RENAME to work on variables other than OLD/NEW
449 450 451
    </li><li>Allow function parameters to be passed by name,
          get_employee_salary(emp_id =&gt; 12345, tax_year =&gt; 2001)
    </li><li>Add Oracle-style packages
Bruce Momjian's avatar
Bruce Momjian committed
452
    </li><li>Add table function support to pltcl, plpython
453 454
    </li><li>Add capability to create and call PROCEDURES
    </li><li>Allow PL/pgSQL to handle %TYPE arrays, e.g. tab.col%TYPE[<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?"></a>]
Bruce Momjian's avatar
Bruce Momjian committed
455
    </li><li>Allow function argument names to be queries from PL/PgSQL
456
    </li><li>Add MOVE to PL/pgSQL
Bruce Momjian's avatar
Bruce Momjian committed
457 458 459 460
    </li><li>Add support for polymorphic arguments and return types to
          languages other than PL/PgSQL
    </li><li>Add support for OUT and INOUT parameters to languages other 
          than PL/PgSQL
461 462
  </li></ul>
</li></ul>
Bruce Momjian's avatar
Bruce Momjian committed
463
<h1><a name="section_9">Clients</a></h1>
464 465

<ul>
Bruce Momjian's avatar
Bruce Momjian committed
466
  <li>Add a libpq function to support Parse/DescribeStatement capability
Bruce Momjian's avatar
Bruce Momjian committed
467
  </li><li>Prevent libpq's PQfnumber() from lowercasing the column name?
Bruce Momjian's avatar
Add:  
Bruce Momjian committed
468
  </li><li>Add PQescapeIdentifier() to libpq
Bruce Momjian's avatar
Bruce Momjian committed
469
  </li><li>Have initdb set the input DateStyle (MDY or DMY) based on locale?
470 471 472 473 474 475 476
  </li><li>Have pg_ctl look at PGHOST in case it is a socket directory?
  </li><li>Allow pg_ctl to work properly with configuration files located outside
  the PGDATA directory
<p>  pg_ctl can not read the pid file because it isn't located in the
  config directory but in the PGDATA directory.  The solution is to
  allow pg_ctl to read and understand postgresql.conf to find the
  data_directory value.
477
</p>
478 479 480 481 482 483 484 485 486 487 488 489 490 491
  </li><li>psql
  <ul>
    <li>Have psql show current values for a sequence
    </li><li>Move psql backslash database information into the backend, use
          mnemonic commands? [<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?psql">psql</a>]
<p>          This would allow non-psql clients to pull the same information out
          of the database as psql.
</p>
    </li><li>Fix psql's display of schema information (Neil)
    </li><li>Allow psql \pset boolean variables to set to fixed values, rather
          than toggle
    </li><li>Consistently display privilege information for all objects in psql
    </li><li>Improve psql's handling of multi-line queries
  </li></ul>
492 493
  </li><li>pg_dump
  <ul>
Bruce Momjian's avatar
Bruce Momjian committed
494 495 496 497 498
    <li>%Have pg_dump use multi-statement transactions for INSERT dumps
    </li><li>%Allow pg_dump to use multiple -t and -n switches [<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?pg_dump">pg_dump</a>]
    </li><li>%Add dumping of comments on composite type columns
    </li><li>%Add dumping of comments on index columns
    </li><li>%Replace crude DELETE FROM method of pg_dumpall --clean for 
Bruce Momjian's avatar
Bruce Momjian committed
499
          cleaning of roles with separate DROP commands
500
    </li><li>Stop dumping CASCADE on DROP TYPE commands in clean mode
Bruce Momjian's avatar
Bruce Momjian committed
501
    </li><li>%Add full object name to the tag field.  eg. for operators we need
502
          '=(integer, integer)', instead of just '='.
Bruce Momjian's avatar
Bruce Momjian committed
503
    </li><li>Add pg_dumpall custom format dumps?
Bruce Momjian's avatar
Bruce Momjian committed
504
    </li><li>%Add CSV output format
505
    </li><li>Update pg_dump and psql to use the new COPY libpq API (Christopher)
Bruce Momjian's avatar
Bruce Momjian committed
506 507
    </li><li>Remove unnecessary function pointer abstractions in pg_dump source
          code
508
  </li></ul>
509
  </li><li>ecpg
510 511 512 513 514
  <ul>
    <li>Docs
<p>          Document differences between ecpg and the SQL standard and
          information about the Informix-compatibility module.
</p>
Bruce Momjian's avatar
Bruce Momjian committed
515
    </li><li>Solve cardinality &gt; 1 for input descriptors / variables?
516 517 518 519 520
    </li><li>Add a semantic check level, e.g. check if a table really exists
    </li><li>fix handling of DB attributes that are arrays
    </li><li>Use backend PREPARE/EXECUTE facility for ecpg where possible
    </li><li>Implement SQLDA
    </li><li>Fix nested C comments
Bruce Momjian's avatar
Bruce Momjian committed
521
    </li><li>%sqlwarn[<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?6">6</a>] should be 'W' if the PRECISION or SCALE value specified
522 523
    </li><li>Make SET CONNECTION thread-aware, non-standard?
    </li><li>Allow multidimensional arrays
Bruce Momjian's avatar
Bruce Momjian committed
524
    </li><li>Add internationalized message strings
525 526
  </li></ul>
</li></ul>
Bruce Momjian's avatar
Bruce Momjian committed
527
<h1><a name="section_10">Referential Integrity</a></h1>
528 529 530 531 532 533 534 535 536

<ul>
  <li>Add MATCH PARTIAL referential integrity
  </li><li>Add deferred trigger queue file
<p>  Right now all deferred trigger information is stored in backend
  memory.  This could exhaust memory for very large trigger queues.
  This item involves dumping large queues into files.
</p>
  </li><li>Change foreign key constraint for array -&gt; element to mean element
Bruce Momjian's avatar
Bruce Momjian committed
537 538
  in array?
  </li><li>Allow DEFERRABLE UNIQUE constraints?
539 540 541 542
  </li><li>Allow triggers to be disabled in only the current session.
<p>  This is currently possible by starting a multi-statement transaction,
  modifying the system tables, performing the desired SQL, restoring the
  system tables, and committing the transaction.  ALTER TABLE ...
Bruce Momjian's avatar
Bruce Momjian committed
543
  TRIGGER requires a table lock so it is not ideal for this usage.
544 545 546 547 548 549 550
</p>
  </li><li>With disabled triggers, allow pg_dump to use ALTER TABLE ADD FOREIGN KEY
<p>  If the dump is known to be valid, allow foreign keys to be added
  without revalidating the data.
</p>
  </li><li>Allow statement-level triggers to access modified rows
  </li><li>Support triggers on columns (Greg Sabino Mullane)
551
  </li><li>Enforce referential integrity for system tables
552 553 554 555 556 557 558
  </li><li>Allow AFTER triggers on system tables
<p>  System tables are modified in many places in the backend without going
  through the executor and therefore not causing triggers to fire. To
  complete this item, the functions that modify system tables will have
  to fire triggers.
</p>
</li></ul>
Bruce Momjian's avatar
Bruce Momjian committed
559
<h1><a name="section_11">Dependency Checking</a></h1>
560 561 562 563

<ul>
  <li>Flush cached query plans when the dependent objects change
  </li><li>Track dependencies in function bodies and recompile/invalidate
Bruce Momjian's avatar
Bruce Momjian committed
564 565
<p>  This is particularly important for references to temporary tables
  in PL/PgSQL because PL/PgSQL caches query plans.  The only workaround
566 567 568
  in PL/PgSQL is to use EXECUTE.  One complexity is that a function
  might itself drop and recreate dependent tables, causing it to
  invalidate its own query plan.
Bruce Momjian's avatar
Bruce Momjian committed
569
</p>
570
</li></ul>
Bruce Momjian's avatar
Bruce Momjian committed
571
<h1><a name="section_12">Exotic Features</a></h1>
572 573 574 575 576 577 578 579 580 581 582 583 584 585

<ul>
  <li>Add SQL99 WITH clause to SELECT
  </li><li>Add SQL99 WITH RECURSIVE to SELECT
  </li><li>Add pre-parsing phase that converts non-ISO syntax to supported
  syntax
<p>  This could allow SQL written for other databases to run without
  modification.
</p>
  </li><li>Allow plug-in modules to emulate features from other databases
  </li><li>SQL*Net listener that makes PostgreSQL appear as an Oracle database
  to clients
  </li><li>Allow queries across databases or servers with transaction
  semantics
586
<p>  This can be done using dblink and two-phase commit.
587
</p>
Bruce Momjian's avatar
Add:  
Bruce Momjian committed
588 589 590 591 592 593 594
  </li><li>Add the features of packages
  <ul>
    <li>Make private objects accessable only to objects in the same schema
    </li><li>Allow current_schema.objname to access current schema objects
    </li><li>Add session variables
    </li><li>Allow nested schemas
  </li></ul>
595
</li></ul>
Bruce Momjian's avatar
Bruce Momjian committed
596
<h1><a name="section_13">Indexes</a></h1>
597

Bruce Momjian's avatar
Bruce Momjian committed
598 599 600 601 602 603 604 605 606
<ul>
  <li>Allow inherited tables to inherit index, UNIQUE constraint, and primary
  key, foreign key
  </li><li>UNIQUE INDEX on base column not honored on INSERTs/UPDATEs from
  inherited table:  INSERT INTO inherit_table (unique_index_col) VALUES
  (dup) should fail
<p>  The main difficulty with this item is the problem of creating an index
  that can span more than one table.
</p>
Bruce Momjian's avatar
Add:  
Bruce Momjian committed
607
  </li><li>Allow SELECT ... FOR UPDATE on inherited tables
Bruce Momjian's avatar
Bruce Momjian committed
608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625
  </li><li>Add UNIQUE capability to non-btree indexes
  </li><li>Prevent index uniqueness checks when UPDATE does not modify the column
<p>  Uniqueness (index) checks are done when updating a column even if the
  column is not modified by the UPDATE.
</p>
  </li><li>Allow the creation of on-disk bitmap indexes which can be quickly
  combined with other bitmap indexes
<p>  Such indexes could be more compact if there are only a few distinct values.
  Such indexes can also be compressed.  Keeping such indexes updated can be
  costly.
</p>
  </li><li>Allow use of indexes to search for NULLs
<p>  One solution is to create a partial index on an IS NULL expression.
</p>
  </li><li>Allow accurate statistics to be collected on indexes with more than
  one column or expression indexes, perhaps using per-index statistics
  </li><li>Add fillfactor to control reserved free space during index creation
  </li><li>Allow the creation of indexes with mixed ascending/descending specifiers
626
  </li><li>Allow constraint_exclusion to work for UNIONs like it does for
627 628
  inheritance, allow it to work for UPDATE and DELETE queries, and allow
  it to be used for all queries with little performance impact
629 630 631 632 633 634
  </li><li>GIST
  <ul>
    <li>Add more GIST index support for geometric data types
    </li><li>Allow GIST indexes to create certain complex index types, like
          digital trees (see Aoki)
  </li></ul>
Bruce Momjian's avatar
Bruce Momjian committed
635 636 637
  </li><li>Hash
  <ul>
    <li>Pack hash index buckets onto disk pages more efficiently
Bruce Momjian's avatar
Bruce Momjian committed
638
<p>          Currently only one hash bucket can be stored on a page. Ideally
Bruce Momjian's avatar
Bruce Momjian committed
639 640 641 642 643 644 645
          several hash buckets could be stored on a single page and greater
          granularity used for the hash algorithm.
</p>
    </li><li>Consider sorting hash buckets so entries can be found using a
          binary search, rather than a linear scan
    </li><li>In hash indexes, consider storing the hash value with or instead
          of the key itself
Bruce Momjian's avatar
Bruce Momjian committed
646 647
    </li><li>Add WAL logging for crash recovery
    </li><li>Allow multi-column hash indexes
Bruce Momjian's avatar
Bruce Momjian committed
648 649 650
  </li></ul>
</li></ul>
<h1><a name="section_14">Fsync</a></h1>
651 652 653 654

<ul>
  <li>Improve commit_delay handling to reduce fsync()
  </li><li>Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options
Bruce Momjian's avatar
Bruce Momjian committed
655 656 657
<p>  Ideally this requires a separate test program that can be run
  at initdb time or optionally later.
</p>
Bruce Momjian's avatar
Bruce Momjian committed
658
  </li><li>%Add an option to sync() before fsync()'ing checkpoint files
Bruce Momjian's avatar
Add:  
Bruce Momjian committed
659
  </li><li>Add program to test if fsync has a delay compared to non-fsync
660
</li></ul>
Bruce Momjian's avatar
Bruce Momjian committed
661
<h1><a name="section_15">Cache Usage</a></h1>
Bruce Momjian's avatar
Bruce Momjian committed
662

663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679
<ul>
  <li>Allow free-behind capability for large sequential scans, perhaps using
  posix_fadvise()
<p>  Posix_fadvise() can control both sequential/random file caching and
  free-behind behavior, but it is unclear how the setting affects other
  backends that also have the file open, and the feature is not supported
  on all operating systems.
</p>
  </li><li>Speed up COUNT(*)
<p>  We could use a fixed row count and a +/- count to follow MVCC
  visibility rules, or a single cached value could be used and
  invalidated if anyone modifies the table.  Another idea is to
  get a count directly from a unique index, but for this to be
  faster than a sequential scan it must avoid access to the heap
  to obtain tuple visibility information.
</p>
  </li><li>Allow data to be pulled directly from indexes
Bruce Momjian's avatar
Bruce Momjian committed
680 681 682 683 684 685
<p>  Currently indexes do not have enough tuple visibility information 
  to allow data to be pulled from the index without also accessing 
  the heap.  One way to allow this is to set a bit to index tuples 
  to indicate if a tuple is currently visible to all transactions 
  when the first valid heap lookup happens.  This bit would have to 
  be cleared when a heap tuple is expired.
686 687 688 689 690 691 692 693 694
</p>
  </li><li>Consider automatic caching of queries at various levels:
  <ul>
    <li>Parsed query tree
    </li><li>Query execute plan
    </li><li>Query results
  </li></ul>
  </li><li>Allow sequential scans to take advantage of other concurrent
  sequentiqal scans, also called "Synchronised Scanning"
695 696 697 698 699
<p>  One possible implementation is to start sequential scans from the lowest
  numbered buffer in the shared cache, and when reaching the end wrap
  around to the beginning, rather than always starting sequential scans
  at the start of the table.
</p>
700
</li></ul>
Bruce Momjian's avatar
Bruce Momjian committed
701
<h1><a name="section_16">Vacuum</a></h1>
702 703 704

<ul>
  <li>Improve speed with indexes
Bruce Momjian's avatar
Bruce Momjian committed
705 706
<p>  For large table adjustements during VACUUM FULL, it is faster to 
  reindex rather than update the index.
707
</p>
Bruce Momjian's avatar
Bruce Momjian committed
708 709
  </li><li>Reduce lock time during VACUUM FULL by moving tuples with read lock,
  then write lock and truncate table
710 711 712 713 714
<p>  Moved tuples are invisible to other backends so they don't require a
  write lock. However, the read lock promotion to write lock could lead
  to deadlock situations.
</p>
  </li><li>Maintain a map of recently-expired rows
Bruce Momjian's avatar
Bruce Momjian committed
715 716
<p>  This allows vacuum to target specific pages for possible free space 
  without requiring a sequential scan.
Bruce Momjian's avatar
Add:  
Bruce Momjian committed
717
</p>
Bruce Momjian's avatar
Bruce Momjian committed
718 719
  </li><li>Auto-fill the free space map by scanning the buffer cache or by
  checking pages written by the background writer
Bruce Momjian's avatar
Add:  
Bruce Momjian committed
720 721 722 723 724
  </li><li>Create a bitmap of pages that need vacuuming
<p>  Instead of sequentially scanning the entire table, have the background
  writer or some other process record pages that have expired rows, then
  VACUUM can look at just those pages rather than the entire table.  In
  the event of a system crash, the bitmap would probably be invalidated.
725
</p>
Bruce Momjian's avatar
Bruce Momjian committed
726
  </li><li>%Add system view to show free space map contents
727 728
  </li><li>Auto-vacuum
  <ul>
Bruce Momjian's avatar
Bruce Momjian committed
729
    <li>Use free-space map information to guide refilling
Bruce Momjian's avatar
Bruce Momjian committed
730 731
    </li><li>%Issue log message to suggest VACUUM FULL if a table is nearly
          empty?
Bruce Momjian's avatar
Add:  
Bruce Momjian committed
732 733
    </li><li>Improve xid wraparound detection by recording per-table rather
          than per-database
734 735
  </li></ul>
</li></ul>
Bruce Momjian's avatar
Bruce Momjian committed
736
<h1><a name="section_17">Locking</a></h1>
737 738

<ul>
Bruce Momjian's avatar
Bruce Momjian committed
739
  <li>Add code to detect an SMP machine and handle spinlocks accordingly
740 741 742 743 744 745 746 747 748
  from distributted.net, <a href="http://www1.distributed.net/source">http://www1.distributed.net/source</a>,
  in client/common/cpucheck.cpp
<p>  On SMP machines, it is possible that locks might be released shortly,
  while on non-SMP machines, the backend should sleep so the process
  holding the lock can complete and release it.
</p>
  </li><li>Research use of sched_yield() for spinlock acquisition failure
  </li><li>Fix priority ordering of read and write light-weight locks (Neil)
</li></ul>
Bruce Momjian's avatar
Bruce Momjian committed
749
<h1><a name="section_18">Startup Time Improvements</a></h1>
750 751 752 753 754 755

<ul>
  <li>Experiment with multi-threaded backend [<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?thread">thread</a>]
<p>  This would prevent the overhead associated with process creation. Most
  operating systems have trivial process creation time compared to
  database startup overhead, but a few operating systems (WIn32,
Bruce Momjian's avatar
Bruce Momjian committed
756 757
  Solaris) might benefit from threading.  Also explore the idea of
  a single session using multiple threads to execute a query faster.
758 759 760 761 762 763 764
</p>
  </li><li>Add connection pooling
<p>  It is unclear if this should be done inside the backend code or done
  by something external like pgpool. The passing of file descriptors to
  existing backends is one of the difficulties with a backend approach.
</p>
</li></ul>
Bruce Momjian's avatar
Bruce Momjian committed
765
<h1><a name="section_19">Write-Ahead Log</a></h1>
766 767 768

<ul>
  <li>Eliminate need to write full pages to WAL before page modification [<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?wal">wal</a>]
Bruce Momjian's avatar
Bruce Momjian committed
769
<p>  Currently, to protect against partial disk page writes, we write
770 771 772 773
  full page images to WAL before they are modified so we can correct any
  partial page writes during recovery.  These pages can also be
  eliminated from point-in-time archive files.
</p>
Bruce Momjian's avatar
Bruce Momjian committed
774
  <ul>
Bruce Momjian's avatar
Bruce Momjian committed
775
    <li>When off, write CRC to WAL and check file system blocks
Bruce Momjian's avatar
Bruce Momjian committed
776
           on recovery
Bruce Momjian's avatar
Bruce Momjian committed
777 778 779
<p>           If CRC check fails during recovery, remember the page in case
           a later CRC for that page properly matches.
</p>
Bruce Momjian's avatar
Bruce Momjian committed
780 781 782
    </li><li>Write full pages during file system write and not when
           the page is modified in the buffer cache
<p>           This allows most full page writes to happen in the background
Bruce Momjian's avatar
Bruce Momjian committed
783 784 785
           writer.  It might cause problems for applying WAL on recovery
           into a partially-written page, but later the full page will be
           replaced from WAL.
Bruce Momjian's avatar
Bruce Momjian committed
786 787
</p>
  </li></ul>
788
  </li><li>Reduce WAL traffic so only modified values are written rather than
Bruce Momjian's avatar
Bruce Momjian committed
789
  entire rows?
790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807
  </li><li>Allow the pg_xlog directory location to be specified during initdb
  with a symlink back to the /data location
  </li><li>Allow WAL information to recover corrupted pg_controldata
  </li><li>Find a way to reduce rotational delay when repeatedly writing
  last WAL page
<p>  Currently fsync of WAL requires the disk platter to perform a full
  rotation to fsync again. One idea is to write the WAL to different
  offsets that might reduce the rotational delay.
</p>
  </li><li>Allow buffered WAL writes and fsync
<p>  Instead of guaranteeing recovery of all committed transactions, this
  would provide improved performance by delaying WAL writes and fsync
  so an abrupt operating system restart might lose a few seconds of
  committed transactions but still be consistent.  We could perhaps
  remove the 'fsync' parameter (which results in an an inconsistent
  database) in favor of this capability.
</p>
</li></ul>
Bruce Momjian's avatar
Bruce Momjian committed
808
<h1><a name="section_20">Optimizer / Executor</a></h1>
809 810 811

<ul>
  <li>Add missing optimizer selectivities for date, r-tree, etc
Bruce Momjian's avatar
Bruce Momjian committed
812
  </li><li>Allow ORDER BY ... LIMIT # to select high/low value without sort or
813
  index using a sequential scan for highest/lowest values
Bruce Momjian's avatar
Bruce Momjian committed
814
<p>  Right now, if no index exists, ORDER BY ... LIMIT # requires we sort
815 816
  all values to return the high/low value.  Instead The idea is to do a 
  sequential scan to find the high/low value, thus avoiding the sort.
Bruce Momjian's avatar
Bruce Momjian committed
817
  MIN/MAX already does this, but not for LIMIT &gt; 1.
818
</p>
819 820 821 822 823 824 825
  </li><li>Precompile SQL functions to avoid overhead
  </li><li>Create utility to compute accurate random_page_cost value
  </li><li>Improve ability to display optimizer analysis using OPTIMIZER_DEBUG
  </li><li>Have EXPLAIN ANALYZE highlight poor optimizer estimates
  </li><li>Consider using hash buckets to do DISTINCT, rather than sorting
<p>  This would be beneficial when there are few distinct values.
</p>
Bruce Momjian's avatar
Add:  
Bruce Momjian committed
826
  </li><li>Log queries where the optimizer row estimates were dramatically
Bruce Momjian's avatar
Bruce Momjian committed
827
  different from the number of rows actually found?
828
</li></ul>
Bruce Momjian's avatar
Bruce Momjian committed
829
<h1><a name="section_21">Miscellaneous Performance</a></h1>
830 831 832 833 834 835

<ul>
  <li>Do async I/O for faster random read-ahead of data
<p>  Async I/O allows multiple I/O requests to be sent to the disk with
  results coming back asynchronously.
</p>
Bruce Momjian's avatar
Bruce Momjian committed
836
  </li><li>Use mmap() rather than SYSV shared memory or to write WAL files?
837 838 839 840 841 842 843 844 845 846 847 848 849 850 851
<p>  This would remove the requirement for SYSV SHM but would introduce
  portability issues. Anonymous mmap (or mmap to /dev/zero) is required
  to prevent I/O overhead.
</p>
  </li><li>Consider mmap()'ing files into a backend?
<p>  Doing I/O to large tables would consume a lot of address space or
  require frequent mapping/unmapping.  Extending the file also causes
  mapping problems that might require mapping only individual pages,
  leading to thousands of mappings.  Another problem is that there is no
  way to _prevent_ I/O to disk from the dirty shared buffers so changes
  could hit disk before WAL is written.
</p>
  </li><li>Add a script to ask system configuration questions and tune postgresql.conf
  </li><li>Use a phantom command counter for nested subtransactions to reduce
  per-tuple overhead
Bruce Momjian's avatar
Add:  
Bruce Momjian committed
852
  </li><li>Research storing disk pages with no alignment/padding
853
</li></ul>
Bruce Momjian's avatar
Bruce Momjian committed
854
<h1><a name="section_22">Source Code</a></h1>
855 856 857 858 859 860

<ul>
  <li>Add use of 'const' for variables in source tree
  </li><li>Rename some /contrib modules from pg* to pg_*
  </li><li>Move some things from /contrib into main tree
  </li><li>Move some /contrib modules out to their own project sites
Bruce Momjian's avatar
Bruce Momjian committed
861
  </li><li>%Remove warnings created by -Wcast-align
862 863 864 865
  </li><li>Move platform-specific ps status display info from ps_status.c to ports
  </li><li>Add optional CRC checksum to heap and index pages
  </li><li>Improve documentation to build only interfaces (Marc)
  </li><li>Remove or relicense modules that are not under the BSD license, if possible
Bruce Momjian's avatar
Bruce Momjian committed
866
  </li><li>%Remove memory/file descriptor freeing before ereport(ERROR)
867
  </li><li>Acquire lock on a relation before building a relcache entry for it
Bruce Momjian's avatar
Bruce Momjian committed
868 869
  </li><li>%Promote debug_query_string into a server-side function current_query()
  </li><li>%Allow the identifier length to be increased via a configure option
870 871 872 873 874 875 876 877 878 879 880 881 882 883 884
  </li><li>Remove Win32 rename/unlink looping if unnecessary
  </li><li>Allow cross-compiling by generating the zic database on the target system
  </li><li>Improve NLS maintenace of libpgport messages linked onto applications
  </li><li>Allow ecpg to work with MSVC and BCC
  </li><li>Add xpath_array() to /contrib/xml2 to return results as an array
  </li><li>Allow building in directories containing spaces
<p>  This is probably not possible because 'gmake' and other compiler tools
  do not fully support quoting of paths with spaces.
</p>
  </li><li>Allow installing to directories containing spaces
<p>  This is possible if proper quoting is added to the makefiles for the
  install targets.  Because PostgreSQL supports relocatable installs, it
  is already possible to install into a directory that doesn't contain 
  spaces and then copy the install to a directory with spaces.
</p>
Bruce Momjian's avatar
Add:  
Bruce Momjian committed
885
  </li><li>Fix sgmltools so PDFs can be generated with bookmarks
Bruce Momjian's avatar
Bruce Momjian committed
886
  </li><li>%Clean up compiler warnings (especially with gcc version 4)
887 888 889 890 891 892 893 894 895 896 897 898
  </li><li>Win32
  <ul>
    <li>Remove configure.in check for link failure when cause is found
    </li><li>Remove readdir() errno patch when runtime/mingwex/dirent.c rev
          1.4 is released
    </li><li>Remove psql newline patch when we find out why mingw outputs an
          extra newline
    </li><li>Allow psql to use readline once non-US code pages work with
          backslashes
    </li><li>Re-enable timezone output on log_line_prefix '%t' when a
          shorter timezone string is available
    </li><li>Fix problem with shared memory on the Win32 Terminal Server
Bruce Momjian's avatar
Bruce Momjian committed
899
    </li><li>%Add support for Unicode
900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916
<p>          To fix this, the data needs to be converted to/from UTF16/UTF8
          so the Win32 wcscoll() can be used, and perhaps other functions
          like towupper().  However, UTF8 already works with normal
          locales but provides no ordering or character set classes.
</p>
  </li></ul>
  </li><li>Wire Protocol Changes
  <ul>
    <li>Allow dynamic character set handling
    </li><li>Add decoded type, length, precision
    </li><li>Use compression?
    </li><li>Update clients to use data types, typmod, <a href="http://schema.table.column">schema.table.column</a>/ names
          of result sets using new query protocol
  </li></ul>
</li></ul>
<hr/>

Bruce Momjian's avatar
Bruce Momjian committed
917
<h2><a name="section_22_1">Developers who have claimed items are:</a></h2>
918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946
<ul>
  <li>Alvaro is Alvaro Herrera &lt;<a href="mailto:alvherre@dcc.uchile.cl">alvherre@dcc.uchile.cl</a>&gt;
  </li><li>Andrew is Andrew Dunstan &lt;<a href="mailto:andrew@dunslane.net">andrew@dunslane.net</a>&gt;
  </li><li>Bruce is Bruce Momjian &lt;<a href="mailto:pgman@candle.pha.pa.us">pgman@candle.pha.pa.us</a>&gt; of Software Research Assoc.
  </li><li>Christopher is Christopher Kings-Lynne &lt;<a href="mailto:chriskl@familyhealth.com.au">chriskl@familyhealth.com.au</a>&gt; of
    Family Health Network
  </li><li>Claudio is Claudio Natoli &lt;<a href="mailto:claudio.natoli@memetrics.com">claudio.natoli@memetrics.com</a>&gt;
  </li><li>D'Arcy is D'Arcy J.M. Cain &lt;<a href="mailto:darcy@druid.net">darcy@druid.net</a>&gt; of The Cain Gang Ltd.
  </li><li>Fabien is Fabien Coelho &lt;<a href="mailto:coelho@cri.ensmp.fr">coelho@cri.ensmp.fr</a>&gt;
  </li><li>Gavin is Gavin Sherry &lt;<a href="mailto:swm@linuxworld.com.au">swm@linuxworld.com.au</a>&gt; of Alcove Systems Engineering
  </li><li>Greg is Greg Sabino Mullane &lt;<a href="mailto:greg@turnstep.com">greg@turnstep.com</a>&gt;
  </li><li>Hiroshi is Hiroshi Inoue &lt;<a href="mailto:Inoue@tpf.co.jp">Inoue@tpf.co.jp</a>&gt;
  </li><li>Jan is Jan Wieck &lt;<a href="mailto:JanWieck@Yahoo.com">JanWieck@Yahoo.com</a>&gt; of Afilias, Inc.
  </li><li>Joe is Joe Conway &lt;<a href="mailto:mail@joeconway.com">mail@joeconway.com</a>&gt;
  </li><li>Karel is Karel Zak &lt;<a href="mailto:zakkr@zf.jcu.cz">zakkr@zf.jcu.cz</a>&gt;
  </li><li>Magnus is Magnus Hagander &lt;<a href="mailto:mha@sollentuna.net">mha@sollentuna.net</a>&gt;
  </li><li>Marc is Marc Fournier &lt;<a href="mailto:scrappy@hub.org">scrappy@hub.org</a>&gt; of PostgreSQL, Inc.
  </li><li>Matthew T. O'Connor &lt;<a href="mailto:matthew@zeut.net">matthew@zeut.net</a>&gt;
  </li><li>Michael is Michael Meskes &lt;<a href="mailto:meskes@postgresql.org">meskes@postgresql.org</a>&gt; of Credativ
  </li><li>Neil is Neil Conway &lt;<a href="mailto:neilc@samurai.com">neilc@samurai.com</a>&gt;
  </li><li>Oleg is Oleg Bartunov &lt;<a href="mailto:oleg@sai.msu.su">oleg@sai.msu.su</a>&gt;
  </li><li>Peter is Peter Eisentraut &lt;<a href="mailto:peter_e@gmx.net">peter_e@gmx.net</a>&gt;
  </li><li>Philip is Philip Warner &lt;<a href="mailto:pjw@rhyme.com.au">pjw@rhyme.com.au</a>&gt; of Albatross Consulting Pty. Ltd.
  </li><li>Rod is Rod Taylor &lt;<a href="mailto:pg@rbt.ca">pg@rbt.ca</a>&gt;
  </li><li>Simon is Simon Riggs &lt;<a href="mailto:simon@2ndquadrant.com">simon@2ndquadrant.com</a>&gt;
  </li><li>Stephan is Stephan Szabo &lt;<a href="mailto:sszabo@megazone23.bigpanda.com">sszabo@megazone23.bigpanda.com</a>&gt;
  </li><li>Tatsuo is Tatsuo Ishii &lt;<a href="mailto:t-ishii@sra.co.jp">t-ishii@sra.co.jp</a>&gt; of Software Research Assoc.
  </li><li>Tom is Tom Lane &lt;<a href="mailto:tgl@sss.pgh.pa.us">tgl@sss.pgh.pa.us</a>&gt; of Red Hat
</li></ul>
947
</li></ul></li></ul>
948 949
</body>
</html>