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