]> granicus.if.org Git - postgresql/blob - doc/src/sgml/release-8.4.sgml
Update release notes for 9.1.5, 9.0.9, 8.4.13, 8.3.20.
[postgresql] / doc / src / sgml / release-8.4.sgml
1 <!-- doc/src/sgml/release-8.4.sgml -->
2 <!-- See header comment in release.sgml about typical markup -->
3
4  <sect1 id="release-8-4-13">
5   <title>Release 8.4.13</title>
6
7   <note>
8   <title>Release Date</title>
9   <simpara>2012-08-17</simpara>
10   </note>
11
12   <para>
13    This release contains a variety of fixes from 8.4.12.
14    For information about new features in the 8.4 major release, see
15    <xref linkend="release-8-4">.
16   </para>
17
18   <sect2>
19    <title>Migration to Version 8.4.13</title>
20
21    <para>
22     A dump/restore is not required for those running 8.4.X.
23    </para>
24
25    <para>
26     However, if you are upgrading from a version earlier than 8.4.10,
27     see the release notes for 8.4.10.
28    </para>
29
30   </sect2>
31
32   <sect2>
33    <title>Changes</title>
34
35    <itemizedlist>
36
37     <listitem>
38      <para>
39       Prevent access to external files/URLs via XML entity references
40       (Noah Misch, Tom Lane)
41      </para>
42
43      <para>
44       <function>xml_parse()</> would attempt to fetch external files or
45       URLs as needed to resolve DTD and entity references in an XML value,
46       thus allowing unprivileged database users to attempt to fetch data
47       with the privileges of the database server.  While the external data
48       wouldn't get returned directly to the user, portions of it could be
49       exposed in error messages if the data didn't parse as valid XML; and
50       in any case the mere ability to check existence of a file might be
51       useful to an attacker.  (CVE-2012-3489)
52      </para>
53     </listitem>
54
55     <listitem>
56      <para>
57       Prevent access to external files/URLs via <filename>contrib/xml2</>'s
58       <function>xslt_process()</> (Peter Eisentraut)
59      </para>
60
61      <para>
62       <application>libxslt</> offers the ability to read and write both
63       files and URLs through stylesheet commands, thus allowing
64       unprivileged database users to both read and write data with the
65       privileges of the database server.  Disable that through proper use
66       of <application>libxslt</>'s security options.  (CVE-2012-3488)
67      </para>
68
69      <para>
70       Also, remove <function>xslt_process()</>'s ability to fetch documents
71       and stylesheets from external files/URLs.  While this was a
72       documented <quote>feature</>, it was long regarded as a bad idea.
73       The fix for CVE-2012-3489 broke that capability, and rather than
74       expend effort on trying to fix it, we're just going to summarily
75       remove it.
76      </para>
77     </listitem>
78
79     <listitem>
80      <para>
81       Prevent too-early recycling of btree index pages (Noah Misch)
82      </para>
83
84      <para>
85       When we allowed read-only transactions to skip assigning XIDs, we
86       introduced the possibility that a deleted btree page could be
87       recycled while a read-only transaction was still in flight to it.
88       This would result in incorrect index search results.  The probability
89       of such an error occurring in the field seems very low because of the
90       timing requirements, but nonetheless it should be fixed.
91      </para>
92     </listitem>
93
94     <listitem>
95      <para>
96       Fix crash-safety bug with newly-created-or-reset sequences (Tom Lane)
97      </para>
98
99      <para>
100       If <command>ALTER SEQUENCE</> was executed on a freshly created or
101       reset sequence, and then precisely one <function>nextval()</> call
102       was made on it, and then the server crashed, WAL replay would restore
103       the sequence to a state in which it appeared that no
104       <function>nextval()</> had been done, thus allowing the first
105       sequence value to be returned again by the next
106       <function>nextval()</> call.  In particular this could manifest for
107       <type>serial</> columns, since creation of a serial column's sequence
108       includes an <command>ALTER SEQUENCE OWNED BY</> step.
109      </para>
110     </listitem>
111
112     <listitem>
113      <para>
114       Ensure the <filename>backup_label</> file is fsync'd after
115       <function>pg_start_backup()</> (Dave Kerr)
116      </para>
117     </listitem>
118
119     <listitem>
120      <para>
121       Back-patch 9.1 improvement to compress the fsync request queue
122       (Robert Haas)
123      </para>
124
125      <para>
126       This improves performance during checkpoints.  The 9.1 change
127       has now seen enough field testing to seem safe to back-patch.
128      </para>
129     </listitem>
130
131     <listitem>
132      <para>
133       Only allow autovacuum to be auto-canceled by a directly blocked
134       process (Tom Lane)
135      </para>
136
137      <para>
138       The original coding could allow inconsistent behavior in some cases;
139       in particular, an autovacuum could get canceled after less than
140       <literal>deadlock_timeout</> grace period.
141      </para>
142     </listitem>
143
144     <listitem>
145      <para>
146       Improve logging of autovacuum cancels (Robert Haas)
147      </para>
148     </listitem>
149
150     <listitem>
151      <para>
152       Fix log collector so that <literal>log_truncate_on_rotation</> works
153       during the very first log rotation after server start (Tom Lane)
154      </para>
155     </listitem>
156
157     <listitem>
158      <para>
159       Fix <literal>WITH</> attached to a nested set operation
160       (<literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</>)
161       (Tom Lane)
162      </para>
163     </listitem>
164
165     <listitem>
166      <para>
167       Ensure that a whole-row reference to a subquery doesn't include any
168       extra <literal>GROUP BY</> or <literal>ORDER BY</> columns (Tom Lane)
169      </para>
170     </listitem>
171
172     <listitem>
173      <para>
174       Disallow copying whole-row references in <literal>CHECK</>
175       constraints and index definitions during <command>CREATE TABLE</>
176       (Tom Lane)
177      </para>
178
179      <para>
180       This situation can arise in <command>CREATE TABLE</> with
181       <literal>LIKE</> or <literal>INHERITS</>.  The copied whole-row
182       variable was incorrectly labeled with the row type of the original
183       table not the new one.  Rejecting the case seems reasonable for
184       <literal>LIKE</>, since the row types might well diverge later.  For
185       <literal>INHERITS</> we should ideally allow it, with an implicit
186       coercion to the parent table's row type; but that will require more
187       work than seems safe to back-patch.
188      </para>
189     </listitem>
190
191     <listitem>
192      <para>
193       Fix memory leak in <literal>ARRAY(SELECT ...)</> subqueries (Heikki
194       Linnakangas, Tom Lane)
195      </para>
196     </listitem>
197
198     <listitem>
199      <para>
200       Fix extraction of common prefixes from regular expressions (Tom Lane)
201      </para>
202
203      <para>
204       The code could get confused by quantified parenthesized
205       subexpressions, such as <literal>^(foo)?bar</>.  This would lead to
206       incorrect index optimization of searches for such patterns.
207      </para>
208     </listitem>
209
210     <listitem>
211      <para>
212       Fix bugs with parsing signed
213       <replaceable>hh</><literal>:</><replaceable>mm</> and
214       <replaceable>hh</><literal>:</><replaceable>mm</><literal>:</><replaceable>ss</>
215       fields in <type>interval</> constants (Amit Kapila, Tom Lane)
216      </para>
217     </listitem>
218
219     <listitem>
220      <para>
221       Report errors properly in <filename>contrib/xml2</>'s
222       <function>xslt_process()</> (Tom Lane)
223      </para>
224     </listitem>
225
226     <listitem>
227      <para>
228       Update time zone data files to <application>tzdata</> release 2012e
229       for DST law changes in Morocco and Tokelau
230      </para>
231     </listitem>
232
233    </itemizedlist>
234
235   </sect2>
236  </sect1>
237
238  <sect1 id="release-8-4-12">
239   <title>Release 8.4.12</title>
240
241   <note>
242   <title>Release Date</title>
243   <simpara>2012-06-04</simpara>
244   </note>
245
246   <para>
247    This release contains a variety of fixes from 8.4.11.
248    For information about new features in the 8.4 major release, see
249    <xref linkend="release-8-4">.
250   </para>
251
252   <sect2>
253    <title>Migration to Version 8.4.12</title>
254
255    <para>
256     A dump/restore is not required for those running 8.4.X.
257    </para>
258
259    <para>
260     However, if you are upgrading from a version earlier than 8.4.10,
261     see the release notes for 8.4.10.
262    </para>
263
264   </sect2>
265
266   <sect2>
267    <title>Changes</title>
268
269    <itemizedlist>
270
271     <listitem>
272      <para>
273       Fix incorrect password transformation in
274       <filename>contrib/pgcrypto</>'s DES <function>crypt()</> function
275       (Solar Designer)
276      </para>
277
278      <para>
279       If a password string contained the byte value <literal>0x80</>, the
280       remainder of the password was ignored, causing the password to be much
281       weaker than it appeared.  With this fix, the rest of the string is
282       properly included in the DES hash.  Any stored password values that are
283       affected by this bug will thus no longer match, so the stored values may
284       need to be updated.  (CVE-2012-2143)
285      </para>
286     </listitem>
287
288     <listitem>
289      <para>
290       Ignore <literal>SECURITY DEFINER</> and <literal>SET</> attributes for
291       a procedural language's call handler (Tom Lane)
292      </para>
293
294      <para>
295       Applying such attributes to a call handler could crash the server.
296       (CVE-2012-2655)
297      </para>
298     </listitem>
299
300     <listitem>
301      <para>
302       Allow numeric timezone offsets in <type>timestamp</> input to be up to
303       16 hours away from UTC (Tom Lane)
304      </para>
305
306      <para>
307       Some historical time zones have offsets larger than 15 hours, the
308       previous limit.  This could result in dumped data values being rejected
309       during reload.
310      </para>
311     </listitem>
312
313     <listitem>
314      <para>
315       Fix timestamp conversion to cope when the given time is exactly the
316       last DST transition time for the current timezone (Tom Lane)
317      </para>
318
319      <para>
320       This oversight has been there a long time, but was not noticed
321       previously because most DST-using zones are presumed to have an
322       indefinite sequence of future DST transitions.
323      </para>
324     </listitem>
325
326     <listitem>
327      <para>
328       Fix <type>text</> to <type>name</> and <type>char</> to <type>name</>
329       casts to perform string truncation correctly in multibyte encodings
330       (Karl Schnaitter)
331      </para>
332     </listitem>
333
334     <listitem>
335      <para>
336       Fix memory copying bug in <function>to_tsquery()</> (Heikki Linnakangas)
337      </para>
338     </listitem>
339
340     <listitem>
341      <para>
342       Fix planner's handling of outer PlaceHolderVars within subqueries (Tom
343       Lane)
344      </para>
345
346      <para>
347       This bug concerns sub-SELECTs that reference variables coming from the
348       nullable side of an outer join of the surrounding query.
349       In 9.1, queries affected by this bug would fail with <quote>ERROR:
350       Upper-level PlaceHolderVar found where not expected</>.  But in 9.0 and
351       8.4, you'd silently get possibly-wrong answers, since the value
352       transmitted into the subquery wouldn't go to null when it should.
353      </para>
354     </listitem>
355
356     <listitem>
357      <para>
358       Fix slow session startup when <structname>pg_attribute</> is very large
359       (Tom Lane)
360      </para>
361
362      <para>
363       If <structname>pg_attribute</> exceeds one-fourth of
364       <varname>shared_buffers</>, cache rebuilding code that is sometimes
365       needed during session start would trigger the synchronized-scan logic,
366       causing it to take many times longer than normal.  The problem was
367       particularly acute if many new sessions were starting at once.
368      </para>
369     </listitem>
370
371     <listitem>
372      <para>
373       Ensure sequential scans check for query cancel reasonably often (Merlin
374       Moncure)
375      </para>
376
377      <para>
378       A scan encountering many consecutive pages that contain no live tuples
379       would not respond to interrupts meanwhile.
380      </para>
381     </listitem>
382
383     <listitem>
384      <para>
385       Ensure the Windows implementation of <function>PGSemaphoreLock()</>
386       clears <varname>ImmediateInterruptOK</> before returning (Tom Lane)
387      </para>
388
389      <para>
390       This oversight meant that a query-cancel interrupt received later
391       in the same query could be accepted at an unsafe time, with
392       unpredictable but not good consequences.
393      </para>
394     </listitem>
395
396     <listitem>
397      <para>
398       Show whole-row variables safely when printing views or rules
399       (Abbas Butt, Tom Lane)
400      </para>
401
402      <para>
403       Corner cases involving ambiguous names (that is, the name could be
404       either a table or column name of the query) were printed in an
405       ambiguous way, risking that the view or rule would be interpreted
406       differently after dump and reload.  Avoid the ambiguous case by
407       attaching a no-op cast.
408      </para>
409     </listitem>
410
411     <listitem>
412      <para>
413       Fix <command>COPY FROM</> to properly handle null marker strings that
414       correspond to invalid encoding (Tom Lane)
415      </para>
416
417      <para>
418       A null marker string such as <literal>E'\\0'</> should work, and did
419       work in the past, but the case got broken in 8.4.
420      </para>
421     </listitem>
422
423     <listitem>
424      <para>
425       Ensure autovacuum worker processes perform stack depth checking
426       properly (Heikki Linnakangas)
427      </para>
428
429      <para>
430       Previously, infinite recursion in a function invoked by
431       auto-<command>ANALYZE</> could crash worker processes.
432      </para>
433     </listitem>
434
435     <listitem>
436      <para>
437       Fix logging collector to not lose log coherency under high load (Andrew
438       Dunstan)
439      </para>
440
441      <para>
442       The collector previously could fail to reassemble large messages if it
443       got too busy.
444      </para>
445     </listitem>
446
447     <listitem>
448      <para>
449       Fix logging collector to ensure it will restart file rotation
450       after receiving <systemitem>SIGHUP</> (Tom Lane)
451      </para>
452     </listitem>
453
454     <listitem>
455      <para>
456       Fix WAL replay logic for GIN indexes to not fail if the index was
457       subsequently dropped (Tom Lane)
458      </para>
459     </listitem>
460
461     <listitem>
462      <para>
463       Fix memory leak in PL/pgSQL's <command>RETURN NEXT</> command (Joe
464       Conway)
465      </para>
466     </listitem>
467
468     <listitem>
469      <para>
470       Fix PL/pgSQL's <command>GET DIAGNOSTICS</> command when the target
471       is the function's first variable (Tom Lane)
472      </para>
473     </listitem>
474
475     <listitem>
476      <para>
477       Fix potential access off the end of memory in <application>psql</>'s
478       expanded display (<command>\x</>) mode (Peter Eisentraut)
479      </para>
480     </listitem>
481
482     <listitem>
483      <para>
484       Fix several performance problems in <application>pg_dump</> when
485       the database contains many objects (Jeff Janes, Tom Lane)
486      </para>
487
488      <para>
489       <application>pg_dump</> could get very slow if the database contained
490       many schemas, or if many objects are in dependency loops, or if there
491       are many owned sequences.
492      </para>
493     </listitem>
494
495     <listitem>
496      <para>
497       Fix <filename>contrib/dblink</>'s <function>dblink_exec()</> to not leak
498       temporary database connections upon error (Tom Lane)
499      </para>
500     </listitem>
501
502     <listitem>
503      <para>
504       Fix <filename>contrib/dblink</> to report the correct connection name in
505       error messages (Kyotaro Horiguchi)
506      </para>
507     </listitem>
508
509     <listitem>
510      <para>
511       Update time zone data files to <application>tzdata</> release 2012c
512       for DST law changes in Antarctica, Armenia, Chile, Cuba, Falkland
513       Islands, Gaza, Haiti, Hebron, Morocco, Syria, and Tokelau Islands;
514       also historical corrections for Canada.
515      </para>
516     </listitem>
517
518    </itemizedlist>
519
520   </sect2>
521  </sect1>
522
523  <sect1 id="release-8-4-11">
524   <title>Release 8.4.11</title>
525
526   <note>
527   <title>Release Date</title>
528   <simpara>2012-02-27</simpara>
529   </note>
530
531   <para>
532    This release contains a variety of fixes from 8.4.10.
533    For information about new features in the 8.4 major release, see
534    <xref linkend="release-8-4">.
535   </para>
536
537   <sect2>
538    <title>Migration to Version 8.4.11</title>
539
540    <para>
541     A dump/restore is not required for those running 8.4.X.
542    </para>
543
544    <para>
545     However, if you are upgrading from a version earlier than 8.4.10,
546     see the release notes for 8.4.10.
547    </para>
548
549   </sect2>
550
551   <sect2>
552    <title>Changes</title>
553
554    <itemizedlist>
555
556     <listitem>
557      <para>
558       Require execute permission on the trigger function for
559       <command>CREATE TRIGGER</> (Robert Haas)
560      </para>
561
562      <para>
563       This missing check could allow another user to execute a trigger
564       function with forged input data, by installing it on a table he owns.
565       This is only of significance for trigger functions marked
566       <literal>SECURITY DEFINER</>, since otherwise trigger functions run
567       as the table owner anyway.  (CVE-2012-0866)
568      </para>
569     </listitem>
570
571     <listitem>
572      <para>
573       Remove arbitrary limitation on length of common name in SSL
574       certificates (Heikki Linnakangas)
575      </para>
576
577      <para>
578       Both <application>libpq</> and the server truncated the common name
579       extracted from an SSL certificate at 32 bytes.  Normally this would
580       cause nothing worse than an unexpected verification failure, but there
581       are some rather-implausible scenarios in which it might allow one
582       certificate holder to impersonate another.  The victim would have to
583       have a common name exactly 32 bytes long, and the attacker would have
584       to persuade a trusted CA to issue a certificate in which the common
585       name has that string as a prefix.  Impersonating a server would also
586       require some additional exploit to redirect client connections.
587       (CVE-2012-0867)
588      </para>
589     </listitem>
590
591     <listitem>
592      <para>
593       Convert newlines to spaces in names written in <application>pg_dump</>
594       comments (Robert Haas)
595      </para>
596
597      <para>
598       <application>pg_dump</> was incautious about sanitizing object names
599       that are emitted within SQL comments in its output script.  A name
600       containing a newline would at least render the script syntactically
601       incorrect.  Maliciously crafted object names could present a SQL
602       injection risk when the script is reloaded.  (CVE-2012-0868)
603      </para>
604     </listitem>
605
606     <listitem>
607      <para>
608       Fix btree index corruption from insertions concurrent with vacuuming
609       (Tom Lane)
610      </para>
611
612      <para>
613       An index page split caused by an insertion could sometimes cause a
614       concurrently-running <command>VACUUM</> to miss removing index entries
615       that it should remove.  After the corresponding table rows are removed,
616       the dangling index entries would cause errors (such as <quote>could not
617       read block N in file ...</>) or worse, silently wrong query results
618       after unrelated rows are re-inserted at the now-free table locations.
619       This bug has been present since release 8.2, but occurs so infrequently
620       that it was not diagnosed until now.  If you have reason to suspect
621       that it has happened in your database, reindexing the affected index
622       will fix things.
623      </para>
624     </listitem>
625
626     <listitem>
627      <para>
628       Update per-column permissions, not only per-table permissions, when
629       changing table owner (Tom Lane)
630      </para>
631
632      <para>
633       Failure to do this meant that any previously granted column permissions
634       were still shown as having been granted by the old owner.  This meant
635       that neither the new owner nor a superuser could revoke the
636       now-untraceable-to-table-owner permissions.
637      </para>
638     </listitem>
639
640     <listitem>
641      <para>
642       Allow non-existent values for some settings in <command>ALTER
643       USER/DATABASE SET</> (Heikki Linnakangas)
644      </para>
645
646      <para>
647       Allow <varname>default_text_search_config</>,
648       <varname>default_tablespace</>, and <varname>temp_tablespaces</> to be
649       set to names that are not known.  This is because they might be known
650       in another database where the setting is intended to be used, or for the
651       tablespace cases because the tablespace might not be created yet.  The
652       same issue was previously recognized for <varname>search_path</>, and
653       these settings now act like that one.
654      </para>
655     </listitem>
656
657     <listitem>
658      <para>
659       Avoid crashing when we have problems deleting table files post-commit
660       (Tom Lane)
661      </para>
662
663      <para>
664       Dropping a table should lead to deleting the underlying disk files only
665       after the transaction commits.  In event of failure then (for instance,
666       because of wrong file permissions) the code is supposed to just emit a
667       warning message and go on, since it's too late to abort the
668       transaction.  This logic got broken as of release 8.4, causing such
669       situations to result in a PANIC and an unrestartable database.
670      </para>
671     </listitem>
672
673     <listitem>
674      <para>
675       Track the OID counter correctly during WAL replay, even when it wraps
676       around (Tom Lane)
677      </para>
678
679      <para>
680       Previously the OID counter would remain stuck at a high value until the
681       system exited replay mode.  The practical consequences of that are
682       usually nil, but there are scenarios wherein a standby server that's
683       been promoted to master might take a long time to advance the OID
684       counter to a reasonable value once values are needed.
685      </para>
686     </listitem>
687
688     <listitem>
689      <para>
690       Fix regular expression back-references with <literal>*</> attached
691       (Tom Lane)
692      </para>
693
694      <para>
695       Rather than enforcing an exact string match, the code would effectively
696       accept any string that satisfies the pattern sub-expression referenced
697       by the back-reference symbol.
698      </para>
699
700      <para>
701       A similar problem still afflicts back-references that are embedded in a
702       larger quantified expression, rather than being the immediate subject
703       of the quantifier.  This will be addressed in a future
704       <productname>PostgreSQL</> release.
705      </para>
706     </listitem>
707
708     <listitem>
709      <para>
710       Fix recently-introduced memory leak in processing of
711       <type>inet</>/<type>cidr</> values (Heikki Linnakangas)
712      </para>
713
714      <para>
715       A patch in the December 2011 releases of <productname>PostgreSQL</>
716       caused memory leakage in these operations, which could be significant
717       in scenarios such as building a btree index on such a column.
718      </para>
719     </listitem>
720
721     <listitem>
722      <para>
723       Fix dangling pointer after <command>CREATE TABLE AS</>/<command>SELECT
724       INTO</> in a SQL-language function (Tom Lane)
725      </para>
726
727      <para>
728       In most cases this only led to an assertion failure in assert-enabled
729       builds, but worse consequences seem possible.
730      </para>
731     </listitem>
732
733     <listitem>
734      <para>
735       Avoid double close of file handle in syslogger on Windows (MauMau)
736      </para>
737
738      <para>
739       Ordinarily this error was invisible, but it would cause an exception
740       when running on a debug version of Windows.
741      </para>
742     </listitem>
743
744     <listitem>
745      <para>
746       Fix I/O-conversion-related memory leaks in plpgsql
747       (Andres Freund, Jan Urbanski, Tom Lane)
748      </para>
749
750      <para>
751       Certain operations would leak memory until the end of the current
752       function.
753      </para>
754     </listitem>
755
756     <listitem>
757      <para>
758       Improve <application>pg_dump</>'s handling of inherited table columns
759       (Tom Lane)
760      </para>
761
762      <para>
763       <application>pg_dump</> mishandled situations where a child column has
764       a different default expression than its parent column.  If the default
765       is textually identical to the parent's default, but not actually the
766       same (for instance, because of schema search path differences) it would
767       not be recognized as different, so that after dump and restore the
768       child would be allowed to inherit the parent's default.  Child columns
769       that are <literal>NOT NULL</> where their parent is not could also be
770       restored subtly incorrectly.
771      </para>
772     </listitem>
773
774     <listitem>
775      <para>
776       Fix <application>pg_restore</>'s direct-to-database mode for
777       INSERT-style table data (Tom Lane)
778      </para>
779
780      <para>
781       Direct-to-database restores from archive files made with
782       <option>--inserts</> or <option>--column-inserts</> options fail when
783       using <application>pg_restore</> from a release dated September or
784       December 2011, as a result of an oversight in a fix for another
785       problem.  The archive file itself is not at fault, and text-mode
786       output is okay.
787      </para>
788     </listitem>
789
790     <listitem>
791      <para>
792       Allow <literal>AT</> option in <application>ecpg</>
793       <literal>DEALLOCATE</> statements (Michael Meskes)
794      </para>
795
796      <para>
797       The infrastructure to support this has been there for awhile, but
798       through an oversight there was still an error check rejecting the case.
799      </para>
800     </listitem>
801
802     <listitem>
803      <para>
804       Fix error in <filename>contrib/intarray</>'s <literal>int[] &amp;
805       int[]</> operator (Guillaume Lelarge)
806      </para>
807
808      <para>
809       If the smallest integer the two input arrays have in common is 1,
810       and there are smaller values in either array, then 1 would be
811       incorrectly omitted from the result.
812      </para>
813     </listitem>
814
815     <listitem>
816      <para>
817       Fix error detection in <filename>contrib/pgcrypto</>'s
818       <function>encrypt_iv()</> and <function>decrypt_iv()</>
819       (Marko Kreen)
820      </para>
821
822      <para>
823       These functions failed to report certain types of invalid-input errors,
824       and would instead return random garbage values for incorrect input.
825      </para>
826     </listitem>
827
828     <listitem>
829      <para>
830       Fix one-byte buffer overrun in <filename>contrib/test_parser</>
831       (Paul Guyot)
832      </para>
833
834      <para>
835       The code would try to read one more byte than it should, which would
836       crash in corner cases.
837       Since <filename>contrib/test_parser</> is only example code, this is
838       not a security issue in itself, but bad example code is still bad.
839      </para>
840     </listitem>
841
842     <listitem>
843      <para>
844       Use <function>__sync_lock_test_and_set()</> for spinlocks on ARM, if
845       available (Martin Pitt)
846      </para>
847
848      <para>
849       This function replaces our previous use of the <literal>SWPB</>
850       instruction, which is deprecated and not available on ARMv6 and later.
851       Reports suggest that the old code doesn't fail in an obvious way on
852       recent ARM boards, but simply doesn't interlock concurrent accesses,
853       leading to bizarre failures in multiprocess operation.
854      </para>
855     </listitem>
856
857     <listitem>
858      <para>
859       Use <option>-fexcess-precision=standard</> option when building with
860       gcc versions that accept it (Andrew Dunstan)
861      </para>
862
863      <para>
864       This prevents assorted scenarios wherein recent versions of gcc will
865       produce creative results.
866      </para>
867     </listitem>
868
869     <listitem>
870      <para>
871       Allow use of threaded Python on FreeBSD (Chris Rees)
872      </para>
873
874      <para>
875       Our configure script previously believed that this combination wouldn't
876       work; but FreeBSD fixed the problem, so remove that error check.
877      </para>
878     </listitem>
879
880    </itemizedlist>
881
882   </sect2>
883  </sect1>
884
885  <sect1 id="release-8-4-10">
886   <title>Release 8.4.10</title>
887
888   <note>
889   <title>Release Date</title>
890   <simpara>2011-12-05</simpara>
891   </note>
892
893   <para>
894    This release contains a variety of fixes from 8.4.9.
895    For information about new features in the 8.4 major release, see
896    <xref linkend="release-8-4">.
897   </para>
898
899   <sect2>
900    <title>Migration to Version 8.4.10</title>
901
902    <para>
903     A dump/restore is not required for those running 8.4.X.
904    </para>
905
906    <para>
907     However, a longstanding error was discovered in the definition of the
908     <literal>information_schema.referential_constraints</> view.  If you
909     rely on correct results from that view, you should replace its
910     definition as explained in the first changelog item below.
911    </para>
912
913    <para>
914     Also, if you are upgrading from a version earlier than 8.4.8,
915     see the release notes for 8.4.8.
916    </para>
917
918   </sect2>
919
920   <sect2>
921    <title>Changes</title>
922
923    <itemizedlist>
924
925     <listitem>
926      <para>
927       Fix bugs in <literal>information_schema.referential_constraints</> view
928       (Tom Lane)
929      </para>
930
931      <para>
932       This view was being insufficiently careful about matching the
933       foreign-key constraint to the depended-on primary or unique key
934       constraint.  That could result in failure to show a foreign key
935       constraint at all, or showing it multiple times, or claiming that it
936       depends on a different constraint than the one it really does.
937      </para>
938
939      <para>
940       Since the view definition is installed by <application>initdb</>,
941       merely upgrading will not fix the problem.  If you need to fix this
942       in an existing installation, you can (as a superuser) drop the
943       <literal>information_schema</> schema then re-create it by sourcing
944       <filename><replaceable>SHAREDIR</>/information_schema.sql</filename>.
945       (Run <literal>pg_config --sharedir</> if you're uncertain where
946       <replaceable>SHAREDIR</> is.)  This must be repeated in each database
947       to be fixed.
948      </para>
949     </listitem>
950
951     <listitem>
952      <para>
953       Fix incorrect replay of WAL records for GIN index updates
954       (Tom Lane)
955      </para>
956
957      <para>
958       This could result in transiently failing to find index entries after
959       a crash, or on a hot-standby server.  The problem would be repaired
960       by the next <command>VACUUM</> of the index, however.
961      </para>
962     </listitem>
963
964     <listitem>
965      <para>
966       Fix TOAST-related data corruption during <literal>CREATE TABLE dest AS
967       SELECT * FROM src</> or <literal>INSERT INTO dest SELECT * FROM src</>
968       (Tom Lane)
969      </para>
970
971      <para>
972       If a table has been modified by <command>ALTER TABLE ADD COLUMN</>,
973       attempts to copy its data verbatim to another table could produce
974       corrupt results in certain corner cases.
975       The problem can only manifest in this precise form in 8.4 and later,
976       but we patched earlier versions as well in case there are other code
977       paths that could trigger the same bug.
978      </para>
979     </listitem>
980
981     <listitem>
982      <para>
983       Fix race condition during toast table access from stale syscache entries
984       (Tom Lane)
985      </para>
986
987      <para>
988       The typical symptom was transient errors like <quote>missing chunk
989       number 0 for toast value NNNNN in pg_toast_2619</>, where the cited
990       toast table would always belong to a system catalog.
991      </para>
992     </listitem>
993
994     <listitem>
995      <para>
996       Track dependencies of functions on items used in parameter default
997       expressions (Tom Lane)
998      </para>
999
1000      <para>
1001       Previously, a referenced object could be dropped without having dropped
1002       or modified the function, leading to misbehavior when the function was
1003       used.  Note that merely installing this update will not fix the missing
1004       dependency entries; to do that, you'd need to <command>CREATE OR
1005       REPLACE</> each such function afterwards.  If you have functions whose
1006       defaults depend on non-built-in objects, doing so is recommended.
1007      </para>
1008     </listitem>
1009
1010     <listitem>
1011      <para>
1012       Allow inlining of set-returning SQL functions with multiple OUT
1013       parameters (Tom Lane)
1014      </para>
1015     </listitem>
1016
1017     <listitem>
1018      <para>
1019       Make <function>DatumGetInetP()</> unpack inet datums that have a 1-byte
1020       header, and add a new macro, <function>DatumGetInetPP()</>, that does
1021       not (Heikki Linnakangas)
1022      </para>
1023
1024      <para>
1025       This change affects no core code, but might prevent crashes in add-on
1026       code that expects <function>DatumGetInetP()</> to produce an unpacked
1027       datum as per usual convention.
1028      </para>
1029     </listitem>
1030
1031     <listitem>
1032      <para>
1033       Improve locale support in <type>money</> type's input and output
1034       (Tom Lane)
1035      </para>
1036
1037      <para>
1038       Aside from not supporting all standard
1039       <link linkend="guc-lc-monetary"><varname>lc_monetary</></link>
1040       formatting options, the input and output functions were inconsistent,
1041       meaning there were locales in which dumped <type>money</> values could
1042       not be re-read.
1043      </para>
1044     </listitem>
1045
1046     <listitem>
1047      <para>
1048       Don't let <link
1049       linkend="guc-transform-null-equals"><varname>transform_null_equals</></link>
1050       affect <literal>CASE foo WHEN NULL ...</> constructs
1051       (Heikki Linnakangas)
1052      </para>
1053
1054      <para>
1055       <varname>transform_null_equals</> is only supposed to affect
1056       <literal>foo = NULL</> expressions written directly by the user, not
1057       equality checks generated internally by this form of <literal>CASE</>.
1058      </para>
1059     </listitem>
1060
1061     <listitem>
1062      <para>
1063       Change foreign-key trigger creation order to better support
1064       self-referential foreign keys (Tom Lane)
1065      </para>
1066
1067      <para>
1068       For a cascading foreign key that references its own table, a row update
1069       will fire both the <literal>ON UPDATE</> trigger and the
1070       <literal>CHECK</> trigger as one event.  The <literal>ON UPDATE</>
1071       trigger must execute first, else the <literal>CHECK</> will check a
1072       non-final state of the row and possibly throw an inappropriate error.
1073       However, the firing order of these triggers is determined by their
1074       names, which generally sort in creation order since the triggers have
1075       auto-generated names following the convention
1076       <quote>RI_ConstraintTrigger_NNNN</>.  A proper fix would require
1077       modifying that convention, which we will do in 9.2, but it seems risky
1078       to change it in existing releases.  So this patch just changes the
1079       creation order of the triggers.  Users encountering this type of error
1080       should drop and re-create the foreign key constraint to get its
1081       triggers into the right order.
1082      </para>
1083     </listitem>
1084
1085     <listitem>
1086      <para>
1087       Avoid floating-point underflow while tracking buffer allocation rate
1088       (Greg Matthews)
1089      </para>
1090
1091      <para>
1092       While harmless in itself, on certain platforms this would result in
1093       annoying kernel log messages.
1094      </para>
1095     </listitem>
1096
1097     <listitem>
1098      <para>
1099       Preserve configuration file name and line number values when starting
1100       child processes under Windows (Tom Lane)
1101      </para>
1102
1103      <para>
1104       Formerly, these would not be displayed correctly in the
1105       <structname>pg_settings</> view.
1106      </para>
1107     </listitem>
1108
1109     <listitem>
1110      <para>
1111       Preserve blank lines within commands in <application>psql</>'s command
1112       history (Robert Haas)
1113      </para>
1114
1115      <para>
1116       The former behavior could cause problems if an empty line was removed
1117       from within a string literal, for example.
1118      </para>
1119     </listitem>
1120
1121     <listitem>
1122      <para>
1123       Fix <application>pg_dump</> to dump user-defined casts between
1124       auto-generated types, such as table rowtypes (Tom Lane)
1125      </para>
1126     </listitem>
1127
1128     <listitem>
1129      <para>
1130       Use the preferred version of <application>xsubpp</> to build PL/Perl,
1131       not necessarily the operating system's main copy
1132       (David Wheeler and Alex Hunsaker)
1133      </para>
1134     </listitem>
1135
1136     <listitem>
1137      <para>
1138       Fix incorrect coding in <filename>contrib/dict_int</> and
1139       <filename>contrib/dict_xsyn</> (Tom Lane)
1140      </para>
1141
1142      <para>
1143       Some functions incorrectly assumed that memory returned by
1144       <function>palloc()</> is guaranteed zeroed.
1145      </para>
1146     </listitem>
1147
1148     <listitem>
1149      <para>
1150       Honor query cancel interrupts promptly in <function>pgstatindex()</>
1151       (Robert Haas)
1152      </para>
1153     </listitem>
1154
1155     <listitem>
1156      <para>
1157       Ensure VPATH builds properly install all server header files
1158       (Peter Eisentraut)
1159      </para>
1160     </listitem>
1161
1162     <listitem>
1163      <para>
1164       Shorten file names reported in verbose error messages (Peter Eisentraut)
1165      </para>
1166
1167      <para>
1168       Regular builds have always reported just the name of the C file
1169       containing the error message call, but VPATH builds formerly
1170       reported an absolute path name.
1171      </para>
1172     </listitem>
1173
1174     <listitem>
1175      <para>
1176       Fix interpretation of Windows timezone names for Central America
1177       (Tom Lane)
1178      </para>
1179
1180      <para>
1181       Map <quote>Central America Standard Time</> to <literal>CST6</>, not
1182       <literal>CST6CDT</>, because DST is generally not observed anywhere in
1183       Central America.
1184      </para>
1185     </listitem>
1186
1187     <listitem>
1188      <para>
1189       Update time zone data files to <application>tzdata</> release 2011n
1190       for DST law changes in Brazil, Cuba, Fiji, Palestine, Russia, and Samoa;
1191       also historical corrections for Alaska and British East Africa.
1192      </para>
1193     </listitem>
1194
1195    </itemizedlist>
1196
1197   </sect2>
1198  </sect1>
1199
1200  <sect1 id="release-8-4-9">
1201   <title>Release 8.4.9</title>
1202
1203   <note>
1204   <title>Release Date</title>
1205   <simpara>2011-09-26</simpara>
1206   </note>
1207
1208   <para>
1209    This release contains a variety of fixes from 8.4.8.
1210    For information about new features in the 8.4 major release, see
1211    <xref linkend="release-8-4">.
1212   </para>
1213
1214   <sect2>
1215    <title>Migration to Version 8.4.9</title>
1216
1217    <para>
1218     A dump/restore is not required for those running 8.4.X.
1219    </para>
1220
1221    <para>
1222     However, if you are upgrading from a version earlier than 8.4.8,
1223     see the release notes for 8.4.8.
1224    </para>
1225
1226   </sect2>
1227
1228   <sect2>
1229    <title>Changes</title>
1230
1231    <itemizedlist>
1232
1233     <listitem>
1234      <para>
1235       Fix bugs in indexing of in-doubt HOT-updated tuples (Tom Lane)
1236      </para>
1237
1238      <para>
1239       These bugs could result in index corruption after reindexing a system
1240       catalog.  They are not believed to affect user indexes.
1241      </para>
1242     </listitem>
1243
1244     <listitem>
1245      <para>
1246       Fix multiple bugs in GiST index page split processing (Heikki
1247       Linnakangas)
1248      </para>
1249
1250      <para>
1251       The probability of occurrence was low, but these could lead to index
1252       corruption.
1253      </para>
1254     </listitem>
1255
1256     <listitem>
1257      <para>
1258       Fix possible buffer overrun in <function>tsvector_concat()</>
1259       (Tom Lane)
1260      </para>
1261
1262      <para>
1263       The function could underestimate the amount of memory needed for its
1264       result, leading to server crashes.
1265      </para>
1266     </listitem>
1267
1268     <listitem>
1269      <para>
1270       Fix crash in <function>xml_recv</> when processing a
1271       <quote>standalone</> parameter (Tom Lane)
1272      </para>
1273     </listitem>
1274
1275     <listitem>
1276      <para>
1277       Make <function>pg_options_to_table</> return NULL for an option with no
1278       value (Tom Lane)
1279      </para>
1280
1281      <para>
1282       Previously such cases would result in a server crash.
1283      </para>
1284     </listitem>
1285
1286     <listitem>
1287      <para>
1288       Avoid possibly accessing off the end of memory in <command>ANALYZE</>
1289       and in SJIS-2004 encoding conversion (Noah Misch)
1290      </para>
1291
1292      <para>
1293       This fixes some very-low-probability server crash scenarios.
1294      </para>
1295     </listitem>
1296
1297     <listitem>
1298      <para>
1299       Prevent intermittent hang in interactions of startup process with
1300       bgwriter process (Simon Riggs)
1301      </para>
1302
1303      <para>
1304       This affected recovery in non-hot-standby cases.
1305      </para>
1306     </listitem>
1307
1308     <listitem>
1309      <para>
1310       Fix race condition in relcache init file invalidation (Tom Lane)
1311      </para>
1312
1313      <para>
1314       There was a window wherein a new backend process could read a stale init
1315       file but miss the inval messages that would tell it the data is stale.
1316       The result would be bizarre failures in catalog accesses, typically
1317       <quote>could not read block 0 in file ...</> later during startup.
1318      </para>
1319     </listitem>
1320
1321     <listitem>
1322      <para>
1323       Fix memory leak at end of a GiST index scan (Tom Lane)
1324      </para>
1325
1326      <para>
1327       Commands that perform many separate GiST index scans, such as
1328       verification of a new GiST-based exclusion constraint on a table
1329       already containing many rows, could transiently require large amounts of
1330       memory due to this leak.
1331      </para>
1332     </listitem>
1333
1334     <listitem>
1335      <para>
1336       Fix incorrect memory accounting (leading to possible memory bloat) in
1337       tuplestores supporting holdable cursors and plpgsql's <literal>RETURN
1338       NEXT</> command (Tom Lane)
1339      </para>
1340     </listitem>
1341
1342     <listitem>
1343      <para>
1344       Fix performance problem when constructing a large, lossy bitmap
1345       (Tom Lane)
1346      </para>
1347     </listitem>
1348
1349     <listitem>
1350      <para>
1351       Fix join selectivity estimation for unique columns (Tom Lane)
1352      </para>
1353
1354      <para>
1355       This fixes an erroneous planner heuristic that could lead to poor
1356       estimates of the result size of a join.
1357      </para>
1358     </listitem>
1359
1360     <listitem>
1361      <para>
1362       Fix nested PlaceHolderVar expressions that appear only in sub-select
1363       target lists (Tom Lane)
1364      </para>
1365
1366      <para>
1367       This mistake could result in outputs of an outer join incorrectly
1368       appearing as NULL.
1369      </para>
1370     </listitem>
1371
1372     <listitem>
1373      <para>
1374       Allow nested <literal>EXISTS</> queries to be optimized properly (Tom
1375       Lane)
1376      </para>
1377     </listitem>
1378
1379     <listitem>
1380      <para>
1381       Fix array- and path-creating functions to ensure padding bytes are
1382       zeroes (Tom Lane)
1383      </para>
1384
1385      <para>
1386       This avoids some situations where the planner will think that
1387       semantically-equal constants are not equal, resulting in poor
1388       optimization.
1389      </para>
1390     </listitem>
1391
1392     <listitem>
1393      <para>
1394       Fix <command>EXPLAIN</> to handle gating Result nodes within
1395       inner-indexscan subplans (Tom Lane)
1396      </para>
1397
1398      <para>
1399       The usual symptom of this oversight was <quote>bogus varno</> errors.
1400      </para>
1401     </listitem>
1402
1403     <listitem>
1404      <para>
1405       Work around gcc 4.6.0 bug that breaks WAL replay (Tom Lane)
1406      </para>
1407
1408      <para>
1409       This could lead to loss of committed transactions after a server crash.
1410      </para>
1411     </listitem>
1412
1413     <listitem>
1414      <para>
1415       Fix dump bug for <literal>VALUES</> in a view (Tom Lane)
1416      </para>
1417     </listitem>
1418
1419     <listitem>
1420      <para>
1421       Disallow <literal>SELECT FOR UPDATE/SHARE</> on sequences (Tom Lane)
1422      </para>
1423
1424      <para>
1425       This operation doesn't work as expected and can lead to failures.
1426      </para>
1427     </listitem>
1428
1429     <listitem>
1430      <para>
1431       Fix <command>VACUUM</> so that it always updates
1432       <literal>pg_class</>.<literal>reltuples</>/<literal>relpages</> (Tom
1433       Lane)
1434      </para>
1435
1436      <para>
1437       This fixes some scenarios where autovacuum could make increasingly poor
1438       decisions about when to vacuum tables.
1439      </para>
1440     </listitem>
1441
1442     <listitem>
1443      <para>
1444       Defend against integer overflow when computing size of a hash table (Tom
1445       Lane)
1446      </para>
1447     </listitem>
1448
1449     <listitem>
1450      <para>
1451       Fix cases where <command>CLUSTER</> might attempt to access
1452       already-removed TOAST data (Tom Lane)
1453      </para>
1454     </listitem>
1455
1456     <listitem>
1457      <para>
1458       Fix portability bugs in use of credentials control messages for
1459       <quote>peer</> authentication (Tom Lane)
1460      </para>
1461     </listitem>
1462
1463     <listitem>
1464      <para>
1465       Fix SSPI login when multiple roundtrips are required (Ahmed Shinwari,
1466       Magnus Hagander)
1467      </para>
1468
1469      <para>
1470       The typical symptom of this problem was <quote>The function requested is
1471       not supported</> errors during SSPI login.
1472      </para>
1473     </listitem>
1474
1475     <listitem>
1476      <para>
1477       Throw an error if <filename>pg_hba.conf</> contains <literal>hostssl</>
1478       but SSL is disabled (Tom Lane)
1479      </para>
1480
1481      <para>
1482       This was concluded to be more user-friendly than the previous behavior
1483       of silently ignoring such lines.
1484      </para>
1485     </listitem>
1486
1487     <listitem>
1488      <para>
1489       Fix typo in <function>pg_srand48</> seed initialization (Andres Freund)
1490      </para>
1491
1492      <para>
1493       This led to failure to use all bits of the provided seed.  This function
1494       is not used on most platforms (only those without <function>srandom</>),
1495       and the potential security exposure from a less-random-than-expected
1496       seed seems minimal in any case.
1497      </para>
1498     </listitem>
1499
1500     <listitem>
1501      <para>
1502       Avoid integer overflow when the sum of <literal>LIMIT</> and
1503       <literal>OFFSET</> values exceeds 2^63 (Heikki Linnakangas)
1504      </para>
1505     </listitem>
1506
1507     <listitem>
1508      <para>
1509       Add overflow checks to <type>int4</> and <type>int8</> versions of
1510       <function>generate_series()</> (Robert Haas)
1511      </para>
1512     </listitem>
1513
1514     <listitem>
1515      <para>
1516       Fix trailing-zero removal in <function>to_char()</> (Marti Raudsepp)
1517      </para>
1518
1519      <para>
1520       In a format with <literal>FM</> and no digit positions
1521       after the decimal point, zeroes to the left of the decimal point could
1522       be removed incorrectly.
1523      </para>
1524     </listitem>
1525
1526     <listitem>
1527      <para>
1528       Fix <function>pg_size_pretty()</> to avoid overflow for inputs close to
1529       2^63 (Tom Lane)
1530      </para>
1531     </listitem>
1532
1533     <listitem>
1534      <para>
1535       Weaken plpgsql's check for typmod matching in record values (Tom Lane)
1536      </para>
1537
1538      <para>
1539       An overly enthusiastic check could lead to discarding length modifiers
1540       that should have been kept.
1541      </para>
1542     </listitem>
1543
1544     <listitem>
1545      <para>
1546       Correctly handle quotes in locale names during <application>initdb</>
1547       (Heikki Linnakangas)
1548      </para>
1549
1550      <para>
1551       The case can arise with some Windows locales, such as <quote>People's
1552       Republic of China</>.
1553      </para>
1554     </listitem>
1555
1556     <listitem>
1557      <para>
1558       Fix <application>pg_upgrade</> to preserve toast tables' relfrozenxids
1559       during an upgrade from 8.3 (Bruce Momjian)
1560      </para>
1561
1562      <para>
1563       Failure to do this could lead to <filename>pg_clog</> files being
1564       removed too soon after the upgrade.
1565      </para>
1566     </listitem>
1567
1568     <listitem>
1569      <para>
1570       In <application>pg_ctl</>, support silent mode for service registrations
1571       on Windows (MauMau)
1572      </para>
1573     </listitem>
1574
1575     <listitem>
1576      <para>
1577       Fix <application>psql</>'s counting of script file line numbers during
1578       <literal>COPY</> from a different file (Tom Lane)
1579      </para>
1580     </listitem>
1581
1582     <listitem>
1583      <para>
1584       Fix <application>pg_restore</>'s direct-to-database mode for
1585       <varname>standard_conforming_strings</> (Tom Lane)
1586      </para>
1587
1588      <para>
1589       <application>pg_restore</> could emit incorrect commands when restoring
1590       directly to a database server from an archive file that had been made
1591       with <varname>standard_conforming_strings</> set to <literal>on</>.
1592      </para>
1593     </listitem>
1594
1595     <listitem>
1596      <para>
1597       Be more user-friendly about unsupported cases for parallel
1598       <application>pg_restore</> (Tom Lane)
1599      </para>
1600
1601      <para>
1602       This change ensures that such cases are detected and reported before
1603       any restore actions have been taken.
1604      </para>
1605     </listitem>
1606
1607     <listitem>
1608      <para>
1609       Fix write-past-buffer-end and memory leak in <application>libpq</>'s
1610       LDAP service lookup code (Albe Laurenz)
1611      </para>
1612     </listitem>
1613
1614     <listitem>
1615      <para>
1616       In <application>libpq</>, avoid failures when using nonblocking I/O
1617       and an SSL connection (Martin Pihlak, Tom Lane)
1618      </para>
1619     </listitem>
1620
1621     <listitem>
1622      <para>
1623       Improve libpq's handling of failures during connection startup
1624       (Tom Lane)
1625      </para>
1626
1627      <para>
1628       In particular, the response to a server report of <function>fork()</>
1629       failure during SSL connection startup is now saner.
1630      </para>
1631     </listitem>
1632
1633     <listitem>
1634      <para>
1635       Improve <application>libpq</>'s error reporting for SSL failures (Tom
1636       Lane)
1637      </para>
1638     </listitem>
1639
1640     <listitem>
1641      <para>
1642       Fix <function>PQsetvalue()</> to avoid possible crash when adding a new
1643       tuple to a <structname>PGresult</> originally obtained from a server
1644       query (Andrew Chernow)
1645      </para>
1646     </listitem>
1647
1648     <listitem>
1649      <para>
1650       Make <application>ecpglib</> write <type>double</> values with 15 digits
1651       precision (Akira Kurosawa)
1652      </para>
1653     </listitem>
1654
1655     <listitem>
1656      <para>
1657       In <application>ecpglib</>, be sure <literal>LC_NUMERIC</> setting is
1658       restored after an error (Michael Meskes)
1659      </para>
1660     </listitem>
1661
1662     <listitem>
1663      <para>
1664       Apply upstream fix for blowfish signed-character bug (CVE-2011-2483)
1665       (Tom Lane)
1666      </para>
1667
1668      <para>
1669       <filename>contrib/pg_crypto</>'s blowfish encryption code could give
1670       wrong results on platforms where char is signed (which is most),
1671       leading to encrypted passwords being weaker than they should be.
1672      </para>
1673     </listitem>
1674
1675     <listitem>
1676      <para>
1677       Fix memory leak in <filename>contrib/seg</> (Heikki Linnakangas)
1678      </para>
1679     </listitem>
1680
1681     <listitem>
1682      <para>
1683       Fix <function>pgstatindex()</> to give consistent results for empty
1684       indexes (Tom Lane)
1685      </para>
1686     </listitem>
1687
1688     <listitem>
1689      <para>
1690       Allow building with perl 5.14 (Alex Hunsaker)
1691      </para>
1692     </listitem>
1693
1694     <listitem>
1695      <para>
1696       Update configure script's method for probing existence of system
1697       functions (Tom Lane)
1698      </para>
1699
1700      <para>
1701       The version of autoconf we used in 8.3 and 8.2 could be fooled by
1702       compilers that perform link-time optimization.
1703      </para>
1704     </listitem>
1705
1706     <listitem>
1707      <para>
1708       Fix assorted issues with build and install file paths containing spaces
1709       (Tom Lane)
1710      </para>
1711     </listitem>
1712
1713     <listitem>
1714      <para>
1715       Update time zone data files to <application>tzdata</> release 2011i
1716       for DST law changes in Canada, Egypt, Russia, Samoa, and South Sudan.
1717      </para>
1718     </listitem>
1719
1720    </itemizedlist>
1721
1722   </sect2>
1723  </sect1>
1724
1725  <sect1 id="release-8-4-8">
1726   <title>Release 8.4.8</title>
1727
1728   <note>
1729   <title>Release Date</title>
1730   <simpara>2011-04-18</simpara>
1731   </note>
1732
1733   <para>
1734    This release contains a variety of fixes from 8.4.7.
1735    For information about new features in the 8.4 major release, see
1736    <xref linkend="release-8-4">.
1737   </para>
1738
1739   <sect2>
1740    <title>Migration to Version 8.4.8</title>
1741
1742    <para>
1743     A dump/restore is not required for those running 8.4.X.
1744    </para>
1745
1746    <para>
1747     However, if your installation was upgraded from a previous major
1748     release by running <application>pg_upgrade</>, you should take
1749     action to prevent possible data loss due to a now-fixed bug in
1750     <application>pg_upgrade</>.  The recommended solution is to run
1751     <command>VACUUM FREEZE</> on all TOAST tables.
1752     More information is available at <ulink
1753     url="http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix">
1754     http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix</ulink>.
1755    </para>
1756
1757    <para>
1758     Also, if you are upgrading from a version earlier than 8.4.2,
1759     see the release notes for 8.4.2.
1760    </para>
1761
1762   </sect2>
1763
1764   <sect2>
1765    <title>Changes</title>
1766
1767    <itemizedlist>
1768
1769     <listitem>
1770      <para>
1771       Fix <application>pg_upgrade</>'s handling of TOAST tables
1772       (Bruce Momjian)
1773      </para>
1774
1775      <para>
1776       The <structname>pg_class</>.<structfield>relfrozenxid</> value for
1777       TOAST tables was not correctly copied into the new installation
1778       during <application>pg_upgrade</>.  This could later result in
1779       <literal>pg_clog</> files being discarded while they were still
1780       needed to validate tuples in the TOAST tables, leading to
1781       <quote>could not access status of transaction</> failures.
1782      </para>
1783
1784      <para>
1785       This error poses a significant risk of data loss for installations
1786       that have been upgraded with <application>pg_upgrade</>.  This patch
1787       corrects the problem for future uses of <application>pg_upgrade</>,
1788       but does not in itself cure the issue in installations that have been
1789       processed with a buggy version of <application>pg_upgrade</>.
1790      </para>
1791     </listitem>
1792
1793     <listitem>
1794      <para>
1795       Suppress incorrect <quote>PD_ALL_VISIBLE flag was incorrectly set</>
1796       warning (Heikki Linnakangas)
1797      </para>
1798
1799      <para>
1800       <command>VACUUM</> would sometimes issue this warning in cases that
1801       are actually valid.
1802      </para>
1803     </listitem>
1804
1805     <listitem>
1806      <para>
1807       Disallow including a composite type in itself (Tom Lane)
1808      </para>
1809
1810      <para>
1811       This prevents scenarios wherein the server could recurse infinitely
1812       while processing the composite type.  While there are some possible
1813       uses for such a structure, they don't seem compelling enough to
1814       justify the effort required to make sure it always works safely.
1815      </para>
1816     </listitem>
1817
1818     <listitem>
1819      <para>
1820       Avoid potential deadlock during catalog cache initialization
1821       (Nikhil Sontakke)
1822      </para>
1823
1824      <para>
1825       In some cases the cache loading code would acquire share lock on a
1826       system index before locking the index's catalog.  This could deadlock
1827       against processes trying to acquire exclusive locks in the other,
1828       more standard order.
1829      </para>
1830     </listitem>
1831
1832     <listitem>
1833      <para>
1834       Fix dangling-pointer problem in <literal>BEFORE ROW UPDATE</> trigger
1835       handling when there was a concurrent update to the target tuple
1836       (Tom Lane)
1837      </para>
1838
1839      <para>
1840       This bug has been observed to result in intermittent <quote>cannot
1841       extract system attribute from virtual tuple</> failures while trying to
1842       do <literal>UPDATE RETURNING ctid</>.  There is a very small probability
1843       of more serious errors, such as generating incorrect index entries for
1844       the updated tuple.
1845      </para>
1846     </listitem>
1847
1848     <listitem>
1849      <para>
1850       Disallow <command>DROP TABLE</> when there are pending deferred trigger
1851       events for the table (Tom Lane)
1852      </para>
1853
1854      <para>
1855       Formerly the <command>DROP</> would go through, leading to
1856       <quote>could not open relation with OID nnn</> errors when the
1857       triggers were eventually fired.
1858      </para>
1859     </listitem>
1860
1861     <listitem>
1862      <para>
1863       Prevent crash triggered by constant-false WHERE conditions during
1864       GEQO optimization (Tom Lane)
1865      </para>
1866
1867      <para>
1868      </para>
1869     </listitem>
1870
1871     <listitem>
1872      <para>
1873       Improve planner's handling of semi-join and anti-join cases
1874       (Tom Lane)
1875      </para>
1876     </listitem>
1877
1878     <listitem>
1879      <para>
1880       Fix selectivity estimation for text search to account for NULLs
1881       (Jesper Krogh)
1882      </para>
1883     </listitem>
1884
1885     <listitem>
1886      <para>
1887       Improve PL/pgSQL's ability to handle row types with dropped columns
1888       (Pavel Stehule)
1889      </para>
1890
1891      <para>
1892       This is a back-patch of fixes previously made in 9.0.
1893      </para>
1894     </listitem>
1895
1896     <listitem>
1897      <para>
1898       Fix PL/Python memory leak involving array slices (Daniel Popowich)
1899      </para>
1900     </listitem>
1901
1902     <listitem>
1903      <para>
1904       Fix <application>pg_restore</> to cope with long lines (over 1KB) in
1905       TOC files (Tom Lane)
1906      </para>
1907     </listitem>
1908
1909     <listitem>
1910      <para>
1911       Put in more safeguards against crashing due to division-by-zero
1912       with overly enthusiastic compiler optimization (Aurelien Jarno)
1913      </para>
1914     </listitem>
1915
1916     <listitem>
1917      <para>
1918       Support use of dlopen() in FreeBSD and OpenBSD on MIPS (Tom Lane)
1919      </para>
1920
1921      <para>
1922       There was a hard-wired assumption that this system function was not
1923       available on MIPS hardware on these systems.  Use a compile-time test
1924       instead, since more recent versions have it.
1925      </para>
1926     </listitem>
1927
1928     <listitem>
1929      <para>
1930       Fix compilation failures on HP-UX (Heikki Linnakangas)
1931      </para>
1932     </listitem>
1933
1934     <listitem>
1935      <para>
1936       Fix version-incompatibility problem with <application>libintl</> on
1937       Windows (Hiroshi Inoue)
1938      </para>
1939     </listitem>
1940
1941     <listitem>
1942      <para>
1943       Fix usage of <application>xcopy</> in Windows build scripts to
1944       work correctly under Windows 7 (Andrew Dunstan)
1945      </para>
1946
1947      <para>
1948       This affects the build scripts only, not installation or usage.
1949      </para>
1950     </listitem>
1951
1952     <listitem>
1953      <para>
1954       Fix path separator used by <application>pg_regress</> on Cygwin
1955       (Andrew Dunstan)
1956      </para>
1957     </listitem>
1958
1959     <listitem>
1960      <para>
1961       Update time zone data files to <application>tzdata</> release 2011f
1962       for DST law changes in Chile, Cuba, Falkland Islands, Morocco, Samoa,
1963       and Turkey; also historical corrections for South Australia, Alaska,
1964       and Hawaii.
1965      </para>
1966     </listitem>
1967
1968    </itemizedlist>
1969
1970   </sect2>
1971  </sect1>
1972
1973  <sect1 id="release-8-4-7">
1974   <title>Release 8.4.7</title>
1975
1976   <note>
1977   <title>Release Date</title>
1978   <simpara>2011-01-31</simpara>
1979   </note>
1980
1981   <para>
1982    This release contains a variety of fixes from 8.4.6.
1983    For information about new features in the 8.4 major release, see
1984    <xref linkend="release-8-4">.
1985   </para>
1986
1987   <sect2>
1988    <title>Migration to Version 8.4.7</title>
1989
1990    <para>
1991     A dump/restore is not required for those running 8.4.X.
1992     However, if you are upgrading from a version earlier than 8.4.2,
1993     see the release notes for 8.4.2.
1994    </para>
1995
1996   </sect2>
1997
1998   <sect2>
1999    <title>Changes</title>
2000
2001    <itemizedlist>
2002
2003     <listitem>
2004      <para>
2005       Avoid failures when <command>EXPLAIN</> tries to display a simple-form
2006       <literal>CASE</> expression (Tom Lane)
2007      </para>
2008
2009      <para>
2010       If the <literal>CASE</>'s test expression was a constant, the planner
2011       could simplify the <literal>CASE</> into a form that confused the
2012       expression-display code, resulting in <quote>unexpected CASE WHEN
2013       clause</> errors.
2014      </para>
2015     </listitem>
2016
2017     <listitem>
2018      <para>
2019       Fix assignment to an array slice that is before the existing range
2020       of subscripts (Tom Lane)
2021      </para>
2022
2023      <para>
2024       If there was a gap between the newly added subscripts and the first
2025       pre-existing subscript, the code miscalculated how many entries needed
2026       to be copied from the old array's null bitmap, potentially leading to
2027       data corruption or crash.
2028      </para>
2029     </listitem>
2030
2031     <listitem>
2032      <para>
2033       Avoid unexpected conversion overflow in planner for very distant date
2034       values (Tom Lane)
2035      </para>
2036
2037      <para>
2038       The <type>date</> type supports a wider range of dates than can be
2039       represented by the <type>timestamp</> types, but the planner assumed it
2040       could always convert a date to timestamp with impunity.
2041      </para>
2042     </listitem>
2043
2044     <listitem>
2045      <para>
2046       Fix <application>pg_restore</>'s text output for large objects (BLOBs)
2047       when <varname>standard_conforming_strings</> is on (Tom Lane)
2048      </para>
2049
2050      <para>
2051       Although restoring directly to a database worked correctly, string
2052       escaping was incorrect if <application>pg_restore</> was asked for
2053       SQL text output and <varname>standard_conforming_strings</> had been
2054       enabled in the source database.
2055      </para>
2056     </listitem>
2057
2058     <listitem>
2059      <para>
2060       Fix erroneous parsing of <type>tsquery</> values containing
2061       <literal>... &amp; !(subexpression) | ...</literal> (Tom Lane)
2062      </para>
2063
2064      <para>
2065       Queries containing this combination of operators were not executed
2066       correctly.  The same error existed in <filename>contrib/intarray</>'s
2067       <type>query_int</> type and <filename>contrib/ltree</>'s
2068       <type>ltxtquery</> type.
2069      </para>
2070     </listitem>
2071
2072     <listitem>
2073      <para>
2074       Fix buffer overrun in <filename>contrib/intarray</>'s input function
2075       for the <type>query_int</> type (Apple)
2076      </para>
2077
2078      <para>
2079       This bug is a security risk since the function's return address could
2080       be overwritten.  Thanks to Apple Inc's security team for reporting this
2081       issue and supplying the fix.  (CVE-2010-4015)
2082      </para>
2083     </listitem>
2084
2085     <listitem>
2086      <para>
2087       Fix bug in <filename>contrib/seg</>'s GiST picksplit algorithm
2088       (Alexander Korotkov)
2089      </para>
2090
2091      <para>
2092       This could result in considerable inefficiency, though not actually
2093       incorrect answers, in a GiST index on a <type>seg</> column.
2094       If you have such an index, consider <command>REINDEX</>ing it after
2095       installing this update.  (This is identical to the bug that was fixed in
2096       <filename>contrib/cube</> in the previous update.)
2097      </para>
2098     </listitem>
2099
2100    </itemizedlist>
2101
2102   </sect2>
2103  </sect1>
2104
2105  <sect1 id="release-8-4-6">
2106   <title>Release 8.4.6</title>
2107
2108   <note>
2109   <title>Release Date</title>
2110   <simpara>2010-12-16</simpara>
2111   </note>
2112
2113   <para>
2114    This release contains a variety of fixes from 8.4.5.
2115    For information about new features in the 8.4 major release, see
2116    <xref linkend="release-8-4">.
2117   </para>
2118
2119   <sect2>
2120    <title>Migration to Version 8.4.6</title>
2121
2122    <para>
2123     A dump/restore is not required for those running 8.4.X.
2124     However, if you are upgrading from a version earlier than 8.4.2,
2125     see the release notes for 8.4.2.
2126    </para>
2127
2128   </sect2>
2129
2130   <sect2>
2131    <title>Changes</title>
2132
2133    <itemizedlist>
2134
2135     <listitem>
2136      <para>
2137       Force the default
2138       <link linkend="guc-wal-sync-method"><varname>wal_sync_method</></link>
2139       to be <literal>fdatasync</> on Linux (Tom Lane, Marti Raudsepp)
2140      </para>
2141
2142      <para>
2143       The default on Linux has actually been <literal>fdatasync</> for many
2144       years, but recent kernel changes caused <productname>PostgreSQL</> to
2145       choose <literal>open_datasync</> instead.  This choice did not result
2146       in any performance improvement, and caused outright failures on
2147       certain filesystems, notably <literal>ext4</> with the
2148       <literal>data=journal</> mount option.
2149      </para>
2150     </listitem>
2151
2152     <listitem>
2153      <para>
2154       Fix assorted bugs in WAL replay logic for GIN indexes (Tom Lane)
2155      </para>
2156
2157      <para>
2158       This could result in <quote>bad buffer id: 0</> failures or
2159       corruption of index contents during replication.
2160      </para>
2161     </listitem>
2162
2163     <listitem>
2164      <para>
2165       Fix recovery from base backup when the starting checkpoint WAL record
2166       is not in the same WAL segment as its redo point (Jeff Davis)
2167      </para>
2168     </listitem>
2169
2170     <listitem>
2171      <para>
2172       Fix persistent slowdown of autovacuum workers when multiple workers
2173       remain active for a long time (Tom Lane)
2174      </para>
2175
2176      <para>
2177       The effective <varname>vacuum_cost_limit</> for an autovacuum worker
2178       could drop to nearly zero if it processed enough tables, causing it
2179       to run extremely slowly.
2180      </para>
2181     </listitem>
2182
2183     <listitem>
2184      <para>
2185       Add support for detecting register-stack overrun on <literal>IA64</>
2186       (Tom Lane)
2187      </para>
2188
2189      <para>
2190       The <literal>IA64</> architecture has two hardware stacks.  Full
2191       prevention of stack-overrun failures requires checking both.
2192      </para>
2193     </listitem>
2194
2195     <listitem>
2196      <para>
2197       Add a check for stack overflow in <function>copyObject()</> (Tom Lane)
2198      </para>
2199
2200      <para>
2201       Certain code paths could crash due to stack overflow given a
2202       sufficiently complex query.
2203      </para>
2204     </listitem>
2205
2206     <listitem>
2207      <para>
2208       Fix detection of page splits in temporary GiST indexes (Heikki
2209       Linnakangas)
2210      </para>
2211
2212      <para>
2213       It is possible to have a <quote>concurrent</> page split in a
2214       temporary index, if for example there is an open cursor scanning the
2215       index when an insertion is done.  GiST failed to detect this case and
2216       hence could deliver wrong results when execution of the cursor
2217       continued.
2218      </para>
2219     </listitem>
2220
2221     <listitem>
2222      <para>
2223       Fix error checking during early connection processing (Tom Lane)
2224      </para>
2225
2226      <para>
2227       The check for too many child processes was skipped in some cases,
2228       possibly leading to postmaster crash when attempting to add the new
2229       child process to fixed-size arrays.
2230      </para>
2231     </listitem>
2232
2233     <listitem>
2234      <para>
2235       Improve efficiency of window functions (Tom Lane)
2236      </para>
2237
2238      <para>
2239       Certain cases where a large number of tuples needed to be read in
2240       advance, but <varname>work_mem</> was large enough to allow them all
2241       to be held in memory, were unexpectedly slow.
2242       <function>percent_rank()</>, <function>cume_dist()</> and
2243       <function>ntile()</> in particular were subject to this problem.
2244      </para>
2245     </listitem>
2246
2247     <listitem>
2248      <para>
2249       Avoid memory leakage while <command>ANALYZE</>'ing complex index
2250       expressions (Tom Lane)
2251      </para>
2252     </listitem>
2253
2254     <listitem>
2255      <para>
2256       Ensure an index that uses a whole-row Var still depends on its table
2257       (Tom Lane)
2258      </para>
2259
2260      <para>
2261       An index declared like <literal>create index i on t (foo(t.*))</>
2262       would not automatically get dropped when its table was dropped.
2263      </para>
2264     </listitem>
2265
2266     <listitem>
2267      <para>
2268       Do not <quote>inline</> a SQL function with multiple <literal>OUT</>
2269       parameters (Tom Lane)
2270      </para>
2271
2272      <para>
2273       This avoids a possible crash due to loss of information about the
2274       expected result rowtype.
2275      </para>
2276     </listitem>
2277
2278     <listitem>
2279      <para>
2280       Behave correctly if <literal>ORDER BY</>, <literal>LIMIT</>,
2281       <literal>FOR UPDATE</>, or <literal>WITH</> is attached to the
2282       <literal>VALUES</> part of <literal>INSERT ... VALUES</> (Tom Lane)
2283      </para>
2284     </listitem>
2285
2286     <listitem>
2287      <para>
2288       Fix constant-folding of <literal>COALESCE()</> expressions (Tom Lane)
2289      </para>
2290
2291      <para>
2292       The planner would sometimes attempt to evaluate sub-expressions that
2293       in fact could never be reached, possibly leading to unexpected errors.
2294      </para>
2295     </listitem>
2296
2297     <listitem>
2298      <para>
2299       Fix postmaster crash when connection acceptance
2300       (<function>accept()</> or one of the calls made immediately after it)
2301       fails, and the postmaster was compiled with GSSAPI support (Alexander
2302       Chernikov)
2303      </para>
2304     </listitem>
2305
2306     <listitem>
2307      <para>
2308       Fix missed unlink of temporary files when <varname>log_temp_files</>
2309       is active (Tom Lane)
2310      </para>
2311
2312      <para>
2313       If an error occurred while attempting to emit the log message, the
2314       unlink was not done, resulting in accumulation of temp files.
2315      </para>
2316     </listitem>
2317
2318     <listitem>
2319      <para>
2320       Add print functionality for <structname>InhRelation</> nodes (Tom Lane)
2321      </para>
2322
2323      <para>
2324       This avoids a failure when <varname>debug_print_parse</> is enabled
2325       and certain types of query are executed.
2326      </para>
2327     </listitem>
2328
2329     <listitem>
2330      <para>
2331       Fix incorrect calculation of distance from a point to a horizontal
2332       line segment (Tom Lane)
2333      </para>
2334
2335      <para>
2336       This bug affected several different geometric distance-measurement
2337       operators.
2338      </para>
2339     </listitem>
2340
2341     <listitem>
2342      <para>
2343       Fix incorrect calculation of transaction status in
2344       <application>ecpg</> (Itagaki Takahiro)
2345      </para>
2346     </listitem>
2347
2348     <listitem>
2349      <para>
2350       Fix <application>PL/pgSQL</>'s handling of <quote>simple</>
2351       expressions to not fail in recursion or error-recovery cases (Tom Lane)
2352      </para>
2353     </listitem>
2354
2355     <listitem>
2356      <para>
2357       Fix <application>PL/Python</>'s handling of set-returning functions
2358       (Jan Urbanski)
2359      </para>
2360
2361      <para>
2362       Attempts to call SPI functions within the iterator generating a set
2363       result would fail.
2364      </para>
2365     </listitem>
2366
2367     <listitem>
2368      <para>
2369       Fix bug in <filename>contrib/cube</>'s GiST picksplit algorithm
2370       (Alexander Korotkov)
2371      </para>
2372
2373      <para>
2374       This could result in considerable inefficiency, though not actually
2375       incorrect answers, in a GiST index on a <type>cube</> column.
2376       If you have such an index, consider <command>REINDEX</>ing it after
2377       installing this update.
2378      </para>
2379     </listitem>
2380
2381     <listitem>
2382      <para>
2383       Don't emit <quote>identifier will be truncated</> notices in
2384       <filename>contrib/dblink</> except when creating new connections
2385       (Itagaki Takahiro)
2386      </para>
2387     </listitem>
2388
2389     <listitem>
2390      <para>
2391       Fix potential coredump on missing public key in
2392       <filename>contrib/pgcrypto</> (Marti Raudsepp)
2393      </para>
2394     </listitem>
2395
2396     <listitem>
2397      <para>
2398       Fix memory leak in <filename>contrib/xml2</>'s XPath query functions
2399       (Tom Lane)
2400      </para>
2401     </listitem>
2402
2403     <listitem>
2404      <para>
2405       Update time zone data files to <application>tzdata</> release 2010o
2406       for DST law changes in Fiji and Samoa;
2407       also historical corrections for Hong Kong.
2408      </para>
2409     </listitem>
2410
2411    </itemizedlist>
2412
2413   </sect2>
2414  </sect1>
2415
2416  <sect1 id="release-8-4-5">
2417   <title>Release 8.4.5</title>
2418
2419   <note>
2420   <title>Release Date</title>
2421   <simpara>2010-10-04</simpara>
2422   </note>
2423
2424   <para>
2425    This release contains a variety of fixes from 8.4.4.
2426    For information about new features in the 8.4 major release, see
2427    <xref linkend="release-8-4">.
2428   </para>
2429
2430   <sect2>
2431    <title>Migration to Version 8.4.5</title>
2432
2433    <para>
2434     A dump/restore is not required for those running 8.4.X.
2435     However, if you are upgrading from a version earlier than 8.4.2,
2436     see the release notes for 8.4.2.
2437    </para>
2438
2439   </sect2>
2440
2441   <sect2>
2442    <title>Changes</title>
2443
2444    <itemizedlist>
2445
2446     <listitem>
2447      <para>
2448       Use a separate interpreter for each calling SQL userid in PL/Perl and
2449       PL/Tcl (Tom Lane)
2450      </para>
2451
2452      <para>
2453       This change prevents security problems that can be caused by subverting
2454       Perl or Tcl code that will be executed later in the same session under
2455       another SQL user identity (for example, within a <literal>SECURITY
2456       DEFINER</> function).  Most scripting languages offer numerous ways that
2457       that might be done, such as redefining standard functions or operators
2458       called by the target function.  Without this change, any SQL user with
2459       Perl or Tcl language usage rights can do essentially anything with the
2460       SQL privileges of the target function's owner.
2461      </para>
2462
2463      <para>
2464       The cost of this change is that intentional communication among Perl
2465       and Tcl functions becomes more difficult.  To provide an escape hatch,
2466       PL/PerlU and PL/TclU functions continue to use only one interpreter
2467       per session.  This is not considered a security issue since all such
2468       functions execute at the trust level of a database superuser already.
2469      </para>
2470
2471      <para>
2472       It is likely that third-party procedural languages that claim to offer
2473       trusted execution have similar security issues.  We advise contacting
2474       the authors of any PL you are depending on for security-critical
2475       purposes.
2476      </para>
2477
2478      <para>
2479       Our thanks to Tim Bunce for pointing out this issue (CVE-2010-3433).
2480      </para>
2481     </listitem>
2482
2483     <listitem>
2484      <para>
2485       Prevent possible crashes in <function>pg_get_expr()</> by disallowing
2486       it from being called with an argument that is not one of the system
2487       catalog columns it's intended to be used with
2488       (Heikki Linnakangas, Tom Lane)
2489      </para>
2490     </listitem>
2491
2492     <listitem>
2493      <para>
2494       Treat exit code 128 (<literal>ERROR_WAIT_NO_CHILDREN</>) as non-fatal on
2495       Windows (Magnus Hagander)
2496      </para>
2497
2498      <para>
2499       Under high load, Windows processes will sometimes fail at startup with
2500       this error code.  Formerly the postmaster treated this as a panic
2501       condition and restarted the whole database, but that seems to be
2502       an overreaction.
2503      </para>
2504     </listitem>
2505
2506     <listitem>
2507      <para>
2508       Fix incorrect placement of placeholder evaluation (Tom Lane)
2509      </para>
2510
2511      <para>
2512       This bug could result in query outputs being non-null when they
2513       should be null, in cases where the inner side of an outer join
2514       is a sub-select with non-strict expressions in its output list.
2515      </para>
2516     </listitem>
2517
2518     <listitem>
2519      <para>
2520       Fix possible duplicate scans of <literal>UNION ALL</> member relations
2521       (Tom Lane)
2522      </para>
2523     </listitem>
2524
2525     <listitem>
2526      <para>
2527       Fix <quote>cannot handle unplanned sub-select</quote> error (Tom Lane)
2528      </para>
2529
2530      <para>
2531       This occurred when a sub-select contains a join alias reference that
2532       expands into an expression containing another sub-select.
2533      </para>
2534     </listitem>
2535
2536     <listitem>
2537      <para>
2538       Fix mishandling of whole-row Vars that reference a view or sub-select
2539       and appear within a nested sub-select (Tom Lane)
2540      </para>
2541     </listitem>
2542
2543     <listitem>
2544      <para>
2545       Fix mishandling of cross-type <literal>IN</> comparisons (Tom Lane)
2546      </para>
2547
2548      <para>
2549       This could result in failures if the planner tried to implement an
2550       <literal>IN</> join with a sort-then-unique-then-plain-join plan.
2551      </para>
2552     </listitem>
2553
2554     <listitem>
2555      <para>
2556       Fix computation of <command>ANALYZE</> statistics for <type>tsvector</>
2557       columns (Jan Urbanski)
2558      </para>
2559
2560      <para>
2561       The original coding could produce incorrect statistics, leading to
2562       poor plan choices later.
2563      </para>
2564     </listitem>
2565
2566     <listitem>
2567      <para>
2568       Improve planner's estimate of memory used by <function>array_agg()</>,
2569       <function>string_agg()</>, and similar aggregate functions
2570       (Hitoshi Harada)
2571      </para>
2572
2573      <para>
2574       The previous drastic underestimate could lead to out-of-memory failures
2575       due to inappropriate choice of a hash-aggregation plan.
2576      </para>
2577     </listitem>
2578
2579     <listitem>
2580      <para>
2581       Fix failure to mark cached plans as transient (Tom Lane)
2582      </para>
2583
2584      <para>
2585       If a plan is prepared while <command>CREATE INDEX CONCURRENTLY</> is
2586       in progress for one of the referenced tables, it is supposed to be
2587       re-planned once the index is ready for use.  This was not happening
2588       reliably.
2589      </para>
2590     </listitem>
2591
2592     <listitem>
2593      <para>
2594       Reduce PANIC to ERROR in some occasionally-reported btree failure cases,
2595       and provide additional detail in the resulting error messages
2596       (Tom Lane)
2597      </para>
2598
2599      <para>
2600       This should improve the system's robustness with corrupted indexes.
2601      </para>
2602     </listitem>
2603
2604     <listitem>
2605      <para>
2606       Fix incorrect search logic for partial-match queries with GIN indexes
2607       (Tom Lane)
2608      </para>
2609
2610      <para>
2611       Cases involving AND/OR combination of several GIN index conditions
2612       didn't always give the right answer, and were sometimes much slower
2613       than necessary.
2614      </para>
2615     </listitem>
2616
2617     <listitem>
2618      <para>
2619       Prevent show_session_authorization() from crashing within autovacuum
2620       processes (Tom Lane)
2621      </para>
2622     </listitem>
2623
2624     <listitem>
2625      <para>
2626       Defend against functions returning setof record where not all the
2627       returned rows are actually of the same rowtype (Tom Lane)
2628      </para>
2629     </listitem>
2630
2631     <listitem>
2632      <para>
2633       Fix possible corruption of pending trigger event lists during
2634       subtransaction rollback (Tom Lane)
2635      </para>
2636
2637      <para>
2638       This could lead to a crash or incorrect firing of triggers.
2639      </para>
2640     </listitem>
2641
2642     <listitem>
2643      <para>
2644       Fix possible failure when hashing a pass-by-reference function result
2645       (Tao Ma, Tom Lane)
2646      </para>
2647     </listitem>
2648
2649     <listitem>
2650      <para>
2651       Improve merge join's handling of NULLs in the join columns (Tom Lane)
2652      </para>
2653
2654      <para>
2655       A merge join can now stop entirely upon reaching the first NULL,
2656       if the sort order is such that NULLs sort high.
2657      </para>
2658     </listitem>
2659
2660     <listitem>
2661      <para>
2662       Take care to fsync the contents of lockfiles (both
2663       <filename>postmaster.pid</> and the socket lockfile) while writing them
2664       (Tom Lane)
2665      </para>
2666
2667      <para>
2668       This omission could result in corrupted lockfile contents if the
2669       machine crashes shortly after postmaster start.  That could in turn
2670       prevent subsequent attempts to start the postmaster from succeeding,
2671       until the lockfile is manually removed.
2672      </para>
2673     </listitem>
2674
2675     <listitem>
2676      <para>
2677       Avoid recursion while assigning XIDs to heavily-nested
2678       subtransactions (Andres Freund, Robert Haas)
2679      </para>
2680
2681      <para>
2682       The original coding could result in a crash if there was limited
2683       stack space.
2684      </para>
2685     </listitem>
2686
2687     <listitem>
2688      <para>
2689       Avoid holding open old WAL segments in the walwriter process
2690       (Magnus Hagander, Heikki Linnakangas)
2691      </para>
2692
2693      <para>
2694       The previous coding would prevent removal of no-longer-needed segments.
2695      </para>
2696     </listitem>
2697
2698     <listitem>
2699      <para>
2700       Fix <varname>log_line_prefix</>'s <literal>%i</> escape,
2701       which could produce junk early in backend startup (Tom Lane)
2702      </para>
2703     </listitem>
2704
2705     <listitem>
2706      <para>
2707       Prevent misinterpretation of partially-specified relation options
2708       for TOAST tables (Itagaki Takahiro)
2709      </para>
2710
2711      <para>
2712       In particular, <literal>fillfactor</> would be read as zero if any
2713       other reloption had been set for the table, leading to serious bloat.
2714      </para>
2715     </listitem>
2716
2717     <listitem>
2718      <para>
2719       Fix inheritance count tracking in <command>ALTER TABLE ... ADD
2720       CONSTRAINT</> (Robert Haas)
2721      </para>
2722     </listitem>
2723
2724     <listitem>
2725      <para>
2726       Fix possible data corruption in <command>ALTER TABLE ... SET
2727       TABLESPACE</> when archiving is enabled (Jeff Davis)
2728      </para>
2729     </listitem>
2730
2731     <listitem>
2732      <para>
2733       Allow <command>CREATE DATABASE</> and <command>ALTER DATABASE ... SET
2734       TABLESPACE</> to be interrupted by query-cancel (Guillaume Lelarge)
2735      </para>
2736     </listitem>
2737
2738     <listitem>
2739      <para>
2740       Improve <command>CREATE INDEX</>'s checking of whether proposed index
2741       expressions are immutable (Tom Lane)
2742      </para>
2743     </listitem>
2744
2745     <listitem>
2746      <para>
2747       Fix <command>REASSIGN OWNED</> to handle operator classes and families
2748       (Asko Tiidumaa)
2749      </para>
2750     </listitem>
2751
2752     <listitem>
2753      <para>
2754       Fix possible core dump when comparing two empty <type>tsquery</> values
2755       (Tom Lane)
2756      </para>
2757     </listitem>
2758
2759     <listitem>
2760      <para>
2761       Fix <literal>LIKE</>'s handling of patterns containing <literal>%</>
2762       followed by <literal>_</> (Tom Lane)
2763      </para>
2764
2765      <para>
2766       We've fixed this before, but there were still some incorrectly-handled
2767       cases.
2768      </para>
2769     </listitem>
2770
2771     <listitem>
2772      <para>
2773       Re-allow input of Julian dates prior to 0001-01-01 AD (Tom Lane)
2774      </para>
2775
2776      <para>
2777       Input such as <literal>'J100000'::date</> worked before 8.4,
2778       but was unintentionally broken by added error-checking.
2779      </para>
2780     </listitem>
2781
2782     <listitem>
2783      <para>
2784       Fix PL/pgSQL to throw an error, not crash, if a cursor is closed within
2785       a <literal>FOR</> loop that is iterating over that cursor
2786       (Heikki Linnakangas)
2787      </para>
2788     </listitem>
2789
2790     <listitem>
2791      <para>
2792       In PL/Python, defend against null pointer results from
2793       <function>PyCObject_AsVoidPtr</> and <function>PyCObject_FromVoidPtr</>
2794       (Peter Eisentraut)
2795      </para>
2796     </listitem>
2797
2798     <listitem>
2799      <para>
2800       In <application>libpq</>, fix full SSL certificate verification for the
2801       case where both <literal>host</> and <literal>hostaddr</> are specified
2802       (Tom Lane)
2803      </para>
2804     </listitem>
2805
2806     <listitem>
2807      <para>
2808       Make psql recognize <command>DISCARD ALL</> as a command that should
2809       not be encased in a transaction block in autocommit-off mode
2810       (Itagaki Takahiro)
2811      </para>
2812     </listitem>
2813
2814     <listitem>
2815      <para>
2816       Fix some issues in <application>pg_dump</>'s handling of SQL/MED objects
2817       (Tom Lane)
2818      </para>
2819
2820      <para>
2821       Notably, <application>pg_dump</> would always fail if run by a
2822       non-superuser, which was not intended.
2823      </para>
2824     </listitem>
2825
2826     <listitem>
2827      <para>
2828       Improve <application>pg_dump</> and <application>pg_restore</>'s
2829       handling of non-seekable archive files (Tom Lane, Robert Haas)
2830      </para>
2831
2832      <para>
2833       This is important for proper functioning of parallel restore.
2834      </para>
2835     </listitem>
2836
2837     <listitem>
2838      <para>
2839       Improve parallel pg_restore's ability to cope with selective restore
2840       (<literal>-L</> option) (Tom Lane)
2841      </para>
2842
2843      <para>
2844       The original code tended to fail if the <literal>-L</> file commanded
2845       a non-default restore ordering.
2846      </para>
2847     </listitem>
2848
2849     <listitem>
2850      <para>
2851       Fix <application>ecpg</> to process data from <literal>RETURNING</>
2852       clauses correctly (Michael Meskes)
2853      </para>
2854     </listitem>
2855
2856     <listitem>
2857      <para>
2858       Fix some memory leaks in <application>ecpg</> (Zoltan Boszormenyi)
2859      </para>
2860     </listitem>
2861
2862     <listitem>
2863      <para>
2864       Improve <filename>contrib/dblink</>'s handling of tables containing
2865       dropped columns (Tom Lane)
2866      </para>
2867     </listitem>
2868
2869     <listitem>
2870      <para>
2871       Fix connection leak after <quote>duplicate connection name</quote>
2872       errors in <filename>contrib/dblink</> (Itagaki Takahiro)
2873      </para>
2874     </listitem>
2875
2876     <listitem>
2877      <para>
2878       Fix <filename>contrib/dblink</> to handle connection names longer than
2879       62 bytes correctly (Itagaki Takahiro)
2880      </para>
2881     </listitem>
2882
2883     <listitem>
2884      <para>
2885       Add <function>hstore(text, text)</>
2886       function to <filename>contrib/hstore</> (Robert Haas)
2887      </para>
2888
2889      <para>
2890       This function is the recommended substitute for the now-deprecated
2891       <literal>=&gt;</> operator.  It was back-patched so that future-proofed
2892       code can be used with older server versions.  Note that the patch will
2893       be effective only after <filename>contrib/hstore</> is installed or
2894       reinstalled in a particular database.  Users might prefer to execute
2895       the <command>CREATE FUNCTION</> command by hand, instead.
2896      </para>
2897     </listitem>
2898
2899     <listitem>
2900      <para>
2901       Update build infrastructure and documentation to reflect the source code
2902       repository's move from CVS to Git (Magnus Hagander and others)
2903      </para>
2904     </listitem>
2905
2906     <listitem>
2907      <para>
2908       Update time zone data files to <application>tzdata</> release 2010l
2909       for DST law changes in Egypt and Palestine; also historical corrections
2910       for Finland.
2911      </para>
2912
2913      <para>
2914       This change also adds new names for two Micronesian timezones:
2915       Pacific/Chuuk is now preferred over Pacific/Truk (and the preferred
2916       abbreviation is CHUT not TRUT) and Pacific/Pohnpei is preferred over
2917       Pacific/Ponape.
2918      </para>
2919     </listitem>
2920
2921     <listitem>
2922      <para>
2923       Make Windows' <quote>N. Central Asia Standard Time</> timezone map to
2924       Asia/Novosibirsk, not Asia/Almaty (Magnus Hagander)
2925      </para>
2926
2927      <para>
2928       Microsoft changed the DST behavior of this zone in the timezone update
2929       from KB976098. Asia/Novosibirsk is a better match to its new behavior.
2930      </para>
2931     </listitem>
2932
2933    </itemizedlist>
2934
2935   </sect2>
2936  </sect1>
2937
2938  <sect1 id="release-8-4-4">
2939   <title>Release 8.4.4</title>
2940
2941   <note>
2942   <title>Release Date</title>
2943   <simpara>2010-05-17</simpara>
2944   </note>
2945
2946   <para>
2947    This release contains a variety of fixes from 8.4.3.
2948    For information about new features in the 8.4 major release, see
2949    <xref linkend="release-8-4">.
2950   </para>
2951
2952   <sect2>
2953    <title>Migration to Version 8.4.4</title>
2954
2955    <para>
2956     A dump/restore is not required for those running 8.4.X.
2957     However, if you are upgrading from a version earlier than 8.4.2,
2958     see the release notes for 8.4.2.
2959    </para>
2960
2961   </sect2>
2962
2963   <sect2>
2964    <title>Changes</title>
2965
2966    <itemizedlist>
2967
2968     <listitem>
2969      <para>
2970       Enforce restrictions in <literal>plperl</> using an opmask applied to
2971       the whole interpreter, instead of using <filename>Safe.pm</>
2972       (Tim Bunce, Andrew Dunstan)
2973      </para>
2974
2975      <para>
2976       Recent developments have convinced us that <filename>Safe.pm</> is too
2977       insecure to rely on for making <literal>plperl</> trustable.  This
2978       change removes use of <filename>Safe.pm</> altogether, in favor of using
2979       a separate interpreter with an opcode mask that is always applied.
2980       Pleasant side effects of the change include that it is now possible to
2981       use Perl's <literal>strict</> pragma in a natural way in
2982       <literal>plperl</>, and that Perl's <literal>$a</> and <literal>$b</>
2983       variables work as expected in sort routines, and that function
2984       compilation is significantly faster.  (CVE-2010-1169)
2985      </para>
2986     </listitem>
2987
2988     <listitem>
2989      <para>
2990       Prevent PL/Tcl from executing untrustworthy code from
2991       <structname>pltcl_modules</> (Tom)
2992      </para>
2993
2994      <para>
2995       PL/Tcl's feature for autoloading Tcl code from a database table
2996       could be exploited for trojan-horse attacks, because there was no
2997       restriction on who could create or insert into that table.  This change
2998       disables the feature unless <structname>pltcl_modules</> is owned by a
2999       superuser.  (However, the permissions on the table are not checked, so
3000       installations that really need a less-than-secure modules table can
3001       still grant suitable privileges to trusted non-superusers.)  Also,
3002       prevent loading code into the unrestricted <quote>normal</> Tcl
3003       interpreter unless we are really going to execute a <literal>pltclu</>
3004       function.  (CVE-2010-1170)
3005      </para>
3006     </listitem>
3007
3008     <listitem>
3009      <para>
3010       Fix data corruption during WAL replay of
3011       <literal>ALTER ... SET TABLESPACE</> (Tom)
3012      </para>
3013
3014      <para>
3015       When <varname>archive_mode</> is on, <literal>ALTER ... SET TABLESPACE</>
3016       generates a WAL record whose replay logic was incorrect.  It could write
3017       the data to the wrong place, leading to possibly-unrecoverable data
3018       corruption.  Data corruption would be observed on standby slaves, and
3019       could occur on the master as well if a database crash and recovery
3020       occurred after committing the <literal>ALTER</> and before the next
3021       checkpoint.
3022      </para>
3023     </listitem>
3024
3025     <listitem>
3026      <para>
3027       Fix possible crash if a cache reset message is received during
3028       rebuild of a relcache entry (Heikki)
3029      </para>
3030
3031      <para>
3032       This error was introduced in 8.4.3 while fixing a related failure.
3033      </para>
3034     </listitem>
3035
3036     <listitem>
3037      <para>
3038       Apply per-function GUC settings while running the language validator
3039       for the function (Itagaki Takahiro)
3040      </para>
3041
3042      <para>
3043       This avoids failures if the function's code is invalid without the
3044       setting; an example is that SQL functions may not parse if the
3045       <varname>search_path</> is not correct.
3046      </para>
3047     </listitem>
3048
3049     <listitem>
3050      <para>
3051       Do constraint exclusion for inherited <command>UPDATE</> and
3052       <command>DELETE</> target tables when
3053       <varname>constraint_exclusion</> = <literal>partition</> (Tom)
3054      </para>
3055
3056      <para>
3057       Due to an oversight, this setting previously only caused constraint
3058       exclusion to be checked in <command>SELECT</> commands.
3059      </para>
3060     </listitem>
3061
3062     <listitem>
3063      <para>
3064       Do not allow an unprivileged user to reset superuser-only parameter
3065       settings (Alvaro)
3066      </para>
3067
3068      <para>
3069       Previously, if an unprivileged user ran <literal>ALTER USER ... RESET
3070       ALL</> for himself, or <literal>ALTER DATABASE ... RESET ALL</> for
3071       a database he owns, this would remove all special parameter settings
3072       for the user or database, even ones that are only supposed to be
3073       changeable by a superuser.  Now, the <command>ALTER</> will only
3074       remove the parameters that the user has permission to change.
3075      </para>
3076     </listitem>
3077
3078     <listitem>
3079      <para>
3080       Avoid possible crash during backend shutdown if shutdown occurs
3081       when a <literal>CONTEXT</> addition would be made to log entries (Tom)
3082      </para>
3083
3084      <para>
3085       In some cases the context-printing function would fail because the
3086       current transaction had already been rolled back when it came time
3087       to print a log message.
3088      </para>
3089     </listitem>
3090
3091     <listitem>
3092      <para>
3093       Fix erroneous handling of <literal>%r</> parameter in
3094       <varname>recovery_end_command</> (Heikki)
3095      </para>
3096
3097      <para>
3098       The value always came out zero.
3099      </para>
3100     </listitem>
3101
3102     <listitem>
3103      <para>
3104       Ensure the archiver process responds to changes in
3105       <varname>archive_command</> as soon as possible (Tom)
3106      </para>
3107     </listitem>
3108
3109     <listitem>
3110      <para>
3111       Fix pl/pgsql's <literal>CASE</> statement to not fail when the
3112       case expression is a query that returns no rows (Tom)
3113      </para>
3114     </listitem>
3115
3116     <listitem>
3117      <para>
3118       Update pl/perl's <filename>ppport.h</> for modern Perl versions
3119       (Andrew)
3120      </para>
3121     </listitem>
3122
3123     <listitem>
3124      <para>
3125       Fix assorted memory leaks in pl/python (Andreas Freund, Tom)
3126      </para>
3127     </listitem>
3128
3129     <listitem>
3130      <para>
3131       Handle empty-string connect parameters properly in ecpg (Michael)
3132      </para>
3133     </listitem>
3134
3135     <listitem>
3136      <para>
3137       Prevent infinite recursion in <application>psql</> when expanding
3138       a variable that refers to itself (Tom)
3139      </para>
3140     </listitem>
3141
3142     <listitem>
3143      <para>
3144       Fix <application>psql</>'s <literal>\copy</> to not add spaces around
3145       a dot within <literal>\copy (select ...)</> (Tom)
3146      </para>
3147
3148      <para>
3149       Addition of spaces around the decimal point in a numeric literal would
3150       result in a syntax error.
3151      </para>
3152     </listitem>
3153
3154     <listitem>
3155      <para>
3156       Avoid formatting failure in <application>psql</> when running in a
3157       locale context that doesn't match the <varname>client_encoding</>
3158       (Tom)
3159      </para>
3160     </listitem>
3161
3162     <listitem>
3163      <para>
3164       Fix unnecessary <quote>GIN indexes do not support whole-index scans</>
3165       errors for unsatisfiable queries using <filename>contrib/intarray</>
3166       operators (Tom)
3167      </para>
3168     </listitem>
3169
3170     <listitem>
3171      <para>
3172       Ensure that <filename>contrib/pgstattuple</> functions respond to cancel
3173       interrupts promptly (Tatsuhito Kasahara)
3174      </para>
3175     </listitem>
3176
3177     <listitem>
3178      <para>
3179       Make server startup deal properly with the case that
3180       <function>shmget()</> returns <literal>EINVAL</> for an existing
3181       shared memory segment (Tom)
3182      </para>
3183
3184      <para>
3185       This behavior has been observed on BSD-derived kernels including OS X.
3186       It resulted in an entirely-misleading startup failure complaining that
3187       the shared memory request size was too large.
3188      </para>
3189     </listitem>
3190
3191     <listitem>
3192      <para>
3193       Avoid possible crashes in syslogger process on Windows (Heikki)
3194      </para>
3195     </listitem>
3196
3197     <listitem>
3198      <para>
3199       Deal more robustly with incomplete time zone information in the
3200       Windows registry (Magnus)
3201      </para>
3202     </listitem>
3203
3204     <listitem>
3205      <para>
3206       Update the set of known Windows time zone names (Magnus)
3207      </para>
3208     </listitem>
3209
3210     <listitem>
3211      <para>
3212       Update time zone data files to <application>tzdata</> release 2010j
3213       for DST law changes in Argentina, Australian Antarctic, Bangladesh,
3214       Mexico, Morocco, Pakistan, Palestine, Russia, Syria, Tunisia;
3215       also historical corrections for Taiwan.
3216      </para>
3217
3218      <para>
3219       Also, add <literal>PKST</> (Pakistan Summer Time) to the default set of
3220       timezone abbreviations.
3221      </para>
3222     </listitem>
3223
3224    </itemizedlist>
3225
3226   </sect2>
3227  </sect1>
3228
3229  <sect1 id="release-8-4-3">
3230   <title>Release 8.4.3</title>
3231
3232   <note>
3233   <title>Release Date</title>
3234   <simpara>2010-03-15</simpara>
3235   </note>
3236
3237   <para>
3238    This release contains a variety of fixes from 8.4.2.
3239    For information about new features in the 8.4 major release, see
3240    <xref linkend="release-8-4">.
3241   </para>
3242
3243   <sect2>
3244    <title>Migration to Version 8.4.3</title>
3245
3246    <para>
3247     A dump/restore is not required for those running 8.4.X.
3248     However, if you are upgrading from a version earlier than 8.4.2,
3249     see the release notes for 8.4.2.
3250    </para>
3251
3252   </sect2>
3253
3254   <sect2>
3255    <title>Changes</title>
3256
3257    <itemizedlist>
3258
3259     <listitem>
3260      <para>
3261       Add new configuration parameter <varname>ssl_renegotiation_limit</> to
3262       control how often we do session key renegotiation for an SSL connection
3263       (Magnus)
3264      </para>
3265
3266      <para>
3267       This can be set to zero to disable renegotiation completely, which may
3268       be required if a broken SSL library is used.  In particular, some
3269       vendors are shipping stopgap patches for CVE-2009-3555 that cause
3270       renegotiation attempts to fail.
3271      </para>
3272     </listitem>
3273
3274     <listitem>
3275      <para>
3276       Fix possible deadlock during backend startup (Tom)
3277      </para>
3278     </listitem>
3279
3280     <listitem>
3281      <para>
3282       Fix possible crashes due to not handling errors during relcache reload
3283       cleanly (Tom)
3284      </para>
3285     </listitem>
3286
3287     <listitem>
3288      <para>
3289       Fix possible crash due to use of dangling pointer to a cached plan
3290       (Tatsuo)
3291      </para>
3292     </listitem>
3293
3294     <listitem>
3295      <para>
3296       Fix possible crash due to overenthusiastic invalidation of cached
3297       plan for <command>ROLLBACK</> (Tom)
3298      </para>
3299     </listitem>
3300
3301     <listitem>
3302      <para>
3303       Fix possible crashes when trying to recover from a failure in
3304       subtransaction start (Tom)
3305      </para>
3306     </listitem>
3307
3308     <listitem>
3309      <para>
3310       Fix server memory leak associated with use of savepoints and a client
3311       encoding different from server's encoding (Tom)
3312      </para>
3313     </listitem>
3314
3315     <listitem>
3316      <para>
3317       Fix incorrect WAL data emitted during end-of-recovery cleanup of a GIST
3318       index page split (Yoichi Hirai)
3319      </para>
3320
3321      <para>
3322       This would result in index corruption, or even more likely an error
3323       during WAL replay, if we were unlucky enough to crash during
3324       end-of-recovery cleanup after having completed an incomplete GIST
3325       insertion.
3326      </para>
3327     </listitem>
3328
3329     <listitem>
3330      <para>
3331       Fix bug in WAL redo cleanup method for GIN indexes (Heikki)
3332      </para>
3333     </listitem>
3334
3335     <listitem>
3336      <para>
3337       Fix incorrect comparison of scan key in GIN index search (Teodor)
3338      </para>
3339     </listitem>
3340
3341     <listitem>
3342      <para>
3343       Make <function>substring()</> for <type>bit</> types treat any negative
3344       length as meaning <quote>all the rest of the string</> (Tom)
3345      </para>
3346
3347      <para>
3348       The previous coding treated only -1 that way, and would produce an
3349       invalid result value for other negative values, possibly leading to
3350       a crash (CVE-2010-0442).
3351      </para>
3352     </listitem>
3353
3354     <listitem>
3355      <para>
3356       Fix integer-to-bit-string conversions to handle the first fractional
3357       byte correctly when the output bit width is wider than the given
3358       integer by something other than a multiple of 8 bits (Tom)
3359      </para>
3360     </listitem>
3361
3362     <listitem>
3363      <para>
3364       Fix some cases of pathologically slow regular expression matching (Tom)
3365      </para>
3366     </listitem>
3367
3368     <listitem>
3369      <para>
3370       Fix bug occurring when trying to inline a SQL function that returns
3371       a set of a composite type that contains dropped columns (Tom)
3372      </para>
3373     </listitem>
3374
3375     <listitem>
3376      <para>
3377       Fix bug with trying to update a field of an element of a
3378       composite-type array column (Tom)
3379      </para>
3380     </listitem>
3381
3382     <listitem>
3383      <para>
3384       Avoid failure when <command>EXPLAIN</> has to print a FieldStore or
3385       assignment ArrayRef expression (Tom)
3386      </para>
3387
3388      <para>
3389       These cases can arise now that <command>EXPLAIN VERBOSE</> tries to
3390       print plan node target lists.
3391      </para>
3392     </listitem>
3393
3394     <listitem>
3395      <para>
3396       Avoid an unnecessary coercion failure in some cases where an undecorated
3397       literal string appears in a subquery within
3398       <command>UNION</>/<command>INTERSECT</>/<command>EXCEPT</> (Tom)
3399      </para>
3400
3401      <para>
3402       This fixes a regression for some cases that worked before 8.4.
3403      </para>
3404     </listitem>
3405
3406     <listitem>
3407      <para>
3408       Avoid undesirable rowtype compatibility check failures in some cases
3409       where a whole-row Var has a rowtype that contains dropped columns (Tom)
3410      </para>
3411     </listitem>
3412
3413     <listitem>
3414      <para>
3415       Fix the <literal>STOP WAL LOCATION</> entry in backup history files to
3416       report the next WAL segment's name when the end location is exactly at a
3417       segment boundary (Itagaki Takahiro)
3418      </para>
3419     </listitem>
3420
3421     <listitem>
3422      <para>
3423       Always pass the catalog ID to an option validator function specified in
3424       <command>CREATE FOREIGN DATA WRAPPER</> (Martin Pihlak)
3425      </para>
3426     </listitem>
3427
3428     <listitem>
3429      <para>
3430       Fix some more cases of temporary-file leakage (Heikki)
3431      </para>
3432
3433      <para>
3434       This corrects a problem introduced in the previous minor release.
3435       One case that failed is when a plpgsql function returning set is
3436       called within another function's exception handler.
3437      </para>
3438     </listitem>
3439
3440     <listitem>
3441      <para>
3442       Add support for doing <literal>FULL JOIN ON FALSE</> (Tom)
3443      </para>
3444
3445      <para>
3446       This prevents a regression from pre-8.4 releases for some queries that
3447       can now be simplified to a constant-false join condition.
3448      </para>
3449     </listitem>
3450
3451     <listitem>
3452      <para>
3453       Improve constraint exclusion processing of boolean-variable cases,
3454       in particular make it possible to exclude a partition that has a
3455       <quote>bool_column = false</> constraint (Tom)
3456      </para>
3457     </listitem>
3458
3459     <listitem>
3460      <para>
3461       Prevent treating an <literal>INOUT</> cast as representing binary
3462       compatibility (Heikki)
3463      </para>
3464     </listitem>
3465
3466     <listitem>
3467      <para>
3468       Include column name in the message when warning about inability to
3469       grant or revoke column-level privileges (Stephen Frost)
3470      </para>
3471
3472      <para>
3473       This is more useful than before and helps to prevent confusion when
3474       a <command>REVOKE</> generates multiple messages, which formerly
3475       appeared to be duplicates.
3476      </para>
3477     </listitem>
3478
3479     <listitem>
3480      <para>
3481       When reading <filename>pg_hba.conf</> and related files, do not treat
3482       <literal>@something</> as a file inclusion request if the <literal>@</>
3483       appears inside quote marks; also, never treat <literal>@</> by itself
3484       as a file inclusion request (Tom)
3485      </para>
3486
3487      <para>
3488       This prevents erratic behavior if a role or database name starts with
3489       <literal>@</>.  If you need to include a file whose path name
3490       contains spaces, you can still do so, but you must write
3491       <literal>@"/path to/file"</> rather than putting the quotes around
3492       the whole construct.
3493      </para>
3494     </listitem>
3495
3496     <listitem>
3497      <para>
3498       Prevent infinite loop on some platforms if a directory is named as
3499       an inclusion target in <filename>pg_hba.conf</> and related files
3500       (Tom)
3501      </para>
3502     </listitem>
3503
3504     <listitem>
3505      <para>
3506       Fix possible infinite loop if <function>SSL_read</> or
3507       <function>SSL_write</> fails without setting <varname>errno</> (Tom)
3508      </para>
3509
3510      <para>
3511       This is reportedly possible with some Windows versions of
3512       <application>openssl</>.
3513      </para>
3514     </listitem>
3515
3516     <listitem>
3517      <para>
3518       Disallow <acronym>GSSAPI</> authentication on local connections,
3519       since it requires a hostname to function correctly (Magnus)
3520      </para>
3521     </listitem>
3522
3523     <listitem>
3524      <para>
3525       Protect <application>ecpg</> against applications freeing strings
3526       unexpectedly (Michael)
3527      </para>
3528     </listitem>
3529
3530     <listitem>
3531      <para>
3532       Make <application>ecpg</> report the proper SQLSTATE if the connection
3533       disappears (Michael)
3534      </para>
3535     </listitem>
3536
3537     <listitem>
3538      <para>
3539       Fix translation of cell contents in <application>psql</> <literal>\d</>
3540       output (Heikki)
3541      </para>
3542     </listitem>
3543
3544     <listitem>
3545      <para>
3546       Fix <application>psql</>'s <literal>numericlocale</> option to not
3547       format strings it shouldn't in latex and troff output formats (Heikki)
3548      </para>
3549     </listitem>
3550
3551     <listitem>
3552      <para>
3553       Fix a small per-query memory leak in <application>psql</> (Tom)
3554      </para>
3555     </listitem>
3556
3557     <listitem>
3558      <para>
3559       Make <application>psql</> return the correct exit status (3) when
3560       <literal>ON_ERROR_STOP</> and <literal>--single-transaction</> are
3561       both specified and an error occurs during the implied <command>COMMIT</>
3562       (Bruce)
3563      </para>
3564     </listitem>
3565
3566     <listitem>
3567      <para>
3568       Fix <application>pg_dump</>'s output of permissions for foreign servers
3569       (Heikki)
3570      </para>
3571     </listitem>
3572
3573     <listitem>
3574      <para>
3575       Fix possible crash in parallel <application>pg_restore</> due to
3576       out-of-range dependency IDs (Tom)
3577      </para>
3578     </listitem>
3579
3580     <listitem>
3581      <para>
3582       Fix plpgsql failure in one case where a composite column is set to NULL
3583       (Tom)
3584      </para>
3585     </listitem>
3586
3587     <listitem>
3588      <para>
3589       Fix possible failure when calling PL/Perl functions from PL/PerlU
3590       or vice versa (Tim Bunce)
3591      </para>
3592     </listitem>
3593
3594     <listitem>
3595      <para>
3596       Add <literal>volatile</> markings in PL/Python to avoid possible
3597       compiler-specific misbehavior (Zdenek Kotala)
3598      </para>
3599     </listitem>
3600
3601     <listitem>
3602      <para>
3603       Ensure PL/Tcl initializes the Tcl interpreter fully (Tom)
3604      </para>
3605
3606      <para>
3607       The only known symptom of this oversight is that the Tcl
3608       <literal>clock</> command misbehaves if using Tcl 8.5 or later.
3609      </para>
3610     </listitem>
3611
3612     <listitem>
3613      <para>
3614       Prevent <function>ExecutorEnd</> from being run on portals created
3615       within a failed transaction or subtransaction (Tom)
3616      </para>
3617
3618      <para>
3619       This is known to cause issues when using
3620       <filename>contrib/auto_explain</>.
3621      </para>
3622     </listitem>
3623
3624     <listitem>
3625      <para>
3626       Prevent crash in <filename>contrib/dblink</> when too many key
3627       columns are specified to a <function>dblink_build_sql_*</> function
3628       (Rushabh Lathia, Joe Conway)
3629      </para>
3630     </listitem>
3631
3632     <listitem>
3633      <para>
3634       Allow zero-dimensional arrays in <filename>contrib/ltree</> operations
3635       (Tom)
3636      </para>
3637
3638      <para>
3639       This case was formerly rejected as an error, but it's more convenient to
3640       treat it the same as a zero-element array.  In particular this avoids
3641       unnecessary failures when an <type>ltree</> operation is applied to the
3642       result of <literal>ARRAY(SELECT ...)</> and the sub-select returns no
3643       rows.
3644      </para>
3645     </listitem>
3646
3647     <listitem>
3648      <para>
3649       Fix assorted crashes in <filename>contrib/xml2</> caused by sloppy
3650       memory management (Tom)
3651      </para>
3652     </listitem>
3653
3654     <listitem>
3655      <para>
3656       Make building of <filename>contrib/xml2</> more robust on Windows
3657       (Andrew)
3658      </para>
3659     </listitem>
3660
3661     <listitem>
3662      <para>
3663       Fix race condition in Windows signal handling (Radu Ilie)
3664      </para>
3665
3666      <para>
3667       One known symptom of this bug is that rows in <structname>pg_listener</>
3668       could be dropped under heavy load.
3669      </para>
3670     </listitem>
3671
3672     <listitem>
3673      <para>
3674       Make the configure script report failure if the C compiler does
3675       not provide a working 64-bit integer datatype (Tom)
3676      </para>
3677
3678      <para>
3679       This case has been broken for some time, and no longer seems worth
3680       supporting, so just reject it at configure time instead.
3681      </para>
3682     </listitem>
3683
3684     <listitem>
3685      <para>
3686       Update time zone data files to <application>tzdata</> release 2010e
3687       for DST law changes in Bangladesh, Chile, Fiji, Mexico, Paraguay, Samoa.
3688      </para>
3689     </listitem>
3690
3691    </itemizedlist>
3692
3693   </sect2>
3694  </sect1>
3695
3696  <sect1 id="release-8-4-2">
3697   <title>Release 8.4.2</title>
3698
3699   <note>
3700   <title>Release Date</title>
3701   <simpara>2009-12-14</simpara>
3702   </note>
3703
3704   <para>
3705    This release contains a variety of fixes from 8.4.1.
3706    For information about new features in the 8.4 major release, see
3707    <xref linkend="release-8-4">.
3708   </para>
3709
3710   <sect2>
3711    <title>Migration to Version 8.4.2</title>
3712
3713    <para>
3714     A dump/restore is not required for those running 8.4.X.
3715     However, if you have any hash indexes,
3716     you should <command>REINDEX</> them after updating to 8.4.2,
3717     to repair possible damage.
3718    </para>
3719
3720   </sect2>
3721
3722   <sect2>
3723    <title>Changes</title>
3724
3725    <itemizedlist>
3726
3727     <listitem>
3728      <para>
3729       Protect against indirect security threats caused by index functions
3730       changing session-local state (Gurjeet Singh, Tom)
3731      </para>
3732
3733      <para>
3734       This change prevents allegedly-immutable index functions from possibly
3735       subverting a superuser's session (CVE-2009-4136).
3736      </para>
3737     </listitem>
3738
3739     <listitem>
3740      <para>
3741       Reject SSL certificates containing an embedded null byte in the common
3742       name (CN) field (Magnus)
3743      </para>
3744
3745      <para>
3746       This prevents unintended matching of a certificate to a server or client
3747       name during SSL validation (CVE-2009-4034).
3748      </para>
3749     </listitem>
3750
3751     <listitem>
3752      <para>
3753       Fix hash index corruption (Tom)
3754      </para>
3755
3756      <para>
3757       The 8.4 change that made hash indexes keep entries sorted by hash value
3758       failed to update the bucket splitting and compaction routines to
3759       preserve the ordering.  So application of either of those operations
3760       could lead to permanent corruption of an index, in the sense that
3761       searches might fail to find entries that are present.  To deal with
3762       this, it is recommended to <literal>REINDEX</> any hash indexes you may
3763       have after installing this update.
3764      </para>
3765     </listitem>
3766
3767     <listitem>
3768      <para>
3769       Fix possible crash during backend-startup-time cache initialization (Tom)
3770      </para>
3771     </listitem>
3772
3773     <listitem>
3774      <para>
3775       Avoid crash on empty thesaurus dictionary (Tom)
3776      </para>
3777     </listitem>
3778
3779     <listitem>
3780      <para>
3781       Prevent signals from interrupting <literal>VACUUM</> at unsafe times
3782       (Alvaro)
3783      </para>
3784
3785      <para>
3786       This fix prevents a PANIC if a <literal>VACUUM FULL</> is canceled
3787       after it's already committed its tuple movements, as well as transient
3788       errors if a plain <literal>VACUUM</> is interrupted after having
3789       truncated the table.
3790      </para>
3791     </listitem>
3792
3793     <listitem>
3794      <para>
3795       Fix possible crash due to integer overflow in hash table size
3796       calculation (Tom)
3797      </para>
3798
3799      <para>
3800       This could occur with extremely large planner estimates for the size of
3801       a hashjoin's result.
3802      </para>
3803     </listitem>
3804
3805     <listitem>
3806      <para>
3807       Fix crash if a <literal>DROP</> is attempted on an internally-dependent
3808       object (Tom)
3809      </para>
3810     </listitem>
3811
3812     <listitem>
3813      <para>
3814       Fix very rare crash in <type>inet</>/<type>cidr</> comparisons (Chris
3815       Mikkelson)
3816      </para>
3817     </listitem>
3818
3819     <listitem>
3820      <para>
3821       Ensure that shared tuple-level locks held by prepared transactions are
3822       not ignored (Heikki)
3823      </para>
3824     </listitem>
3825
3826     <listitem>
3827      <para>
3828       Fix premature drop of temporary files used for a cursor that is accessed
3829       within a subtransaction (Heikki)
3830      </para>
3831     </listitem>
3832
3833     <listitem>
3834      <para>
3835       Fix memory leak in syslogger process when rotating to a new CSV logfile
3836       (Tom)
3837      </para>
3838     </listitem>
3839
3840     <listitem>
3841      <para>
3842       Fix memory leak in postmaster when re-parsing <filename>pg_hba.conf</>
3843       (Tom)
3844      </para>
3845     </listitem>
3846
3847     <listitem>
3848      <para>
3849       Fix Windows permission-downgrade logic (Jesse Morris)
3850      </para>
3851
3852      <para>
3853       This fixes some cases where the database failed to start on Windows,
3854       often with misleading error messages such as <quote>could not locate
3855       matching postgres executable</quote>.
3856      </para>
3857     </listitem>
3858
3859     <listitem>
3860      <para>
3861       Make <literal>FOR UPDATE/SHARE</> in the primary query not propagate
3862       into <literal>WITH</> queries (Tom)
3863      </para>
3864
3865      <para>
3866       For example, in
3867 <programlisting>
3868 WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE
3869 </programlisting>
3870       the <literal>FOR UPDATE</> will now affect <literal>bar</> but not
3871       <literal>foo</>.  This is more useful and consistent than the original
3872       8.4 behavior, which tried to propagate <literal>FOR UPDATE</> into the
3873       <literal>WITH</> query but always failed due to assorted implementation
3874       restrictions.  It also follows the design rule that <literal>WITH</>
3875       queries are executed as if independent of the main query.
3876      </para>
3877     </listitem>
3878
3879     <listitem>
3880      <para>
3881       Fix bug with a <literal>WITH RECURSIVE</> query immediately inside
3882       another one (Tom)
3883      </para>
3884     </listitem>
3885
3886     <listitem>
3887      <para>
3888       Fix concurrency bug in hash indexes (Tom)
3889      </para>
3890
3891      <para>
3892       Concurrent insertions could cause index scans to transiently report
3893       wrong results.
3894      </para>
3895     </listitem>
3896
3897     <listitem>
3898      <para>
3899       Fix incorrect logic for GiST index page splits, when the split depends
3900       on a non-first column of the index (Paul Ramsey)
3901      </para>
3902     </listitem>
3903
3904     <listitem>
3905      <para>
3906       Fix wrong search results for a multi-column GIN index with
3907       <literal>fastupdate</> enabled (Teodor)
3908      </para>
3909     </listitem>
3910
3911     <listitem>
3912      <para>
3913       Fix bugs in WAL entry creation for GIN indexes (Tom)
3914      </para>
3915
3916      <para>
3917       These bugs were masked when <varname>full_page_writes</> was on, but
3918       with it off a WAL replay failure was certain if a crash occurred before
3919       the next checkpoint.
3920      </para>
3921     </listitem>
3922
3923     <listitem>
3924      <para>
3925       Don't error out if recycling or removing an old WAL file fails at the
3926       end of checkpoint (Heikki)
3927      </para>
3928
3929      <para>
3930       It's better to treat the problem as non-fatal and allow the checkpoint
3931       to complete.  Future checkpoints will retry the removal.  Such problems
3932       are not expected in normal operation, but have been seen to be
3933       caused by misdesigned Windows anti-virus and backup software.
3934      </para>
3935     </listitem>
3936
3937     <listitem>
3938      <para>
3939       Ensure WAL files aren't repeatedly archived on Windows (Heikki)
3940      </para>
3941
3942      <para>
3943       This is another symptom that could happen if some other process
3944       interfered with deletion of a no-longer-needed file.
3945      </para>
3946     </listitem>
3947
3948     <listitem>
3949      <para>
3950       Fix PAM password processing to be more robust (Tom)
3951      </para>
3952
3953      <para>
3954       The previous code is known to fail with the combination of the Linux
3955       <literal>pam_krb5</> PAM module with Microsoft Active Directory as the
3956       domain controller.  It might have problems elsewhere too, since it was
3957       making unjustified assumptions about what arguments the PAM stack would
3958       pass to it.
3959      </para>
3960     </listitem>
3961
3962     <listitem>
3963      <para>
3964       Raise the maximum authentication token (Kerberos ticket) size in GSSAPI
3965       and SSPI authentication methods (Ian Turner)
3966      </para>
3967
3968      <para>
3969       While the old 2000-byte limit was more than enough for Unix Kerberos
3970       implementations, tickets issued by Windows Domain Controllers can be
3971       much larger.
3972      </para>
3973     </listitem>
3974
3975     <listitem>
3976      <para>
3977       Ensure that domain constraints are enforced in constructs like
3978       <literal>ARRAY[...]::domain</>, where the domain is over an array type
3979       (Heikki)
3980      </para>
3981     </listitem>
3982
3983     <listitem>
3984      <para>
3985       Fix foreign-key logic for some cases involving composite-type columns
3986       as foreign keys (Tom)
3987      </para>
3988     </listitem>
3989
3990     <listitem>
3991      <para>
3992       Ensure that a cursor's snapshot is not modified after it is created
3993       (Alvaro)
3994      </para>
3995
3996      <para>
3997       This could lead to a cursor delivering wrong results if later operations
3998       in the same transaction modify the data the cursor is supposed to return.
3999      </para>
4000     </listitem>
4001
4002     <listitem>
4003      <para>
4004       Fix <literal>CREATE TABLE</> to properly merge default expressions
4005       coming from different inheritance parent tables (Tom)
4006      </para>
4007
4008      <para>
4009       This used to work but was broken in 8.4.
4010      </para>
4011     </listitem>
4012
4013     <listitem>
4014      <para>
4015       Re-enable collection of access statistics for sequences (Akira Kurosawa)
4016      </para>
4017
4018      <para>
4019       This used to work but was broken in 8.3.
4020      </para>
4021     </listitem>
4022
4023     <listitem>
4024      <para>
4025       Fix processing of ownership dependencies during <literal>CREATE OR
4026       REPLACE FUNCTION</> (Tom)
4027      </para>
4028     </listitem>
4029
4030     <listitem>
4031      <para>
4032       Fix incorrect handling of <literal>WHERE</>
4033       <replaceable>x</>=<replaceable>x</> conditions (Tom)
4034      </para>
4035
4036      <para>
4037       In some cases these could get ignored as redundant, but they aren't
4038       &mdash; they're equivalent to <replaceable>x</> <literal>IS NOT NULL</>.
4039      </para>
4040     </listitem>
4041
4042     <listitem>
4043      <para>
4044       Fix incorrect plan construction when using hash aggregation to implement
4045       <literal>DISTINCT</> for textually identical volatile expressions (Tom)
4046      </para>
4047     </listitem>
4048
4049     <listitem>
4050      <para>
4051       Fix Assert failure for a volatile <literal>SELECT DISTINCT ON</>
4052       expression (Tom)
4053      </para>
4054     </listitem>
4055
4056     <listitem>
4057      <para>
4058       Fix <function>ts_stat()</> to not fail on an empty <type>tsvector</>
4059       value (Tom)
4060      </para>
4061     </listitem>
4062
4063     <listitem>
4064      <para>
4065       Make text search parser accept underscores in XML attributes (Peter)
4066      </para>
4067     </listitem>
4068
4069     <listitem>
4070      <para>
4071       Fix encoding handling in <type>xml</> binary input (Heikki)
4072      </para>
4073
4074      <para>
4075       If the XML header doesn't specify an encoding, we now assume UTF-8 by
4076       default; the previous handling was inconsistent.
4077      </para>
4078     </listitem>
4079
4080     <listitem>
4081      <para>
4082       Fix bug with calling <literal>plperl</> from <literal>plperlu</> or vice
4083       versa (Tom)
4084      </para>
4085
4086      <para>
4087       An error exit from the inner function could result in crashes due to
4088       failure to re-select the correct Perl interpreter for the outer function.
4089      </para>
4090     </listitem>
4091
4092     <listitem>
4093      <para>
4094       Fix session-lifespan memory leak when a PL/Perl function is redefined
4095       (Tom)
4096      </para>
4097     </listitem>
4098
4099     <listitem>
4100      <para>
4101       Ensure that Perl arrays are properly converted to
4102       <productname>PostgreSQL</> arrays when returned by a set-returning
4103       PL/Perl function (Andrew Dunstan, Abhijit Menon-Sen)
4104      </para>
4105
4106      <para>
4107       This worked correctly already for non-set-returning functions.
4108      </para>
4109     </listitem>
4110
4111     <listitem>
4112      <para>
4113       Fix rare crash in exception processing in PL/Python (Peter)
4114      </para>
4115     </listitem>
4116
4117     <listitem>
4118      <para>
4119       Fix <application>ecpg</> problem with comments in <literal>DECLARE
4120       CURSOR</> statements (Michael)
4121      </para>
4122     </listitem>
4123
4124     <listitem>
4125      <para>
4126       Fix <application>ecpg</> to not treat recently-added keywords as
4127       reserved words (Tom)
4128      </para>
4129
4130      <para>
4131       This affected the keywords <literal>CALLED</>, <literal>CATALOG</>,
4132       <literal>DEFINER</>, <literal>ENUM</>, <literal>FOLLOWING</>,
4133       <literal>INVOKER</>, <literal>OPTIONS</>, <literal>PARTITION</>,
4134       <literal>PRECEDING</>, <literal>RANGE</>, <literal>SECURITY</>,
4135       <literal>SERVER</>, <literal>UNBOUNDED</>, and <literal>WRAPPER</>.
4136      </para>
4137     </listitem>
4138
4139     <listitem>
4140      <para>
4141       Re-allow regular expression special characters in <application>psql</>'s
4142       <literal>\df</> function name parameter (Tom)
4143      </para>
4144     </listitem>
4145
4146     <listitem>
4147      <para>
4148       In <filename>contrib/fuzzystrmatch</>, correct the calculation of
4149       <function>levenshtein</> distances with non-default costs (Marcin Mank)
4150      </para>
4151     </listitem>
4152
4153     <listitem>
4154      <para>
4155       In <filename>contrib/pg_standby</>, disable triggering failover with a
4156       signal on Windows (Fujii Masao)
4157      </para>
4158
4159      <para>
4160       This never did anything useful, because Windows doesn't have Unix-style
4161       signals, but recent changes made it actually crash.
4162      </para>
4163     </listitem>
4164
4165     <listitem>
4166      <para>
4167       Put <literal>FREEZE</> and <literal>VERBOSE</> options in the right
4168       order in the <literal>VACUUM</> command that
4169       <filename>contrib/vacuumdb</> produces (Heikki)
4170      </para>
4171     </listitem>
4172
4173     <listitem>
4174      <para>
4175       Fix possible leak of connections when <filename>contrib/dblink</>
4176       encounters an error (Tatsuhito Kasahara)
4177      </para>
4178     </listitem>
4179
4180     <listitem>
4181      <para>
4182       Ensure <application>psql</>'s flex module is compiled with the correct
4183       system header definitions (Tom)
4184      </para>
4185
4186      <para>
4187       This fixes build failures on platforms where
4188       <literal>--enable-largefile</> causes incompatible changes in the
4189       generated code.
4190      </para>
4191     </listitem>
4192
4193     <listitem>
4194      <para>
4195       Make the postmaster ignore any <literal>application_name</> parameter in
4196       connection request packets, to improve compatibility with future libpq
4197       versions (Tom)
4198      </para>
4199     </listitem>
4200
4201     <listitem>
4202      <para>
4203       Update the timezone abbreviation files to match current reality (Joachim
4204       Wieland)
4205      </para>
4206
4207      <para>
4208       This includes adding <literal>IDT</> to the default
4209       timezone abbreviation set.
4210      </para>
4211     </listitem>
4212
4213     <listitem>
4214      <para>
4215       Update time zone data files to <application>tzdata</> release 2009s
4216       for DST law changes in Antarctica, Argentina, Bangladesh, Fiji,
4217       Novokuznetsk, Pakistan, Palestine, Samoa, Syria; also historical
4218       corrections for Hong Kong.
4219      </para>
4220     </listitem>
4221
4222    </itemizedlist>
4223
4224   </sect2>
4225  </sect1>
4226
4227  <sect1 id="release-8-4-1">
4228   <title>Release 8.4.1</title>
4229
4230   <note>
4231   <title>Release Date</title>
4232   <simpara>2009-09-09</simpara>
4233   </note>
4234
4235   <para>
4236    This release contains a variety of fixes from 8.4.
4237    For information about new features in the 8.4 major release, see
4238    <xref linkend="release-8-4">.
4239   </para>
4240
4241   <sect2>
4242    <title>Migration to Version 8.4.1</title>
4243
4244    <para>
4245     A dump/restore is not required for those running 8.4.X.
4246    </para>
4247
4248   </sect2>
4249
4250   <sect2>
4251    <title>Changes</title>
4252
4253    <itemizedlist>
4254
4255     <listitem>
4256      <para>
4257       Fix WAL page header initialization at the end of archive recovery
4258       (Heikki)
4259      </para>
4260
4261      <para>
4262       This could lead to failure to process the WAL in a subsequent
4263       archive recovery.
4264      </para>
4265     </listitem>
4266
4267     <listitem>
4268      <para>
4269       Fix <quote>cannot make new WAL entries during recovery</> error (Tom)
4270      </para>
4271     </listitem>
4272
4273     <listitem>
4274      <para>
4275       Fix problem that could make expired rows visible after a crash (Tom)
4276      </para>
4277
4278      <para>
4279       This bug involved a page status bit potentially not being set
4280       correctly after a server crash.
4281      </para>
4282     </listitem>
4283
4284     <listitem>
4285      <para>
4286       Disallow <command>RESET ROLE</> and <command>RESET SESSION
4287       AUTHORIZATION</> inside security-definer functions (Tom, Heikki)
4288      </para>
4289
4290      <para>
4291       This covers a case that was missed in the previous patch that
4292       disallowed <command>SET ROLE</> and <command>SET SESSION
4293       AUTHORIZATION</> inside security-definer functions.
4294       (See CVE-2007-6600)
4295      </para>
4296     </listitem>
4297
4298     <listitem>
4299      <para>
4300       Make <command>LOAD</> of an already-loaded loadable module
4301       into a no-op (Tom)
4302      </para>
4303
4304      <para>
4305       Formerly, <command>LOAD</> would attempt to unload and re-load the
4306       module, but this is unsafe and not all that useful.
4307      </para>
4308     </listitem>
4309
4310     <listitem>
4311      <para>
4312       Make window function <literal>PARTITION BY</> and <literal>ORDER BY</>
4313       items always be interpreted as simple expressions (Tom)
4314      </para>
4315
4316      <para>
4317       In 8.4.0 these lists were parsed following the rules used for
4318       top-level <literal>GROUP BY</> and <literal>ORDER BY</> lists.
4319       But this was not correct per the SQL standard, and it led to possible
4320       circularity.
4321      </para>
4322     </listitem>
4323
4324     <listitem>
4325      <para>
4326       Fix several errors in planning of semi-joins (Tom)
4327      </para>
4328
4329      <para>
4330       These led to wrong query results in some cases where <literal>IN</>
4331       or <literal>EXISTS</> was used together with another join.
4332      </para>
4333     </listitem>
4334
4335     <listitem>
4336      <para>
4337       Fix handling of whole-row references to subqueries that are within
4338       an outer join (Tom)
4339      </para>
4340
4341      <para>
4342       An example is
4343       <literal>SELECT COUNT(ss.*) FROM ... LEFT JOIN (SELECT ...) ss ON ...</>.
4344       Here, <literal>ss.*</> would be treated as <literal>ROW(NULL,NULL,...)</>
4345       for null-extended join rows, which is not the same as a simple NULL.
4346       Now it is treated as a simple NULL.
4347      </para>
4348     </listitem>
4349
4350     <listitem>
4351      <para>
4352       Fix Windows shared-memory allocation code (Tsutomu Yamada, Magnus)
4353      </para>
4354
4355      <para>
4356       This bug led to the often-reported <quote>could not reattach
4357       to shared memory</> error message.
4358      </para>
4359     </listitem>
4360
4361     <listitem>
4362      <para>
4363       Fix locale handling with plperl (Heikki)
4364      </para>
4365
4366      <para>
4367       This bug could cause the server's locale setting to change when a
4368       plperl function is called, leading to data corruption.
4369      </para>
4370     </listitem>
4371
4372     <listitem>
4373      <para>
4374       Fix handling of reloptions to ensure setting one option doesn't
4375       force default values for others (Itagaki Takahiro)
4376      </para>
4377     </listitem>
4378
4379     <listitem>
4380      <para>
4381       Ensure that a <quote>fast shutdown</> request will forcibly terminate
4382       open sessions, even if a <quote>smart shutdown</> was already in progress
4383       (Fujii Masao)
4384      </para>
4385     </listitem>
4386
4387     <listitem>
4388      <para>
4389       Avoid memory leak for <function>array_agg()</> in <literal>GROUP BY</>
4390       queries (Tom)
4391      </para>
4392     </listitem>
4393
4394     <listitem>
4395      <para>
4396       Treat <function>to_char(..., 'TH')</> as an uppercase ordinal
4397       suffix with <literal>'HH'</>/<literal>'HH12'</> (Heikki)
4398      </para>
4399
4400      <para>
4401       It was previously handled as <literal>'th'</> (lowercase).
4402      </para>
4403     </listitem>
4404
4405     <listitem>
4406      <para>
4407       Include the fractional part in the result of
4408       <function>EXTRACT(second)</> and
4409       <function>EXTRACT(milliseconds)</> for
4410       <type>time</> and <type>time with time zone</> inputs (Tom)
4411      </para>
4412
4413      <para>
4414       This has always worked for floating-point datetime configurations,
4415       but was broken in the integer datetime code.
4416      </para>
4417     </listitem>
4418
4419     <listitem>
4420      <para>
4421       Fix overflow for <literal>INTERVAL '<replaceable>x</> ms'</literal>
4422       when <replaceable>x</> is more than 2 million and integer
4423       datetimes are in use (Alex Hunsaker)
4424      </para>
4425     </listitem>
4426
4427     <listitem>
4428      <para>
4429       Improve performance when processing toasted values in index scans (Tom)
4430      </para>
4431
4432      <para>
4433       This is particularly useful for <ulink
4434       url="http://postgis.refractions.net/">PostGIS</ulink>.
4435      </para>
4436     </listitem>
4437
4438     <listitem>
4439      <para>
4440       Fix a typo that disabled <varname>commit_delay</> (Jeff Janes)
4441      </para>
4442     </listitem>
4443
4444     <listitem>
4445      <para>
4446       Output early-startup messages to <filename>postmaster.log</> if the
4447       server is started in silent mode (Tom)
4448      </para>
4449
4450      <para>
4451       Previously such error messages were discarded, leading to
4452       difficulty in debugging.
4453      </para>
4454     </listitem>
4455
4456     <listitem>
4457      <para>
4458       Remove translated FAQs (Peter)
4459      </para>
4460
4461      <para>
4462       They are now on the <ulink
4463       url="http://wiki.postgresql.org/wiki/FAQ">wiki</ulink>.  The
4464       main FAQ was moved to the wiki some time ago.
4465      </para>
4466     </listitem>
4467
4468     <listitem>
4469      <para>
4470       Fix <application>pg_ctl</> to not go into an infinite loop if
4471       <filename>postgresql.conf</> is empty (Jeff Davis)
4472      </para>
4473     </listitem>
4474
4475     <listitem>
4476      <para>
4477       Fix several errors in <application>pg_dump</>'s
4478       <literal>--binary-upgrade</> mode (Bruce, Tom)
4479      </para>
4480
4481      <para>
4482       <literal>pg_dump --binary-upgrade</> is used by pg_migrator.
4483      </para>
4484     </listitem>
4485
4486     <listitem>
4487      <para>
4488       Fix <filename>contrib/xml2</>'s <function>xslt_process()</> to
4489       properly handle the maximum number of parameters (twenty) (Tom)
4490      </para>
4491     </listitem>
4492
4493     <listitem>
4494      <para>
4495       Improve robustness of <application>libpq</>'s code to recover
4496       from errors during <command>COPY FROM STDIN</> (Tom)
4497      </para>
4498     </listitem>
4499
4500     <listitem>
4501      <para>
4502       Avoid including conflicting readline and editline header files
4503       when both libraries are installed (Zdenek Kotala)
4504      </para>
4505     </listitem>
4506
4507     <listitem>
4508      <para>
4509       Work around gcc bug that causes <quote>floating-point exception</>
4510       instead of <quote>division by zero</> on some platforms (Tom)
4511      </para>
4512     </listitem>
4513
4514     <listitem>
4515      <para>
4516       Update time zone data files to <application>tzdata</> release 2009l
4517       for DST law changes in Bangladesh, Egypt, Mauritius.
4518      </para>
4519     </listitem>
4520
4521    </itemizedlist>
4522
4523   </sect2>
4524  </sect1>
4525
4526  <sect1 id="release-8-4">
4527   <title>Release 8.4</title>
4528
4529   <note>
4530    <title>Release Date</title>
4531    <simpara>2009-07-01</simpara>
4532   </note>
4533
4534   <sect2>
4535    <title>Overview</title>
4536
4537    <para>
4538     After many years of development, <productname>PostgreSQL</> has
4539     become feature-complete in many areas.   This release shows a
4540     targeted approach to adding features (e.g., authentication,
4541     monitoring, space reuse), and adds capabilities defined in the
4542     later SQL standards.  The major areas of enhancement are:
4543    </para>
4544
4545    <itemizedlist>
4546
4547     <!-- This list duplicates items below, but without authors or details-->
4548
4549     <listitem>
4550      <para>
4551       Windowing Functions
4552      </para>
4553     </listitem>
4554
4555     <listitem>
4556      <para>
4557       Common Table Expressions and Recursive Queries
4558      </para>
4559     </listitem>
4560
4561     <listitem>
4562      <para>
4563       Default and variadic parameters for functions
4564      </para>
4565     </listitem>
4566
4567     <listitem>
4568      <para>
4569       Parallel Restore
4570      </para>
4571     </listitem>
4572
4573     <listitem>
4574      <para>
4575       Column Permissions
4576      </para>
4577     </listitem>
4578
4579     <listitem>
4580      <para>
4581       Per-database locale settings
4582      </para>
4583     </listitem>
4584
4585     <listitem>
4586      <para>
4587       Improved hash indexes
4588      </para>
4589     </listitem>
4590
4591     <listitem>
4592      <para>
4593       Improved join performance for <literal>EXISTS</> and <literal>NOT EXISTS</> queries
4594      </para>
4595     </listitem>
4596
4597     <listitem>
4598      <para>
4599       Easier-to-use Warm Standby
4600      </para>
4601     </listitem>
4602
4603     <listitem>
4604      <para>
4605       Automatic sizing of the Free Space Map
4606      </para>
4607     </listitem>
4608
4609     <listitem>
4610      <para>
4611       Visibility Map (greatly reduces vacuum overhead for slowly-changing tables)
4612      </para>
4613     </listitem>
4614
4615     <listitem>
4616      <para>
4617       Version-aware psql (backslash commands work against older servers)
4618      </para>
4619     </listitem>
4620
4621     <listitem>
4622      <para>
4623       Support SSL certificates for user authentication
4624      </para>
4625     </listitem>
4626
4627     <listitem>
4628      <para>
4629       Per-function runtime statistics
4630      </para>
4631     </listitem>
4632
4633     <listitem>
4634      <para>
4635       Easy editing of functions in psql
4636      </para>
4637     </listitem>
4638
4639     <listitem>
4640      <para>
4641       New contrib modules: pg_stat_statements, auto_explain, citext, btree_gin
4642      </para>
4643     </listitem>
4644
4645    </itemizedlist>
4646
4647    <para>
4648     The above items are explained in more detail in the sections below.
4649    </para>
4650
4651   </sect2>
4652
4653   <sect2>
4654    <title>Migration to Version 8.4</title>
4655
4656    <para>
4657     A dump/restore using <application>pg_dump</application> is
4658     required for those wishing to migrate data from any previous
4659     release.
4660    </para>
4661
4662    <para>
4663     Observe the following incompatibilities:
4664    </para>
4665
4666    <sect3>
4667     <title>General</title>
4668     <itemizedlist>
4669
4670      <listitem>
4671       <para>
4672        Use 64-bit integer datetimes by default (Neil Conway)
4673       </para>
4674
4675       <para>
4676        Previously this was selected by <application>configure</>'s
4677        <option>--enable-integer-datetimes</> option.  To retain
4678        the old behavior, build with <option>--disable-integer-datetimes</>.
4679       </para>
4680      </listitem>
4681
4682      <listitem>
4683       <para>
4684        Remove <application>ipcclean</> utility command (Bruce)
4685       </para>
4686
4687       <para>
4688        The utility only worked on a few platforms.  Users should use
4689        their operating system tools instead.
4690       </para>
4691      </listitem>
4692
4693     </itemizedlist>
4694
4695    </sect3>
4696
4697    <sect3>
4698     <title>Server Settings</title>
4699     <itemizedlist>
4700
4701      <listitem>
4702       <para>
4703        Change default setting for
4704        <literal>log_min_messages</> to <literal>warning</> (previously
4705        it was <literal>notice</>) to reduce log file volume (Tom)
4706       </para>
4707      </listitem>
4708
4709      <listitem>
4710       <para>
4711        Change default setting for <literal>max_prepared_transactions</> to
4712        zero (previously it was 5) (Tom)
4713       </para>
4714      </listitem>
4715
4716      <listitem>
4717       <para>
4718        Make <literal>debug_print_parse</>, <literal>debug_print_rewritten</>,
4719        and <literal>debug_print_plan</>
4720        output appear at <literal>LOG</> message level, not
4721        <literal>DEBUG1</> as formerly (Tom)
4722       </para>
4723      </listitem>
4724
4725      <listitem>
4726       <para>
4727        Make <literal>debug_pretty_print</> default to <literal>on</> (Tom)
4728       </para>
4729      </listitem>
4730
4731      <listitem>
4732       <para>
4733        Remove <varname>explain_pretty_print</> parameter (no longer needed) (Tom)
4734       </para>
4735      </listitem>
4736
4737      <listitem>
4738       <para>
4739        Make <varname>log_temp_files</> settable by superusers only, like other
4740        logging options (Simon Riggs)
4741       </para>
4742      </listitem>
4743
4744      <listitem>
4745       <para>
4746        Remove automatic appending of the epoch timestamp when no <literal>%</>
4747        escapes are present in <literal>log_filename</> (Robert Haas)
4748       </para>
4749
4750       <para>
4751        This change was made because some users wanted a fixed log filename,
4752        for use with an external log rotation tool.
4753       </para>
4754      </listitem>
4755
4756      <listitem>
4757       <para>
4758        Remove <varname>log_restartpoints</> from <filename>recovery.conf</>;
4759        instead use <varname>log_checkpoints</> (Simon)
4760       </para>
4761      </listitem>
4762
4763      <listitem>
4764       <para>
4765        Remove <varname>krb_realm</> and <varname>krb_server_hostname</>;
4766        these are now set in <filename>pg_hba.conf</> instead (Magnus)
4767       </para>
4768      </listitem>
4769
4770      <listitem>
4771       <para>
4772        There are also significant changes in <link
4773        linkend="release-8-4-pg-hba-conf"><filename>pg_hba.conf</></link>,
4774        as described below.
4775       </para>
4776      </listitem>
4777
4778     </itemizedlist>
4779
4780    </sect3>
4781
4782    <sect3>
4783     <title>Queries</title>
4784
4785     <itemizedlist>
4786
4787      <listitem>
4788       <para>
4789        Change <command>TRUNCATE</> and <command>LOCK</> to
4790        apply to child tables of the specified table(s) (Peter)
4791       </para>
4792
4793       <para>
4794        These commands now accept an <literal>ONLY</> option that prevents
4795        processing child tables; this option must be used if the old
4796        behavior is needed.
4797       </para>
4798      </listitem>
4799
4800      <listitem>
4801       <para>
4802        <command>SELECT DISTINCT</> and
4803        <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</>
4804        no longer always produce sorted output (Tom)
4805       </para>
4806
4807       <para>
4808        Previously, these types of queries always removed duplicate rows
4809        by means of Sort/Unique processing (i.e., sort then remove adjacent
4810        duplicates).  Now they can be implemented by hashing, which will not
4811        produce sorted output.  If an application relied on the output being
4812        in sorted order, the recommended fix is to add an <literal>ORDER BY</>
4813        clause.  As a short-term workaround, the previous behavior can be
4814        restored by disabling <literal>enable_hashagg</>, but that is a very
4815        performance-expensive fix.  <literal>SELECT DISTINCT ON</> never uses
4816        hashing, however, so its behavior is unchanged.
4817       </para>
4818      </listitem>
4819
4820      <listitem>
4821       <para>
4822        Force child tables to inherit <literal>CHECK</> constraints from parents
4823        (Alex Hunsaker, Nikhil Sontakke, Tom)
4824       </para>
4825
4826       <para>
4827        Formerly it was possible to drop such a constraint from a child
4828        table, allowing rows that violate the constraint to be visible
4829        when scanning the parent table.  This was deemed inconsistent,
4830        as well as contrary to SQL standard.
4831       </para>
4832      </listitem>
4833
4834      <listitem>
4835       <para>
4836        Disallow negative <literal>LIMIT</> or <literal>OFFSET</>
4837        values, rather than treating them as zero (Simon)
4838       </para>
4839      </listitem>
4840
4841      <listitem>
4842       <para>
4843        Disallow <command>LOCK TABLE</> outside a transaction block
4844        (Tom)
4845       </para>
4846
4847       <para>
4848        Such an operation is useless because the lock would be released
4849        immediately.
4850       </para>
4851      </listitem>
4852
4853      <listitem>
4854       <para>
4855        Sequences now contain an additional <structfield>start_value</> column
4856        (Zoltan Boszormenyi)
4857       </para>
4858
4859       <para>
4860        This supports <command>ALTER SEQUENCE ... RESTART</>.
4861       </para>
4862      </listitem>
4863
4864     </itemizedlist>
4865
4866    </sect3>
4867
4868
4869    <sect3>
4870     <title>Functions and Operators</title>
4871
4872     <itemizedlist>
4873
4874      <listitem>
4875       <para>
4876        Make <type>numeric</> zero raised to a fractional power return
4877        <literal>0</>, rather than throwing an error, and make
4878        <type>numeric</> zero raised to the zero power return <literal>1</>,
4879        rather than error (Bruce)
4880       </para>
4881
4882       <para>
4883        This matches the longstanding <type>float8</> behavior.
4884       </para>
4885      </listitem>
4886
4887      <listitem>
4888       <para>
4889        Allow unary minus of floating-point values to produce minus zero (Tom)
4890       </para>
4891
4892       <para>
4893        The changed behavior is more <acronym>IEEE</>-standard
4894        compliant.
4895       </para>
4896      </listitem>
4897
4898      <listitem>
4899       <para>
4900        Throw an error if an escape character is the last character in
4901        a <literal>LIKE</> pattern (i.e., it has nothing to escape) (Tom)
4902       </para>
4903
4904       <para>
4905        Previously, such an escape character was silently ignored,
4906        thus possibly masking application logic errors.
4907       </para>
4908      </listitem>
4909
4910      <listitem>
4911       <para>
4912        Remove <literal>~=~</> and <literal>~&lt;&gt;~</> operators
4913        formerly used for <literal>LIKE</> index comparisons (Tom)
4914       </para>
4915
4916       <para>
4917        Pattern indexes now use the regular equality operator.
4918       </para>
4919      </listitem>
4920
4921      <listitem>
4922       <para>
4923        <function>xpath()</> now passes its arguments to <application>libxml</>
4924        without any changes (Andrew)
4925       </para>
4926
4927       <para>
4928        This means that the XML argument must be a well-formed XML document.
4929        The previous coding attempted to allow XML fragments, but it did not
4930        work well.
4931       </para>
4932      </listitem>
4933
4934      <listitem>
4935       <para>
4936        Make <function>xmlelement()</> format attribute values just like
4937        content values (Peter)
4938       </para>
4939
4940       <para>
4941        Previously, attribute values were formatted according to the
4942        normal SQL output behavior, which is sometimes at odds with
4943        XML rules.
4944       </para>
4945      </listitem>
4946
4947      <listitem>
4948       <para>
4949        Rewrite memory management for <application>libxml</>-using functions
4950        (Tom)
4951       </para>
4952
4953       <para>
4954        This change should avoid some compatibility problems with use of
4955        <application>libxml</> in PL/Perl and other add-on code.
4956       </para>
4957      </listitem>
4958
4959      <listitem>
4960       <para>
4961        Adopt a faster algorithm for hash functions (Kenneth Marshall,
4962        based on work of Bob Jenkins)
4963       </para>
4964
4965       <para>
4966        Many of the built-in hash functions now deliver different results on
4967        little-endian and big-endian platforms.
4968       </para>
4969      </listitem>
4970
4971     </itemizedlist>
4972
4973     <sect4>
4974      <title>Temporal Functions and Operators</title>
4975
4976      <itemizedlist>
4977
4978       <listitem>
4979        <para>
4980         <varname>DateStyle</> no longer controls <type>interval</> output
4981         formatting; instead there is a new variable <varname>IntervalStyle</>
4982         (Ron Mayer)
4983        </para>
4984       </listitem>
4985
4986       <listitem>
4987        <para>
4988         Improve consistency of handling of fractional seconds in
4989         <type>timestamp</> and <type>interval</> output (Ron Mayer)
4990        </para>
4991
4992        <para>
4993         This may result in displaying a different number of fractional
4994         digits than before, or rounding instead of truncating.
4995        </para>
4996       </listitem>
4997
4998       <listitem>
4999        <para>
5000         Make <function>to_char()</>'s localized month/day names depend
5001         on <varname>LC_TIME</>, not <varname>LC_MESSAGES</> (Euler
5002         Taveira de Oliveira)
5003        </para>
5004       </listitem>
5005
5006       <listitem>
5007        <para>
5008         Cause <function>to_date()</> and <function>to_timestamp()</>
5009         to more consistently report errors for invalid input (Brendan
5010         Jurd)
5011        </para>
5012
5013        <para>
5014         Previous versions would often ignore or silently misread input
5015         that did not match the format string.  Such cases will now
5016         result in an error.
5017        </para>
5018       </listitem>
5019
5020       <listitem>
5021        <para>
5022         Fix <function>to_timestamp()</> to not require upper/lower case
5023         matching for meridian (<literal>AM</>/<literal>PM</>) and era
5024         (<literal>BC</>/<literal>AD</>) format designations  (Brendan
5025         Jurd)
5026        </para>
5027
5028        <para>
5029         For example, input value <literal>ad</> now matches the format
5030         string <literal>AD</>.
5031        </para>
5032       </listitem>
5033
5034      </itemizedlist>
5035
5036     </sect4>
5037
5038    </sect3>
5039
5040   </sect2>
5041
5042   <sect2>
5043    <title>Changes</title>
5044
5045    <para>
5046     Below you will find a detailed account of the changes between
5047     <productname>PostgreSQL</productname> 8.4 and the previous major
5048     release.
5049    </para>
5050
5051    <sect3>
5052     <title>Performance</title>
5053     <itemizedlist>
5054
5055      <listitem>
5056       <para>
5057        Improve optimizer statistics calculations (Jan Urbanski, Tom)
5058       </para>
5059
5060       <para>
5061        In particular, estimates for full-text-search operators are
5062        greatly improved.
5063       </para>
5064      </listitem>
5065
5066      <listitem>
5067       <para>
5068        Allow <command>SELECT DISTINCT</> and
5069        <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</> to
5070        use hashing (Tom)
5071       </para>
5072
5073       <para>
5074        This means that these types of queries no longer automatically
5075        produce sorted output.
5076       </para>
5077      </listitem>
5078
5079      <listitem>
5080       <para>
5081        Create explicit concepts of semi-joins and anti-joins (Tom)
5082       </para>
5083
5084       <para>
5085        This work formalizes our previous ad-hoc treatment of <literal>IN
5086        (SELECT ...)</> clauses, and extends it to <literal>EXISTS</> and
5087        <literal>NOT EXISTS</> clauses.  It should result in significantly
5088        better planning of <literal>EXISTS</> and <literal>NOT EXISTS</>
5089        queries.  In general, logically equivalent <literal>IN</> and
5090        <literal>EXISTS</> clauses should now have similar performance,
5091        whereas previously <literal>IN</> often won.
5092       </para>
5093      </listitem>
5094
5095      <listitem>
5096       <para>
5097        Improve optimization of sub-selects beneath outer joins (Tom)
5098       </para>
5099
5100       <para>
5101        Formerly, a sub-select or view could not be optimized very well if it
5102        appeared within the nullable side of an outer join and contained
5103        non-strict expressions (for instance, constants) in its result list.
5104       </para>
5105      </listitem>
5106
5107      <listitem>
5108       <para>
5109        Improve the performance of <function>text_position()</> and
5110        related functions by using Boyer-Moore-Horspool searching (David
5111        Rowley)
5112       </para>
5113
5114       <para>
5115        This is particularly helpful for long search patterns.
5116       </para>
5117      </listitem>
5118
5119      <listitem>
5120       <para>
5121        Reduce I/O load of writing the statistics collection file
5122        by writing the file only when requested (Martin Pihlak)
5123       </para>
5124      </listitem>
5125
5126      <listitem>
5127       <para>
5128        Improve performance for bulk inserts (Robert Haas, Simon)
5129       </para>
5130      </listitem>
5131
5132      <listitem>
5133       <para>
5134        Increase the default value of <varname>default_statistics_target</>
5135        from <literal>10</> to <literal>100</> (Greg Sabino Mullane,
5136        Tom)
5137       </para>
5138
5139       <para>
5140        The maximum value was also increased from <literal>1000</> to
5141        <literal>10000</>.
5142       </para>
5143      </listitem>
5144
5145      <listitem>
5146       <para>
5147        Perform <varname>constraint_exclusion</> checking by default
5148        in queries involving inheritance or <literal>UNION ALL</> (Tom)
5149       </para>
5150
5151       <para>
5152        A new <varname>constraint_exclusion</> setting,
5153        <literal>partition</>, was added to specify this behavior.
5154       </para>
5155      </listitem>
5156
5157      <listitem>
5158       <para>
5159        Allow I/O read-ahead for bitmap index scans (Greg Stark)
5160       </para>
5161
5162       <para>
5163        The amount of read-ahead is controlled by
5164        <varname>effective_io_concurrency</>.  This feature is available only
5165        if the kernel has <function>posix_fadvise()</> support.
5166       </para>
5167      </listitem>
5168
5169      <listitem>
5170       <para>
5171        Inline simple set-returning <acronym>SQL</> functions in
5172        <literal>FROM</> clauses (Richard Rowell)
5173       </para>
5174      </listitem>
5175
5176      <listitem>
5177       <para>
5178        Improve performance of multi-batch hash joins by providing a special
5179        case for join key values that are especially common in the outer
5180        relation (Bryce Cutt, Ramon Lawrence)
5181       </para>
5182      </listitem>
5183
5184      <listitem>
5185       <para>
5186        Reduce volume of temporary data in multi-batch hash joins
5187        by suppressing <quote>physical tlist</> optimization (Michael
5188        Henderson, Ramon Lawrence)
5189       </para>
5190      </listitem>
5191
5192      <listitem>
5193       <para>
5194        Avoid waiting for idle-in-transaction sessions during
5195        <command>CREATE INDEX CONCURRENTLY</> (Simon)
5196       </para>
5197      </listitem>
5198
5199      <listitem>
5200       <para>
5201        Improve performance of shared cache invalidation (Tom)
5202       </para>
5203      </listitem>
5204
5205     </itemizedlist>
5206
5207    </sect3>
5208
5209    <sect3>
5210     <title>Server</title>
5211
5212     <sect4>
5213      <title>Settings</title>
5214
5215      <itemizedlist>
5216
5217       <listitem>
5218        <para>
5219         Convert many <filename>postgresql.conf</> settings to enumerated
5220         values so that <literal>pg_settings</> can display the valid
5221         values (Magnus)
5222        </para>
5223       </listitem>
5224
5225       <listitem>
5226        <para>
5227         Add <varname>cursor_tuple_fraction</> parameter to control the
5228         fraction of a cursor's rows that the planner assumes will be
5229         fetched (Robert Hell)
5230        </para>
5231       </listitem>
5232
5233       <listitem>
5234        <para>
5235         Allow underscores in the names of custom variable
5236         classes in <filename>postgresql.conf</> (Tom)
5237        </para>
5238       </listitem>
5239
5240      </itemizedlist>
5241
5242     </sect4>
5243
5244     <sect4>
5245      <title>Authentication and security</title>
5246      <itemizedlist>
5247
5248       <listitem>
5249        <para>
5250         Remove support for the (insecure) <literal>crypt</> authentication method
5251         (Magnus)
5252        </para>
5253
5254        <para>
5255         This effectively obsoletes pre-<productname>PostgreSQL</> 7.2 client
5256         libraries, as there is no longer any non-plaintext password method that
5257         they can use.
5258        </para>
5259       </listitem>
5260
5261       <listitem>
5262        <para>
5263         Support regular expressions in <filename>pg_ident.conf</>
5264         (Magnus)
5265        </para>
5266       </listitem>
5267
5268       <listitem>
5269        <para>
5270         Allow <productname>Kerberos</>/<acronym>GSSAPI</> parameters
5271         to be changed without restarting the postmaster (Magnus)
5272        </para>
5273       </listitem>
5274
5275       <listitem>
5276        <para>
5277         Support <acronym>SSL</> certificate chains in server certificate
5278         file (Andrew Gierth)
5279        </para>
5280
5281        <para>
5282         Including the full certificate chain makes the client able
5283         to verify the certificate without having all intermediate CA
5284         certificates present in the local store, which is often the case for
5285         commercial CAs.
5286        </para>
5287       </listitem>
5288
5289       <listitem>
5290        <para>
5291         Report appropriate error message for combination of <literal>MD5</>
5292         authentication and <varname>db_user_namespace</> enabled (Bruce)
5293        </para>
5294       </listitem>
5295      </itemizedlist>
5296
5297     </sect4>
5298
5299     <sect4 id="release-8-4-pg-hba-conf">
5300      <title><filename>pg_hba.conf</></title>
5301      <itemizedlist>
5302
5303       <listitem>
5304        <para>
5305         Change all authentication options to use <literal>name=value</>
5306         syntax (Magnus)
5307        </para>
5308
5309        <para>
5310         This makes incompatible changes to the <literal>ldap</>,
5311         <literal>pam</> and <literal>ident</> authentication methods. All
5312         <filename>pg_hba.conf</> entries with these methods need to be
5313         rewritten using the new format.
5314        </para>
5315       </listitem>
5316
5317       <listitem>
5318        <para>
5319         Remove the <literal>ident sameuser</> option, instead making that
5320         behavior the default if no usermap is specified (Magnus)
5321        </para>
5322       </listitem>
5323
5324       <listitem>
5325        <para>
5326         Allow a usermap parameter for all external authentication methods
5327         (Magnus)
5328        </para>
5329
5330        <para>
5331         Previously a usermap was only supported for <literal>ident</>
5332         authentication.
5333        </para>
5334       </listitem>
5335
5336       <listitem>
5337        <para>
5338         Add <literal>clientcert</> option to control requesting of a
5339         client certificate (Magnus)
5340        </para>
5341
5342        <para>
5343         Previously this was controlled by the presence of a root
5344         certificate file in the server's data directory.
5345        </para>
5346       </listitem>
5347
5348       <listitem>
5349        <para>
5350         Add <literal>cert</> authentication method to allow
5351         <emphasis>user</> authentication via <acronym>SSL</> certificates
5352         (Magnus)
5353        </para>
5354
5355        <para>
5356         Previously <acronym>SSL</> certificates could only verify that
5357         the client had access to a certificate, not authenticate a
5358         user.
5359        </para>
5360       </listitem>
5361
5362       <listitem>
5363        <para>
5364         Allow <literal>krb5</>, <literal>gssapi</> and <literal>sspi</>
5365         realm and <literal>krb5</> host settings to be specified in
5366         <filename>pg_hba.conf</> (Magnus)
5367        </para>
5368
5369        <para>
5370         These override the settings in <filename>postgresql.conf</>.
5371        </para>
5372       </listitem>
5373
5374       <listitem>
5375        <para>
5376         Add <varname>include_realm</> parameter for <literal>krb5</>,
5377         <literal>gssapi</>, and <literal>sspi</> methods (Magnus)
5378        </para>
5379
5380        <para>
5381         This allows identical usernames from different realms to be
5382         authenticated as different database users using usermaps.
5383        </para>
5384       </listitem>
5385
5386       <listitem>
5387        <para>
5388         Parse <filename>pg_hba.conf</> fully when it is loaded,
5389         so that errors are reported immediately (Magnus)
5390        </para>
5391
5392        <para>
5393         Previously, most errors in the file wouldn't be detected until clients
5394         tried to connect, so an erroneous file could render the system
5395         unusable.  With the new behavior, if an error is detected during
5396         reload then the bad file is rejected and the postmaster continues
5397         to use its old copy.
5398        </para>
5399       </listitem>
5400
5401       <listitem>
5402        <para>
5403         Show all parsing errors in <filename>pg_hba.conf</> instead of
5404         aborting after the first one (Selena Deckelmann)
5405        </para>
5406       </listitem>
5407
5408       <listitem>
5409        <para>
5410         Support <literal>ident</> authentication over Unix-domain sockets
5411         on <productname>Solaris</> (Garick Hamlin)
5412        </para>
5413       </listitem>
5414
5415      </itemizedlist>
5416
5417     </sect4>
5418
5419     <sect4>
5420      <title>Continuous Archiving</title>
5421      <itemizedlist>
5422
5423       <listitem>
5424        <para>
5425         Provide an option to <function>pg_start_backup()</> to force its
5426         implied checkpoint to finish as quickly as possible (Tom)
5427        </para>
5428
5429        <para>
5430         The default behavior avoids excess I/O consumption, but that is
5431         pointless if no concurrent query activity is going on.
5432        </para>
5433       </listitem>
5434
5435       <listitem>
5436        <para>
5437         Make <function>pg_stop_backup()</> wait for modified <acronym>WAL</>
5438         files to be archived (Simon)
5439        </para>
5440
5441        <para>
5442         This guarantees that the backup is valid at the time
5443         <function>pg_stop_backup()</> completes.
5444        </para>
5445       </listitem>
5446
5447       <listitem>
5448        <para>
5449         When archiving is enabled, rotate the last WAL segment at shutdown
5450         so that all transactions can be archived immediately
5451         (Guillaume Smet, Heikki)
5452        </para>
5453       </listitem>
5454
5455       <listitem>
5456        <para>
5457         Delay <quote>smart</> shutdown while a continuous archiving base backup
5458         is in progress (Laurenz Albe)
5459        </para>
5460       </listitem>
5461
5462       <listitem>
5463        <para>
5464         Cancel a continuous archiving base backup if <quote>fast</> shutdown
5465         is requested (Laurenz Albe)
5466        </para>
5467       </listitem>
5468
5469       <listitem>
5470        <para>
5471         Allow <filename>recovery.conf</> boolean variables to take the
5472         same range of string values as <filename>postgresql.conf</>
5473         boolean variables
5474         (Bruce)
5475        </para>
5476       </listitem>
5477
5478      </itemizedlist>
5479
5480     </sect4>
5481
5482     <sect4>
5483      <title>Monitoring</title>
5484      <itemizedlist>
5485
5486       <listitem>
5487        <para>
5488         Add <function>pg_conf_load_time()</> to report when
5489         the <productname>PostgreSQL</> configuration files were last loaded
5490         (George Gensure)
5491        </para>
5492       </listitem>
5493
5494       <listitem>
5495        <para>
5496         Add <function>pg_terminate_backend()</> to safely terminate a
5497         backend (the <literal>SIGTERM</> signal works also) (Tom, Bruce)
5498        </para>
5499
5500        <para>
5501         While it's always been possible to <literal>SIGTERM</> a single
5502         backend, this was previously considered unsupported; and testing
5503         of the case found some bugs that are now fixed.
5504        </para>
5505       </listitem>
5506
5507       <listitem>
5508        <para>
5509         Add ability to track user-defined functions' call counts and
5510         runtimes (Martin Pihlak)
5511        </para>
5512
5513        <para>
5514         Function statistics appear in a new system view,
5515         <literal>pg_stat_user_functions</>.  Tracking is controlled
5516         by the new parameter <varname>track_functions</>.
5517        </para>
5518       </listitem>
5519
5520       <listitem>
5521        <para>
5522         Allow specification of the maximum query string size in
5523         <literal>pg_stat_activity</> via new
5524         <varname>track_activity_query_size</> parameter (Thomas Lee)
5525        </para>
5526       </listitem>
5527
5528       <listitem>
5529        <para>
5530         Increase the maximum line length sent to <application>syslog</>, in
5531         hopes of improving performance (Tom)
5532        </para>
5533       </listitem>
5534
5535       <listitem>
5536        <para>
5537         Add read-only configuration variables <varname>segment_size</>,
5538         <varname>wal_block_size</>, and <varname>wal_segment_size</>
5539         (Bernd Helmle)
5540        </para>
5541       </listitem>
5542
5543       <listitem>
5544        <para>
5545         When reporting a deadlock, report the text of all queries involved
5546         in the deadlock to the server log  (Itagaki Takahiro)
5547        </para>
5548       </listitem>
5549
5550       <listitem>
5551        <para>
5552         Add <function>pg_stat_get_activity(pid)</> function to return
5553         information about a specific process id (Magnus)
5554        </para>
5555       </listitem>
5556
5557       <listitem>
5558        <para>
5559         Allow the location of the server's statistics file to be specified
5560         via <varname>stats_temp_directory</> (Magnus)
5561        </para>
5562
5563        <para>
5564         This allows the statistics file to be placed in a
5565         <acronym>RAM</>-resident directory to reduce I/O requirements.
5566         On startup/shutdown, the file is copied to its traditional location
5567         (<literal>$PGDATA/global/</>) so it is preserved across restarts.
5568        </para>
5569       </listitem>
5570
5571      </itemizedlist>
5572
5573     </sect4>
5574
5575    </sect3>
5576
5577    <sect3>
5578     <title>Queries</title>
5579     <itemizedlist>
5580
5581      <listitem>
5582       <para>
5583        Add support for <literal>WINDOW</> functions (Hitoshi Harada)
5584       </para>
5585      </listitem>
5586
5587      <listitem>
5588       <para>
5589        Add support for <literal>WITH</> clauses (CTEs), including <literal>WITH
5590        RECURSIVE</> (Yoshiyuki Asaba, Tatsuo Ishii, Tom)
5591       </para>
5592      </listitem>
5593
5594      <listitem>
5595       <para>
5596        Add <command>TABLE</> command (Peter)
5597       </para>
5598
5599       <para>
5600        <literal>TABLE tablename</> is a SQL standard short-hand for
5601        <literal>SELECT * FROM tablename</>.
5602       </para>
5603      </listitem>
5604
5605      <listitem>
5606       <para>
5607        Allow <literal>AS</> to be optional when specifying a
5608        <command>SELECT</> (or <literal>RETURNING</>) column output
5609        label (Hiroshi Saito)
5610       </para>
5611
5612       <para>
5613        This works so long as the column label is not any
5614        <productname>PostgreSQL</> keyword; otherwise <literal>AS</> is still
5615        needed.
5616       </para>
5617      </listitem>
5618
5619      <listitem>
5620       <para>
5621        Support set-returning functions in <command>SELECT</> result lists
5622        even for functions that return their result via a tuplestore (Tom)
5623       </para>
5624
5625       <para>
5626        In particular, this means that functions written in PL/pgSQL
5627        and other PL languages can now be called this way.
5628       </para>
5629      </listitem>
5630
5631      <listitem>
5632       <para>
5633        Support set-returning functions in the output of aggregation
5634        and grouping queries (Tom)
5635       </para>
5636      </listitem>
5637
5638      <listitem>
5639       <para>
5640        Allow <command>SELECT FOR UPDATE</>/<literal>SHARE</> to work
5641        on inheritance trees (Tom)
5642       </para>
5643      </listitem>
5644
5645      <listitem>
5646       <para>
5647        Add infrastructure for <acronym>SQL/MED</> (Martin Pihlak,
5648        Peter)
5649       </para>
5650
5651       <para>
5652        There are no remote or external <acronym>SQL/MED</> capabilities
5653        yet, but this change provides a standardized and future-proof
5654        system for managing connection information for modules like
5655        <filename>dblink</> and <filename>plproxy</>.
5656       </para>
5657      </listitem>
5658
5659      <listitem>
5660       <para>
5661        Invalidate cached plans when referenced schemas, functions, operators,
5662        or operator classes are modified (Martin Pihlak, Tom)
5663       </para>
5664
5665       <para>
5666        This improves the system's ability to respond to on-the-fly
5667        DDL changes.
5668       </para>
5669      </listitem>
5670      <listitem>
5671       <para>
5672        Allow comparison of composite types and allow arrays of
5673        anonymous composite types (Tom)
5674       </para>
5675
5676       <para>
5677        This allows constructs such as
5678        <literal>row(1, 1.1) = any (array[row(7, 7.7), row(1, 1.0)])</>.
5679        This is particularly useful in recursive queries.
5680       </para>
5681      </listitem>
5682
5683      <listitem>
5684       <para>
5685        Add support for Unicode string literal and identifier specifications
5686        using code points, e.g. <literal>U&amp;'d\0061t\+000061'</>
5687        (Peter)
5688       </para>
5689      </listitem>
5690
5691      <listitem>
5692       <para>
5693        Reject <literal>\000</> in string literals and <command>COPY</> data
5694        (Tom)
5695       </para>
5696
5697       <para>
5698        Previously, this was accepted but had the effect of terminating
5699        the string contents.
5700       </para>
5701      </listitem>
5702
5703      <listitem>
5704       <para>
5705        Improve the parser's ability to report error locations (Tom)
5706       </para>
5707
5708       <para>
5709        An error location is now reported for many semantic errors,
5710        such as mismatched datatypes, that previously could not be localized.
5711       </para>
5712      </listitem>
5713
5714     </itemizedlist>
5715
5716     <sect4>
5717      <title><command>TRUNCATE</></title>
5718      <itemizedlist>
5719
5720       <listitem>
5721        <para>
5722         Support statement-level <literal>ON TRUNCATE</> triggers (Simon)
5723        </para>
5724       </listitem>
5725
5726       <listitem>
5727        <para>
5728         Add <literal>RESTART</>/<literal>CONTINUE IDENTITY</> options
5729         for <command>TRUNCATE TABLE</>
5730         (Zoltan Boszormenyi)
5731        </para>
5732
5733        <para>
5734         The start value of a sequence can be changed by <command>ALTER
5735         SEQUENCE START WITH</>.
5736        </para>
5737       </listitem>
5738
5739       <listitem>
5740        <para>
5741         Allow <command>TRUNCATE tab1, tab1</> to succeed (Bruce)
5742        </para>
5743       </listitem>
5744
5745       <listitem>
5746        <para>
5747         Add a separate <command>TRUNCATE</> permission (Robert Haas)
5748        </para>
5749       </listitem>
5750
5751      </itemizedlist>
5752
5753     </sect4>
5754
5755     <sect4>
5756      <title><command>EXPLAIN</></title>
5757      <itemizedlist>
5758
5759       <listitem>
5760        <para>
5761         Make <command>EXPLAIN VERBOSE</> show the output columns of each
5762         plan node (Tom)
5763        </para>
5764
5765        <para>
5766         Previously <command>EXPLAIN VERBOSE</> output an internal
5767         representation of the query plan.  (That behavior is now
5768         available via <varname>debug_print_plan</>.)
5769        </para>
5770       </listitem>
5771
5772       <listitem>
5773        <para>
5774         Make <command>EXPLAIN</> identify subplans and initplans with
5775         individual labels (Tom)
5776        </para>
5777       </listitem>
5778
5779       <listitem>
5780        <para>
5781         Make <command>EXPLAIN</> honor <varname>debug_print_plan</> (Tom)
5782        </para>
5783       </listitem>
5784
5785       <listitem>
5786        <para>
5787         Allow <command>EXPLAIN</> on <command>CREATE TABLE AS</> (Peter)
5788        </para>
5789       </listitem>
5790
5791      </itemizedlist>
5792
5793     </sect4>
5794
5795     <sect4>
5796      <title><literal>LIMIT</>/<literal>OFFSET</></title>
5797      <itemizedlist>
5798
5799       <listitem>
5800        <para>
5801         Allow sub-selects in <literal>LIMIT</> and <literal>OFFSET</> (Tom)
5802        </para>
5803       </listitem>
5804
5805       <listitem>
5806        <para>
5807         Add <acronym>SQL</>-standard syntax for
5808         <literal>LIMIT</>/<literal>OFFSET</> capabilities (Peter)
5809        </para>
5810
5811        <para>
5812         To wit,
5813         <literal>OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS}
5814         ONLY</>.
5815        </para>
5816       </listitem>
5817
5818      </itemizedlist>
5819
5820     </sect4>
5821
5822    </sect3>
5823
5824    <sect3>
5825     <title>Object Manipulation</title>
5826     <itemizedlist>
5827
5828      <listitem>
5829       <para>
5830        Add support for column-level privileges (Stephen Frost, KaiGai
5831        Kohei)
5832       </para>
5833      </listitem>
5834
5835      <listitem>
5836       <para>
5837        Refactor multi-object <command>DROP</> operations to reduce the
5838        need for <literal>CASCADE</> (Alex Hunsaker)
5839       </para>
5840
5841       <para>
5842        For example, if table <literal>B</> has a dependency on table
5843        <literal>A</>, the command <literal>DROP TABLE A, B</> no longer
5844        requires the <literal>CASCADE</> option.
5845       </para>
5846      </listitem>
5847
5848      <listitem>
5849       <para>
5850        Fix various problems with concurrent <command>DROP</> commands
5851        by ensuring that locks are taken before we begin to drop dependencies
5852        of an object (Tom)
5853       </para>
5854      </listitem>
5855
5856      <listitem>
5857       <para>
5858        Improve reporting of dependencies during <command>DROP</>
5859        commands (Tom)
5860       </para>
5861      </listitem>
5862
5863      <listitem>
5864       <para>
5865        Add <literal>WITH [NO] DATA</> clause to <command>CREATE TABLE
5866        AS</>, per the <acronym>SQL</> standard (Peter, Tom)
5867       </para>
5868      </listitem>
5869
5870      <listitem>
5871       <para>
5872        Add support for user-defined I/O conversion casts (Heikki)
5873       </para>
5874      </listitem>
5875
5876      <listitem>
5877       <para>
5878        Allow <command>CREATE AGGREGATE</> to use an <type>internal</>
5879        transition datatype (Tom)
5880       </para>
5881      </listitem>
5882
5883      <listitem>
5884       <para>
5885        Add <literal>LIKE</> clause to <command>CREATE TYPE</> (Tom)
5886       </para>
5887
5888       <para>
5889        This simplifies creation of data types that use the same internal
5890        representation as an existing type.
5891       </para>
5892      </listitem>
5893
5894      <listitem>
5895       <para>
5896        Allow specification of the type category and <quote>preferred</>
5897        status for user-defined base types (Tom)
5898       </para>
5899
5900       <para>
5901        This allows more control over the coercion behavior of user-defined
5902        types.
5903       </para>
5904      </listitem>
5905
5906      <listitem>
5907       <para>
5908        Allow <command>CREATE OR REPLACE VIEW</> to add columns to the
5909        end of a view (Robert Haas)
5910       </para>
5911      </listitem>
5912
5913     </itemizedlist>
5914
5915     <sect4>
5916      <title><command>ALTER</></title>
5917      <itemizedlist>
5918
5919       <listitem>
5920        <para>
5921         Add <command>ALTER TYPE RENAME</> (Petr Jelinek)
5922        </para>
5923       </listitem>
5924
5925       <listitem>
5926        <para>
5927         Add <command>ALTER SEQUENCE ... RESTART</> (with no parameter) to
5928         reset a sequence to its initial value (Zoltan Boszormenyi)
5929        </para>
5930       </listitem>
5931
5932       <listitem>
5933        <para>
5934         Modify the <command>ALTER TABLE</> syntax to allow all reasonable
5935         combinations for tables, indexes, sequences, and views (Tom)
5936        </para>
5937
5938        <para>
5939         This change allows the following new syntaxes:
5940
5941         <itemizedlist>
5942          <listitem>
5943           <para>
5944            <command>ALTER SEQUENCE OWNER TO</>
5945           </para>
5946          </listitem>
5947          <listitem>
5948           <para>
5949            <command>ALTER VIEW ALTER COLUMN SET/DROP DEFAULT</>
5950           </para>
5951          </listitem>
5952          <listitem>
5953           <para>
5954            <command>ALTER VIEW OWNER TO</>
5955           </para>
5956          </listitem>
5957          <listitem>
5958           <para>
5959            <command>ALTER VIEW SET SCHEMA</>
5960           </para>
5961          </listitem>
5962         </itemizedlist>
5963
5964         There is no actual new functionality here, but formerly
5965         you had to say <command>ALTER TABLE</> to do these things,
5966         which was confusing.
5967        </para>
5968       </listitem>
5969
5970       <listitem>
5971        <para>
5972         Add support for the syntax <command>ALTER TABLE ... ALTER COLUMN
5973         ... SET DATA TYPE</> (Peter)
5974        </para>
5975
5976        <para>
5977         This is <acronym>SQL</>-standard syntax for functionality that
5978         was already supported.
5979        </para>
5980       </listitem>
5981
5982       <listitem>
5983        <para>
5984         Make <command>ALTER TABLE SET WITHOUT OIDS</> rewrite the table
5985         to physically remove <type>OID</> values (Tom)
5986        </para>
5987
5988        <para>
5989         Also, add <command>ALTER TABLE SET WITH OIDS</> to rewrite the
5990         table to add <type>OID</>s.
5991        </para>
5992       </listitem>
5993
5994      </itemizedlist>
5995
5996     </sect4>
5997
5998     <sect4>
5999      <title>Database Manipulation</title>
6000      <itemizedlist>
6001
6002       <listitem>
6003        <para>
6004         Improve reporting of
6005         <command>CREATE</>/<command>DROP</>/<command>RENAME DATABASE</>
6006         failure when uncommitted prepared transactions are the cause
6007         (Tom)
6008        </para>
6009       </listitem>
6010
6011       <listitem>
6012        <para>
6013         Make <varname>LC_COLLATE</> and <varname>LC_CTYPE</> into
6014         per-database settings (Radek Strnad, Heikki)
6015        </para>
6016
6017        <para>
6018         This makes collation similar to encoding, which was always
6019         configurable per database.
6020        </para>
6021       </listitem>
6022
6023       <listitem>
6024        <para>
6025         Improve checks that the database encoding, collation
6026         (<varname>LC_COLLATE</>), and character classes
6027         (<varname>LC_CTYPE</>) match (Heikki, Tom)
6028        </para>
6029
6030        <para>
6031         Note in particular that a new database's encoding and locale
6032         settings can be changed only when copying from <literal>template0</>.
6033         This prevents possibly copying data that doesn't match the settings.
6034        </para>
6035       </listitem>
6036
6037       <listitem>
6038        <para>
6039         Add <command>ALTER DATABASE SET TABLESPACE</> to move a database
6040         to a new tablespace (Guillaume Lelarge, Bernd Helmle)
6041        </para>
6042       </listitem>
6043
6044      </itemizedlist>
6045
6046     </sect4>
6047
6048    </sect3>
6049
6050    <sect3>
6051     <title>Utility Operations</title>
6052
6053     <itemizedlist>
6054
6055      <listitem>
6056       <para>
6057        Add a <literal>VERBOSE</> option to the <command>CLUSTER</> command and
6058        <application>clusterdb</> (Jim Cox)
6059       </para>
6060      </listitem>
6061
6062      <listitem>
6063       <para>
6064        Decrease memory requirements for recording pending trigger
6065        events (Tom)
6066       </para>
6067      </listitem>
6068
6069     </itemizedlist>
6070
6071     <sect4>
6072      <title>Indexes</title>
6073      <itemizedlist>
6074
6075       <listitem>
6076        <para>
6077         Dramatically improve the speed of building and accessing hash
6078         indexes (Tom Raney, Shreya Bhargava)
6079        </para>
6080
6081        <para>
6082         This allows hash indexes to be sometimes faster than btree
6083         indexes.  However, hash indexes are still not crash-safe.
6084        </para>
6085       </listitem>
6086
6087       <listitem>
6088        <para>
6089         Make hash indexes store only the hash code, not the full value of
6090         the indexed column (Xiao Meng)
6091        </para>
6092
6093        <para>
6094         This greatly reduces the size of hash indexes for long indexed
6095         values, improving performance.
6096        </para>
6097       </listitem>
6098
6099       <listitem>
6100        <para>
6101         Implement fast update option for GIN indexes (Teodor, Oleg)
6102        </para>
6103
6104        <para>
6105         This option greatly improves update speed at a small penalty in search
6106         speed.
6107        </para>
6108       </listitem>
6109
6110       <listitem>
6111        <para>
6112         <literal>xxx_pattern_ops</> indexes can now be used for simple
6113         equality comparisons, not only for <literal>LIKE</> (Tom)
6114        </para>
6115       </listitem>
6116
6117      </itemizedlist>
6118
6119     </sect4>
6120
6121     <sect4>
6122      <title>Full Text Indexes</title>
6123      <itemizedlist>
6124
6125       <listitem>
6126        <para>
6127         Remove the requirement to use <literal>@@@</> when doing
6128         <acronym>GIN</> weighted lookups on full text indexes (Tom, Teodor)
6129        </para>
6130
6131        <para>
6132         The normal <literal>@@</> text search operator can be used
6133         instead.
6134        </para>
6135       </listitem>
6136
6137       <listitem>
6138        <para>
6139         Add an optimizer selectivity function for <literal>@@</> text
6140         search operations (Jan Urbanski)
6141        </para>
6142       </listitem>
6143
6144       <listitem>
6145        <para>
6146         Allow prefix matching in full text searches (Teodor Sigaev,
6147         Oleg Bartunov)
6148        </para>
6149       </listitem>
6150
6151       <listitem>
6152        <para>
6153         Support multi-column <acronym>GIN</> indexes (Teodor Sigaev)
6154        </para>
6155       </listitem>
6156
6157       <listitem>
6158        <para>
6159         Improve support for Nepali language and Devanagari alphabet (Teodor)
6160        </para>
6161       </listitem>
6162
6163      </itemizedlist>
6164
6165     </sect4>
6166
6167     <sect4>
6168      <title><command>VACUUM</></title>
6169      <itemizedlist>
6170
6171       <listitem>
6172        <para>
6173         Track free space in separate per-relation <quote>fork</> files (Heikki)
6174        </para>
6175
6176        <para>
6177         Free space discovered by <command>VACUUM</> is now recorded in
6178         <filename>*_fsm</> files, rather than in a fixed-sized shared memory
6179         area.  The <varname>max_fsm_pages</> and <varname>max_fsm_relations</>
6180         settings have been removed, greatly simplifying administration of
6181         free space management.
6182        </para>
6183       </listitem>
6184
6185       <listitem>
6186        <para>
6187         Add a visibility map to track pages that do not require
6188         vacuuming (Heikki)
6189        </para>
6190
6191        <para>
6192         This allows <command>VACUUM</> to avoid scanning all of
6193         a table when only a portion of the table needs vacuuming.
6194         The visibility map is stored in per-relation <quote>fork</> files.
6195        </para>
6196       </listitem>
6197
6198       <listitem>
6199        <para>
6200         Add <varname>vacuum_freeze_table_age</> parameter to control
6201         when <command>VACUUM</> should ignore the visibility map and
6202         do a full table scan to freeze tuples (Heikki)
6203        </para>
6204       </listitem>
6205
6206       <listitem>
6207        <para>
6208         Track transaction snapshots more carefully (Alvaro)
6209        </para>
6210
6211        <para>
6212         This improves <command>VACUUM</>'s ability to reclaim space
6213         in the presence of long-running transactions.
6214        </para>
6215       </listitem>
6216
6217       <listitem>
6218        <para>
6219         Add ability to specify per-relation autovacuum and <acronym>TOAST</>
6220         parameters in <command>CREATE TABLE</> (Alvaro, Euler Taveira de
6221         Oliveira)
6222        </para>
6223
6224        <para>
6225         Autovacuum options used to be stored in a system table.
6226        </para>
6227       </listitem>
6228
6229       <listitem>
6230        <para>
6231         Add <literal>--freeze</> option to <application>vacuumdb</>
6232         (Bruce)
6233        </para>
6234       </listitem>
6235
6236      </itemizedlist>
6237
6238     </sect4>
6239
6240    </sect3>
6241
6242    <sect3>
6243     <title>Data Types</title>
6244     <itemizedlist>
6245
6246      <listitem>
6247       <para>
6248        Add a <literal>CaseSensitive</> option for text search synonym
6249        dictionaries (Simon)
6250       </para>
6251      </listitem>
6252
6253      <listitem>
6254       <para>
6255        Improve the precision of <type>NUMERIC</> division (Tom)
6256       </para>
6257      </listitem>
6258
6259      <listitem>
6260       <para>
6261        Add basic arithmetic operators for <type>int2</> with <type>int8</>
6262        (Tom)
6263       </para>
6264
6265       <para>
6266        This eliminates the need for explicit casting in some situations.
6267       </para>
6268      </listitem>
6269
6270      <listitem>
6271       <para>
6272        Allow <type>UUID</> input to accept an optional hyphen after
6273        every fourth digit (Robert Haas)
6274       </para>
6275      </listitem>
6276
6277      <listitem>
6278       <para>
6279        Allow <literal>on</>/<literal>off</> as input for the boolean data type
6280        (Itagaki Takahiro)
6281       </para>
6282      </listitem>
6283
6284      <listitem>
6285       <para>
6286        Allow spaces around <literal>NaN</> in the input string for
6287        type <type>numeric</> (Sam Mason)
6288       </para>
6289      </listitem>
6290
6291     </itemizedlist>
6292
6293     <sect4>
6294      <title>Temporal Data Types</title>
6295      <itemizedlist>
6296
6297       <listitem>
6298        <para>
6299         Reject year <literal>0 BC</> and years <literal>000</> and
6300         <literal>0000</> (Tom)
6301        </para>
6302
6303        <para>
6304         Previously these were interpreted as <literal>1 BC</>.
6305         (Note: years <literal>0</> and <literal>00</> are still assumed to be
6306         the year 2000.)
6307        </para>
6308       </listitem>
6309
6310       <listitem>
6311        <para>
6312         Include <literal>SGT</> (Singapore time) in the default list of
6313         known time zone abbreviations (Tom)
6314        </para>
6315       </listitem>
6316
6317       <listitem>
6318        <para>
6319         Support <literal>infinity</> and <literal>-infinity</> as
6320         values of type <type>date</> (Tom)
6321        </para>
6322       </listitem>
6323
6324       <listitem>
6325        <para>
6326         Make parsing of <type>interval</> literals more standard-compliant
6327         (Tom, Ron Mayer)
6328        </para>
6329
6330        <para>
6331         For example, <literal>INTERVAL '1' YEAR</> now does what it's
6332         supposed to.
6333        </para>
6334       </listitem>
6335
6336       <listitem>
6337        <para>
6338         Allow <type>interval</> fractional-seconds precision to be specified
6339         after the <literal>second</> keyword, for <acronym>SQL</> standard
6340         compliance (Tom)
6341        </para>
6342
6343        <para>
6344         Formerly the precision had to be specified after the keyword
6345         <type>interval</>.  (For backwards compatibility, this syntax is still
6346         supported, though deprecated.)  Data type definitions will now be
6347         output using the standard format.
6348        </para>
6349       </listitem>
6350
6351       <listitem>
6352        <para>
6353         Support the <acronym>IS0 8601</> <type>interval</> syntax (Ron
6354         Mayer, Kevin Grittner)
6355        </para>
6356
6357        <para>
6358         For example, <literal>INTERVAL 'P1Y2M3DT4H5M6.7S'</> is now
6359         supported.
6360        </para>
6361       </listitem>
6362
6363       <listitem>
6364        <para>
6365         Add <varname>IntervalStyle</> parameter
6366         which controls how <type>interval</> values are output (Ron Mayer)
6367        </para>
6368
6369        <para>
6370         Valid values are:  <literal>postgres</>, <literal>postgres_verbose</>,
6371         <literal>sql_standard</>, <literal>iso_8601</>.  This setting also
6372         controls the handling of negative <type>interval</> input when only
6373         some fields have positive/negative designations.
6374        </para>
6375       </listitem>
6376
6377       <listitem>
6378        <para>
6379         Improve consistency of handling of fractional seconds in
6380         <type>timestamp</> and <type>interval</> output (Ron Mayer)
6381        </para>
6382       </listitem>
6383
6384      </itemizedlist>
6385
6386     </sect4>
6387
6388     <sect4>
6389      <title>Arrays</title>
6390      <itemizedlist>
6391
6392       <listitem>
6393        <para>
6394         Improve the handling of casts applied to <literal>ARRAY[]</>
6395         constructs, such as <literal>ARRAY[...]::integer[]</>
6396         (Brendan Jurd)
6397        </para>
6398
6399        <para>
6400         Formerly <productname>PostgreSQL</> attempted to determine a data type
6401         for the <literal>ARRAY[]</> construct without reference to the ensuing
6402         cast.  This could fail unnecessarily in many cases, in particular when
6403         the <literal>ARRAY[]</> construct was empty or contained only
6404         ambiguous entries such as <literal>NULL</>.  Now the cast is consulted
6405         to determine the type that the array elements must be.
6406        </para>
6407       </listitem>
6408
6409       <listitem>
6410        <para>
6411         Make <acronym>SQL</>-syntax <type>ARRAY</> dimensions optional
6412         to match the <acronym>SQL</> standard (Peter)
6413        </para>
6414       </listitem>
6415
6416       <listitem>
6417        <para>
6418         Add <function>array_ndims()</> to return the number
6419         of dimensions of an array (Robert Haas)
6420        </para>
6421       </listitem>
6422
6423       <listitem>
6424        <para>
6425         Add <function>array_length()</> to return the length
6426         of an array for a specified dimension (Jim Nasby, Robert
6427         Haas, Peter Eisentraut)
6428        </para>
6429       </listitem>
6430
6431       <listitem>
6432        <para>
6433         Add aggregate function <function>array_agg()</>, which
6434         returns all aggregated values as a single array (Robert Haas,
6435         Jeff Davis, Peter)
6436        </para>
6437       </listitem>
6438
6439       <listitem>
6440        <para>
6441         Add <function>unnest()</>, which converts an array to
6442         individual row values (Tom)
6443        </para>
6444
6445        <para>
6446         This is the opposite of <function>array_agg()</>.
6447        </para>
6448       </listitem>
6449
6450       <listitem>
6451        <para>
6452         Add <function>array_fill()</> to create arrays initialized with
6453         a value (Pavel Stehule)
6454        </para>
6455       </listitem>
6456
6457       <listitem>
6458        <para>
6459         Add <function>generate_subscripts()</> to simplify generating
6460         the range of an array's subscripts (Pavel Stehule)
6461        </para>
6462       </listitem>
6463
6464      </itemizedlist>
6465
6466     </sect4>
6467
6468     <sect4>
6469      <title>Wide-Value Storage (<acronym>TOAST</>)</title>
6470      <itemizedlist>
6471
6472       <listitem>
6473        <para>
6474         Consider <acronym>TOAST</> compression on values as short as
6475         32 bytes (previously 256 bytes) (Greg Stark)
6476        </para>
6477       </listitem>
6478
6479       <listitem>
6480        <para>
6481         Require 25% minimum space savings before using <acronym>TOAST</>
6482         compression (previously 20% for small values and any-savings-at-all
6483         for large values) (Greg)
6484        </para>
6485       </listitem>
6486
6487       <listitem>
6488        <para>
6489         Improve <acronym>TOAST</> heuristics for rows that have a mix of large
6490         and small toastable fields, so that we prefer to push large values out
6491         of line and don't compress small values unnecessarily (Greg, Tom)
6492        </para>
6493       </listitem>
6494
6495      </itemizedlist>
6496
6497     </sect4>
6498
6499    </sect3>
6500
6501    <sect3>
6502     <title>Functions</title>
6503     <itemizedlist>
6504
6505      <listitem>
6506       <para>
6507        Document that <function>setseed()</> allows values from
6508        <literal>-1</> to <literal>1</> (not just <literal>0</> to
6509        <literal>1</>), and enforce the valid range (Kris Jurka)
6510       </para>
6511      </listitem>
6512
6513      <listitem>
6514       <para>
6515        Add server-side function <function>lo_import(filename, oid)</>
6516        (Tatsuo)
6517       </para>
6518      </listitem>
6519
6520      <listitem>
6521       <para>
6522        Add <function>quote_nullable()</>, which behaves like
6523        <function>quote_literal()</> but returns the string <literal>NULL</> for
6524        a null argument (Brendan Jurd)
6525       </para>
6526      </listitem>
6527
6528      <listitem>
6529       <para>
6530        Improve full text search <function>headline()</> function to
6531        allow extracting several fragments of text (Sushant Sinha)
6532       </para>
6533      </listitem>
6534
6535      <listitem>
6536       <para>
6537        Add <function>suppress_redundant_updates_trigger()</> trigger
6538        function to avoid overhead for non-data-changing updates (Andrew)
6539       </para>
6540      </listitem>
6541
6542      <listitem>
6543       <para>
6544        Add <function>div(numeric, numeric)</> to perform <type>numeric</>
6545        division without rounding (Tom)
6546       </para>
6547      </listitem>
6548
6549      <listitem>
6550       <para>
6551        Add <type>timestamp</> and <type>timestamptz</> versions of
6552        <function>generate_series()</> (Hitoshi Harada)
6553       </para>
6554      </listitem>
6555
6556     </itemizedlist>
6557
6558     <sect4>
6559      <title>Object Information Functions</title>
6560      <itemizedlist>
6561
6562       <listitem>
6563        <para>
6564         Implement <function>current_query()</> for use by functions
6565         that need to know the currently running query (Tomas Doran)
6566        </para>
6567       </listitem>
6568
6569       <listitem>
6570        <para>
6571         Add <function>pg_get_keywords()</> to return a list of the
6572         parser keywords (Dave Page)
6573        </para>
6574       </listitem>
6575
6576       <listitem>
6577        <para>
6578         Add <function>pg_get_functiondef()</> to see a function's
6579         definition (Abhijit Menon-Sen)
6580        </para>
6581       </listitem>
6582
6583       <listitem>
6584        <para>
6585         Allow the second argument of <function>pg_get_expr()</> to be zero
6586         when deparsing an expression that does not contain variables (Tom)
6587        </para>
6588       </listitem>
6589
6590       <listitem>
6591        <para>
6592         Modify <function>pg_relation_size()</> to use <literal>regclass</>
6593         (Heikki)
6594        </para>
6595
6596        <para>
6597         <function>pg_relation_size(data_type_name)</> no longer works.
6598        </para>
6599       </listitem>
6600
6601       <listitem>
6602        <para>
6603         Add <literal>boot_val</> and <literal>reset_val</> columns to
6604         <literal>pg_settings</> output (Greg Smith)
6605        </para>
6606       </listitem>
6607
6608       <listitem>
6609        <para>
6610         Add source file name and line number columns to
6611         <literal>pg_settings</> output for variables set in a configuration
6612         file (Magnus, Alvaro)
6613        </para>
6614
6615        <para>
6616         For security reasons, these columns are only visible to superusers.
6617        </para>
6618       </listitem>
6619
6620       <listitem>
6621        <para>
6622         Add support for <varname>CURRENT_CATALOG</>,
6623         <varname>CURRENT_SCHEMA</>, <varname>SET CATALOG</>, <varname>SET
6624         SCHEMA</> (Peter)
6625        </para>
6626
6627        <para>
6628         These provide <acronym>SQL</>-standard syntax for existing features.
6629        </para>
6630       </listitem>
6631
6632       <listitem>
6633        <para>
6634         Add <function>pg_typeof()</> which returns the data type
6635         of any value (Brendan Jurd)
6636        </para>
6637       </listitem>
6638
6639       <listitem>
6640        <para>
6641         Make <function>version()</> return information about whether
6642         the server is a 32- or 64-bit binary (Bruce)
6643        </para>
6644       </listitem>
6645
6646       <listitem>
6647        <para>
6648         Fix the behavior of information schema columns
6649         <structfield>is_insertable_into</> and <structfield>is_updatable</> to
6650         be consistent (Peter)
6651        </para>
6652       </listitem>
6653
6654       <listitem>
6655        <para>
6656         Improve the behavior of information schema
6657         <structfield>datetime_precision</> columns (Peter)
6658        </para>
6659
6660        <para>
6661         These columns now show zero for <type>date</> columns, and 6
6662         (the default precision) for <type>time</>, <type>timestamp</>, and
6663         <type>interval</> without a declared precision, rather than showing
6664         null as formerly.
6665        </para>
6666       </listitem>
6667
6668       <listitem>
6669        <para>
6670         Convert remaining builtin set-returning functions to use
6671         <literal>OUT</> parameters (Jaime Casanova)
6672        </para>
6673
6674        <para>
6675         This makes it possible to call these functions without specifying
6676         a column list:  <function>pg_show_all_settings()</>,
6677         <function>pg_lock_status()</>, <function>pg_prepared_xact()</>,
6678         <function>pg_prepared_statement()</>, <function>pg_cursor()</>
6679        </para>
6680       </listitem>
6681
6682       <listitem>
6683        <para>
6684         Make <function>pg_*_is_visible()</> and
6685         <function>has_*_privilege()</> functions return <literal>NULL</>
6686         for invalid OIDs, rather than reporting an error (Tom)
6687        </para>
6688       </listitem>
6689
6690       <listitem>
6691        <para>
6692         Extend <function>has_*_privilege()</> functions to allow inquiring
6693         about the OR of multiple privileges in one call (Stephen
6694         Frost, Tom)
6695        </para>
6696       </listitem>
6697
6698       <listitem>
6699        <para>
6700         Add <function>has_column_privilege()</> and
6701         <function>has_any_column_privilege()</> functions (Stephen
6702         Frost, Tom)
6703        </para>
6704       </listitem>
6705
6706      </itemizedlist>
6707
6708     </sect4>
6709
6710     <sect4>
6711      <title>Function Creation</title>
6712      <itemizedlist>
6713
6714       <listitem>
6715        <para>
6716         Support variadic functions (functions with a variable number
6717         of arguments) (Pavel Stehule)
6718        </para>
6719
6720        <para>
6721         Only trailing arguments can be optional, and they all must be
6722         of the same data type.
6723        </para>
6724       </listitem>
6725
6726       <listitem>
6727        <para>
6728         Support default values for function arguments (Pavel Stehule)
6729        </para>
6730       </listitem>
6731
6732       <listitem>
6733        <para>
6734         Add <command>CREATE FUNCTION ... RETURNS TABLE</> clause (Pavel
6735         Stehule)
6736        </para>
6737       </listitem>
6738
6739       <listitem>
6740        <para>
6741         Allow <acronym>SQL</>-language functions to return the output
6742         of an <command>INSERT</>/<command>UPDATE</>/<command>DELETE</>
6743         <literal>RETURNING</> clause (Tom)
6744        </para>
6745       </listitem>
6746
6747      </itemizedlist>
6748
6749     </sect4>
6750
6751     <sect4>
6752      <title>PL/pgSQL Server-Side Language</title>
6753      <itemizedlist>
6754
6755       <listitem>
6756        <para>
6757         Support <literal>EXECUTE USING</> for easier insertion of data
6758         values into a dynamic query string (Pavel Stehule)
6759        </para>
6760       </listitem>
6761
6762       <listitem>
6763        <para>
6764         Allow looping over the results of a cursor using a <literal>FOR</>
6765         loop (Pavel Stehule)
6766        </para>
6767       </listitem>
6768
6769       <listitem>
6770        <para>
6771         Support <literal>RETURN QUERY EXECUTE</> (Pavel
6772         Stehule)
6773        </para>
6774       </listitem>
6775
6776       <listitem>
6777        <para>
6778         Improve the <literal>RAISE</> command (Pavel Stehule)
6779
6780         <itemizedlist>
6781          <listitem>
6782           <para>
6783            Support <literal>DETAIL</> and <literal>HINT</> fields
6784           </para>
6785          </listitem>
6786          <listitem>
6787           <para>
6788            Support specification of the <literal>SQLSTATE</> error code
6789           </para>
6790          </listitem>
6791          <listitem>
6792           <para>
6793            Support an exception name parameter
6794           </para>
6795          </listitem>
6796          <listitem>
6797           <para>
6798            Allow <literal>RAISE</> without parameters in an exception
6799            block to re-throw the current error
6800           </para>
6801          </listitem>
6802         </itemizedlist>
6803        </para>
6804       </listitem>
6805
6806       <listitem>
6807        <para>
6808         Allow specification of <varname>SQLSTATE</> codes
6809         in <literal>EXCEPTION</> lists (Pavel Stehule)
6810        </para>
6811
6812        <para>
6813         This is useful for handling custom <varname>SQLSTATE</> codes.
6814        </para>
6815       </listitem>
6816
6817       <listitem>
6818        <para>
6819         Support the <literal>CASE</> statement (Pavel Stehule)
6820        </para>
6821       </listitem>
6822
6823       <listitem>
6824        <para>
6825         Make <command>RETURN QUERY</> set the special <literal>FOUND</> and
6826         <command>GET DIAGNOSTICS</> <literal>ROW_COUNT</> variables
6827         (Pavel Stehule)
6828        </para>
6829       </listitem>
6830
6831       <listitem>
6832        <para>
6833         Make <command>FETCH</> and <command>MOVE</> set the
6834         <command>GET DIAGNOSTICS</> <literal>ROW_COUNT</> variable
6835         (Andrew Gierth)
6836        </para>
6837       </listitem>
6838
6839       <listitem>
6840        <para>
6841         Make <command>EXIT</> without a label always exit the innermost
6842         loop (Tom)
6843        </para>
6844
6845        <para>
6846         Formerly, if there were a <literal>BEGIN</> block more closely nested
6847         than any loop, it would exit that block instead.  The new behavior
6848         matches Oracle(TM) and is also what was previously stated by our own
6849         documentation.
6850        </para>
6851       </listitem>
6852
6853       <listitem>
6854        <para>
6855         Make processing of string literals and nested block comments
6856         match the main SQL parser's processing (Tom)
6857        </para>
6858
6859        <para>
6860         In particular, the format string in <command>RAISE</> now works
6861         the same as any other string literal, including being subject
6862         to <varname>standard_conforming_strings</>.  This change also
6863         fixes other cases in which valid commands would fail when
6864         <varname>standard_conforming_strings</> is on.
6865        </para>
6866       </listitem>
6867
6868       <listitem>
6869        <para>
6870         Avoid memory leakage when the same function is called at varying
6871         exception-block nesting depths (Tom)
6872        </para>
6873       </listitem>
6874
6875      </itemizedlist>
6876
6877     </sect4>
6878
6879    </sect3>
6880
6881    <sect3>
6882     <title>Client Applications</title>
6883
6884     <itemizedlist>
6885
6886      <listitem>
6887       <para>
6888        Fix <literal>pg_ctl restart</> to preserve command-line arguments
6889        (Bruce)
6890       </para>
6891      </listitem>
6892
6893      <listitem>
6894       <para>
6895        Add <literal>-w</>/<literal>--no-password</> option that
6896        prevents password prompting in all utilities that have a
6897        <literal>-W</>/<literal>--password</> option (Peter)
6898       </para>
6899      </listitem>
6900
6901      <listitem>
6902       <para>
6903        Remove <option>-q</> (quiet) option of <application>createdb</>,
6904        <application>createuser</>, <application>dropdb</>,
6905        <application>dropuser</> (Peter)
6906       </para>
6907
6908       <para>
6909        These options have had no effect since <productname>PostgreSQL</>
6910        8.3.
6911       </para>
6912      </listitem>
6913
6914     </itemizedlist>
6915
6916     <sect4>
6917      <title><application>psql</></title>
6918      <itemizedlist>
6919
6920       <listitem>
6921        <para>
6922         Remove verbose startup banner; now just suggest <literal>help</>
6923         (Joshua Drake)
6924        </para>
6925       </listitem>
6926
6927       <listitem>
6928        <para>
6929         Make <literal>help</> show common backslash commands (Greg
6930         Sabino Mullane)
6931        </para>
6932       </listitem>
6933
6934       <listitem>
6935        <para>
6936         Add <literal>\pset format wrapped</> mode to wrap output to the
6937         screen width, or file/pipe output too if <literal>\pset columns</>
6938         is set (Bryce Nesbitt)
6939        </para>
6940       </listitem>
6941
6942       <listitem>
6943        <para>
6944         Allow all supported spellings of boolean values in <command>\pset</>,
6945         rather than just <literal>on</> and <literal>off</> (Bruce)
6946        </para>
6947
6948        <para>
6949         Formerly, any string other than <quote>off</> was silently taken
6950         to mean <literal>true</>.  <application>psql</> will now complain
6951         about unrecognized spellings (but still take them as <literal>true</>).
6952        </para>
6953       </listitem>
6954
6955       <listitem>
6956        <para>
6957         Use the pager for wide output (Bruce)
6958        </para>
6959       </listitem>
6960
6961       <listitem>
6962        <para>
6963         Require a space between a one-letter backslash command and its first
6964         argument (Bernd Helmle)
6965        </para>
6966
6967        <para>
6968         This removes a historical source of ambiguity.
6969        </para>
6970       </listitem>
6971
6972       <listitem>
6973        <para>
6974         Improve tab completion support for schema-qualified and
6975         quoted identifiers (Greg Sabino Mullane)
6976        </para>
6977       </listitem>
6978
6979       <listitem>
6980        <para>
6981         Add optional <literal>on</>/<literal>off</> argument for
6982         <command>\timing</> (David Fetter)
6983        </para>
6984       </listitem>
6985
6986       <listitem>
6987        <para>
6988         Display access control rights on multiple lines (Brendan
6989         Jurd, Andreas Scherbaum)
6990        </para>
6991       </listitem>
6992
6993       <listitem>
6994        <para>
6995         Make <command>\l</> show database access privileges (Andrew Gilligan)
6996        </para>
6997       </listitem>
6998
6999       <listitem>
7000        <para>
7001         Make <command>\l+</> show database sizes, if permissions
7002         allow (Andrew Gilligan)
7003        </para>
7004       </listitem>
7005
7006       <listitem>
7007        <para>
7008         Add the <command>\ef</> command to edit function definitions
7009         (Abhijit Menon-Sen)
7010        </para>
7011       </listitem>
7012
7013      </itemizedlist>
7014
7015     </sect4>
7016
7017     <sect4>
7018      <title><application>psql</> \d* commands</title>
7019
7020      <itemizedlist>
7021
7022       <listitem>
7023        <para>
7024         Make <command>\d*</> commands that do not have a pattern argument
7025         show system objects only if the <literal>S</> modifier is specified
7026         (Greg Sabino Mullane, Bruce)
7027        </para>
7028
7029        <para>
7030         The former behavior was inconsistent across different variants
7031         of <command>\d</>, and in most cases it provided no easy way to see
7032         just user objects.
7033        </para>
7034       </listitem>
7035
7036       <listitem>
7037        <para>
7038         Improve <command>\d*</> commands to work with older
7039         <productname>PostgreSQL</> server versions (back to 7.4),
7040         not only the current server version
7041         (Guillaume Lelarge)
7042        </para>
7043       </listitem>
7044
7045       <listitem>
7046        <para>
7047         Make <command>\d</> show foreign-key constraints that reference
7048         the selected table (Kenneth D'Souza)
7049        </para>
7050       </listitem>
7051
7052       <listitem>
7053        <para>
7054         Make <command>\d</> on a sequence show its column values
7055         (Euler Taveira de Oliveira)
7056        </para>
7057       </listitem>
7058
7059       <listitem>
7060        <para>
7061         Add column storage type and other relation options to the
7062         <command>\d+</> display (Gregory Stark, Euler Taveira de
7063         Oliveira)
7064        </para>
7065       </listitem>
7066
7067       <listitem>
7068        <para>
7069         Show relation size in <command>\dt+</> output (Dickson S.
7070         Guedes)
7071        </para>
7072       </listitem>
7073
7074       <listitem>
7075        <para>
7076         Show the possible values of <literal>enum</> types in <command>\dT+</>
7077         (David Fetter)
7078        </para>
7079       </listitem>
7080
7081       <listitem>
7082        <para>
7083         Allow <command>\dC</> to accept a wildcard pattern, which matches
7084         either datatype involved in the cast (Tom)
7085        </para>
7086       </listitem>
7087
7088       <listitem>
7089        <para>
7090         Add a function type column to <command>\df</>'s output, and add
7091         options to list only selected types of functions (David Fetter)
7092        </para>
7093       </listitem>
7094
7095       <listitem>
7096        <para>
7097         Make <command>\df</> not hide functions that take or return
7098         type <type>cstring</> (Tom)
7099        </para>
7100
7101        <para>
7102         Previously, such functions were hidden because most of them are
7103         datatype I/O functions, which were deemed uninteresting.  The new
7104         policy about hiding system functions by default makes this wart
7105         unnecessary.
7106        </para>
7107       </listitem>
7108
7109      </itemizedlist>
7110
7111     </sect4>
7112
7113     <sect4>
7114      <title><application>pg_dump</></title>
7115      <itemizedlist>
7116
7117       <listitem>
7118        <para>
7119         Add a <literal>--no-tablespaces</> option to
7120         <application>pg_dump</>/<application>pg_dumpall</>/<application>pg_restore</>
7121         so that dumps can be restored to clusters that have non-matching
7122         tablespace layouts (Gavin Roy)
7123        </para>
7124       </listitem>
7125
7126       <listitem>
7127        <para>
7128         Remove <option>-d</> and <option>-D</> options from
7129         <application>pg_dump</> and <application>pg_dumpall</> (Tom)
7130        </para>
7131
7132        <para>
7133         These options were too frequently confused with the option to
7134         select a database name in other <productname>PostgreSQL</>
7135         client applications.  The functionality is still available,
7136         but you must now spell out the long option name
7137         <option>--inserts</> or <option>--column-inserts</>.
7138        </para>
7139       </listitem>
7140
7141       <listitem>
7142        <para>
7143         Remove <option>-i</>/<option>--ignore-version</> option from
7144         <application>pg_dump</> and <application>pg_dumpall</> (Tom)
7145        </para>
7146
7147        <para>
7148         Use of this option does not throw an error, but it has no
7149         effect.  This option was removed because the version checks
7150         are necessary for safety.
7151        </para>
7152       </listitem>
7153
7154       <listitem>
7155        <para>
7156         Disable <varname>statement_timeout</> during dump and restore
7157         (Joshua Drake)
7158        </para>
7159       </listitem>
7160
7161       <listitem>
7162        <para>
7163         Add <application>pg_dump</>/<application>pg_dumpall</> option
7164         <option>--lock-wait-timeout</> (David Gould)
7165        </para>
7166
7167        <para>
7168         This allows dumps to fail if unable to acquire a shared lock
7169         within the specified amount of time.
7170        </para>
7171       </listitem>
7172
7173       <listitem>
7174        <para>
7175         Reorder <application>pg_dump</> <literal>--data-only</> output
7176         to dump tables referenced by foreign keys before
7177         the referencing tables (Tom)
7178        </para>
7179
7180        <para>
7181         This allows data loads when foreign keys are already present.
7182         If circular references make a safe ordering impossible, a
7183         <literal>NOTICE</> is issued.
7184        </para>
7185       </listitem>
7186
7187       <listitem>
7188        <para>
7189         Allow <application>pg_dump</>, <application>pg_dumpall</>, and
7190         <application>pg_restore</> to use a specified role (Benedek
7191         L&aacute;szl&oacute;)
7192        </para>
7193       </listitem>
7194
7195       <listitem>
7196        <para>
7197         Allow <application>pg_restore</> to use multiple concurrent
7198         connections to do the restore (Andrew)
7199        </para>
7200
7201        <para>
7202         The number of concurrent connections is controlled by the option
7203         <literal>--jobs</>.  This is supported only for custom-format archives.
7204        </para>
7205       </listitem>
7206
7207      </itemizedlist>
7208
7209     </sect4>
7210
7211    </sect3>
7212
7213    <sect3>
7214     <title>Programming Tools</title>
7215
7216     <sect4>
7217      <title><application>libpq</></title>
7218      <itemizedlist>
7219
7220       <listitem>
7221        <para>
7222         Allow the <type>OID</> to be specified when importing a large
7223         object, via new function <function>lo_import_with_oid()</> (Tatsuo)
7224        </para>
7225       </listitem>
7226
7227       <listitem>
7228        <para>
7229         Add <quote>events</> support (Andrew Chernow, Merlin Moncure)
7230        </para>
7231
7232        <para>
7233         This adds the ability to register callbacks to manage private
7234         data associated with <structname>PGconn</> and <structname>PGresult</>
7235         objects.
7236        </para>
7237       </listitem>
7238
7239       <listitem>
7240        <para>
7241         Improve error handling to allow the return of multiple
7242         error messages as multi-line error reports (Magnus)
7243        </para>
7244       </listitem>
7245
7246       <listitem>
7247        <para>
7248         Make <function>PQexecParams()</> and related functions return
7249         <varname>PGRES_EMPTY_QUERY</> for an empty query (Tom)
7250        </para>
7251
7252        <para>
7253         They previously returned <varname>PGRES_COMMAND_OK</>.
7254        </para>
7255       </listitem>
7256
7257       <listitem>
7258        <para>
7259         Document how to avoid the overhead of <function>WSACleanup()</>
7260         on Windows (Andrew Chernow)
7261        </para>
7262       </listitem>
7263
7264       <listitem>
7265        <para>
7266         Do not rely on Kerberos tickets to determine the default database
7267         username (Magnus)
7268        </para>
7269
7270        <para>
7271         Previously, a Kerberos-capable build of libpq would use the
7272         principal name from any available Kerberos ticket as default
7273         database username, even if the connection wasn't using Kerberos
7274         authentication.  This was deemed inconsistent and confusing.
7275         The default username is now determined the same way with or
7276         without Kerberos.  Note however that the database username must still
7277         match the ticket when Kerberos authentication is used.
7278        </para>
7279       </listitem>
7280      </itemizedlist>
7281
7282     </sect4>
7283
7284     <sect4>
7285      <title><application>libpq</> <acronym>SSL</> (Secure Sockets Layer)
7286       support</title>
7287      <itemizedlist>
7288
7289       <listitem>
7290        <para>
7291         Fix certificate validation for <acronym>SSL</> connections
7292         (Magnus)
7293        </para>
7294
7295        <para>
7296         <application>libpq</> now supports verifying both the certificate
7297         and the name of the server when making <acronym>SSL</>
7298         connections. If a root certificate is not available to use for
7299         verification, <acronym>SSL</> connections will fail. The
7300         <literal>sslmode</> parameter is used to enable certificate
7301         verification and set the level of checking.
7302         The default is still not to do any verification, allowing connections
7303         to SSL-enabled servers without requiring a root certificate on the
7304         client.
7305        </para>
7306       </listitem>
7307
7308       <listitem>
7309        <para>
7310         Support wildcard server certificates (Magnus)
7311        </para>
7312
7313        <para>
7314         If a certificate <acronym>CN</> starts with <literal>*</>, it will
7315         be treated as a wildcard when matching the hostname, allowing the
7316         use of the same certificate for multiple servers.
7317        </para>
7318       </listitem>
7319
7320       <listitem>
7321        <para>
7322         Allow the file locations for client certificates to be specified
7323         (Mark Woodward, Alvaro, Magnus)
7324        </para>
7325       </listitem>
7326
7327       <listitem>
7328        <para>
7329         Add a <function>PQinitOpenSSL</> function to allow greater control
7330         over OpenSSL/libcrypto initialization (Andrew Chernow)
7331        </para>
7332       </listitem>
7333
7334       <listitem>
7335        <para>
7336         Make <application>libpq</> unregister its <application>OpenSSL</>
7337         callbacks when no database connections remain open
7338         (Bruce, Magnus, Russell Smith)
7339        </para>
7340
7341        <para>
7342         This is required for applications that unload the libpq library,
7343         otherwise invalid <application>OpenSSL</> callbacks will remain.
7344        </para>
7345       </listitem>
7346
7347      </itemizedlist>
7348
7349     </sect4>
7350
7351     <sect4>
7352      <title><application>ecpg</></title>
7353      <itemizedlist>
7354
7355       <listitem>
7356        <para>
7357         Add localization support for messages (Euler Taveira de
7358         Oliveira)
7359        </para>
7360       </listitem>
7361
7362       <listitem>
7363        <para>
7364         ecpg parser is now automatically generated from the server
7365         parser (Michael)
7366        </para>
7367
7368        <para>
7369         Previously the ecpg parser was hand-maintained.
7370        </para>
7371       </listitem>
7372
7373      </itemizedlist>
7374
7375     </sect4>
7376
7377     <sect4>
7378      <title>Server Programming Interface (<acronym>SPI</>)</title>
7379      <itemizedlist>
7380
7381       <listitem>
7382        <para>
7383         Add support for single-use plans with out-of-line
7384         parameters (Tom)
7385        </para>
7386       </listitem>
7387
7388       <listitem>
7389        <para>
7390         Add new <varname>SPI_OK_REWRITTEN</> return code for
7391         <function>SPI_execute()</> (Heikki)
7392        </para>
7393
7394        <para>
7395         This is used when a command is rewritten to another type of
7396         command.
7397        </para>
7398       </listitem>
7399
7400       <listitem>
7401        <para>
7402         Remove unnecessary inclusions from <filename>executor/spi.h</> (Tom)
7403        </para>
7404
7405        <para>
7406         SPI-using modules might need to add some <literal>#include</>
7407         lines if they were depending on <filename>spi.h</> to include
7408         things for them.
7409        </para>
7410       </listitem>
7411
7412      </itemizedlist>
7413
7414     </sect4>
7415
7416    </sect3>
7417
7418    <sect3>
7419     <title>Build Options</title>
7420     <itemizedlist>
7421
7422      <listitem>
7423       <para>
7424        Update build system to use <productname>Autoconf</> 2.61 (Peter)
7425       </para>
7426      </listitem>
7427
7428      <listitem>
7429       <para>
7430        Require <productname>GNU bison</> for source code builds (Peter)
7431       </para>
7432
7433       <para>
7434        This has effectively been required for several years, but now there
7435        is no infrastructure claiming to support other parser tools.
7436       </para>
7437      </listitem>
7438
7439      <listitem>
7440       <para>
7441        Add <application>pg_config</> <literal>--htmldir</> option
7442        (Peter)
7443       </para>
7444      </listitem>
7445
7446      <listitem>
7447       <para>
7448        Pass <type>float4</> by value inside the server (Zoltan
7449        Boszormenyi)
7450       </para>
7451
7452       <para>
7453        Add <application>configure</> option
7454        <literal>--disable-float4-byval</> to use the old behavior.
7455        External C functions that use old-style (version 0) call convention
7456        and pass or return <type>float4</> values will be broken by this
7457        change, so you may need the <application>configure</> option if you
7458        have such functions and don't want to update them.
7459       </para>
7460      </listitem>
7461
7462      <listitem>
7463       <para>
7464        Pass <type>float8</>, <type>int8</>, and related datatypes
7465        by value inside the server on 64-bit platforms (Zoltan Boszormenyi)
7466       </para>
7467
7468       <para>
7469        Add <application>configure</> option
7470        <literal>--disable-float8-byval</> to use the old behavior.
7471        As above, this change might break old-style external C functions.
7472       </para>
7473      </listitem>
7474
7475      <listitem>
7476       <para>
7477        Add configure options <literal>--with-segsize</>,
7478        <literal>--with-blocksize</>, <literal>--with-wal-blocksize</>,
7479        <literal>--with-wal-segsize</> (Zdenek Kotala, Tom)
7480       </para>
7481
7482       <para>
7483        This simplifies build-time control over several constants that
7484        previously could only be changed by editing
7485        <filename>pg_config_manual.h</>.
7486       </para>
7487      </listitem>
7488
7489      <listitem>
7490       <para>
7491        Allow threaded builds on <productname>Solaris</> 2.5 (Bruce)
7492       </para>
7493      </listitem>
7494
7495      <listitem>
7496       <para>
7497        Use the system's <function>getopt_long()</> on <productname>Solaris</>
7498        (Zdenek Kotala, Tom)
7499       </para>
7500
7501       <para>
7502        This makes option processing more consistent with what Solaris users
7503        expect.
7504       </para>
7505      </listitem>
7506
7507      <listitem>
7508       <para>
7509        Add support for the <productname>Sun Studio</> compiler on
7510        <productname>Linux</> (Julius Stroffek)
7511       </para>
7512      </listitem>
7513
7514      <listitem>
7515       <para>
7516        Append the major version number to the backend <application>gettext</>
7517        domain, and the <literal>soname</> major version number to
7518        libraries' <application>gettext</> domain (Peter)
7519       </para>
7520
7521       <para>
7522        This simplifies parallel installations of multiple versions.
7523       </para>
7524      </listitem>
7525
7526      <listitem>
7527       <para>
7528        Add support for code coverage testing with <application>gcov</>
7529        (Michelle Caisse)
7530       </para>
7531      </listitem>
7532
7533      <listitem>
7534       <para>
7535        Allow out-of-tree builds on <productname>Mingw</> and
7536        <productname>Cygwin</> (Richard Evans)
7537       </para>
7538      </listitem>
7539
7540      <listitem>
7541       <para>
7542        Fix the use of <productname>Mingw</> as a cross-compiling source
7543        platform (Peter)
7544       </para>
7545      </listitem>
7546
7547     </itemizedlist>
7548
7549    </sect3>
7550
7551    <sect3>
7552     <title>Source Code</title>
7553     <itemizedlist>
7554
7555      <listitem>
7556       <para>
7557        Support 64-bit time zone data files (Heikki)
7558       </para>
7559
7560       <para>
7561        This adds support for daylight saving time (<acronym>DST</>)
7562        calculations beyond the year 2038.
7563       </para>
7564      </listitem>
7565
7566      <listitem>
7567       <para>
7568        Deprecate use of platform's <type>time_t</> data type (Tom)
7569       </para>
7570
7571       <para>
7572        Some platforms have migrated to 64-bit <type>time_t</>, some have
7573        not, and Windows can't make up its mind what it's doing.  Define
7574        <type>pg_time_t</> to have the same meaning as <type>time_t</>,
7575        but always be 64 bits (unless the platform has no 64-bit integer type),
7576        and use that type in all module APIs and on-disk data formats.
7577       </para>
7578      </listitem>
7579
7580      <listitem>
7581       <para>
7582        Fix bug in handling of the time zone database when cross-compiling
7583        (Richard Evans)
7584       </para>
7585      </listitem>
7586
7587      <listitem>
7588       <para>
7589        Link backend object files in one step, rather than in stages
7590        (Peter)
7591       </para>
7592      </listitem>
7593
7594      <listitem>
7595       <para>
7596        Improve <application>gettext</> support to allow better translation
7597        of plurals (Peter)
7598       </para>
7599      </listitem>
7600
7601      <listitem>
7602       <para>
7603        Add message translation support to the PL languages (Alvaro, Peter)
7604       </para>
7605      </listitem>
7606
7607      <listitem>
7608       <para>
7609        Add more <application>DTrace</> probes (Robert Lor)
7610       </para>
7611      </listitem>
7612
7613      <listitem>
7614       <para>
7615        Enable <application>DTrace</> support on <application>Mac OS X
7616        Leopard</> and other non-Solaris platforms (Robert Lor)
7617       </para>
7618      </listitem>
7619
7620      <listitem>
7621       <para>
7622        Simplify and standardize conversions between C strings and
7623        <type>text</> datums, by providing common functions for the purpose
7624        (Brendan Jurd, Tom)
7625       </para>
7626      </listitem>
7627
7628      <listitem>
7629       <para>
7630        Clean up the <filename>include/catalog/</> header files so that
7631        frontend programs can include them without including
7632        <filename>postgres.h</>
7633        (Zdenek Kotala)
7634       </para>
7635      </listitem>
7636
7637      <listitem>
7638       <para>
7639        Make <type>name</> char-aligned, and suppress zero-padding of
7640        <type>name</> entries in indexes (Tom)
7641       </para>
7642      </listitem>
7643
7644      <listitem>
7645       <para>
7646        Recover better if dynamically-loaded code executes <function>exit()</>
7647        (Tom)
7648       </para>
7649      </listitem>
7650
7651      <listitem>
7652       <para>
7653        Add a hook to let plug-ins monitor the executor (Itagaki
7654        Takahiro)
7655       </para>
7656      </listitem>
7657
7658      <listitem>
7659       <para>
7660        Add a hook to allow the planner's statistics lookup behavior to
7661        be overridden (Simon Riggs)
7662       </para>
7663      </listitem>
7664
7665      <listitem>
7666       <para>
7667        Add <function>shmem_startup_hook()</> for custom shared memory
7668        requirements (Tom)
7669       </para>
7670      </listitem>
7671
7672      <listitem>
7673       <para>
7674        Replace the index access method <function>amgetmulti</> entry point
7675        with <function>amgetbitmap</>, and extend the API for
7676        <function>amgettuple</> to support run-time determination of
7677        operator lossiness (Heikki, Tom, Teodor)
7678       </para>
7679
7680       <para>
7681        The API for GIN and GiST opclass <function>consistent</> functions
7682        has been extended as well.
7683       </para>
7684      </listitem>
7685
7686      <listitem>
7687       <para>
7688        Add support for partial-match searches in <acronym>GIN</> indexes
7689        (Teodor Sigaev, Oleg Bartunov)
7690       </para>
7691      </listitem>
7692
7693      <listitem>
7694       <para>
7695        Replace <structname>pg_class</> column <structfield>reltriggers</>
7696        with boolean <structfield>relhastriggers</> (Simon)
7697       </para>
7698
7699       <para>
7700        Also remove unused <structname>pg_class</> columns
7701        <structfield>relukeys</>, <structfield>relfkeys</>, and
7702        <structfield>relrefs</>.
7703       </para>
7704      </listitem>
7705
7706      <listitem>
7707       <para>
7708        Add a <structfield>relistemp</> column to <structname>pg_class</>
7709        to ease identification of temporary tables (Tom)
7710       </para>
7711      </listitem>
7712
7713      <listitem>
7714       <para>
7715        Move platform <acronym>FAQ</>s into the main documentation
7716        (Peter)
7717       </para>
7718      </listitem>
7719
7720      <listitem>
7721       <para>
7722        Prevent parser input files from being built with any conflicts
7723        (Peter)
7724       </para>
7725      </listitem>
7726
7727      <listitem>
7728       <para>
7729        Add support for the <literal>KOI8U</> (Ukrainian) encoding
7730        (Peter)
7731       </para>
7732      </listitem>
7733
7734      <listitem>
7735       <para>
7736        Add Japanese message translations (Japan PostgreSQL Users Group)
7737       </para>
7738
7739       <para>
7740        This used to be maintained as a separate project.
7741       </para>
7742      </listitem>
7743
7744      <listitem>
7745       <para>
7746        Fix problem when setting <varname>LC_MESSAGES</> on
7747        <application>MSVC</>-built systems (Hiroshi Inoue, Hiroshi
7748        Saito, Magnus)
7749       </para>
7750      </listitem>
7751
7752     </itemizedlist>
7753
7754    </sect3>
7755
7756    <sect3>
7757     <title>Contrib</title>
7758
7759     <itemizedlist>
7760
7761      <listitem>
7762       <para>
7763        Add <filename>contrib/auto_explain</> to automatically run
7764        <command>EXPLAIN</> on queries exceeding a specified duration
7765        (Itagaki Takahiro, Tom)
7766       </para>
7767      </listitem>
7768
7769      <listitem>
7770       <para>
7771        Add <filename>contrib/btree_gin</> to allow GIN indexes to
7772        handle more datatypes (Oleg, Teodor)
7773       </para>
7774      </listitem>
7775
7776      <listitem>
7777       <para>
7778        Add <filename>contrib/citext</> to provide a case-insensitive,
7779        multibyte-aware text data type (David Wheeler)
7780       </para>
7781      </listitem>
7782
7783      <listitem>
7784       <para>
7785        Add <filename>contrib/pg_stat_statements</> for server-wide
7786        tracking of statement execution statistics (Itagaki Takahiro)
7787       </para>
7788      </listitem>
7789
7790      <listitem>
7791       <para>
7792        Add duration and query mode options to <filename>contrib/pgbench</>
7793        (Itagaki Takahiro)
7794       </para>
7795      </listitem>
7796
7797      <listitem>
7798       <para>
7799        Make <filename>contrib/pgbench</> use table names
7800        <structname>pgbench_accounts</>, <structname>pgbench_branches</>,
7801        <structname>pgbench_history</>, and <structname>pgbench_tellers</>,
7802        rather than just <structname>accounts</>, <structname>branches</>,
7803        <structname>history</>, and <structname>tellers</> (Tom)
7804       </para>
7805
7806       <para>
7807        This is to reduce the risk of accidentally destroying real data
7808        by running <application>pgbench</>.
7809       </para>
7810      </listitem>
7811
7812      <listitem>
7813       <para>
7814        Fix <filename>contrib/pgstattuple</> to handle tables and
7815        indexes with over 2 billion pages (Tatsuhito Kasahara)
7816       </para>
7817      </listitem>
7818
7819      <listitem>
7820       <para>
7821        In <filename>contrib/fuzzystrmatch</>, add a version of the
7822        Levenshtein string-distance function that allows the user to
7823        specify the costs of insertion, deletion, and substitution
7824        (Volkan Yazici)
7825       </para>
7826      </listitem>
7827
7828      <listitem>
7829       <para>
7830        Make <filename>contrib/ltree</> support multibyte encodings
7831        (laser)
7832       </para>
7833      </listitem>
7834
7835      <listitem>
7836       <para>
7837        Enable <filename>contrib/dblink</> to use connection information
7838        stored in the SQL/MED catalogs (Joe Conway)
7839       </para>
7840      </listitem>
7841
7842      <listitem>
7843       <para>
7844        Improve <filename>contrib/dblink</>'s reporting of errors from
7845        the remote server (Joe Conway)
7846       </para>
7847      </listitem>
7848
7849      <listitem>
7850       <para>
7851        Make <filename>contrib/dblink</> set <varname>client_encoding</>
7852        to match the local database's encoding (Joe Conway)
7853       </para>
7854
7855       <para>
7856        This prevents encoding problems when communicating with a remote
7857        database that uses a different encoding.
7858       </para>
7859      </listitem>
7860
7861      <listitem>
7862       <para>
7863        Make sure <filename>contrib/dblink</> uses a password supplied
7864        by the user, and not accidentally taken from the server's
7865        <filename>.pgpass</> file (Joe Conway)
7866       </para>
7867
7868       <para>
7869        This is a minor security enhancement.
7870       </para>
7871      </listitem>
7872
7873      <listitem>
7874       <para>
7875        Add <function>fsm_page_contents()</>
7876        to <filename>contrib/pageinspect</> (Heikki)
7877       </para>
7878      </listitem>
7879
7880      <listitem>
7881       <para>
7882        Modify <function>get_raw_page()</> to support free space map
7883        (<filename>*_fsm</>) files.  Also update
7884        <filename>contrib/pg_freespacemap</>.
7885       </para>
7886      </listitem>
7887
7888      <listitem>
7889       <para>
7890        Add support for multibyte encodings to <filename>contrib/pg_trgm</>
7891        (Teodor)
7892       </para>
7893      </listitem>
7894
7895      <listitem>
7896       <para>
7897        Rewrite <filename>contrib/intagg</> to use new
7898        functions <function>array_agg()</> and <function>unnest()</>
7899        (Tom)
7900       </para>
7901      </listitem>
7902
7903      <listitem>
7904       <para>
7905        Make <filename>contrib/pg_standby</> recover all available WAL before
7906        failover (Fujii Masao, Simon, Heikki)
7907       </para>
7908
7909       <para>
7910        To make this work safely, you now need to set the new
7911        <literal>recovery_end_command</> option in <filename>recovery.conf</>
7912        to clean up the trigger file after failover. <application>pg_standby</>
7913        will no longer remove the trigger file itself.
7914       </para>
7915      </listitem>
7916
7917      <listitem>
7918       <para>
7919        <filename>contrib/pg_standby</>'s <option>-l</> option is now a no-op,
7920        because it is unsafe to use a symlink (Simon)
7921       </para>
7922      </listitem>
7923
7924     </itemizedlist>
7925
7926    </sect3>
7927   </sect2>
7928  </sect1>