]> granicus.if.org Git - postgresql/blob - doc/src/FAQ/TODO.html
Update pg_dump item:
[postgresql] / doc / src / FAQ / TODO.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html>
4 <head>
5 <title>PostgreSQL TODO List</title>
6 <meta name="generator" content="HTML::TextToHTML v2.25"/>
7 </head>
8 <body bgcolor="#FFFFFF" text="#000000" link="#FF0000" vlink="#A00000" alink="#0000FF">
9 <h1><a name="section_1">PostgreSQL TODO List</a></h1>
10 <p>Current maintainer:     Bruce Momjian (<a href="mailto:bruce@momjian.us">bruce@momjian.us</a>)<br/>
11 Last updated:           Tue Mar  4 09:38:30 EST 2008
12 </p>
13 <p>The most recent version of this document can be viewed at<br/>
14 <a href="http://www.postgresql.org/docs/faqs.TODO.html">http://www.postgresql.org/docs/faqs.TODO.html</a>.
15 </p>
16 <p><strong>A hyphen, "-", marks changes that will appear in the upcoming 8.3 release.</strong><br/>
17 <strong>A percent sign, "%", marks items that are easier to implement.</strong>
18 </p>
19 <p>Bracketed items, "[<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?"></a>]", have more detail.
20 </p>
21 <p>This list contains all known PostgreSQL bugs and feature requests. If<br/>
22 you would like to work on an item, please read the Developer's FAQ<br/>
23 first.  There is also a developer's wiki at<br/>
24 <a href="http://developer.postgresql.org">http://developer.postgresql.org</a>.
25 </p>
26 <h1><a name="section_2">Administration</a></h1>
27
28 <ul>
29   <li>Allow administrators to safely terminate individual sessions either
30   via an SQL function or SIGTERM
31 <p>  Lock table corruption following SIGTERM of an individual backend
32   has been reported in 8.0.  A possible cause was fixed in 8.1, but
33   it is unknown whether other problems exist.  This item mostly
34   requires additional testing rather than of writing any new code.
35 </p>
36 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-08/msg00174.php">http://archives.postgresql.org/pgsql-hackers/2006-08/msg00174.php</a>
37 </p>
38   </li><li>Check for unreferenced table files created by transactions that were
39   in-progress when the server terminated abruptly
40 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2006-06/msg00096.php">http://archives.postgresql.org/pgsql-patches/2006-06/msg00096.php</a>
41 </p>
42   </li><li>Set proper permissions on non-system schemas during db creation
43 <p>  Currently all schemas are owned by the super-user because they are copied
44   from the template1 database.  However, since all objects are inherited
45   from the template database, it is not clear that setting schemas to the db
46   owner is correct.
47 </p>
48   </li><li>Add function to report the time of the most recent server reload
49   </li><li>Allow statistics collector information to be pulled from the collector
50   process directly, rather than requiring the collector to write a
51   filesystem file twice a second?
52   </li><li>Allow log_min_messages to be specified on a per-module basis
53 <p>  This would allow administrators to see more detailed information from
54   specific sections of the backend, e.g. checkpoints, autovacuum, etc.
55   Another idea is to allow separate configuration files for each module,
56   or allow arbitrary SET commands to be passed to them.
57 </p>
58   </li><li>Simplify ability to create partitioned tables
59 <p>  This would allow creation of partitioned tables without requiring
60   creation of triggers or rules for INSERT/UPDATE/DELETE, and constraints
61   for rapid partition selection.  Options could include range and hash
62   partition selection.
63 </p>
64 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-03/msg00375.php">http://archives.postgresql.org/pgsql-hackers/2007-03/msg00375.php</a>
65   <a href="http://archives.postgresql.org/pgsql-hackers/2007-04/msg00151.php">http://archives.postgresql.org/pgsql-hackers/2007-04/msg00151.php</a>
66 </p>
67   </li><li>Allow auto-selection of partitioned tables for min/max() operations
68   </li><li>Allow more complex user/database default GUC settings
69 <p>  Currently ALTER USER and ALTER DATABASE support per-user and
70   per-database defaults.  Consider adding per-user-and-database
71   defaults so things like search_path can be defaulted for a
72   specific user connecting to a specific database.
73 </p>
74   </li><li>Allow custom variable classes that can restrict who can set the values
75 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-11/msg00911.php">http://archives.postgresql.org/pgsql-hackers/2006-11/msg00911.php</a>
76 </p>
77   </li><li>Implement the SQL standard mechanism whereby REVOKE ROLE revokes only
78   the privilege granted by the invoking role, and not those granted
79   by other roles
80 <p>  <a href="http://archives.postgresql.org/pgsql-bugs/2007-05/msg00010.php">http://archives.postgresql.org/pgsql-bugs/2007-05/msg00010.php</a>
81 </p>
82   </li><li>Allow SSL authentication/encryption over unix domain sockets
83 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-12/msg00924.php">http://archives.postgresql.org/pgsql-hackers/2007-12/msg00924.php</a>
84 </p>
85   </li><li>Configuration files
86   <ul>
87     <li>Allow pg_hba.conf to specify host names along with IP addresses
88 <p>          Host name lookup could occur when the postmaster reads the
89           pg_hba.conf file, or when the backend starts.  Another
90           solution would be to reverse lookup the connection IP and
91           check that hostname against the host names in pg_hba.conf.
92           We could also then check that the host name maps to the IP
93           address.
94 </p>
95     </li><li>%Allow postgresql.conf file values to be changed via an SQL
96           API, perhaps using SET GLOBAL
97     </li><li>Allow the server to be stopped/restarted via an SQL API
98     </li><li>Issue a warning if a change-on-restart-only postgresql.conf value
99           is modified  and the server config files are reloaded
100   </li></ul>
101   </li><li>Tablespaces
102   <ul>
103     <li>Allow a database in tablespace t1 with tables created in
104           tablespace t2 to be used as a template for a new database created
105           with default tablespace t2
106 <p>          Currently all objects in the default database tablespace must
107           have default tablespace specifications. This is because new
108           databases are created by copying directories. If you mix default
109           tablespace tables and tablespace-specified tables in the same
110           directory, creating a new database from such a mixed directory
111           would create a new database with tables that had incorrect
112           explicit tablespaces.  To fix this would require modifying
113           pg_class in the newly copied database, which we don't currently
114           do.
115 </p>
116     </li><li>Allow reporting of which objects are in which tablespaces
117 <p>          This item is difficult because a tablespace can contain objects
118           from multiple databases. There is a server-side function that
119           returns the databases which use a specific tablespace, so this
120           requires a tool that will call that function and connect to each
121           database to find the objects in each database for that tablespace.
122 </p>
123     </li><li>Allow WAL replay of CREATE TABLESPACE to work when the directory
124           structure on the recovery computer is different from the original
125     </li><li>Allow per-tablespace quotas
126   </li></ul>
127   </li><li>Point-In-Time Recovery (PITR)
128   <ul>
129     <li>Allow a warm standby system to also allow read-only statements
130             [<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?pitr">pitr</a>]
131 <p>            <a href="http://archives.postgresql.org/pgsql-hackers/2007-03/msg00050.php">http://archives.postgresql.org/pgsql-hackers/2007-03/msg00050.php</a>
132 </p>
133     </li><li>%Create dump tool for write-ahead logs for use in determining
134             transaction id for point-in-time recovery
135 <p>            This is useful for checking PITR recovery.
136 </p>
137     </li><li>Allow recovery.conf to support the same syntax as
138             postgresql.conf, including quoting
139 <p>            <a href="http://archives.postgresql.org/pgsql-hackers/2006-12/msg00497.php">http://archives.postgresql.org/pgsql-hackers/2006-12/msg00497.php</a>
140 </p>
141   </li></ul>
142 </li></ul>
143 <h1><a name="section_3">Data Types</a></h1>
144
145 <ul>
146   <li>Change NUMERIC to enforce the maximum precision
147   </li><li>Reduce storage space for small NUMERICs
148 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-02/msg01331.php">http://archives.postgresql.org/pgsql-hackers/2007-02/msg01331.php</a>
149   <a href="http://archives.postgresql.org/pgsql-patches/2007-02/msg00505.php">http://archives.postgresql.org/pgsql-patches/2007-02/msg00505.php</a>
150 </p>
151   </li><li>Fix data types where equality comparison isn't intuitive, e.g. box
152   </li><li>Add support for public SYNONYMs
153 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-03/msg00519.php">http://archives.postgresql.org/pgsql-hackers/2006-03/msg00519.php</a>
154 </p>
155   </li><li>Fix CREATE CAST on DOMAINs
156 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-05/msg00072.php">http://archives.postgresql.org/pgsql-hackers/2006-05/msg00072.php</a>
157   <a href="http://archives.postgresql.org/pgsql-hackers/2006-09/msg01681.php">http://archives.postgresql.org/pgsql-hackers/2006-09/msg01681.php</a>
158 </p>
159   </li><li>Add support for SQL-standard GENERATED/IDENTITY columns
160 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-07/msg00543.php">http://archives.postgresql.org/pgsql-hackers/2006-07/msg00543.php</a>
161   <a href="http://archives.postgresql.org/pgsql-hackers/2006-08/msg00038.php">http://archives.postgresql.org/pgsql-hackers/2006-08/msg00038.php</a>
162   <a href="http://archives.postgresql.org/pgsql-hackers/2007-05/msg00344.php">http://archives.postgresql.org/pgsql-hackers/2007-05/msg00344.php</a>
163   <a href="http://archives.postgresql.org/pgsql-patches/2007-05/msg00076.php">http://archives.postgresql.org/pgsql-patches/2007-05/msg00076.php</a>
164 </p>
165   </li><li>Improve XML support
166 <p>  <a href="http://developer.postgresql.org/index.php/XML_Support">http://developer.postgresql.org/index.php/XML_Support</a>
167 </p>
168   </li><li>Consider placing all sequences in a single table, or create a system
169   view
170 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php">http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php</a>
171 </p>
172   </li><li>Allow the UUID type to accept non-standard formats
173 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2008-02/msg01214.php">http://archives.postgresql.org/pgsql-hackers/2008-02/msg01214.php</a>
174 </p>
175   </li><li>Dates and Times
176   <ul>
177     <li>Allow infinite dates and intervals just like infinite timestamps
178     </li><li>Merge hardwired timezone names with the TZ database; allow either
179           kind everywhere a TZ name is currently taken
180     </li><li>Allow TIMESTAMP WITH TIME ZONE to store the original timezone
181           information, either zone name or offset from UTC [<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?timezone">timezone</a>]
182 <p>          If the TIMESTAMP value is stored with a time zone name, interval
183           computations should adjust based on the time zone rules.
184 </p>
185     </li><li>Fix SELECT '0.01 years'::interval, '0.01 months'::interval
186     </li><li>Add a GUC variable to allow output of interval values in ISO8601
187           format
188     </li><li>Have timestamp subtraction not call justify_hours()?
189 <p>          <a href="http://archives.postgresql.org/pgsql-sql/2006-10/msg00059.php">http://archives.postgresql.org/pgsql-sql/2006-10/msg00059.php</a>
190 </p>
191     </li><li>Improve timestamptz subtraction to be DST-aware
192 <p>          Currently subtracting one date from another that crosses a
193           daylight savings time adjustment can return '1 day 1 hour', but
194           adding that back to the first date returns a time one hour in
195           the future.  This is caused by the adjustment of '25 hours' to
196           '1 day 1 hour', and '1 day' is the same time the next day, even
197           if daylight savings adjustments are involved.
198 </p>
199     </li><li>Fix interval display to support values exceeding 2^31 hours
200     </li><li>Add overflow checking to timestamp and interval arithmetic
201     </li><li>Extend timezone code to allow 64-bit values so we can
202           represent years beyond 2038
203 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2006-09/msg01363.php">http://archives.postgresql.org/pgsql-hackers/2006-09/msg01363.php</a>
204 </p>
205     </li><li>Use LC_TIME for localized weekday/month names, rather than
206           LC_MESSAGES
207 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2006-11/msg00390.php">http://archives.postgresql.org/pgsql-hackers/2006-11/msg00390.php</a>
208 </p>
209     </li><li>Add ISO INTERVAL handling
210   </li></ul>
211 </li></ul>
212 <p>                  <a href="http://archives.postgresql.org/pgsql-hackers/2006-01/msg00250.php">http://archives.postgresql.org/pgsql-hackers/2006-01/msg00250.php</a><br/>
213                   <a href="http://archives.postgresql.org/pgsql-bugs/2006-04/msg00248.php">http://archives.postgresql.org/pgsql-bugs/2006-04/msg00248.php</a>
214 </p>
215 <ul>
216   <li>Support ISO INTERVAL syntax if units cannot be determined from
217                   the string, and are supplied after the string
218 <p>                  The SQL standard states that the units after the string
219                   specify the units of the string, e.g. INTERVAL '2' MINUTE
220                   should return '00:02:00'. The current behavior has the units
221                   restrict the interval value to the specified unit or unit
222                   range, INTERVAL '70' SECOND returns '00:00:10'.
223 </p>
224 <p>                  For syntax that isn't uniquely ISO or PG syntax, like '1' or
225                   '1:30', treat as ISO if there is a range specification clause,
226                   and as PG if there no clause is present, e.g. interpret '1:30'
227                   MINUTE TO SECOND as '1 minute 30 seconds', and interpret
228                   '1:30' as '1 hour, 30 minutes'.
229 </p>
230 <p>                  This makes common cases like SELECT INTERVAL '1' MONTH
231                   SQL-standard results. The SQL standard supports a limited
232                   number of unit combinations and doesn't support unit names in
233                   the string. The PostgreSQL syntax is more flexible in the
234                   range of units supported, e.g. PostgreSQL supports '1 year 1
235                   hour', while the SQL standard does not.
236 </p>
237   </li><li>Add support for year-month syntax, INTERVAL '50-6' YEAR
238                   TO MONTH
239   </li><li>Interpret INTERVAL '1 year' MONTH as CAST (INTERVAL '1
240                   year' AS INTERVAL MONTH), and this should return '12 months'
241   </li><li>Round or truncate values to the requested precision, e.g.
242                   INTERVAL '11 months' AS YEAR should return one or zero
243   </li><li>Support precision, CREATE TABLE foo (a INTERVAL MONTH(3))
244   <ul>
245     <li>Arrays
246     <ul>
247       <li>Delay resolution of array expression's data type so assignment
248           coercion can be performed on empty array expressions
249       </li><li>Add support for arrays of domains
250 <p>          <a href="http://archives.postgresql.org/pgsql-patches/2007-05/msg00114.php">http://archives.postgresql.org/pgsql-patches/2007-05/msg00114.php</a>
251 </p>
252       </li><li>Allow single-byte header storage for array elements
253     </li></ul>
254     </li><li>Binary Data
255     <ul>
256       <li>Improve vacuum of large objects, like contrib/vacuumlo?
257       </li><li>Add security checking for large objects
258       </li><li>Auto-delete large objects when referencing row is deleted
259 <p>          contrib/lo offers this functionality.
260 </p>
261       </li><li>Allow read/write into TOAST values like large objects
262 <p>          This requires the TOAST column to be stored EXTERNAL.
263 </p>
264       </li><li>Add API for 64-bit large object access
265 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2005-09/msg00781.php">http://archives.postgresql.org/pgsql-hackers/2005-09/msg00781.php</a>
266 </p>
267     </li></ul>
268     </li><li>MONEY data type
269     <ul>
270       <li>Add locale-aware MONEY type, and support multiple currencies
271 <p>          <a href="http://archives.postgresql.org/pgsql-general/2005-08/msg01432.php">http://archives.postgresql.org/pgsql-general/2005-08/msg01432.php</a>
272           <a href="http://archives.postgresql.org/pgsql-hackers/2007-03/msg01181.php">http://archives.postgresql.org/pgsql-hackers/2007-03/msg01181.php</a>
273 </p>
274       </li><li>MONEY dumps in a locale-specific format making it difficult to
275           restore to a system with a different locale
276       </li><li>Allow MONEY to be easily cast to/from other numeric data types
277     </li></ul>
278   </li></ul>
279 </li></ul>
280 <h1><a name="section_4">Functions</a></h1>
281
282 <ul>
283   <li>Allow INET subnet tests using non-constants to be indexed
284   </li><li>Allow to_date() and to_timestamp() accept localized month names
285   </li><li>Fix to_date()-related functions to consistently issue errors
286 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-02/msg00915.php">http://archives.postgresql.org/pgsql-hackers/2007-02/msg00915.php</a>
287 </p>
288   </li><li>Add missing parameter handling in to_char()
289 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2005-12/msg00948.php">http://archives.postgresql.org/pgsql-hackers/2005-12/msg00948.php</a>
290 </p>
291   </li><li>Allow substring/replace() to get/set bit values
292   </li><li>Allow to_char() on interval values to accumulate the highest unit
293   requested
294 <p>  Some special format flag would be required to request such
295   accumulation.  Such functionality could also be added to EXTRACT.
296   Prevent accumulation that crosses the month/day boundary because of
297   the uneven number of days in a month.
298 </p>
299   <ul>
300     <li>to_char(INTERVAL '1 hour 5 minutes', 'MI') =&gt; 65
301     </li><li>to_char(INTERVAL '43 hours 20 minutes', 'MI' ) =&gt; 2600
302     </li><li>to_char(INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI') =&gt; 0:1:19:20
303     </li><li>to_char(INTERVAL '3 years 5 months','MM') =&gt; 41
304   </li></ul>
305   </li><li>Implement inlining of set-returning functions defined in SQL
306   </li><li>Allow SQL-language functions to return results from RETURNING queries
307 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-10/msg00665.php">http://archives.postgresql.org/pgsql-hackers/2006-10/msg00665.php</a>
308 </p>
309   </li><li>Allow SQL-language functions to reference parameters by parameter name
310 <p>  Currently SQL-language functions can only refer to dollar parameters,
311   e.g. $1
312 </p>
313   </li><li>Add SPI_gettypmod() to return the typemod for a TupleDesc
314   </li><li>Enforce typmod for function inputs, function results and parameters for
315   spi_prepare'd statements called from PLs
316 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-01/msg01403.php">http://archives.postgresql.org/pgsql-hackers/2007-01/msg01403.php</a>
317 </p>
318   </li><li>Allow holdable cursors in SPI
319   </li><li>Tighten function permission checks
320 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-12/msg00568.php">http://archives.postgresql.org/pgsql-hackers/2006-12/msg00568.php</a>
321 </p>
322   </li><li>Fix IS OF so it matches the ISO specification, and add documentation
323 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2003-08/msg00060.php">http://archives.postgresql.org/pgsql-patches/2003-08/msg00060.php</a>
324   <a href="http://archives.postgresql.org/pgsql-hackers/2007-02/msg00060.php">http://archives.postgresql.org/pgsql-hackers/2007-02/msg00060.php</a>
325 </p>
326   </li><li>Add missing operators for geometric data types
327 <p>  Some geometric types do not have the full suite of geometric operators,
328   e.g. box @&gt; point
329 </p>
330   </li><li>Implement Boyer-Moore searching in strpos()
331 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2007-08/msg00012.php">http://archives.postgresql.org/pgsql-patches/2007-08/msg00012.php</a>
332 </p>
333 </li></ul>
334 <h1><a name="section_5">Multi-Language Support</a></h1>
335
336 <ul>
337   <li>Add NCHAR (as distinguished from ordinary varchar),
338   </li><li>Allow locale to be set at database creation
339 <p>  Currently locale can only be set during initdb.  No global tables have
340   locale-aware columns.  However, the database template used during
341   database creation might have locale-aware indexes.  The indexes would
342   need to be reindexed to match the new locale.
343 </p>
344   </li><li>Allow encoding on a per-column basis optionally using the ICU library:
345 <p>  Right now only one encoding is allowed per database.  [<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?locale">locale</a>]
346 </p>
347 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2005-03/msg00932.php">http://archives.postgresql.org/pgsql-hackers/2005-03/msg00932.php</a>
348   <a href="http://archives.postgresql.org/pgsql-patches/2005-08/msg00309.php">http://archives.postgresql.org/pgsql-patches/2005-08/msg00309.php</a>
349   <a href="http://archives.postgresql.org/pgsql-patches/2006-03/msg00233.php">http://archives.postgresql.org/pgsql-patches/2006-03/msg00233.php</a>
350   <a href="http://archives.postgresql.org/pgsql-hackers/2006-09/msg00662.php">http://archives.postgresql.org/pgsql-hackers/2006-09/msg00662.php</a>
351 </p>
352   </li><li>Add CREATE COLLATE?  [<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?locale">locale</a>]
353   </li><li>Support multiple simultaneous character sets, per SQL92
354   </li><li>Improve UTF8 combined character handling?
355   </li><li>Add octet_length_server() and octet_length_client()
356   </li><li>Make octet_length_client() the same as octet_length()?
357   </li><li>Fix problems with wrong runtime encoding conversion for NLS message files
358   </li><li>Add URL to more complete multi-byte regression tests
359 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2005-07/msg00272.php">http://archives.postgresql.org/pgsql-hackers/2005-07/msg00272.php</a>
360 </p>
361   </li><li>Fix ILIKE and regular expressions to handle case insensitivity
362   properly in multibyte encodings
363 <p>  <a href="http://archives.postgresql.org/pgsql-bugs/2005-10/msg00001.php">http://archives.postgresql.org/pgsql-bugs/2005-10/msg00001.php</a>
364   <a href="http://archives.postgresql.org/pgsql-patches/2005-11/msg00173.php">http://archives.postgresql.org/pgsql-patches/2005-11/msg00173.php</a>
365 </p>
366   </li><li>Set client encoding based on the client operating system encoding
367 <p>  Currently client_encoding is set in postgresql.conf, which
368   defaults to the server encoding.
369 </p>
370 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-08/msg01696.php">http://archives.postgresql.org/pgsql-hackers/2006-08/msg01696.php</a>
371 </p>
372 </li></ul>
373 <h1><a name="section_6">Views / Rules</a></h1>
374
375 <ul>
376   <li>Automatically create rules on views so they are updateable, per SQL99
377 <p>  We can only auto-create rules for simple views.  For more complex
378   cases users will still have to write rules manually.
379 </p>
380 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-03/msg00586.php">http://archives.postgresql.org/pgsql-hackers/2006-03/msg00586.php</a>
381   <a href="http://archives.postgresql.org/pgsql-patches/2006-08/msg00255.php">http://archives.postgresql.org/pgsql-patches/2006-08/msg00255.php</a>
382 </p>
383   </li><li>Add the functionality for WITH CHECK OPTION clause of CREATE VIEW
384   </li><li>Allow NOTIFY in rules involving conditionals
385   </li><li>Allow VIEW/RULE recompilation when the underlying tables change
386 <p>  Another issue is whether underlying table changes should be reflected
387   in the view, e.g. should SELECT * show additional columns if they
388   are added after the view is created.
389 </p>
390   </li><li>Make it possible to use RETURNING together with conditional DO INSTEAD
391   rules, such as for partitioning setups
392 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-09/msg00577.php">http://archives.postgresql.org/pgsql-hackers/2007-09/msg00577.php</a>
393 </p>
394   </li><li>Add the ability to automatically create materialized views
395 <p>  Right now materialized views require the user to create triggers on the
396   main table to keep the summary table current.  SQL syntax should be able
397   to manager the triggers and summary table automatically.  A more
398   sophisticated implementation would automatically retrieve from the
399   summary table when the main table is referenced, if possible.
400 </p>
401 </li></ul>
402 <h1><a name="section_7">SQL Commands</a></h1>
403
404 <ul>
405   <li>Add CORRESPONDING BY to UNION/INTERSECT/EXCEPT
406   </li><li>Add ROLLUP, CUBE, GROUPING SETS options to GROUP BY
407   </li><li>%Allow SET CONSTRAINTS to be qualified by schema/table name
408   </li><li>%Add a separate TRUNCATE permission
409 <p>  Currently only the owner can TRUNCATE a table because triggers are not
410   called, and the table is locked in exclusive mode.
411 </p>
412   </li><li>Allow PREPARE of cursors
413   </li><li>Allow finer control over the caching of prepared query plans
414 <p>  Currently queries prepared via the libpq API are planned on first
415   execute using the supplied parameters --- allow SQL PREPARE to do the
416   same.  Also, allow control over replanning prepared queries either
417   manually or automatically when statistics for execute parameters
418   differ dramatically from those used during planning.
419 </p>
420   </li><li>Improve logging of prepared transactions recovered during startup
421 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-11/msg00092.php">http://archives.postgresql.org/pgsql-hackers/2006-11/msg00092.php</a>
422 </p>
423   </li><li>Allow LISTEN/NOTIFY to store info in memory rather than tables?
424 <p>  Currently LISTEN/NOTIFY information is stored in pg_listener. Storing
425   such information in memory would improve performance.
426 </p>
427   </li><li>Add optional textual message to NOTIFY
428 <p>  This would allow an informational message to be added to the notify
429   message, perhaps indicating the row modified or other custom
430   information.
431 </p>
432   </li><li>Allow multiple identical NOTIFY events to always be communicated to the
433   client, rather than sent as a single notification to the listener
434   </li><li>Add a GUC variable to warn about non-standard SQL usage in queries
435   </li><li>Add SQL-standard MERGE command, typically used to merge two tables
436   [<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?merge">merge</a>]
437 <p>  This is similar to UPDATE, then for unmatched rows, INSERT.
438   Whether concurrent access allows modifications which could cause
439   row loss is implementation independent.
440 </p>
441   </li><li>Add REPLACE or UPSERT command that does UPDATE, or on failure, INSERT
442   [<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?merge">merge</a>]
443 <p>  To implement this cleanly requires that the table have a unique index
444   so duplicate checking can be easily performed.  It is possible to
445   do it without a unique index if we require the user to LOCK the table
446   before the MERGE.
447 </p>
448 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2005-11/msg00501.php">http://archives.postgresql.org/pgsql-hackers/2005-11/msg00501.php</a>
449   <a href="http://archives.postgresql.org/pgsql-hackers/2005-11/msg00536.php">http://archives.postgresql.org/pgsql-hackers/2005-11/msg00536.php</a>
450 </p>
451   </li><li>Add NOVICE output level for helpful messages like automatic sequence/index
452   creation
453   </li><li>Add GUC to issue notice about statements that use unjoined tables
454   </li><li>Allow EXPLAIN to identify tables that were skipped because of
455   constraint_exclusion
456   </li><li>Allow EXPLAIN output to be more easily processed by scripts, perhaps XML
457   </li><li>Enable standard_conforming_strings
458   </li><li>Make standard_conforming_strings the default in 8.5?
459 <p>  When this is done, backslash-quote should be prohibited in non-E''
460   strings because of possible confusion over how such strings treat
461   backslashes.  Basically, '' is always safe for a literal single
462   quote, while \' might or might not be based on the backslash
463   handling rules.
464 </p>
465   </li><li>Simplify dropping roles that have objects in several databases
466   </li><li>Allow COMMENT ON to accept an expression rather than just a string
467   </li><li>Allow the count returned by SELECT, etc to be represented as an int64
468   to allow a higher range of values
469   </li><li>Add SQL99 WITH clause to SELECT
470   </li><li>Add SQL:2003 WITH RECURSIVE (hierarchical) queries to SELECT
471   </li><li>Add DEFAULT .. AS OWNER so permission checks are done as the table
472   owner
473 <p>  This would be useful for SERIAL nextval() calls and CHECK constraints.
474 </p>
475   </li><li>Allow DISTINCT to work in multiple-argument aggregate calls
476   </li><li>Add column to pg_stat_activity that shows the progress of long-running
477   commands like CREATE INDEX and VACUUM
478   </li><li>Implement SQL:2003 window functions
479   </li><li>Improve failure message when DROP DATABASE is used on a database that
480   has prepared transactions
481   </li><li>Allow INSERT/UPDATE ... RETURNING inside a SELECT 'FROM' clause
482 <p>  <a href="http://archives.postgresql.org/pgsql-general/2006-09/msg00803.php">http://archives.postgresql.org/pgsql-general/2006-09/msg00803.php</a>
483   <a href="http://archives.postgresql.org/pgsql-hackers/2006-10/msg00693.php">http://archives.postgresql.org/pgsql-hackers/2006-10/msg00693.php</a>
484 </p>
485   </li><li>Increase locking when DROPing objects so dependent objects cannot
486   get dropped while the DROP operation is happening
487 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-01/msg00937.php">http://archives.postgresql.org/pgsql-hackers/2007-01/msg00937.php</a>
488 </p>
489   </li><li>-<em>Allow AS in "SELECT col AS label" to be optional in certain cases</em>
490   </li><li>Allow INSERT ... DELETE ... RETURNING, namely allow the DELETE ...
491   RETURNING to supply values to the INSERT
492   <a href="http://archives.postgresql.org/pgsql-hackers/2008-02/thrd2.php#00979">http://archives.postgresql.org/pgsql-hackers/2008-02/thrd2.php#00979</a>
493   </li><li>CREATE
494   <ul>
495     <li>Allow CREATE TABLE AS to determine column lengths for complex
496           expressions like SELECT col1 || col2
497     </li><li>Have WITH CONSTRAINTS also create constraint indexes
498 <p>          <a href="http://archives.postgresql.org/pgsql-patches/2007-04/msg00149.php">http://archives.postgresql.org/pgsql-patches/2007-04/msg00149.php</a>
499 </p>
500   </li></ul>
501   </li><li>UPDATE
502   <ul>
503     <li>Allow UPDATE tab SET ROW (col, ...) = (SELECT...)
504 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2006-07/msg01306.php">http://archives.postgresql.org/pgsql-hackers/2006-07/msg01306.php</a>
505           <a href="http://archives.postgresql.org/pgsql-hackers/2007-03/msg00865.php">http://archives.postgresql.org/pgsql-hackers/2007-03/msg00865.php</a>
506 </p>
507     </li><li>Research self-referential UPDATEs that see inconsistent row versions
508           in read-committed mode
509 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-05/msg00507.php">http://archives.postgresql.org/pgsql-hackers/2007-05/msg00507.php</a>
510           <a href="http://archives.postgresql.org/pgsql-hackers/2007-06/msg00016.php">http://archives.postgresql.org/pgsql-hackers/2007-06/msg00016.php</a>
511 </p>
512     </li><li>Allow GLOBAL temporary tables to exist as empty by default in
513           all sessions
514 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-07/msg00006.php">http://archives.postgresql.org/pgsql-hackers/2007-07/msg00006.php</a>
515 </p>
516   </li></ul>
517   </li><li>ALTER
518   <ul>
519     <li>Have ALTER TABLE RENAME rename SERIAL sequence names
520 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php">http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php</a>
521 </p>
522     </li><li>Have ALTER SEQUENCE RENAME rename the sequence name stored
523           in the sequence table
524 <p>          <a href="http://archives.postgresql.org/pgsql-bugs/2007-09/msg00092.php">http://archives.postgresql.org/pgsql-bugs/2007-09/msg00092.php</a>
525           <a href="http://archives.postgresql.org/pgsql-bugs/2007-10/msg00007.php">http://archives.postgresql.org/pgsql-bugs/2007-10/msg00007.php</a>
526           <a href="http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php">http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php</a>
527 </p>
528     </li><li>Add ALTER DOMAIN to modify the underlying data type
529     </li><li>%Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME
530 <p>          <a href="http://archives.postgresql.org/pgsql-patches/2006-02/msg00168.php">http://archives.postgresql.org/pgsql-patches/2006-02/msg00168.php</a>
531 </p>
532     </li><li>%Allow ALTER TABLE to change constraint deferrability and actions
533     </li><li>Add missing object types for ALTER ... SET SCHEMA
534     </li><li>Allow ALTER TABLESPACE to move to different directories
535     </li><li>Allow databases to be moved to different tablespaces
536     </li><li>Allow moving system tables to other tablespaces, where possible
537 <p>          Currently non-global system tables must be in the default database
538           tablespace. Global system tables can never be moved.
539 </p>
540     </li><li>Prevent parent tables from altering or dropping constraints
541           like CHECK that are inherited by child tables unless CASCADE
542           is used
543     </li><li>%Prevent child tables from altering or dropping constraints
544           like CHECK that were inherited from the parent table
545     </li><li>Have ALTER INDEX update the name of a constraint using that index
546     </li><li>Add ALTER TABLE RENAME CONSTRAINT, update index name also
547     </li><li>Allow column display reordering by recording a display,
548           storage, and permanent id for every column?
549 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2006-12/msg00782.php">http://archives.postgresql.org/pgsql-hackers/2006-12/msg00782.php</a>
550 </p>
551   </li></ul>
552   </li><li>CLUSTER
553   <ul>
554     <li>Automatically maintain clustering on a table
555 <p>          This might require some background daemon to maintain clustering
556           during periods of low usage. It might also require tables to be only
557           partially filled for easier reorganization.  Another idea would
558           be to create a merged heap/index data file so an index lookup would
559           automatically access the heap data too.  A third idea would be to
560           store heap rows in hashed groups, perhaps using a user-supplied
561           hash function.
562           <a href="http://archives.postgresql.org/pgsql-performance/2004-08/msg00349.php">http://archives.postgresql.org/pgsql-performance/2004-08/msg00349.php</a>
563 </p>
564     </li><li>%Add default clustering to system tables
565 <p>          To do this, determine the ideal cluster index for each system
566           table and set the cluster setting during initdb.
567 </p>
568     </li><li>%Add VERBOSE option to report tables as they are processed,
569           like VACUUM VERBOSE
570   </li></ul>
571   </li><li>COPY
572   <ul>
573     <li>Allow COPY to report error lines and continue
574 <p>          This requires the use of a savepoint before each COPY line is
575           processed, with ROLLBACK on COPY failure.
576 </p>
577     </li><li>Allow COPY on a newly-created table to skip WAL logging
578 <p>          On crash recovery, the table involved in the COPY would
579           be removed or have its heap and index files truncated.  One
580           issue is that no other backend should be able to add to
581           the table at the same time, which is something that is
582           currently allowed.  This currently is done if the table is
583           created inside the same transaction block as the COPY because
584           no other backends can see the table.
585 </p>
586     </li><li>Consider using a ring buffer for COPY FROM
587 <p>          <a href="http://archives.postgresql.org/pgsql-patches/2008-02/msg00140.php">http://archives.postgresql.org/pgsql-patches/2008-02/msg00140.php</a>
588           <a href="http://archives.postgresql.org/pgsql-hackers/2008-02/msg01080.php">http://archives.postgresql.org/pgsql-hackers/2008-02/msg01080.php</a>
589 </p>
590   </li></ul>
591   </li><li>GRANT/REVOKE
592   <ul>
593     <li>Allow column-level privileges
594     </li><li>%Allow GRANT/REVOKE permissions to be applied to all schema objects
595           with one command
596 <p>          The proposed syntax is:
597 </p><p>                GRANT SELECT ON ALL TABLES IN public TO phpuser;
598                 GRANT SELECT ON NEW TABLES IN public TO phpuser;
599 </p>
600     </li><li>Allow GRANT/REVOKE permissions to be inherited by objects based on
601           schema permissions
602     </li><li>Allow SERIAL sequences to inherit permissions from the base table?
603   </li></ul>
604   </li><li>CURSOR
605   <ul>
606     <li>Prevent DROP TABLE from dropping a row referenced by its own open
607           cursor?
608   </li></ul>
609   </li><li>INSERT
610   <ul>
611     <li>Allow INSERT/UPDATE of the system-generated oid value for a row
612     </li><li>In rules, allow VALUES() to contain a mixture of 'old' and 'new'
613           references
614   </li></ul>
615   </li><li>SHOW/SET
616   <ul>
617     <li>Add SET PERFORMANCE_TIPS option to suggest INDEX, VACUUM, VACUUM
618           ANALYZE, and CLUSTER
619   </li></ul>
620   </li><li>Referential Integrity
621   <ul>
622     <li>Add MATCH PARTIAL referential integrity
623     </li><li>Change foreign key constraint for array -&gt; element to mean element
624           in array?
625     </li><li>Fix problem when cascading referential triggers make changes on
626           cascaded tables, seeing the tables in an intermediate state
627 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2005-09/msg00174.php">http://archives.postgresql.org/pgsql-hackers/2005-09/msg00174.php</a>
628           <a href="http://archives.postgresql.org/pgsql-hackers/2005-09/msg00174.php">http://archives.postgresql.org/pgsql-hackers/2005-09/msg00174.php</a>
629 </p>
630     </li><li>Allow DEFERRABLE and end-of-statement UNIQUE constraints?
631 <p>          This would allow UPDATE tab SET col = col + 1 to work if col has
632           a unique index.  Currently, uniqueness checks are done while the
633           command is being executed, rather than at the end of the statement
634           or transaction.
635 </p>
636 <p>          <a href="http://people.planetpostgresql.org/greg/index.php?/archives/2006/06/10.html">http://people.planetpostgresql.org/greg/index.php?/archives/2006/06/10.html</a>
637           <a href="http://archives.postgresql.org/pgsql-hackers/2006-09/msg01458.php">http://archives.postgresql.org/pgsql-hackers/2006-09/msg01458.php</a>
638 </p>
639   </li></ul>
640   </li><li>Server-Side Languages
641   <ul>
642     <li>PL/pgSQL
643     <ul>
644       <li>Fix RENAME to work on variables other than OLD/NEW
645 <p>                  <a href="http://archives.postgresql.org/pgsql-hackers/2002-03/msg00591.php">http://archives.postgresql.org/pgsql-hackers/2002-03/msg00591.php</a>
646                   <a href="http://archives.postgresql.org/pgsql-hackers/2007-01/msg01615.php">http://archives.postgresql.org/pgsql-hackers/2007-01/msg01615.php</a>
647                   <a href="http://archives.postgresql.org/pgsql-hackers/2007-01/msg01587.php">http://archives.postgresql.org/pgsql-hackers/2007-01/msg01587.php</a>
648 </p>
649       </li><li>Allow function parameters to be passed by name,
650                   get_employee_salary(12345 AS emp_id, 2001 AS tax_year)
651       </li><li>Allow handling of %TYPE arrays, e.g. tab.col%TYPE[<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?"></a>]
652       </li><li>Allow listing of record column names, and access to
653                   record columns via variables, e.g. columns := r.(*),
654                   tval2 := r.(colname)
655 <p>                  <a href="http://archives.postgresql.org/pgsql-patches/2005-07/msg00458.php">http://archives.postgresql.org/pgsql-patches/2005-07/msg00458.php</a>
656                   <a href="http://archives.postgresql.org/pgsql-patches/2006-05/msg00302.php">http://archives.postgresql.org/pgsql-patches/2006-05/msg00302.php</a>
657                   <a href="http://archives.postgresql.org/pgsql-patches/2006-06/msg00031.php">http://archives.postgresql.org/pgsql-patches/2006-06/msg00031.php</a>
658 </p>
659       </li><li>Add support for SCROLL cursors
660       </li><li>Add support for WITH HOLD cursors
661       </li><li>Allow row and record variables to be set to NULL constants,
662                   and allow NULL tests on such variables
663 <p>                  Because a row is not scalar, do not allow assignment
664                   from NULL-valued scalars.
665 </p>
666 <p>                  <a href="http://archives.postgresql.org/pgsql-hackers/2006-10/msg00070.php">http://archives.postgresql.org/pgsql-hackers/2006-10/msg00070.php</a>
667 </p>
668     </li></ul>
669     </li><li>Other
670     <ul>
671       <li>Add table function support to pltcl, plpythonu
672       </li><li>Add support for polymorphic arguments and return types to
673                   languages other than PL/PgSQL
674       </li><li>Add capability to create and call PROCEDURES
675       </li><li>Add support for OUT and INOUT parameters to languages other
676                   than PL/PgSQL
677       </li><li>Add PL/PythonU tracebacks
678 <p>                  <a href="http://archives.postgresql.org/pgsql-patches/2006-02/msg00288.php">http://archives.postgresql.org/pgsql-patches/2006-02/msg00288.php</a>
679 </p>
680       </li><li>Allow data to be passed in native language formats, rather
681                   than only text
682 <p>                  <a href="http://archives.postgresql.org/pgsql-hackers/2007-05/msg00289.php">http://archives.postgresql.org/pgsql-hackers/2007-05/msg00289.php</a>
683 </p>
684     </li></ul>
685   </li></ul>
686 </li></ul>
687 <h1><a name="section_8">Clients</a></h1>
688
689 <ul>
690   <li>Have pg_ctl look at PGHOST in case it is a socket directory?
691   </li><li>Allow pg_ctl to work properly with configuration files located outside
692   the PGDATA directory
693 <p>  pg_ctl can not read the pid file because it isn't located in the
694   config directory but in the PGDATA directory.  The solution is to
695   allow pg_ctl to read and understand postgresql.conf to find the
696   data_directory value.
697 </p>
698   </li><li>psql
699   <ul>
700     <li>Have psql show current values for a sequence
701     </li><li>Move psql backslash database information into the backend, use
702           mnemonic commands? [<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?psql">psql</a>]
703 <p>          This would allow non-psql clients to pull the same information out
704           of the database as psql.
705 </p>
706     </li><li>Fix psql's \d commands more consistent
707 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php">http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php</a>
708           <a href="http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php">http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php</a>
709 </p>
710     </li><li>Consistently display privilege information for all objects in psql
711     </li><li>Add auto-expanded mode so expanded output is used if the row
712           length is wider than the screen width.
713 <p>          Consider using auto-expanded mode for backslash commands like \df+.
714 </p>
715     </li><li>Prevent tab completion of SET TRANSACTION from querying the
716           database and therefore preventing the transaction isolation
717           level from being set.
718 <p>          Currently SET &lt;tab&gt; causes a database lookup to check all
719           supported session variables.  This query causes problems
720           because setting the transaction isolation level must be the
721           first statement of a transaction.
722 </p>
723     </li><li>Add a \set variable to control whether \s displays line numbers
724 <p>          Another option is to add \# which lists line numbers, and
725           allows command execution.
726 </p>
727 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2006-12/msg00255.php">http://archives.postgresql.org/pgsql-hackers/2006-12/msg00255.php</a>
728 </p>
729   </li></ul>
730   </li><li>pg_dump / pg_restore
731   <ul>
732     <li>%Add dumping of comments on index columns and composite type columns
733     </li><li>%Add full object name to the tag field.  eg. for operators we need
734           '=(integer, integer)', instead of just '='.
735     </li><li>Add pg_dumpall custom format dumps?
736     </li><li>Allow selection of individual object(s) of all types, not just
737           tables
738     </li><li>In a selective dump, allow dumping of an object and all its
739           dependencies
740     </li><li>Add options like pg_restore -l and -L to pg_dump
741     </li><li>Stop dumping CASCADE on DROP TYPE commands in clean mode
742     </li><li>Allow pg_dump --clean to drop roles that own objects or have
743           privileges
744     </li><li>Change pg_dump so that a comment on the dumped database is
745           applied to the loaded database, even if the database has a
746           different name.  This will require new backend syntax, perhaps
747           COMMENT ON CURRENT DATABASE.
748     </li><li>Remove unnecessary function pointer abstractions in pg_dump source
749           code
750     </li><li>Allow pg_dump to utilize multiple CPUs and I/O channels by dumping
751           multiple objects simultaneously
752 <p>          The difficulty with this is getting multiple dump processes to
753           produce a single dump output file.  It also would require
754           several sessions to share the same snapshot.
755           <a href="http://archives.postgresql.org/pgsql-hackers/2008-02/msg00205.php">http://archives.postgresql.org/pgsql-hackers/2008-02/msg00205.php</a>
756 </p>
757     </li><li>Allow pg_restore to utilize multiple CPUs and I/O channels by
758           restoring multiple objects simultaneously
759 <p>          This might require a pg_restore flag to indicate how many
760           simultaneous operations should be performed.  Only pg_dump's
761           -Fc format has the necessary dependency information.
762           <a href="http://archives.postgresql.org/pgsql-hackers/2008-02/msg00963.php">http://archives.postgresql.org/pgsql-hackers/2008-02/msg00963.php</a>
763 </p>
764     </li><li>To better utilize resources, allow pg_restore to check foreign
765           keys simultaneously, where possible
766     </li><li>Allow pg_restore to create all indexes of a table
767           concurrently, via a single heap scan
768 <p>          This requires a pg_dump -Fc file because that format contains
769           the required dependency information.
770           <a href="http://archives.postgresql.org/pgsql-general/2007-05/msg01274.php">http://archives.postgresql.org/pgsql-general/2007-05/msg01274.php</a>
771 </p>
772     </li><li>Allow pg_restore to load different parts of the COPY data
773           simultaneously
774   </li></ul>
775   </li><li>ecpg
776   <ul>
777     <li>Docs
778 <p>          Document differences between ecpg and the SQL standard and
779           information about the Informix-compatibility module.
780 </p>
781     </li><li>Solve cardinality &gt; 1 for input descriptors / variables?
782     </li><li>Add a semantic check level, e.g. check if a table really exists
783     </li><li>fix handling of DB attributes that are arrays
784     </li><li>Use backend PREPARE/EXECUTE facility for ecpg where possible
785     </li><li>Implement SQLDA
786     </li><li>Fix nested C comments
787     </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
788     </li><li>Make SET CONNECTION thread-aware, non-standard?
789     </li><li>Allow multidimensional arrays
790     </li><li>Add internationalized message strings
791     </li><li>Implement COPY FROM STDIN
792   </li></ul>
793   </li><li>libpq
794   <ul>
795     <li>Add PQescapeIdentifierConn()
796     </li><li>Prevent PQfnumber() from lowercasing unquoted the column name
797 <p>          PQfnumber() should never have been doing lowercasing, but
798           historically it has so we need a way to prevent it
799 </p>
800     </li><li>Allow statement results to be automatically batched to the client
801 <p>          Currently all statement results are transferred to the libpq
802           client before libpq makes the results available to the
803           application.  This feature would allow the application to make
804           use of the first result rows while the rest are transferred, or
805           held on the server waiting for them to be requested by libpq.
806           One complexity is that a statement like SELECT 1/col could error
807           out mid-way through the result set.
808 </p>
809     </li><li>Consider disallowing multiple queries in PQexec() as an
810           additional barrier to SQL injection attacks
811 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-01/msg00184.php">http://archives.postgresql.org/pgsql-hackers/2007-01/msg00184.php</a>
812 </p>
813     </li><li>Add PQexecf() that allows complex parameter substitution
814 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-03/msg01803.php">http://archives.postgresql.org/pgsql-hackers/2007-03/msg01803.php</a>
815 </p>
816   </li></ul>
817 </li></ul>
818 <h1><a name="section_9">Triggers</a></h1>
819
820 <ul>
821   <li>Add deferred trigger queue file
822 <p>  Right now all deferred trigger information is stored in backend
823   memory.  This could exhaust memory for very large trigger queues.
824   This item involves dumping large queues into files.
825 </p>
826   </li><li>Allow triggers to be disabled in only the current session.
827 <p>  This is currently possible by starting a multi-statement transaction,
828   modifying the system tables, performing the desired SQL, restoring the
829   system tables, and committing the transaction.  ALTER TABLE ...
830   TRIGGER requires a table lock so it is not ideal for this usage.
831 </p>
832   </li><li>With disabled triggers, allow pg_dump to use ALTER TABLE ADD FOREIGN KEY
833 <p>  If the dump is known to be valid, allow foreign keys to be added
834   without revalidating the data.
835 </p>
836   </li><li>Allow statement-level triggers to access modified rows
837   </li><li>Support triggers on columns
838 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2005-07/msg00107.php">http://archives.postgresql.org/pgsql-patches/2005-07/msg00107.php</a>
839 </p>
840   </li><li>Allow AFTER triggers on system tables
841 <p>  System tables are modified in many places in the backend without going
842   through the executor and therefore not causing triggers to fire. To
843   complete this item, the functions that modify system tables will have
844   to fire triggers.
845 </p>
846   </li><li>Tighten trigger permission checks
847 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-12/msg00564.php">http://archives.postgresql.org/pgsql-hackers/2006-12/msg00564.php</a>
848 </p>
849   </li><li>Allow BEFORE INSERT triggers on views
850 <p>  <a href="http://archives.postgresql.org/pgsql-general/2007-02/msg01466.php">http://archives.postgresql.org/pgsql-general/2007-02/msg01466.php</a>
851 </p>
852   </li><li>Add ability to trigger on TRUNCATE
853 <p>  <a href="http://archives.postgresql.org/pgsql-sql/2008-01/msg00050.php">http://archives.postgresql.org/pgsql-sql/2008-01/msg00050.php</a>
854 </p>
855 </li></ul>
856 <h1><a name="section_10">Indexes</a></h1>
857
858 <ul>
859   <li>Add UNIQUE capability to non-btree indexes
860   </li><li>Prevent index uniqueness checks when UPDATE does not modify the column
861 <p>  Uniqueness (index) checks are done when updating a column even if the
862   column is not modified by the UPDATE.
863 </p>
864   </li><li>Allow the creation of on-disk bitmap indexes which can be quickly
865   combined with other bitmap indexes
866 <p>  Such indexes could be more compact if there are only a few distinct values.
867   Such indexes can also be compressed.  Keeping such indexes updated can be
868   costly.
869 </p>
870 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2005-07/msg00512.php">http://archives.postgresql.org/pgsql-patches/2005-07/msg00512.php</a>
871   <a href="http://archives.postgresql.org/pgsql-hackers/2006-12/msg01107.php">http://archives.postgresql.org/pgsql-hackers/2006-12/msg01107.php</a>
872 </p>
873   </li><li>Allow accurate statistics to be collected on indexes with more than
874   one column or expression indexes, perhaps using per-index statistics
875 <p>  <a href="http://archives.postgresql.org/pgsql-performance/2006-10/msg00222.php">http://archives.postgresql.org/pgsql-performance/2006-10/msg00222.php</a>
876   <a href="http://archives.postgresql.org/pgsql-hackers/2007-03/msg01131.php">http://archives.postgresql.org/pgsql-hackers/2007-03/msg01131.php</a>
877 </p>
878   </li><li>Consider compressing indexes by storing key values duplicated in
879   several rows as a single index entry
880   </li><li>Add REINDEX CONCURRENTLY, like CREATE INDEX CONCURRENTLY
881 <p>  This is difficult because you must upgrade to an exclusive table lock
882   to replace the existing index file.  CREATE INDEX CONCURRENTLY does not
883   have this complication.  This would allow index compaction without
884   downtime.
885 </p>
886   </li><li>Allow multiple indexes to be created concurrently, ideally via a
887   single heap scan, and have pg_restore use it
888   </li><li>Inheritance
889   <ul>
890     <li>Allow inherited tables to inherit indexes, UNIQUE constraints,
891           and primary/foreign keys
892     </li><li>Honor UNIQUE INDEX on base column in INSERTs/UPDATEs
893           on inherited table, e.g.  INSERT INTO inherit_table
894           (unique_index_col) VALUES (dup) should fail
895 <p>          The main difficulty with this item is the problem of
896           creating an index that can span multiple tables.
897 </p>
898     </li><li>Allow SELECT ... FOR UPDATE on inherited tables
899   </li></ul>
900   </li><li>GIST
901   <ul>
902     <li>Add more GIST index support for geometric data types
903     </li><li>Allow GIST indexes to create certain complex index types, like
904           digital trees (see Aoki)
905   </li></ul>
906   </li><li>Hash
907 </li></ul>
908 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-09/msg00051.php">http://archives.postgresql.org/pgsql-hackers/2007-09/msg00051.php</a>
909 </p>
910 <ul>
911   <li>Pack hash index buckets onto disk pages more efficiently
912 <p>          Currently only one hash bucket can be stored on a page. Ideally
913           several hash buckets could be stored on a single page and greater
914           granularity used for the hash algorithm.
915 </p>
916 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2004-06/msg00168.php">http://archives.postgresql.org/pgsql-hackers/2004-06/msg00168.php</a>
917 </p>
918   </li><li>Consider sorting hash buckets so entries can be found using a
919           binary search, rather than a linear scan
920   </li><li>In hash indexes, consider storing the hash value with or instead
921           of the key itself
922   </li><li>Add WAL logging for crash recovery
923   </li><li>Allow multi-column hash indexes
924   </li><li>During index creation, pre-sort the tuples to improve build speed
925 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2007-03/msg01199.php">http://archives.postgresql.org/pgsql-hackers/2007-03/msg01199.php</a>
926 </p>
927 </li></ul>
928 <h1><a name="section_11">Fsync</a></h1>
929
930 <ul>
931   <li>Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options
932 <p>  Ideally this requires a separate test program that can be run
933   at initdb time or optionally later.  Consider O_SYNC when
934   O_DIRECT exists.
935 </p>
936   </li><li>Add program to test if fsync has a delay compared to non-fsync
937 </li></ul>
938 <h1><a name="section_12">Cache Usage</a></h1>
939
940 <ul>
941   <li>Speed up COUNT(*)
942 <p>  We could use a fixed row count and a +/- count to follow MVCC
943   visibility rules, or a single cached value could be used and
944   invalidated if anyone modifies the table.  Another idea is to
945   get a count directly from a unique index, but for this to be
946   faster than a sequential scan it must avoid access to the heap
947   to obtain tuple visibility information.
948 </p>
949   </li><li>Provide a way to calculate an "estimated COUNT(*)"
950 <p>  Perhaps by using the optimizer's cardinality estimates or random
951   sampling.
952 </p>
953 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2005-11/msg00943.php">http://archives.postgresql.org/pgsql-hackers/2005-11/msg00943.php</a>
954 </p>
955   </li><li>Allow data to be pulled directly from indexes
956 <p>  Currently indexes do not have enough tuple visibility information
957   to allow data to be pulled from the index without also accessing
958   the heap.  One way to allow this is to set a bit on index tuples
959   to indicate if a tuple is currently visible to all transactions
960   when the first valid heap lookup happens.  This bit would have to
961   be cleared when a heap tuple is expired.
962 </p>
963 <p>  Another idea is to maintain a bitmap of heap pages where all rows
964   are visible to all backends, and allow index lookups to reference
965   that bitmap to avoid heap lookups, perhaps the same bitmap we might
966   add someday to determine which heap pages need vacuuming.  Frequently
967   accessed bitmaps would have to be stored in shared memory.  One 8k
968   page of bitmaps could track 512MB of heap pages.
969 </p>
970 <p>  A third idea would be for a heap scan to check if all rows are visible
971   and if so set a per-table flag which can be checked by index scans. 
972   Any change to the table would have to clear the flag.  To detect
973   changes during the heap scan a counter could be set at the start and
974   checked at the end --- if it is the same, the table has not been
975   modified --- any table change would increment the counter.
976 </p>
977   </li><li>Consider automatic caching of statements at various levels:
978   <ul>
979     <li>Parsed query tree
980     </li><li>Query execute plan
981     </li><li>Query results
982   </li></ul>
983   </li><li>Consider increasing internal areas when shared buffers is increased
984 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2005-10/msg01419.php">http://archives.postgresql.org/pgsql-hackers/2005-10/msg01419.php</a>
985 </p>
986   </li><li>Consider decreasing the amount of memory used by PrivateRefCount
987 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-11/msg00797.php">http://archives.postgresql.org/pgsql-hackers/2006-11/msg00797.php</a>
988   <a href="http://archives.postgresql.org/pgsql-hackers/2007-01/msg00752.php">http://archives.postgresql.org/pgsql-hackers/2007-01/msg00752.php</a>
989 </p>
990 </li></ul>
991 <h1><a name="section_13">Vacuum</a></h1>
992
993 <ul>
994   <li>Improve speed with indexes
995 <p>  For large table adjustments during VACUUM FULL, it is faster to cluster
996   or reindex rather than update the index.  Also, index updates can bloat
997   the index.
998 </p>
999 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-03/msg00024.php">http://archives.postgresql.org/pgsql-hackers/2007-03/msg00024.php</a>
1000   <a href="http://archives.postgresql.org/pgsql-performance/2007-05/msg00296.php">http://archives.postgresql.org/pgsql-performance/2007-05/msg00296.php</a>
1001 </p>
1002   </li><li>Auto-fill the free space map by scanning the buffer cache or by
1003   checking pages written by the background writer
1004 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-02/msg01125.php">http://archives.postgresql.org/pgsql-hackers/2006-02/msg01125.php</a>
1005   <a href="http://archives.postgresql.org/pgsql-hackers/2006-03/msg00011.php">http://archives.postgresql.org/pgsql-hackers/2006-03/msg00011.php</a>
1006 </p>
1007   </li><li>Create a bitmap of pages that need vacuuming
1008 <p>  Instead of sequentially scanning the entire table, have the background
1009   writer or some other process record pages that have expired rows, then
1010   VACUUM can look at just those pages rather than the entire table.  In
1011   the event of a system crash, the bitmap would probably be invalidated.
1012   One complexity is that index entries still have to be vacuumed, and
1013   doing this without an index scan (by using the heap values to find the
1014   index entry) might be slow and unreliable, especially for user-defined
1015   index functions.
1016 </p>
1017 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-12/msg01188.php">http://archives.postgresql.org/pgsql-hackers/2006-12/msg01188.php</a>
1018   <a href="http://archives.postgresql.org/pgsql-hackers/2007-01/msg00121.php">http://archives.postgresql.org/pgsql-hackers/2007-01/msg00121.php</a>
1019 </p>
1020   </li><li>Allow FSM to return free space toward the beginning of the heap file,
1021   in hopes that empty pages at the end can be truncated by VACUUM
1022   </li><li>Allow FSM page return free space based on table clustering, to assist
1023   in maintaining clustering?
1024   </li><li>Improve dead row detection during multi-statement transactions usage
1025 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2007-03/msg00358.php">http://archives.postgresql.org/pgsql-patches/2007-03/msg00358.php</a>
1026 </p>
1027   </li><li>Auto-vacuum
1028   <ul>
1029     <li>%Issue log message to suggest VACUUM FULL if a table is nearly
1030           empty?
1031     </li><li>Improve control of auto-vacuum
1032 <p>          <a href="http://archives.postgresql.org/pgsql-hackers/2006-12/msg00876.php">http://archives.postgresql.org/pgsql-hackers/2006-12/msg00876.php</a>
1033 </p>
1034     </li><li>Prevent long-lived temporary tables from causing frozen-xid
1035           advancement starvation
1036 <p>          The problem is that autovacuum cannot vacuum them to set frozen xids;
1037           only the session that created them can do that.
1038           <a href="http://archives.postgresql.org/pgsql-general/2007-06/msg01645.php">http://archives.postgresql.org/pgsql-general/2007-06/msg01645.php</a>
1039 </p>
1040   </li></ul>
1041 </li></ul>
1042 <h1><a name="section_14">Locking</a></h1>
1043
1044 <ul>
1045   <li>Fix priority ordering of read and write light-weight locks (Neil)
1046 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2004-11/msg00893.php">http://archives.postgresql.org/pgsql-hackers/2004-11/msg00893.php</a>
1047   <a href="http://archives.postgresql.org/pgsql-hackers/2004-11/msg00905.php">http://archives.postgresql.org/pgsql-hackers/2004-11/msg00905.php</a>
1048 </p>
1049   </li><li>Fix problem when multiple subtransactions of the same outer transaction
1050   hold different types of locks, and one subtransaction aborts
1051 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-11/msg01011.php">http://archives.postgresql.org/pgsql-hackers/2006-11/msg01011.php</a>
1052   <a href="http://archives.postgresql.org/pgsql-hackers/2006-12/msg00001.php">http://archives.postgresql.org/pgsql-hackers/2006-12/msg00001.php</a>
1053   <a href="http://archives.postgresql.org/pgsql-hackers/2007-02/msg00435.php">http://archives.postgresql.org/pgsql-hackers/2007-02/msg00435.php</a>
1054 </p>
1055   </li><li>Allow UPDATEs on only non-referential integrity columns not to conflict
1056   with referential integrity locks
1057 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-02/msg00073.php">http://archives.postgresql.org/pgsql-hackers/2007-02/msg00073.php</a>
1058 </p>
1059   </li><li>Add idle_in_transaction_timeout GUC so locks are not held for long
1060   periods of time
1061   </li><li>Improve deadlock detection when a page cleaning lock conflicts
1062   with a shared buffer that is pinned
1063 <p>  <a href="http://archives.postgresql.org/pgsql-bugs/2008-01/msg00138.php">http://archives.postgresql.org/pgsql-bugs/2008-01/msg00138.php</a>
1064   <a href="http://archives.postgresql.org/pgsql-hackers/2008-01/msg00873.php">http://archives.postgresql.org/pgsql-hackers/2008-01/msg00873.php</a>
1065   <a href="http://archives.postgresql.org/pgsql-committers/2008-01/msg00365.php">http://archives.postgresql.org/pgsql-committers/2008-01/msg00365.php</a>
1066 </p>
1067 </li></ul>
1068 <h1><a name="section_15">Startup Time Improvements</a></h1>
1069
1070 <ul>
1071   <li>Experiment with multi-threaded backend for backend creation [<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?thread">thread</a>]
1072 <p>  This would prevent the overhead associated with process creation. Most
1073   operating systems have trivial process creation time compared to
1074   database startup overhead, but a few operating systems (Win32,
1075   Solaris) might benefit from threading.  Also explore the idea of
1076   a single session using multiple threads to execute a statement faster.
1077 </p>
1078 </li></ul>
1079 <h1><a name="section_16">Write-Ahead Log</a></h1>
1080
1081 <ul>
1082   <li>Eliminate need to write full pages to WAL before page modification [<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?wal">wal</a>]
1083 <p>  Currently, to protect against partial disk page writes, we write
1084   full page images to WAL before they are modified so we can correct any
1085   partial page writes during recovery.  These pages can also be
1086   eliminated from point-in-time archive files.
1087 </p>
1088   <ul>
1089     <li>When off, write CRC to WAL and check file system blocks
1090            on recovery
1091 <p>           If CRC check fails during recovery, remember the page in case
1092            a later CRC for that page properly matches.
1093 </p>
1094     </li><li>Write full pages during file system write and not when
1095            the page is modified in the buffer cache
1096 <p>           This allows most full page writes to happen in the background
1097            writer.  It might cause problems for applying WAL on recovery
1098            into a partially-written page, but later the full page will be
1099            replaced from WAL.
1100 </p>
1101   </li></ul>
1102   </li><li>Allow WAL traffic to be streamed to another server for stand-by
1103   replication
1104   </li><li>Reduce WAL traffic so only modified values are written rather than
1105   entire rows
1106 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-03/msg01589.php">http://archives.postgresql.org/pgsql-hackers/2007-03/msg01589.php</a>
1107 </p>
1108   </li><li>Allow WAL information to recover corrupted pg_controldata
1109 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2006-06/msg00025.php">http://archives.postgresql.org/pgsql-patches/2006-06/msg00025.php</a>
1110 </p>
1111   </li><li>Find a way to reduce rotational delay when repeatedly writing
1112   last WAL page
1113 <p>  Currently fsync of WAL requires the disk platter to perform a full
1114   rotation to fsync again. One idea is to write the WAL to different
1115   offsets that might reduce the rotational delay.
1116 </p>
1117   </li><li>Allow WAL logging to be turned off for a table, but the table
1118   might be dropped or truncated during crash recovery [<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?walcontrol">walcontrol</a>]
1119 <p>  Allow tables to bypass WAL writes and just fsync() dirty pages on
1120   commit.  This should be implemented using ALTER TABLE, e.g. ALTER
1121   TABLE PERSISTENCE [<a href="http://momjian.postgresql.org/cgi-bin/pgtodo? DROP | TRUNCATE | DEFAULT "> DROP | TRUNCATE | DEFAULT </a>].  Tables using
1122   non-default logging should not use referential integrity with
1123   default-logging tables.  A table without dirty buffers during a
1124   crash could perhaps avoid the drop/truncate.
1125 </p>
1126   </li><li>Allow WAL logging to be turned off for a table, but the table would
1127   avoid being truncated/dropped [<a href="http://momjian.postgresql.org/cgi-bin/pgtodo?walcontrol">walcontrol</a>]
1128 <p>  To do this, only a single writer can modify the table, and writes
1129   must happen only on new pages so the new pages can be removed during
1130   crash recovery.  Readers can continue accessing the table.  Such
1131   tables probably cannot have indexes.  One complexity is the handling
1132   of indexes on TOAST tables.
1133 </p>
1134   </li><li>Speed WAL recovery by allowing more than one page to be prefetched
1135 <p>  This involves having a separate process that can be told which pages
1136   the recovery process will need in the near future.
1137   <a href="http://archives.postgresql.org/pgsql-hackers/2008-02/msg01279.php">http://archives.postgresql.org/pgsql-hackers/2008-02/msg01279.php</a>
1138 </p>
1139 </li></ul>
1140 <h1><a name="section_17">Optimizer / Executor</a></h1>
1141
1142 <ul>
1143   <li>Improve selectivity functions for geometric operators
1144   </li><li>Precompile SQL functions to avoid overhead
1145   </li><li>Create utility to compute accurate random_page_cost value
1146   </li><li>Improve ability to display optimizer analysis using OPTIMIZER_DEBUG
1147   </li><li>Have EXPLAIN ANALYZE issue NOTICE messages when the estimated and
1148   actual row counts differ by a specified percentage
1149   </li><li>Consider using hash buckets to do DISTINCT, rather than sorting
1150 <p>  This would be beneficial when there are few distinct values.  This is
1151   already used by GROUP BY.
1152 </p>
1153   </li><li>Log statements where the optimizer row estimates were dramatically
1154   different from the number of rows actually found?
1155   </li><li>Consider compressed annealing to search for query plans
1156 <p>  This might replace GEQO, <a href="http://sixdemonbag.org/Djinni">http://sixdemonbag.org/Djinni</a>.
1157 </p>
1158   </li><li>Improve merge join performance by allowing mark/restore of
1159   tuple sources
1160 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-01/msg00096.php">http://archives.postgresql.org/pgsql-hackers/2007-01/msg00096.php</a>
1161 </p>
1162 </li></ul>
1163 <h1><a name="section_18">Miscellaneous Performance</a></h1>
1164
1165 <ul>
1166   <li>Do async I/O for faster random read-ahead of data
1167 <p>  Async I/O allows multiple I/O requests to be sent to the disk with
1168   results coming back asynchronously.
1169 </p>
1170 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-10/msg00820.php">http://archives.postgresql.org/pgsql-hackers/2006-10/msg00820.php</a>
1171   <a href="http://archives.postgresql.org/pgsql-hackers/2007-12/msg00027.php">http://archives.postgresql.org/pgsql-hackers/2007-12/msg00027.php</a>
1172 </p>
1173   </li><li>Use mmap() rather than SYSV shared memory or to write WAL files?
1174 <p>  This would remove the requirement for SYSV SHM but would introduce
1175   portability issues. Anonymous mmap (or mmap to /dev/zero) is required
1176   to prevent I/O overhead.
1177 </p>
1178   </li><li>Consider mmap()'ing files into a backend?
1179 <p>  Doing I/O to large tables would consume a lot of address space or
1180   require frequent mapping/unmapping.  Extending the file also causes
1181   mapping problems that might require mapping only individual pages,
1182   leading to thousands of mappings.  Another problem is that there is no
1183   way to <u>prevent</u> I/O to disk from the dirty shared buffers so changes
1184   could hit disk before WAL is written.
1185 </p>
1186   </li><li>Add a script to ask system configuration questions and tune postgresql.conf
1187   </li><li>Consider ways of storing rows more compactly on disk
1188   <ul>
1189     <li>Reduce the row header size?
1190     </li><li>Consider reducing on-disk varlena length from four bytes to
1191           two because a heap row cannot be more than 64k in length
1192   </li></ul>
1193   </li><li>Consider increasing NUM_CLOG_BUFFERS
1194   </li><li>Consider having the background writer update the transaction status
1195   hint bits before writing out the page
1196 <p>  Implementing this requires the background writer to have access to system
1197   catalogs and the transaction status log.
1198 </p>
1199   </li><li>Allow user configuration of TOAST thresholds
1200 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2007-02/msg00213.php">http://archives.postgresql.org/pgsql-hackers/2007-02/msg00213.php</a>
1201 </p>
1202   </li><li>Allow configuration of backend priorities via the operating system
1203 <p>  Though backend priorities make priority inversion during lock
1204   waits possible, research shows that this is not a huge problem.
1205 </p>
1206 <p>  <a href="http://archives.postgresql.org/pgsql-general/2007-02/msg00493.php">http://archives.postgresql.org/pgsql-general/2007-02/msg00493.php</a>
1207 </p>
1208   </li><li>Experiment with multi-threaded backend better resource utilization
1209 <p>  This would allow a single query to make use of multiple CPU's or
1210   multiple I/O channels simultaneously.  One idea is to create a
1211   background reader that can pre-fetch sequential and index scan
1212   pages needed by other backends.  This could be expanded to allow
1213   concurrent reads from multiple devices in a partitioned table.
1214 </p>
1215 </li></ul>
1216 <h1><a name="section_19">Source Code</a></h1>
1217
1218 <ul>
1219   <li>Add use of 'const' for variables in source tree
1220   </li><li>Move some things from contrib into main tree
1221   </li><li>%Remove warnings created by -Wcast-align
1222   </li><li>Move platform-specific ps status display info from ps_status.c to ports
1223   </li><li>Add optional CRC checksum to heap and index pages
1224   </li><li>Improve documentation to build only interfaces (Marc)
1225   </li><li>Remove or relicense modules that are not under the BSD license, if possible
1226   </li><li>Acquire lock on a relation before building a relcache entry for it
1227   </li><li>Allow cross-compiling by generating the zic database on the target system
1228   </li><li>Improve NLS maintenance of libpgport messages linked onto applications
1229   </li><li>Clean up casting in contrib/isn
1230 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-11/msg00245.php">http://archives.postgresql.org/pgsql-hackers/2006-11/msg00245.php</a>
1231 </p>
1232   </li><li>Use UTF8 encoding for NLS messages so all server encodings can
1233   read them properly
1234   </li><li>Update Bonjour to work with newer cross-platform SDK
1235 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-09/msg02238.php">http://archives.postgresql.org/pgsql-hackers/2006-09/msg02238.php</a>
1236   <a href="http://archives.postgresql.org/pgsql-patches/2006-10/msg00048.php">http://archives.postgresql.org/pgsql-patches/2006-10/msg00048.php</a>
1237 </p>
1238   </li><li>Consider detoasting keys before sorting
1239   </li><li>Consider GnuTLS if OpenSSL license becomes a problem
1240 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2006-05/msg00040.php">http://archives.postgresql.org/pgsql-patches/2006-05/msg00040.php</a>
1241   <a href="http://archives.postgresql.org/pgsql-hackers/2006-12/msg01213.php">http://archives.postgresql.org/pgsql-hackers/2006-12/msg01213.php</a>
1242 </p>
1243   </li><li>Consider changing documentation format from SGML to XML
1244 <p>  <a href="http://archives.postgresql.org/pgsql-docs/2006-12/msg00152.php">http://archives.postgresql.org/pgsql-docs/2006-12/msg00152.php</a>
1245 </p>
1246   </li><li>Consider making NAMEDATALEN more configurable in future releases
1247   </li><li>Update our code to handle 64-bit timezone files to match the zic
1248   source code, which now uses them
1249   </li><li>Have configure choose integer datetimes by default
1250 <p>  <a href="http://archives.postgresql.org/pgsql-patches/2007-05/msg00046.php">http://archives.postgresql.org/pgsql-patches/2007-05/msg00046.php</a>
1251 </p>
1252   </li><li>Support scoped IPv6 addresses
1253 <p>  <a href="http://archives.postgresql.org/pgsql-bugs/2007-05/msg00111.php">http://archives.postgresql.org/pgsql-bugs/2007-05/msg00111.php</a>
1254 </p>
1255   </li><li>Consider allowing 64-bit integers and floats to be passed by value on
1256   64-bit platforms
1257 <p>  Also change 32-bit floats (float4) to be passed by value at the same
1258   time.
1259 </p>
1260   </li><li>Win32
1261   <ul>
1262     <li>Remove configure.in check for link failure when cause is found
1263     </li><li>Remove readdir() errno patch when runtime/mingwex/dirent.c rev
1264           1.4 is released
1265     </li><li>Remove psql newline patch when we find out why mingw outputs an
1266           extra newline
1267     </li><li>Allow psql to use readline once non-US code pages work with
1268           backslashes
1269     </li><li>Fix problem with shared memory on the Win32 Terminal Server
1270     </li><li>Improve signal handling
1271 <p>          <a href="http://archives.postgresql.org/pgsql-patches/2005-06/msg00027.php">http://archives.postgresql.org/pgsql-patches/2005-06/msg00027.php</a>
1272 </p>
1273   </li></ul>
1274   </li><li>Wire Protocol Changes
1275   <ul>
1276     <li>Allow dynamic character set handling
1277     </li><li>Add decoded type, length, precision
1278     </li><li>Use compression?
1279     </li><li>Update clients to use data types, typmod, schema.table.column names
1280           of result sets using new statement protocol
1281   </li></ul>
1282 </li></ul>
1283 <h1><a name="section_20">Exotic Features</a></h1>
1284
1285 <ul>
1286   <li>Add pre-parsing phase that converts non-ISO syntax to supported
1287   syntax
1288 <p>  This could allow SQL written for other databases to run without
1289   modification.
1290 </p>
1291   </li><li>Allow plug-in modules to emulate features from other databases
1292   </li><li>Add features of Oracle-style packages  (Pavel)
1293 <p>  A package would be a schema with session-local variables,
1294   public/private functions, and initialization functions.  It
1295   is also possible to implement these capabilities
1296   in any schema and not use a separate "packages"
1297   syntax at all.
1298 </p>
1299 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-08/msg00384.php">http://archives.postgresql.org/pgsql-hackers/2006-08/msg00384.php</a>
1300 </p>
1301   </li><li>Consider allowing control of upper/lower case folding of unquoted
1302   identifiers
1303 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2004-04/msg00818.php">http://archives.postgresql.org/pgsql-hackers/2004-04/msg00818.php</a>
1304   <a href="http://archives.postgresql.org/pgsql-hackers/2006-10/msg01527.php">http://archives.postgresql.org/pgsql-hackers/2006-10/msg01527.php</a>
1305 </p>
1306   </li><li>Add autonomous transactions
1307 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2008-01/msg00893.php">http://archives.postgresql.org/pgsql-hackers/2008-01/msg00893.php</a>
1308 </p>
1309 </li></ul>
1310 <h1><a name="section_21">Features We Do <u>Not</u> Want</a></h1>
1311
1312 <ul>
1313   <li>All backends running as threads in a single process (not wanted)
1314 <p>  This eliminates the process protection we get from the current setup.
1315   Thread creation is usually the same overhead as process creation on
1316   modern systems, so it seems unwise to use a pure threaded model.
1317 </p>
1318   </li><li>Optimizer hints (not wanted)
1319 <p>  Optimizer hints are used to work around problems in the optimizer.  We
1320   would rather have the problems reported and fixed.
1321 </p>
1322 <p>  <a href="http://archives.postgresql.org/pgsql-hackers/2006-08/msg00506.php">http://archives.postgresql.org/pgsql-hackers/2006-08/msg00506.php</a>
1323   <a href="http://archives.postgresql.org/pgsql-hackers/2006-10/msg00517.php">http://archives.postgresql.org/pgsql-hackers/2006-10/msg00517.php</a>
1324   <a href="http://archives.postgresql.org/pgsql-hackers/2006-10/msg00663.php">http://archives.postgresql.org/pgsql-hackers/2006-10/msg00663.php</a>
1325 </p>
1326 <p>  Because we support postfix operators, it isn't possible to make AS
1327   optional and continue to use bison.
1328   <a href="http://archives.postgresql.org/pgsql-hackers/2003-04/msg00436.php">http://archives.postgresql.org/pgsql-hackers/2003-04/msg00436.php</a>
1329 </p>
1330 <p>  <a href="http://archives.postgresql.org/pgsql-sql/2006-08/msg00164.php">http://archives.postgresql.org/pgsql-sql/2006-08/msg00164.php</a>
1331 </p>
1332   </li><li>Embedded server (not wanted)
1333 <p>  While PostgreSQL clients runs fine in limited-resource environments, the
1334   server requires multiple processes and a stable pool of resources to
1335   run reliabily and efficiently.  Stripping down the PostgreSQL server
1336   to run in the same process address space as the client application
1337   would add too much complexity and failure cases.</p>
1338 </li></ul>
1339
1340 </body>
1341 </html>