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