1 <!-- doc/src/sgml/release-8.4.sgml -->
2 <!-- See header comment in release.sgml about typical markup -->
4 <sect1 id="release-8-4-13">
5 <title>Release 8.4.13</title>
8 <title>Release Date</title>
9 <simpara>2012-08-17</simpara>
13 This release contains a variety of fixes from 8.4.12.
14 For information about new features in the 8.4 major release, see
15 <xref linkend="release-8-4">.
19 <title>Migration to Version 8.4.13</title>
22 A dump/restore is not required for those running 8.4.X.
26 However, if you are upgrading from a version earlier than 8.4.10,
27 see the release notes for 8.4.10.
33 <title>Changes</title>
39 Prevent access to external files/URLs via XML entity references
40 (Noah Misch, Tom Lane)
44 <function>xml_parse()</> would attempt to fetch external files or
45 URLs as needed to resolve DTD and entity references in an XML value,
46 thus allowing unprivileged database users to attempt to fetch data
47 with the privileges of the database server. While the external data
48 wouldn't get returned directly to the user, portions of it could be
49 exposed in error messages if the data didn't parse as valid XML; and
50 in any case the mere ability to check existence of a file might be
51 useful to an attacker. (CVE-2012-3489)
57 Prevent access to external files/URLs via <filename>contrib/xml2</>'s
58 <function>xslt_process()</> (Peter Eisentraut)
62 <application>libxslt</> offers the ability to read and write both
63 files and URLs through stylesheet commands, thus allowing
64 unprivileged database users to both read and write data with the
65 privileges of the database server. Disable that through proper use
66 of <application>libxslt</>'s security options. (CVE-2012-3488)
70 Also, remove <function>xslt_process()</>'s ability to fetch documents
71 and stylesheets from external files/URLs. While this was a
72 documented <quote>feature</>, it was long regarded as a bad idea.
73 The fix for CVE-2012-3489 broke that capability, and rather than
74 expend effort on trying to fix it, we're just going to summarily
81 Prevent too-early recycling of btree index pages (Noah Misch)
85 When we allowed read-only transactions to skip assigning XIDs, we
86 introduced the possibility that a deleted btree page could be
87 recycled while a read-only transaction was still in flight to it.
88 This would result in incorrect index search results. The probability
89 of such an error occurring in the field seems very low because of the
90 timing requirements, but nonetheless it should be fixed.
96 Fix crash-safety bug with newly-created-or-reset sequences (Tom Lane)
100 If <command>ALTER SEQUENCE</> was executed on a freshly created or
101 reset sequence, and then precisely one <function>nextval()</> call
102 was made on it, and then the server crashed, WAL replay would restore
103 the sequence to a state in which it appeared that no
104 <function>nextval()</> had been done, thus allowing the first
105 sequence value to be returned again by the next
106 <function>nextval()</> call. In particular this could manifest for
107 <type>serial</> columns, since creation of a serial column's sequence
108 includes an <command>ALTER SEQUENCE OWNED BY</> step.
114 Ensure the <filename>backup_label</> file is fsync'd after
115 <function>pg_start_backup()</> (Dave Kerr)
121 Back-patch 9.1 improvement to compress the fsync request queue
126 This improves performance during checkpoints. The 9.1 change
127 has now seen enough field testing to seem safe to back-patch.
133 Only allow autovacuum to be auto-canceled by a directly blocked
138 The original coding could allow inconsistent behavior in some cases;
139 in particular, an autovacuum could get canceled after less than
140 <literal>deadlock_timeout</> grace period.
146 Improve logging of autovacuum cancels (Robert Haas)
152 Fix log collector so that <literal>log_truncate_on_rotation</> works
153 during the very first log rotation after server start (Tom Lane)
159 Fix <literal>WITH</> attached to a nested set operation
160 (<literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</>)
167 Ensure that a whole-row reference to a subquery doesn't include any
168 extra <literal>GROUP BY</> or <literal>ORDER BY</> columns (Tom Lane)
174 Disallow copying whole-row references in <literal>CHECK</>
175 constraints and index definitions during <command>CREATE TABLE</>
180 This situation can arise in <command>CREATE TABLE</> with
181 <literal>LIKE</> or <literal>INHERITS</>. The copied whole-row
182 variable was incorrectly labeled with the row type of the original
183 table not the new one. Rejecting the case seems reasonable for
184 <literal>LIKE</>, since the row types might well diverge later. For
185 <literal>INHERITS</> we should ideally allow it, with an implicit
186 coercion to the parent table's row type; but that will require more
187 work than seems safe to back-patch.
193 Fix memory leak in <literal>ARRAY(SELECT ...)</> subqueries (Heikki
194 Linnakangas, Tom Lane)
200 Fix extraction of common prefixes from regular expressions (Tom Lane)
204 The code could get confused by quantified parenthesized
205 subexpressions, such as <literal>^(foo)?bar</>. This would lead to
206 incorrect index optimization of searches for such patterns.
212 Fix bugs with parsing signed
213 <replaceable>hh</><literal>:</><replaceable>mm</> and
214 <replaceable>hh</><literal>:</><replaceable>mm</><literal>:</><replaceable>ss</>
215 fields in <type>interval</> constants (Amit Kapila, Tom Lane)
221 Report errors properly in <filename>contrib/xml2</>'s
222 <function>xslt_process()</> (Tom Lane)
228 Update time zone data files to <application>tzdata</> release 2012e
229 for DST law changes in Morocco and Tokelau
238 <sect1 id="release-8-4-12">
239 <title>Release 8.4.12</title>
242 <title>Release Date</title>
243 <simpara>2012-06-04</simpara>
247 This release contains a variety of fixes from 8.4.11.
248 For information about new features in the 8.4 major release, see
249 <xref linkend="release-8-4">.
253 <title>Migration to Version 8.4.12</title>
256 A dump/restore is not required for those running 8.4.X.
260 However, if you are upgrading from a version earlier than 8.4.10,
261 see the release notes for 8.4.10.
267 <title>Changes</title>
273 Fix incorrect password transformation in
274 <filename>contrib/pgcrypto</>'s DES <function>crypt()</> function
279 If a password string contained the byte value <literal>0x80</>, the
280 remainder of the password was ignored, causing the password to be much
281 weaker than it appeared. With this fix, the rest of the string is
282 properly included in the DES hash. Any stored password values that are
283 affected by this bug will thus no longer match, so the stored values may
284 need to be updated. (CVE-2012-2143)
290 Ignore <literal>SECURITY DEFINER</> and <literal>SET</> attributes for
291 a procedural language's call handler (Tom Lane)
295 Applying such attributes to a call handler could crash the server.
302 Allow numeric timezone offsets in <type>timestamp</> input to be up to
303 16 hours away from UTC (Tom Lane)
307 Some historical time zones have offsets larger than 15 hours, the
308 previous limit. This could result in dumped data values being rejected
315 Fix timestamp conversion to cope when the given time is exactly the
316 last DST transition time for the current timezone (Tom Lane)
320 This oversight has been there a long time, but was not noticed
321 previously because most DST-using zones are presumed to have an
322 indefinite sequence of future DST transitions.
328 Fix <type>text</> to <type>name</> and <type>char</> to <type>name</>
329 casts to perform string truncation correctly in multibyte encodings
336 Fix memory copying bug in <function>to_tsquery()</> (Heikki Linnakangas)
342 Fix planner's handling of outer PlaceHolderVars within subqueries (Tom
347 This bug concerns sub-SELECTs that reference variables coming from the
348 nullable side of an outer join of the surrounding query.
349 In 9.1, queries affected by this bug would fail with <quote>ERROR:
350 Upper-level PlaceHolderVar found where not expected</>. But in 9.0 and
351 8.4, you'd silently get possibly-wrong answers, since the value
352 transmitted into the subquery wouldn't go to null when it should.
358 Fix slow session startup when <structname>pg_attribute</> is very large
363 If <structname>pg_attribute</> exceeds one-fourth of
364 <varname>shared_buffers</>, cache rebuilding code that is sometimes
365 needed during session start would trigger the synchronized-scan logic,
366 causing it to take many times longer than normal. The problem was
367 particularly acute if many new sessions were starting at once.
373 Ensure sequential scans check for query cancel reasonably often (Merlin
378 A scan encountering many consecutive pages that contain no live tuples
379 would not respond to interrupts meanwhile.
385 Ensure the Windows implementation of <function>PGSemaphoreLock()</>
386 clears <varname>ImmediateInterruptOK</> before returning (Tom Lane)
390 This oversight meant that a query-cancel interrupt received later
391 in the same query could be accepted at an unsafe time, with
392 unpredictable but not good consequences.
398 Show whole-row variables safely when printing views or rules
399 (Abbas Butt, Tom Lane)
403 Corner cases involving ambiguous names (that is, the name could be
404 either a table or column name of the query) were printed in an
405 ambiguous way, risking that the view or rule would be interpreted
406 differently after dump and reload. Avoid the ambiguous case by
407 attaching a no-op cast.
413 Fix <command>COPY FROM</> to properly handle null marker strings that
414 correspond to invalid encoding (Tom Lane)
418 A null marker string such as <literal>E'\\0'</> should work, and did
419 work in the past, but the case got broken in 8.4.
425 Ensure autovacuum worker processes perform stack depth checking
426 properly (Heikki Linnakangas)
430 Previously, infinite recursion in a function invoked by
431 auto-<command>ANALYZE</> could crash worker processes.
437 Fix logging collector to not lose log coherency under high load (Andrew
442 The collector previously could fail to reassemble large messages if it
449 Fix logging collector to ensure it will restart file rotation
450 after receiving <systemitem>SIGHUP</> (Tom Lane)
456 Fix WAL replay logic for GIN indexes to not fail if the index was
457 subsequently dropped (Tom Lane)
463 Fix memory leak in PL/pgSQL's <command>RETURN NEXT</> command (Joe
470 Fix PL/pgSQL's <command>GET DIAGNOSTICS</> command when the target
471 is the function's first variable (Tom Lane)
477 Fix potential access off the end of memory in <application>psql</>'s
478 expanded display (<command>\x</>) mode (Peter Eisentraut)
484 Fix several performance problems in <application>pg_dump</> when
485 the database contains many objects (Jeff Janes, Tom Lane)
489 <application>pg_dump</> could get very slow if the database contained
490 many schemas, or if many objects are in dependency loops, or if there
491 are many owned sequences.
497 Fix <filename>contrib/dblink</>'s <function>dblink_exec()</> to not leak
498 temporary database connections upon error (Tom Lane)
504 Fix <filename>contrib/dblink</> to report the correct connection name in
505 error messages (Kyotaro Horiguchi)
511 Update time zone data files to <application>tzdata</> release 2012c
512 for DST law changes in Antarctica, Armenia, Chile, Cuba, Falkland
513 Islands, Gaza, Haiti, Hebron, Morocco, Syria, and Tokelau Islands;
514 also historical corrections for Canada.
523 <sect1 id="release-8-4-11">
524 <title>Release 8.4.11</title>
527 <title>Release Date</title>
528 <simpara>2012-02-27</simpara>
532 This release contains a variety of fixes from 8.4.10.
533 For information about new features in the 8.4 major release, see
534 <xref linkend="release-8-4">.
538 <title>Migration to Version 8.4.11</title>
541 A dump/restore is not required for those running 8.4.X.
545 However, if you are upgrading from a version earlier than 8.4.10,
546 see the release notes for 8.4.10.
552 <title>Changes</title>
558 Require execute permission on the trigger function for
559 <command>CREATE TRIGGER</> (Robert Haas)
563 This missing check could allow another user to execute a trigger
564 function with forged input data, by installing it on a table he owns.
565 This is only of significance for trigger functions marked
566 <literal>SECURITY DEFINER</>, since otherwise trigger functions run
567 as the table owner anyway. (CVE-2012-0866)
573 Remove arbitrary limitation on length of common name in SSL
574 certificates (Heikki Linnakangas)
578 Both <application>libpq</> and the server truncated the common name
579 extracted from an SSL certificate at 32 bytes. Normally this would
580 cause nothing worse than an unexpected verification failure, but there
581 are some rather-implausible scenarios in which it might allow one
582 certificate holder to impersonate another. The victim would have to
583 have a common name exactly 32 bytes long, and the attacker would have
584 to persuade a trusted CA to issue a certificate in which the common
585 name has that string as a prefix. Impersonating a server would also
586 require some additional exploit to redirect client connections.
593 Convert newlines to spaces in names written in <application>pg_dump</>
594 comments (Robert Haas)
598 <application>pg_dump</> was incautious about sanitizing object names
599 that are emitted within SQL comments in its output script. A name
600 containing a newline would at least render the script syntactically
601 incorrect. Maliciously crafted object names could present a SQL
602 injection risk when the script is reloaded. (CVE-2012-0868)
608 Fix btree index corruption from insertions concurrent with vacuuming
613 An index page split caused by an insertion could sometimes cause a
614 concurrently-running <command>VACUUM</> to miss removing index entries
615 that it should remove. After the corresponding table rows are removed,
616 the dangling index entries would cause errors (such as <quote>could not
617 read block N in file ...</>) or worse, silently wrong query results
618 after unrelated rows are re-inserted at the now-free table locations.
619 This bug has been present since release 8.2, but occurs so infrequently
620 that it was not diagnosed until now. If you have reason to suspect
621 that it has happened in your database, reindexing the affected index
628 Update per-column permissions, not only per-table permissions, when
629 changing table owner (Tom Lane)
633 Failure to do this meant that any previously granted column permissions
634 were still shown as having been granted by the old owner. This meant
635 that neither the new owner nor a superuser could revoke the
636 now-untraceable-to-table-owner permissions.
642 Allow non-existent values for some settings in <command>ALTER
643 USER/DATABASE SET</> (Heikki Linnakangas)
647 Allow <varname>default_text_search_config</>,
648 <varname>default_tablespace</>, and <varname>temp_tablespaces</> to be
649 set to names that are not known. This is because they might be known
650 in another database where the setting is intended to be used, or for the
651 tablespace cases because the tablespace might not be created yet. The
652 same issue was previously recognized for <varname>search_path</>, and
653 these settings now act like that one.
659 Avoid crashing when we have problems deleting table files post-commit
664 Dropping a table should lead to deleting the underlying disk files only
665 after the transaction commits. In event of failure then (for instance,
666 because of wrong file permissions) the code is supposed to just emit a
667 warning message and go on, since it's too late to abort the
668 transaction. This logic got broken as of release 8.4, causing such
669 situations to result in a PANIC and an unrestartable database.
675 Track the OID counter correctly during WAL replay, even when it wraps
680 Previously the OID counter would remain stuck at a high value until the
681 system exited replay mode. The practical consequences of that are
682 usually nil, but there are scenarios wherein a standby server that's
683 been promoted to master might take a long time to advance the OID
684 counter to a reasonable value once values are needed.
690 Fix regular expression back-references with <literal>*</> attached
695 Rather than enforcing an exact string match, the code would effectively
696 accept any string that satisfies the pattern sub-expression referenced
697 by the back-reference symbol.
701 A similar problem still afflicts back-references that are embedded in a
702 larger quantified expression, rather than being the immediate subject
703 of the quantifier. This will be addressed in a future
704 <productname>PostgreSQL</> release.
710 Fix recently-introduced memory leak in processing of
711 <type>inet</>/<type>cidr</> values (Heikki Linnakangas)
715 A patch in the December 2011 releases of <productname>PostgreSQL</>
716 caused memory leakage in these operations, which could be significant
717 in scenarios such as building a btree index on such a column.
723 Fix dangling pointer after <command>CREATE TABLE AS</>/<command>SELECT
724 INTO</> in a SQL-language function (Tom Lane)
728 In most cases this only led to an assertion failure in assert-enabled
729 builds, but worse consequences seem possible.
735 Avoid double close of file handle in syslogger on Windows (MauMau)
739 Ordinarily this error was invisible, but it would cause an exception
740 when running on a debug version of Windows.
746 Fix I/O-conversion-related memory leaks in plpgsql
747 (Andres Freund, Jan Urbanski, Tom Lane)
751 Certain operations would leak memory until the end of the current
758 Improve <application>pg_dump</>'s handling of inherited table columns
763 <application>pg_dump</> mishandled situations where a child column has
764 a different default expression than its parent column. If the default
765 is textually identical to the parent's default, but not actually the
766 same (for instance, because of schema search path differences) it would
767 not be recognized as different, so that after dump and restore the
768 child would be allowed to inherit the parent's default. Child columns
769 that are <literal>NOT NULL</> where their parent is not could also be
770 restored subtly incorrectly.
776 Fix <application>pg_restore</>'s direct-to-database mode for
777 INSERT-style table data (Tom Lane)
781 Direct-to-database restores from archive files made with
782 <option>--inserts</> or <option>--column-inserts</> options fail when
783 using <application>pg_restore</> from a release dated September or
784 December 2011, as a result of an oversight in a fix for another
785 problem. The archive file itself is not at fault, and text-mode
792 Allow <literal>AT</> option in <application>ecpg</>
793 <literal>DEALLOCATE</> statements (Michael Meskes)
797 The infrastructure to support this has been there for awhile, but
798 through an oversight there was still an error check rejecting the case.
804 Fix error in <filename>contrib/intarray</>'s <literal>int[] &
805 int[]</> operator (Guillaume Lelarge)
809 If the smallest integer the two input arrays have in common is 1,
810 and there are smaller values in either array, then 1 would be
811 incorrectly omitted from the result.
817 Fix error detection in <filename>contrib/pgcrypto</>'s
818 <function>encrypt_iv()</> and <function>decrypt_iv()</>
823 These functions failed to report certain types of invalid-input errors,
824 and would instead return random garbage values for incorrect input.
830 Fix one-byte buffer overrun in <filename>contrib/test_parser</>
835 The code would try to read one more byte than it should, which would
836 crash in corner cases.
837 Since <filename>contrib/test_parser</> is only example code, this is
838 not a security issue in itself, but bad example code is still bad.
844 Use <function>__sync_lock_test_and_set()</> for spinlocks on ARM, if
845 available (Martin Pitt)
849 This function replaces our previous use of the <literal>SWPB</>
850 instruction, which is deprecated and not available on ARMv6 and later.
851 Reports suggest that the old code doesn't fail in an obvious way on
852 recent ARM boards, but simply doesn't interlock concurrent accesses,
853 leading to bizarre failures in multiprocess operation.
859 Use <option>-fexcess-precision=standard</> option when building with
860 gcc versions that accept it (Andrew Dunstan)
864 This prevents assorted scenarios wherein recent versions of gcc will
865 produce creative results.
871 Allow use of threaded Python on FreeBSD (Chris Rees)
875 Our configure script previously believed that this combination wouldn't
876 work; but FreeBSD fixed the problem, so remove that error check.
885 <sect1 id="release-8-4-10">
886 <title>Release 8.4.10</title>
889 <title>Release Date</title>
890 <simpara>2011-12-05</simpara>
894 This release contains a variety of fixes from 8.4.9.
895 For information about new features in the 8.4 major release, see
896 <xref linkend="release-8-4">.
900 <title>Migration to Version 8.4.10</title>
903 A dump/restore is not required for those running 8.4.X.
907 However, a longstanding error was discovered in the definition of the
908 <literal>information_schema.referential_constraints</> view. If you
909 rely on correct results from that view, you should replace its
910 definition as explained in the first changelog item below.
914 Also, if you are upgrading from a version earlier than 8.4.8,
915 see the release notes for 8.4.8.
921 <title>Changes</title>
927 Fix bugs in <literal>information_schema.referential_constraints</> view
932 This view was being insufficiently careful about matching the
933 foreign-key constraint to the depended-on primary or unique key
934 constraint. That could result in failure to show a foreign key
935 constraint at all, or showing it multiple times, or claiming that it
936 depends on a different constraint than the one it really does.
940 Since the view definition is installed by <application>initdb</>,
941 merely upgrading will not fix the problem. If you need to fix this
942 in an existing installation, you can (as a superuser) drop the
943 <literal>information_schema</> schema then re-create it by sourcing
944 <filename><replaceable>SHAREDIR</>/information_schema.sql</filename>.
945 (Run <literal>pg_config --sharedir</> if you're uncertain where
946 <replaceable>SHAREDIR</> is.) This must be repeated in each database
953 Fix incorrect replay of WAL records for GIN index updates
958 This could result in transiently failing to find index entries after
959 a crash, or on a hot-standby server. The problem would be repaired
960 by the next <command>VACUUM</> of the index, however.
966 Fix TOAST-related data corruption during <literal>CREATE TABLE dest AS
967 SELECT * FROM src</> or <literal>INSERT INTO dest SELECT * FROM src</>
972 If a table has been modified by <command>ALTER TABLE ADD COLUMN</>,
973 attempts to copy its data verbatim to another table could produce
974 corrupt results in certain corner cases.
975 The problem can only manifest in this precise form in 8.4 and later,
976 but we patched earlier versions as well in case there are other code
977 paths that could trigger the same bug.
983 Fix race condition during toast table access from stale syscache entries
988 The typical symptom was transient errors like <quote>missing chunk
989 number 0 for toast value NNNNN in pg_toast_2619</>, where the cited
990 toast table would always belong to a system catalog.
996 Track dependencies of functions on items used in parameter default
997 expressions (Tom Lane)
1001 Previously, a referenced object could be dropped without having dropped
1002 or modified the function, leading to misbehavior when the function was
1003 used. Note that merely installing this update will not fix the missing
1004 dependency entries; to do that, you'd need to <command>CREATE OR
1005 REPLACE</> each such function afterwards. If you have functions whose
1006 defaults depend on non-built-in objects, doing so is recommended.
1012 Allow inlining of set-returning SQL functions with multiple OUT
1013 parameters (Tom Lane)
1019 Make <function>DatumGetInetP()</> unpack inet datums that have a 1-byte
1020 header, and add a new macro, <function>DatumGetInetPP()</>, that does
1021 not (Heikki Linnakangas)
1025 This change affects no core code, but might prevent crashes in add-on
1026 code that expects <function>DatumGetInetP()</> to produce an unpacked
1027 datum as per usual convention.
1033 Improve locale support in <type>money</> type's input and output
1038 Aside from not supporting all standard
1039 <link linkend="guc-lc-monetary"><varname>lc_monetary</></link>
1040 formatting options, the input and output functions were inconsistent,
1041 meaning there were locales in which dumped <type>money</> values could
1049 linkend="guc-transform-null-equals"><varname>transform_null_equals</></link>
1050 affect <literal>CASE foo WHEN NULL ...</> constructs
1051 (Heikki Linnakangas)
1055 <varname>transform_null_equals</> is only supposed to affect
1056 <literal>foo = NULL</> expressions written directly by the user, not
1057 equality checks generated internally by this form of <literal>CASE</>.
1063 Change foreign-key trigger creation order to better support
1064 self-referential foreign keys (Tom Lane)
1068 For a cascading foreign key that references its own table, a row update
1069 will fire both the <literal>ON UPDATE</> trigger and the
1070 <literal>CHECK</> trigger as one event. The <literal>ON UPDATE</>
1071 trigger must execute first, else the <literal>CHECK</> will check a
1072 non-final state of the row and possibly throw an inappropriate error.
1073 However, the firing order of these triggers is determined by their
1074 names, which generally sort in creation order since the triggers have
1075 auto-generated names following the convention
1076 <quote>RI_ConstraintTrigger_NNNN</>. A proper fix would require
1077 modifying that convention, which we will do in 9.2, but it seems risky
1078 to change it in existing releases. So this patch just changes the
1079 creation order of the triggers. Users encountering this type of error
1080 should drop and re-create the foreign key constraint to get its
1081 triggers into the right order.
1087 Avoid floating-point underflow while tracking buffer allocation rate
1092 While harmless in itself, on certain platforms this would result in
1093 annoying kernel log messages.
1099 Preserve configuration file name and line number values when starting
1100 child processes under Windows (Tom Lane)
1104 Formerly, these would not be displayed correctly in the
1105 <structname>pg_settings</> view.
1111 Preserve blank lines within commands in <application>psql</>'s command
1112 history (Robert Haas)
1116 The former behavior could cause problems if an empty line was removed
1117 from within a string literal, for example.
1123 Fix <application>pg_dump</> to dump user-defined casts between
1124 auto-generated types, such as table rowtypes (Tom Lane)
1130 Use the preferred version of <application>xsubpp</> to build PL/Perl,
1131 not necessarily the operating system's main copy
1132 (David Wheeler and Alex Hunsaker)
1138 Fix incorrect coding in <filename>contrib/dict_int</> and
1139 <filename>contrib/dict_xsyn</> (Tom Lane)
1143 Some functions incorrectly assumed that memory returned by
1144 <function>palloc()</> is guaranteed zeroed.
1150 Honor query cancel interrupts promptly in <function>pgstatindex()</>
1157 Ensure VPATH builds properly install all server header files
1164 Shorten file names reported in verbose error messages (Peter Eisentraut)
1168 Regular builds have always reported just the name of the C file
1169 containing the error message call, but VPATH builds formerly
1170 reported an absolute path name.
1176 Fix interpretation of Windows timezone names for Central America
1181 Map <quote>Central America Standard Time</> to <literal>CST6</>, not
1182 <literal>CST6CDT</>, because DST is generally not observed anywhere in
1189 Update time zone data files to <application>tzdata</> release 2011n
1190 for DST law changes in Brazil, Cuba, Fiji, Palestine, Russia, and Samoa;
1191 also historical corrections for Alaska and British East Africa.
1200 <sect1 id="release-8-4-9">
1201 <title>Release 8.4.9</title>
1204 <title>Release Date</title>
1205 <simpara>2011-09-26</simpara>
1209 This release contains a variety of fixes from 8.4.8.
1210 For information about new features in the 8.4 major release, see
1211 <xref linkend="release-8-4">.
1215 <title>Migration to Version 8.4.9</title>
1218 A dump/restore is not required for those running 8.4.X.
1222 However, if you are upgrading from a version earlier than 8.4.8,
1223 see the release notes for 8.4.8.
1229 <title>Changes</title>
1235 Fix bugs in indexing of in-doubt HOT-updated tuples (Tom Lane)
1239 These bugs could result in index corruption after reindexing a system
1240 catalog. They are not believed to affect user indexes.
1246 Fix multiple bugs in GiST index page split processing (Heikki
1251 The probability of occurrence was low, but these could lead to index
1258 Fix possible buffer overrun in <function>tsvector_concat()</>
1263 The function could underestimate the amount of memory needed for its
1264 result, leading to server crashes.
1270 Fix crash in <function>xml_recv</> when processing a
1271 <quote>standalone</> parameter (Tom Lane)
1277 Make <function>pg_options_to_table</> return NULL for an option with no
1282 Previously such cases would result in a server crash.
1288 Avoid possibly accessing off the end of memory in <command>ANALYZE</>
1289 and in SJIS-2004 encoding conversion (Noah Misch)
1293 This fixes some very-low-probability server crash scenarios.
1299 Prevent intermittent hang in interactions of startup process with
1300 bgwriter process (Simon Riggs)
1304 This affected recovery in non-hot-standby cases.
1310 Fix race condition in relcache init file invalidation (Tom Lane)
1314 There was a window wherein a new backend process could read a stale init
1315 file but miss the inval messages that would tell it the data is stale.
1316 The result would be bizarre failures in catalog accesses, typically
1317 <quote>could not read block 0 in file ...</> later during startup.
1323 Fix memory leak at end of a GiST index scan (Tom Lane)
1327 Commands that perform many separate GiST index scans, such as
1328 verification of a new GiST-based exclusion constraint on a table
1329 already containing many rows, could transiently require large amounts of
1330 memory due to this leak.
1336 Fix incorrect memory accounting (leading to possible memory bloat) in
1337 tuplestores supporting holdable cursors and plpgsql's <literal>RETURN
1338 NEXT</> command (Tom Lane)
1344 Fix performance problem when constructing a large, lossy bitmap
1351 Fix join selectivity estimation for unique columns (Tom Lane)
1355 This fixes an erroneous planner heuristic that could lead to poor
1356 estimates of the result size of a join.
1362 Fix nested PlaceHolderVar expressions that appear only in sub-select
1363 target lists (Tom Lane)
1367 This mistake could result in outputs of an outer join incorrectly
1374 Allow nested <literal>EXISTS</> queries to be optimized properly (Tom
1381 Fix array- and path-creating functions to ensure padding bytes are
1386 This avoids some situations where the planner will think that
1387 semantically-equal constants are not equal, resulting in poor
1394 Fix <command>EXPLAIN</> to handle gating Result nodes within
1395 inner-indexscan subplans (Tom Lane)
1399 The usual symptom of this oversight was <quote>bogus varno</> errors.
1405 Work around gcc 4.6.0 bug that breaks WAL replay (Tom Lane)
1409 This could lead to loss of committed transactions after a server crash.
1415 Fix dump bug for <literal>VALUES</> in a view (Tom Lane)
1421 Disallow <literal>SELECT FOR UPDATE/SHARE</> on sequences (Tom Lane)
1425 This operation doesn't work as expected and can lead to failures.
1431 Fix <command>VACUUM</> so that it always updates
1432 <literal>pg_class</>.<literal>reltuples</>/<literal>relpages</> (Tom
1437 This fixes some scenarios where autovacuum could make increasingly poor
1438 decisions about when to vacuum tables.
1444 Defend against integer overflow when computing size of a hash table (Tom
1451 Fix cases where <command>CLUSTER</> might attempt to access
1452 already-removed TOAST data (Tom Lane)
1458 Fix portability bugs in use of credentials control messages for
1459 <quote>peer</> authentication (Tom Lane)
1465 Fix SSPI login when multiple roundtrips are required (Ahmed Shinwari,
1470 The typical symptom of this problem was <quote>The function requested is
1471 not supported</> errors during SSPI login.
1477 Throw an error if <filename>pg_hba.conf</> contains <literal>hostssl</>
1478 but SSL is disabled (Tom Lane)
1482 This was concluded to be more user-friendly than the previous behavior
1483 of silently ignoring such lines.
1489 Fix typo in <function>pg_srand48</> seed initialization (Andres Freund)
1493 This led to failure to use all bits of the provided seed. This function
1494 is not used on most platforms (only those without <function>srandom</>),
1495 and the potential security exposure from a less-random-than-expected
1496 seed seems minimal in any case.
1502 Avoid integer overflow when the sum of <literal>LIMIT</> and
1503 <literal>OFFSET</> values exceeds 2^63 (Heikki Linnakangas)
1509 Add overflow checks to <type>int4</> and <type>int8</> versions of
1510 <function>generate_series()</> (Robert Haas)
1516 Fix trailing-zero removal in <function>to_char()</> (Marti Raudsepp)
1520 In a format with <literal>FM</> and no digit positions
1521 after the decimal point, zeroes to the left of the decimal point could
1522 be removed incorrectly.
1528 Fix <function>pg_size_pretty()</> to avoid overflow for inputs close to
1535 Weaken plpgsql's check for typmod matching in record values (Tom Lane)
1539 An overly enthusiastic check could lead to discarding length modifiers
1540 that should have been kept.
1546 Correctly handle quotes in locale names during <application>initdb</>
1547 (Heikki Linnakangas)
1551 The case can arise with some Windows locales, such as <quote>People's
1552 Republic of China</>.
1558 Fix <application>pg_upgrade</> to preserve toast tables' relfrozenxids
1559 during an upgrade from 8.3 (Bruce Momjian)
1563 Failure to do this could lead to <filename>pg_clog</> files being
1564 removed too soon after the upgrade.
1570 In <application>pg_ctl</>, support silent mode for service registrations
1577 Fix <application>psql</>'s counting of script file line numbers during
1578 <literal>COPY</> from a different file (Tom Lane)
1584 Fix <application>pg_restore</>'s direct-to-database mode for
1585 <varname>standard_conforming_strings</> (Tom Lane)
1589 <application>pg_restore</> could emit incorrect commands when restoring
1590 directly to a database server from an archive file that had been made
1591 with <varname>standard_conforming_strings</> set to <literal>on</>.
1597 Be more user-friendly about unsupported cases for parallel
1598 <application>pg_restore</> (Tom Lane)
1602 This change ensures that such cases are detected and reported before
1603 any restore actions have been taken.
1609 Fix write-past-buffer-end and memory leak in <application>libpq</>'s
1610 LDAP service lookup code (Albe Laurenz)
1616 In <application>libpq</>, avoid failures when using nonblocking I/O
1617 and an SSL connection (Martin Pihlak, Tom Lane)
1623 Improve libpq's handling of failures during connection startup
1628 In particular, the response to a server report of <function>fork()</>
1629 failure during SSL connection startup is now saner.
1635 Improve <application>libpq</>'s error reporting for SSL failures (Tom
1642 Fix <function>PQsetvalue()</> to avoid possible crash when adding a new
1643 tuple to a <structname>PGresult</> originally obtained from a server
1644 query (Andrew Chernow)
1650 Make <application>ecpglib</> write <type>double</> values with 15 digits
1651 precision (Akira Kurosawa)
1657 In <application>ecpglib</>, be sure <literal>LC_NUMERIC</> setting is
1658 restored after an error (Michael Meskes)
1664 Apply upstream fix for blowfish signed-character bug (CVE-2011-2483)
1669 <filename>contrib/pg_crypto</>'s blowfish encryption code could give
1670 wrong results on platforms where char is signed (which is most),
1671 leading to encrypted passwords being weaker than they should be.
1677 Fix memory leak in <filename>contrib/seg</> (Heikki Linnakangas)
1683 Fix <function>pgstatindex()</> to give consistent results for empty
1690 Allow building with perl 5.14 (Alex Hunsaker)
1696 Update configure script's method for probing existence of system
1697 functions (Tom Lane)
1701 The version of autoconf we used in 8.3 and 8.2 could be fooled by
1702 compilers that perform link-time optimization.
1708 Fix assorted issues with build and install file paths containing spaces
1715 Update time zone data files to <application>tzdata</> release 2011i
1716 for DST law changes in Canada, Egypt, Russia, Samoa, and South Sudan.
1725 <sect1 id="release-8-4-8">
1726 <title>Release 8.4.8</title>
1729 <title>Release Date</title>
1730 <simpara>2011-04-18</simpara>
1734 This release contains a variety of fixes from 8.4.7.
1735 For information about new features in the 8.4 major release, see
1736 <xref linkend="release-8-4">.
1740 <title>Migration to Version 8.4.8</title>
1743 A dump/restore is not required for those running 8.4.X.
1747 However, if your installation was upgraded from a previous major
1748 release by running <application>pg_upgrade</>, you should take
1749 action to prevent possible data loss due to a now-fixed bug in
1750 <application>pg_upgrade</>. The recommended solution is to run
1751 <command>VACUUM FREEZE</> on all TOAST tables.
1752 More information is available at <ulink
1753 url="http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix">
1754 http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix</ulink>.
1758 Also, if you are upgrading from a version earlier than 8.4.2,
1759 see the release notes for 8.4.2.
1765 <title>Changes</title>
1771 Fix <application>pg_upgrade</>'s handling of TOAST tables
1776 The <structname>pg_class</>.<structfield>relfrozenxid</> value for
1777 TOAST tables was not correctly copied into the new installation
1778 during <application>pg_upgrade</>. This could later result in
1779 <literal>pg_clog</> files being discarded while they were still
1780 needed to validate tuples in the TOAST tables, leading to
1781 <quote>could not access status of transaction</> failures.
1785 This error poses a significant risk of data loss for installations
1786 that have been upgraded with <application>pg_upgrade</>. This patch
1787 corrects the problem for future uses of <application>pg_upgrade</>,
1788 but does not in itself cure the issue in installations that have been
1789 processed with a buggy version of <application>pg_upgrade</>.
1795 Suppress incorrect <quote>PD_ALL_VISIBLE flag was incorrectly set</>
1796 warning (Heikki Linnakangas)
1800 <command>VACUUM</> would sometimes issue this warning in cases that
1807 Disallow including a composite type in itself (Tom Lane)
1811 This prevents scenarios wherein the server could recurse infinitely
1812 while processing the composite type. While there are some possible
1813 uses for such a structure, they don't seem compelling enough to
1814 justify the effort required to make sure it always works safely.
1820 Avoid potential deadlock during catalog cache initialization
1825 In some cases the cache loading code would acquire share lock on a
1826 system index before locking the index's catalog. This could deadlock
1827 against processes trying to acquire exclusive locks in the other,
1828 more standard order.
1834 Fix dangling-pointer problem in <literal>BEFORE ROW UPDATE</> trigger
1835 handling when there was a concurrent update to the target tuple
1840 This bug has been observed to result in intermittent <quote>cannot
1841 extract system attribute from virtual tuple</> failures while trying to
1842 do <literal>UPDATE RETURNING ctid</>. There is a very small probability
1843 of more serious errors, such as generating incorrect index entries for
1850 Disallow <command>DROP TABLE</> when there are pending deferred trigger
1851 events for the table (Tom Lane)
1855 Formerly the <command>DROP</> would go through, leading to
1856 <quote>could not open relation with OID nnn</> errors when the
1857 triggers were eventually fired.
1863 Prevent crash triggered by constant-false WHERE conditions during
1864 GEQO optimization (Tom Lane)
1873 Improve planner's handling of semi-join and anti-join cases
1880 Fix selectivity estimation for text search to account for NULLs
1887 Improve PL/pgSQL's ability to handle row types with dropped columns
1892 This is a back-patch of fixes previously made in 9.0.
1898 Fix PL/Python memory leak involving array slices (Daniel Popowich)
1904 Fix <application>pg_restore</> to cope with long lines (over 1KB) in
1905 TOC files (Tom Lane)
1911 Put in more safeguards against crashing due to division-by-zero
1912 with overly enthusiastic compiler optimization (Aurelien Jarno)
1918 Support use of dlopen() in FreeBSD and OpenBSD on MIPS (Tom Lane)
1922 There was a hard-wired assumption that this system function was not
1923 available on MIPS hardware on these systems. Use a compile-time test
1924 instead, since more recent versions have it.
1930 Fix compilation failures on HP-UX (Heikki Linnakangas)
1936 Fix version-incompatibility problem with <application>libintl</> on
1937 Windows (Hiroshi Inoue)
1943 Fix usage of <application>xcopy</> in Windows build scripts to
1944 work correctly under Windows 7 (Andrew Dunstan)
1948 This affects the build scripts only, not installation or usage.
1954 Fix path separator used by <application>pg_regress</> on Cygwin
1961 Update time zone data files to <application>tzdata</> release 2011f
1962 for DST law changes in Chile, Cuba, Falkland Islands, Morocco, Samoa,
1963 and Turkey; also historical corrections for South Australia, Alaska,
1973 <sect1 id="release-8-4-7">
1974 <title>Release 8.4.7</title>
1977 <title>Release Date</title>
1978 <simpara>2011-01-31</simpara>
1982 This release contains a variety of fixes from 8.4.6.
1983 For information about new features in the 8.4 major release, see
1984 <xref linkend="release-8-4">.
1988 <title>Migration to Version 8.4.7</title>
1991 A dump/restore is not required for those running 8.4.X.
1992 However, if you are upgrading from a version earlier than 8.4.2,
1993 see the release notes for 8.4.2.
1999 <title>Changes</title>
2005 Avoid failures when <command>EXPLAIN</> tries to display a simple-form
2006 <literal>CASE</> expression (Tom Lane)
2010 If the <literal>CASE</>'s test expression was a constant, the planner
2011 could simplify the <literal>CASE</> into a form that confused the
2012 expression-display code, resulting in <quote>unexpected CASE WHEN
2019 Fix assignment to an array slice that is before the existing range
2020 of subscripts (Tom Lane)
2024 If there was a gap between the newly added subscripts and the first
2025 pre-existing subscript, the code miscalculated how many entries needed
2026 to be copied from the old array's null bitmap, potentially leading to
2027 data corruption or crash.
2033 Avoid unexpected conversion overflow in planner for very distant date
2038 The <type>date</> type supports a wider range of dates than can be
2039 represented by the <type>timestamp</> types, but the planner assumed it
2040 could always convert a date to timestamp with impunity.
2046 Fix <application>pg_restore</>'s text output for large objects (BLOBs)
2047 when <varname>standard_conforming_strings</> is on (Tom Lane)
2051 Although restoring directly to a database worked correctly, string
2052 escaping was incorrect if <application>pg_restore</> was asked for
2053 SQL text output and <varname>standard_conforming_strings</> had been
2054 enabled in the source database.
2060 Fix erroneous parsing of <type>tsquery</> values containing
2061 <literal>... & !(subexpression) | ...</literal> (Tom Lane)
2065 Queries containing this combination of operators were not executed
2066 correctly. The same error existed in <filename>contrib/intarray</>'s
2067 <type>query_int</> type and <filename>contrib/ltree</>'s
2068 <type>ltxtquery</> type.
2074 Fix buffer overrun in <filename>contrib/intarray</>'s input function
2075 for the <type>query_int</> type (Apple)
2079 This bug is a security risk since the function's return address could
2080 be overwritten. Thanks to Apple Inc's security team for reporting this
2081 issue and supplying the fix. (CVE-2010-4015)
2087 Fix bug in <filename>contrib/seg</>'s GiST picksplit algorithm
2088 (Alexander Korotkov)
2092 This could result in considerable inefficiency, though not actually
2093 incorrect answers, in a GiST index on a <type>seg</> column.
2094 If you have such an index, consider <command>REINDEX</>ing it after
2095 installing this update. (This is identical to the bug that was fixed in
2096 <filename>contrib/cube</> in the previous update.)
2105 <sect1 id="release-8-4-6">
2106 <title>Release 8.4.6</title>
2109 <title>Release Date</title>
2110 <simpara>2010-12-16</simpara>
2114 This release contains a variety of fixes from 8.4.5.
2115 For information about new features in the 8.4 major release, see
2116 <xref linkend="release-8-4">.
2120 <title>Migration to Version 8.4.6</title>
2123 A dump/restore is not required for those running 8.4.X.
2124 However, if you are upgrading from a version earlier than 8.4.2,
2125 see the release notes for 8.4.2.
2131 <title>Changes</title>
2138 <link linkend="guc-wal-sync-method"><varname>wal_sync_method</></link>
2139 to be <literal>fdatasync</> on Linux (Tom Lane, Marti Raudsepp)
2143 The default on Linux has actually been <literal>fdatasync</> for many
2144 years, but recent kernel changes caused <productname>PostgreSQL</> to
2145 choose <literal>open_datasync</> instead. This choice did not result
2146 in any performance improvement, and caused outright failures on
2147 certain filesystems, notably <literal>ext4</> with the
2148 <literal>data=journal</> mount option.
2154 Fix assorted bugs in WAL replay logic for GIN indexes (Tom Lane)
2158 This could result in <quote>bad buffer id: 0</> failures or
2159 corruption of index contents during replication.
2165 Fix recovery from base backup when the starting checkpoint WAL record
2166 is not in the same WAL segment as its redo point (Jeff Davis)
2172 Fix persistent slowdown of autovacuum workers when multiple workers
2173 remain active for a long time (Tom Lane)
2177 The effective <varname>vacuum_cost_limit</> for an autovacuum worker
2178 could drop to nearly zero if it processed enough tables, causing it
2179 to run extremely slowly.
2185 Add support for detecting register-stack overrun on <literal>IA64</>
2190 The <literal>IA64</> architecture has two hardware stacks. Full
2191 prevention of stack-overrun failures requires checking both.
2197 Add a check for stack overflow in <function>copyObject()</> (Tom Lane)
2201 Certain code paths could crash due to stack overflow given a
2202 sufficiently complex query.
2208 Fix detection of page splits in temporary GiST indexes (Heikki
2213 It is possible to have a <quote>concurrent</> page split in a
2214 temporary index, if for example there is an open cursor scanning the
2215 index when an insertion is done. GiST failed to detect this case and
2216 hence could deliver wrong results when execution of the cursor
2223 Fix error checking during early connection processing (Tom Lane)
2227 The check for too many child processes was skipped in some cases,
2228 possibly leading to postmaster crash when attempting to add the new
2229 child process to fixed-size arrays.
2235 Improve efficiency of window functions (Tom Lane)
2239 Certain cases where a large number of tuples needed to be read in
2240 advance, but <varname>work_mem</> was large enough to allow them all
2241 to be held in memory, were unexpectedly slow.
2242 <function>percent_rank()</>, <function>cume_dist()</> and
2243 <function>ntile()</> in particular were subject to this problem.
2249 Avoid memory leakage while <command>ANALYZE</>'ing complex index
2250 expressions (Tom Lane)
2256 Ensure an index that uses a whole-row Var still depends on its table
2261 An index declared like <literal>create index i on t (foo(t.*))</>
2262 would not automatically get dropped when its table was dropped.
2268 Do not <quote>inline</> a SQL function with multiple <literal>OUT</>
2269 parameters (Tom Lane)
2273 This avoids a possible crash due to loss of information about the
2274 expected result rowtype.
2280 Behave correctly if <literal>ORDER BY</>, <literal>LIMIT</>,
2281 <literal>FOR UPDATE</>, or <literal>WITH</> is attached to the
2282 <literal>VALUES</> part of <literal>INSERT ... VALUES</> (Tom Lane)
2288 Fix constant-folding of <literal>COALESCE()</> expressions (Tom Lane)
2292 The planner would sometimes attempt to evaluate sub-expressions that
2293 in fact could never be reached, possibly leading to unexpected errors.
2299 Fix postmaster crash when connection acceptance
2300 (<function>accept()</> or one of the calls made immediately after it)
2301 fails, and the postmaster was compiled with GSSAPI support (Alexander
2308 Fix missed unlink of temporary files when <varname>log_temp_files</>
2309 is active (Tom Lane)
2313 If an error occurred while attempting to emit the log message, the
2314 unlink was not done, resulting in accumulation of temp files.
2320 Add print functionality for <structname>InhRelation</> nodes (Tom Lane)
2324 This avoids a failure when <varname>debug_print_parse</> is enabled
2325 and certain types of query are executed.
2331 Fix incorrect calculation of distance from a point to a horizontal
2332 line segment (Tom Lane)
2336 This bug affected several different geometric distance-measurement
2343 Fix incorrect calculation of transaction status in
2344 <application>ecpg</> (Itagaki Takahiro)
2350 Fix <application>PL/pgSQL</>'s handling of <quote>simple</>
2351 expressions to not fail in recursion or error-recovery cases (Tom Lane)
2357 Fix <application>PL/Python</>'s handling of set-returning functions
2362 Attempts to call SPI functions within the iterator generating a set
2369 Fix bug in <filename>contrib/cube</>'s GiST picksplit algorithm
2370 (Alexander Korotkov)
2374 This could result in considerable inefficiency, though not actually
2375 incorrect answers, in a GiST index on a <type>cube</> column.
2376 If you have such an index, consider <command>REINDEX</>ing it after
2377 installing this update.
2383 Don't emit <quote>identifier will be truncated</> notices in
2384 <filename>contrib/dblink</> except when creating new connections
2391 Fix potential coredump on missing public key in
2392 <filename>contrib/pgcrypto</> (Marti Raudsepp)
2398 Fix memory leak in <filename>contrib/xml2</>'s XPath query functions
2405 Update time zone data files to <application>tzdata</> release 2010o
2406 for DST law changes in Fiji and Samoa;
2407 also historical corrections for Hong Kong.
2416 <sect1 id="release-8-4-5">
2417 <title>Release 8.4.5</title>
2420 <title>Release Date</title>
2421 <simpara>2010-10-04</simpara>
2425 This release contains a variety of fixes from 8.4.4.
2426 For information about new features in the 8.4 major release, see
2427 <xref linkend="release-8-4">.
2431 <title>Migration to Version 8.4.5</title>
2434 A dump/restore is not required for those running 8.4.X.
2435 However, if you are upgrading from a version earlier than 8.4.2,
2436 see the release notes for 8.4.2.
2442 <title>Changes</title>
2448 Use a separate interpreter for each calling SQL userid in PL/Perl and
2453 This change prevents security problems that can be caused by subverting
2454 Perl or Tcl code that will be executed later in the same session under
2455 another SQL user identity (for example, within a <literal>SECURITY
2456 DEFINER</> function). Most scripting languages offer numerous ways that
2457 that might be done, such as redefining standard functions or operators
2458 called by the target function. Without this change, any SQL user with
2459 Perl or Tcl language usage rights can do essentially anything with the
2460 SQL privileges of the target function's owner.
2464 The cost of this change is that intentional communication among Perl
2465 and Tcl functions becomes more difficult. To provide an escape hatch,
2466 PL/PerlU and PL/TclU functions continue to use only one interpreter
2467 per session. This is not considered a security issue since all such
2468 functions execute at the trust level of a database superuser already.
2472 It is likely that third-party procedural languages that claim to offer
2473 trusted execution have similar security issues. We advise contacting
2474 the authors of any PL you are depending on for security-critical
2479 Our thanks to Tim Bunce for pointing out this issue (CVE-2010-3433).
2485 Prevent possible crashes in <function>pg_get_expr()</> by disallowing
2486 it from being called with an argument that is not one of the system
2487 catalog columns it's intended to be used with
2488 (Heikki Linnakangas, Tom Lane)
2494 Treat exit code 128 (<literal>ERROR_WAIT_NO_CHILDREN</>) as non-fatal on
2495 Windows (Magnus Hagander)
2499 Under high load, Windows processes will sometimes fail at startup with
2500 this error code. Formerly the postmaster treated this as a panic
2501 condition and restarted the whole database, but that seems to be
2508 Fix incorrect placement of placeholder evaluation (Tom Lane)
2512 This bug could result in query outputs being non-null when they
2513 should be null, in cases where the inner side of an outer join
2514 is a sub-select with non-strict expressions in its output list.
2520 Fix possible duplicate scans of <literal>UNION ALL</> member relations
2527 Fix <quote>cannot handle unplanned sub-select</quote> error (Tom Lane)
2531 This occurred when a sub-select contains a join alias reference that
2532 expands into an expression containing another sub-select.
2538 Fix mishandling of whole-row Vars that reference a view or sub-select
2539 and appear within a nested sub-select (Tom Lane)
2545 Fix mishandling of cross-type <literal>IN</> comparisons (Tom Lane)
2549 This could result in failures if the planner tried to implement an
2550 <literal>IN</> join with a sort-then-unique-then-plain-join plan.
2556 Fix computation of <command>ANALYZE</> statistics for <type>tsvector</>
2557 columns (Jan Urbanski)
2561 The original coding could produce incorrect statistics, leading to
2562 poor plan choices later.
2568 Improve planner's estimate of memory used by <function>array_agg()</>,
2569 <function>string_agg()</>, and similar aggregate functions
2574 The previous drastic underestimate could lead to out-of-memory failures
2575 due to inappropriate choice of a hash-aggregation plan.
2581 Fix failure to mark cached plans as transient (Tom Lane)
2585 If a plan is prepared while <command>CREATE INDEX CONCURRENTLY</> is
2586 in progress for one of the referenced tables, it is supposed to be
2587 re-planned once the index is ready for use. This was not happening
2594 Reduce PANIC to ERROR in some occasionally-reported btree failure cases,
2595 and provide additional detail in the resulting error messages
2600 This should improve the system's robustness with corrupted indexes.
2606 Fix incorrect search logic for partial-match queries with GIN indexes
2611 Cases involving AND/OR combination of several GIN index conditions
2612 didn't always give the right answer, and were sometimes much slower
2619 Prevent show_session_authorization() from crashing within autovacuum
2620 processes (Tom Lane)
2626 Defend against functions returning setof record where not all the
2627 returned rows are actually of the same rowtype (Tom Lane)
2633 Fix possible corruption of pending trigger event lists during
2634 subtransaction rollback (Tom Lane)
2638 This could lead to a crash or incorrect firing of triggers.
2644 Fix possible failure when hashing a pass-by-reference function result
2651 Improve merge join's handling of NULLs in the join columns (Tom Lane)
2655 A merge join can now stop entirely upon reaching the first NULL,
2656 if the sort order is such that NULLs sort high.
2662 Take care to fsync the contents of lockfiles (both
2663 <filename>postmaster.pid</> and the socket lockfile) while writing them
2668 This omission could result in corrupted lockfile contents if the
2669 machine crashes shortly after postmaster start. That could in turn
2670 prevent subsequent attempts to start the postmaster from succeeding,
2671 until the lockfile is manually removed.
2677 Avoid recursion while assigning XIDs to heavily-nested
2678 subtransactions (Andres Freund, Robert Haas)
2682 The original coding could result in a crash if there was limited
2689 Avoid holding open old WAL segments in the walwriter process
2690 (Magnus Hagander, Heikki Linnakangas)
2694 The previous coding would prevent removal of no-longer-needed segments.
2700 Fix <varname>log_line_prefix</>'s <literal>%i</> escape,
2701 which could produce junk early in backend startup (Tom Lane)
2707 Prevent misinterpretation of partially-specified relation options
2708 for TOAST tables (Itagaki Takahiro)
2712 In particular, <literal>fillfactor</> would be read as zero if any
2713 other reloption had been set for the table, leading to serious bloat.
2719 Fix inheritance count tracking in <command>ALTER TABLE ... ADD
2720 CONSTRAINT</> (Robert Haas)
2726 Fix possible data corruption in <command>ALTER TABLE ... SET
2727 TABLESPACE</> when archiving is enabled (Jeff Davis)
2733 Allow <command>CREATE DATABASE</> and <command>ALTER DATABASE ... SET
2734 TABLESPACE</> to be interrupted by query-cancel (Guillaume Lelarge)
2740 Improve <command>CREATE INDEX</>'s checking of whether proposed index
2741 expressions are immutable (Tom Lane)
2747 Fix <command>REASSIGN OWNED</> to handle operator classes and families
2754 Fix possible core dump when comparing two empty <type>tsquery</> values
2761 Fix <literal>LIKE</>'s handling of patterns containing <literal>%</>
2762 followed by <literal>_</> (Tom Lane)
2766 We've fixed this before, but there were still some incorrectly-handled
2773 Re-allow input of Julian dates prior to 0001-01-01 AD (Tom Lane)
2777 Input such as <literal>'J100000'::date</> worked before 8.4,
2778 but was unintentionally broken by added error-checking.
2784 Fix PL/pgSQL to throw an error, not crash, if a cursor is closed within
2785 a <literal>FOR</> loop that is iterating over that cursor
2786 (Heikki Linnakangas)
2792 In PL/Python, defend against null pointer results from
2793 <function>PyCObject_AsVoidPtr</> and <function>PyCObject_FromVoidPtr</>
2800 In <application>libpq</>, fix full SSL certificate verification for the
2801 case where both <literal>host</> and <literal>hostaddr</> are specified
2808 Make psql recognize <command>DISCARD ALL</> as a command that should
2809 not be encased in a transaction block in autocommit-off mode
2816 Fix some issues in <application>pg_dump</>'s handling of SQL/MED objects
2821 Notably, <application>pg_dump</> would always fail if run by a
2822 non-superuser, which was not intended.
2828 Improve <application>pg_dump</> and <application>pg_restore</>'s
2829 handling of non-seekable archive files (Tom Lane, Robert Haas)
2833 This is important for proper functioning of parallel restore.
2839 Improve parallel pg_restore's ability to cope with selective restore
2840 (<literal>-L</> option) (Tom Lane)
2844 The original code tended to fail if the <literal>-L</> file commanded
2845 a non-default restore ordering.
2851 Fix <application>ecpg</> to process data from <literal>RETURNING</>
2852 clauses correctly (Michael Meskes)
2858 Fix some memory leaks in <application>ecpg</> (Zoltan Boszormenyi)
2864 Improve <filename>contrib/dblink</>'s handling of tables containing
2865 dropped columns (Tom Lane)
2871 Fix connection leak after <quote>duplicate connection name</quote>
2872 errors in <filename>contrib/dblink</> (Itagaki Takahiro)
2878 Fix <filename>contrib/dblink</> to handle connection names longer than
2879 62 bytes correctly (Itagaki Takahiro)
2885 Add <function>hstore(text, text)</>
2886 function to <filename>contrib/hstore</> (Robert Haas)
2890 This function is the recommended substitute for the now-deprecated
2891 <literal>=></> operator. It was back-patched so that future-proofed
2892 code can be used with older server versions. Note that the patch will
2893 be effective only after <filename>contrib/hstore</> is installed or
2894 reinstalled in a particular database. Users might prefer to execute
2895 the <command>CREATE FUNCTION</> command by hand, instead.
2901 Update build infrastructure and documentation to reflect the source code
2902 repository's move from CVS to Git (Magnus Hagander and others)
2908 Update time zone data files to <application>tzdata</> release 2010l
2909 for DST law changes in Egypt and Palestine; also historical corrections
2914 This change also adds new names for two Micronesian timezones:
2915 Pacific/Chuuk is now preferred over Pacific/Truk (and the preferred
2916 abbreviation is CHUT not TRUT) and Pacific/Pohnpei is preferred over
2923 Make Windows' <quote>N. Central Asia Standard Time</> timezone map to
2924 Asia/Novosibirsk, not Asia/Almaty (Magnus Hagander)
2928 Microsoft changed the DST behavior of this zone in the timezone update
2929 from KB976098. Asia/Novosibirsk is a better match to its new behavior.
2938 <sect1 id="release-8-4-4">
2939 <title>Release 8.4.4</title>
2942 <title>Release Date</title>
2943 <simpara>2010-05-17</simpara>
2947 This release contains a variety of fixes from 8.4.3.
2948 For information about new features in the 8.4 major release, see
2949 <xref linkend="release-8-4">.
2953 <title>Migration to Version 8.4.4</title>
2956 A dump/restore is not required for those running 8.4.X.
2957 However, if you are upgrading from a version earlier than 8.4.2,
2958 see the release notes for 8.4.2.
2964 <title>Changes</title>
2970 Enforce restrictions in <literal>plperl</> using an opmask applied to
2971 the whole interpreter, instead of using <filename>Safe.pm</>
2972 (Tim Bunce, Andrew Dunstan)
2976 Recent developments have convinced us that <filename>Safe.pm</> is too
2977 insecure to rely on for making <literal>plperl</> trustable. This
2978 change removes use of <filename>Safe.pm</> altogether, in favor of using
2979 a separate interpreter with an opcode mask that is always applied.
2980 Pleasant side effects of the change include that it is now possible to
2981 use Perl's <literal>strict</> pragma in a natural way in
2982 <literal>plperl</>, and that Perl's <literal>$a</> and <literal>$b</>
2983 variables work as expected in sort routines, and that function
2984 compilation is significantly faster. (CVE-2010-1169)
2990 Prevent PL/Tcl from executing untrustworthy code from
2991 <structname>pltcl_modules</> (Tom)
2995 PL/Tcl's feature for autoloading Tcl code from a database table
2996 could be exploited for trojan-horse attacks, because there was no
2997 restriction on who could create or insert into that table. This change
2998 disables the feature unless <structname>pltcl_modules</> is owned by a
2999 superuser. (However, the permissions on the table are not checked, so
3000 installations that really need a less-than-secure modules table can
3001 still grant suitable privileges to trusted non-superusers.) Also,
3002 prevent loading code into the unrestricted <quote>normal</> Tcl
3003 interpreter unless we are really going to execute a <literal>pltclu</>
3004 function. (CVE-2010-1170)
3010 Fix data corruption during WAL replay of
3011 <literal>ALTER ... SET TABLESPACE</> (Tom)
3015 When <varname>archive_mode</> is on, <literal>ALTER ... SET TABLESPACE</>
3016 generates a WAL record whose replay logic was incorrect. It could write
3017 the data to the wrong place, leading to possibly-unrecoverable data
3018 corruption. Data corruption would be observed on standby slaves, and
3019 could occur on the master as well if a database crash and recovery
3020 occurred after committing the <literal>ALTER</> and before the next
3027 Fix possible crash if a cache reset message is received during
3028 rebuild of a relcache entry (Heikki)
3032 This error was introduced in 8.4.3 while fixing a related failure.
3038 Apply per-function GUC settings while running the language validator
3039 for the function (Itagaki Takahiro)
3043 This avoids failures if the function's code is invalid without the
3044 setting; an example is that SQL functions may not parse if the
3045 <varname>search_path</> is not correct.
3051 Do constraint exclusion for inherited <command>UPDATE</> and
3052 <command>DELETE</> target tables when
3053 <varname>constraint_exclusion</> = <literal>partition</> (Tom)
3057 Due to an oversight, this setting previously only caused constraint
3058 exclusion to be checked in <command>SELECT</> commands.
3064 Do not allow an unprivileged user to reset superuser-only parameter
3069 Previously, if an unprivileged user ran <literal>ALTER USER ... RESET
3070 ALL</> for himself, or <literal>ALTER DATABASE ... RESET ALL</> for
3071 a database he owns, this would remove all special parameter settings
3072 for the user or database, even ones that are only supposed to be
3073 changeable by a superuser. Now, the <command>ALTER</> will only
3074 remove the parameters that the user has permission to change.
3080 Avoid possible crash during backend shutdown if shutdown occurs
3081 when a <literal>CONTEXT</> addition would be made to log entries (Tom)
3085 In some cases the context-printing function would fail because the
3086 current transaction had already been rolled back when it came time
3087 to print a log message.
3093 Fix erroneous handling of <literal>%r</> parameter in
3094 <varname>recovery_end_command</> (Heikki)
3098 The value always came out zero.
3104 Ensure the archiver process responds to changes in
3105 <varname>archive_command</> as soon as possible (Tom)
3111 Fix pl/pgsql's <literal>CASE</> statement to not fail when the
3112 case expression is a query that returns no rows (Tom)
3118 Update pl/perl's <filename>ppport.h</> for modern Perl versions
3125 Fix assorted memory leaks in pl/python (Andreas Freund, Tom)
3131 Handle empty-string connect parameters properly in ecpg (Michael)
3137 Prevent infinite recursion in <application>psql</> when expanding
3138 a variable that refers to itself (Tom)
3144 Fix <application>psql</>'s <literal>\copy</> to not add spaces around
3145 a dot within <literal>\copy (select ...)</> (Tom)
3149 Addition of spaces around the decimal point in a numeric literal would
3150 result in a syntax error.
3156 Avoid formatting failure in <application>psql</> when running in a
3157 locale context that doesn't match the <varname>client_encoding</>
3164 Fix unnecessary <quote>GIN indexes do not support whole-index scans</>
3165 errors for unsatisfiable queries using <filename>contrib/intarray</>
3172 Ensure that <filename>contrib/pgstattuple</> functions respond to cancel
3173 interrupts promptly (Tatsuhito Kasahara)
3179 Make server startup deal properly with the case that
3180 <function>shmget()</> returns <literal>EINVAL</> for an existing
3181 shared memory segment (Tom)
3185 This behavior has been observed on BSD-derived kernels including OS X.
3186 It resulted in an entirely-misleading startup failure complaining that
3187 the shared memory request size was too large.
3193 Avoid possible crashes in syslogger process on Windows (Heikki)
3199 Deal more robustly with incomplete time zone information in the
3200 Windows registry (Magnus)
3206 Update the set of known Windows time zone names (Magnus)
3212 Update time zone data files to <application>tzdata</> release 2010j
3213 for DST law changes in Argentina, Australian Antarctic, Bangladesh,
3214 Mexico, Morocco, Pakistan, Palestine, Russia, Syria, Tunisia;
3215 also historical corrections for Taiwan.
3219 Also, add <literal>PKST</> (Pakistan Summer Time) to the default set of
3220 timezone abbreviations.
3229 <sect1 id="release-8-4-3">
3230 <title>Release 8.4.3</title>
3233 <title>Release Date</title>
3234 <simpara>2010-03-15</simpara>
3238 This release contains a variety of fixes from 8.4.2.
3239 For information about new features in the 8.4 major release, see
3240 <xref linkend="release-8-4">.
3244 <title>Migration to Version 8.4.3</title>
3247 A dump/restore is not required for those running 8.4.X.
3248 However, if you are upgrading from a version earlier than 8.4.2,
3249 see the release notes for 8.4.2.
3255 <title>Changes</title>
3261 Add new configuration parameter <varname>ssl_renegotiation_limit</> to
3262 control how often we do session key renegotiation for an SSL connection
3267 This can be set to zero to disable renegotiation completely, which may
3268 be required if a broken SSL library is used. In particular, some
3269 vendors are shipping stopgap patches for CVE-2009-3555 that cause
3270 renegotiation attempts to fail.
3276 Fix possible deadlock during backend startup (Tom)
3282 Fix possible crashes due to not handling errors during relcache reload
3289 Fix possible crash due to use of dangling pointer to a cached plan
3296 Fix possible crash due to overenthusiastic invalidation of cached
3297 plan for <command>ROLLBACK</> (Tom)
3303 Fix possible crashes when trying to recover from a failure in
3304 subtransaction start (Tom)
3310 Fix server memory leak associated with use of savepoints and a client
3311 encoding different from server's encoding (Tom)
3317 Fix incorrect WAL data emitted during end-of-recovery cleanup of a GIST
3318 index page split (Yoichi Hirai)
3322 This would result in index corruption, or even more likely an error
3323 during WAL replay, if we were unlucky enough to crash during
3324 end-of-recovery cleanup after having completed an incomplete GIST
3331 Fix bug in WAL redo cleanup method for GIN indexes (Heikki)
3337 Fix incorrect comparison of scan key in GIN index search (Teodor)
3343 Make <function>substring()</> for <type>bit</> types treat any negative
3344 length as meaning <quote>all the rest of the string</> (Tom)
3348 The previous coding treated only -1 that way, and would produce an
3349 invalid result value for other negative values, possibly leading to
3350 a crash (CVE-2010-0442).
3356 Fix integer-to-bit-string conversions to handle the first fractional
3357 byte correctly when the output bit width is wider than the given
3358 integer by something other than a multiple of 8 bits (Tom)
3364 Fix some cases of pathologically slow regular expression matching (Tom)
3370 Fix bug occurring when trying to inline a SQL function that returns
3371 a set of a composite type that contains dropped columns (Tom)
3377 Fix bug with trying to update a field of an element of a
3378 composite-type array column (Tom)
3384 Avoid failure when <command>EXPLAIN</> has to print a FieldStore or
3385 assignment ArrayRef expression (Tom)
3389 These cases can arise now that <command>EXPLAIN VERBOSE</> tries to
3390 print plan node target lists.
3396 Avoid an unnecessary coercion failure in some cases where an undecorated
3397 literal string appears in a subquery within
3398 <command>UNION</>/<command>INTERSECT</>/<command>EXCEPT</> (Tom)
3402 This fixes a regression for some cases that worked before 8.4.
3408 Avoid undesirable rowtype compatibility check failures in some cases
3409 where a whole-row Var has a rowtype that contains dropped columns (Tom)
3415 Fix the <literal>STOP WAL LOCATION</> entry in backup history files to
3416 report the next WAL segment's name when the end location is exactly at a
3417 segment boundary (Itagaki Takahiro)
3423 Always pass the catalog ID to an option validator function specified in
3424 <command>CREATE FOREIGN DATA WRAPPER</> (Martin Pihlak)
3430 Fix some more cases of temporary-file leakage (Heikki)
3434 This corrects a problem introduced in the previous minor release.
3435 One case that failed is when a plpgsql function returning set is
3436 called within another function's exception handler.
3442 Add support for doing <literal>FULL JOIN ON FALSE</> (Tom)
3446 This prevents a regression from pre-8.4 releases for some queries that
3447 can now be simplified to a constant-false join condition.
3453 Improve constraint exclusion processing of boolean-variable cases,
3454 in particular make it possible to exclude a partition that has a
3455 <quote>bool_column = false</> constraint (Tom)
3461 Prevent treating an <literal>INOUT</> cast as representing binary
3462 compatibility (Heikki)
3468 Include column name in the message when warning about inability to
3469 grant or revoke column-level privileges (Stephen Frost)
3473 This is more useful than before and helps to prevent confusion when
3474 a <command>REVOKE</> generates multiple messages, which formerly
3475 appeared to be duplicates.
3481 When reading <filename>pg_hba.conf</> and related files, do not treat
3482 <literal>@something</> as a file inclusion request if the <literal>@</>
3483 appears inside quote marks; also, never treat <literal>@</> by itself
3484 as a file inclusion request (Tom)
3488 This prevents erratic behavior if a role or database name starts with
3489 <literal>@</>. If you need to include a file whose path name
3490 contains spaces, you can still do so, but you must write
3491 <literal>@"/path to/file"</> rather than putting the quotes around
3492 the whole construct.
3498 Prevent infinite loop on some platforms if a directory is named as
3499 an inclusion target in <filename>pg_hba.conf</> and related files
3506 Fix possible infinite loop if <function>SSL_read</> or
3507 <function>SSL_write</> fails without setting <varname>errno</> (Tom)
3511 This is reportedly possible with some Windows versions of
3512 <application>openssl</>.
3518 Disallow <acronym>GSSAPI</> authentication on local connections,
3519 since it requires a hostname to function correctly (Magnus)
3525 Protect <application>ecpg</> against applications freeing strings
3526 unexpectedly (Michael)
3532 Make <application>ecpg</> report the proper SQLSTATE if the connection
3533 disappears (Michael)
3539 Fix translation of cell contents in <application>psql</> <literal>\d</>
3546 Fix <application>psql</>'s <literal>numericlocale</> option to not
3547 format strings it shouldn't in latex and troff output formats (Heikki)
3553 Fix a small per-query memory leak in <application>psql</> (Tom)
3559 Make <application>psql</> return the correct exit status (3) when
3560 <literal>ON_ERROR_STOP</> and <literal>--single-transaction</> are
3561 both specified and an error occurs during the implied <command>COMMIT</>
3568 Fix <application>pg_dump</>'s output of permissions for foreign servers
3575 Fix possible crash in parallel <application>pg_restore</> due to
3576 out-of-range dependency IDs (Tom)
3582 Fix plpgsql failure in one case where a composite column is set to NULL
3589 Fix possible failure when calling PL/Perl functions from PL/PerlU
3590 or vice versa (Tim Bunce)
3596 Add <literal>volatile</> markings in PL/Python to avoid possible
3597 compiler-specific misbehavior (Zdenek Kotala)
3603 Ensure PL/Tcl initializes the Tcl interpreter fully (Tom)
3607 The only known symptom of this oversight is that the Tcl
3608 <literal>clock</> command misbehaves if using Tcl 8.5 or later.
3614 Prevent <function>ExecutorEnd</> from being run on portals created
3615 within a failed transaction or subtransaction (Tom)
3619 This is known to cause issues when using
3620 <filename>contrib/auto_explain</>.
3626 Prevent crash in <filename>contrib/dblink</> when too many key
3627 columns are specified to a <function>dblink_build_sql_*</> function
3628 (Rushabh Lathia, Joe Conway)
3634 Allow zero-dimensional arrays in <filename>contrib/ltree</> operations
3639 This case was formerly rejected as an error, but it's more convenient to
3640 treat it the same as a zero-element array. In particular this avoids
3641 unnecessary failures when an <type>ltree</> operation is applied to the
3642 result of <literal>ARRAY(SELECT ...)</> and the sub-select returns no
3649 Fix assorted crashes in <filename>contrib/xml2</> caused by sloppy
3650 memory management (Tom)
3656 Make building of <filename>contrib/xml2</> more robust on Windows
3663 Fix race condition in Windows signal handling (Radu Ilie)
3667 One known symptom of this bug is that rows in <structname>pg_listener</>
3668 could be dropped under heavy load.
3674 Make the configure script report failure if the C compiler does
3675 not provide a working 64-bit integer datatype (Tom)
3679 This case has been broken for some time, and no longer seems worth
3680 supporting, so just reject it at configure time instead.
3686 Update time zone data files to <application>tzdata</> release 2010e
3687 for DST law changes in Bangladesh, Chile, Fiji, Mexico, Paraguay, Samoa.
3696 <sect1 id="release-8-4-2">
3697 <title>Release 8.4.2</title>
3700 <title>Release Date</title>
3701 <simpara>2009-12-14</simpara>
3705 This release contains a variety of fixes from 8.4.1.
3706 For information about new features in the 8.4 major release, see
3707 <xref linkend="release-8-4">.
3711 <title>Migration to Version 8.4.2</title>
3714 A dump/restore is not required for those running 8.4.X.
3715 However, if you have any hash indexes,
3716 you should <command>REINDEX</> them after updating to 8.4.2,
3717 to repair possible damage.
3723 <title>Changes</title>
3729 Protect against indirect security threats caused by index functions
3730 changing session-local state (Gurjeet Singh, Tom)
3734 This change prevents allegedly-immutable index functions from possibly
3735 subverting a superuser's session (CVE-2009-4136).
3741 Reject SSL certificates containing an embedded null byte in the common
3742 name (CN) field (Magnus)
3746 This prevents unintended matching of a certificate to a server or client
3747 name during SSL validation (CVE-2009-4034).
3753 Fix hash index corruption (Tom)
3757 The 8.4 change that made hash indexes keep entries sorted by hash value
3758 failed to update the bucket splitting and compaction routines to
3759 preserve the ordering. So application of either of those operations
3760 could lead to permanent corruption of an index, in the sense that
3761 searches might fail to find entries that are present. To deal with
3762 this, it is recommended to <literal>REINDEX</> any hash indexes you may
3763 have after installing this update.
3769 Fix possible crash during backend-startup-time cache initialization (Tom)
3775 Avoid crash on empty thesaurus dictionary (Tom)
3781 Prevent signals from interrupting <literal>VACUUM</> at unsafe times
3786 This fix prevents a PANIC if a <literal>VACUUM FULL</> is canceled
3787 after it's already committed its tuple movements, as well as transient
3788 errors if a plain <literal>VACUUM</> is interrupted after having
3789 truncated the table.
3795 Fix possible crash due to integer overflow in hash table size
3800 This could occur with extremely large planner estimates for the size of
3801 a hashjoin's result.
3807 Fix crash if a <literal>DROP</> is attempted on an internally-dependent
3814 Fix very rare crash in <type>inet</>/<type>cidr</> comparisons (Chris
3821 Ensure that shared tuple-level locks held by prepared transactions are
3822 not ignored (Heikki)
3828 Fix premature drop of temporary files used for a cursor that is accessed
3829 within a subtransaction (Heikki)
3835 Fix memory leak in syslogger process when rotating to a new CSV logfile
3842 Fix memory leak in postmaster when re-parsing <filename>pg_hba.conf</>
3849 Fix Windows permission-downgrade logic (Jesse Morris)
3853 This fixes some cases where the database failed to start on Windows,
3854 often with misleading error messages such as <quote>could not locate
3855 matching postgres executable</quote>.
3861 Make <literal>FOR UPDATE/SHARE</> in the primary query not propagate
3862 into <literal>WITH</> queries (Tom)
3868 WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE
3870 the <literal>FOR UPDATE</> will now affect <literal>bar</> but not
3871 <literal>foo</>. This is more useful and consistent than the original
3872 8.4 behavior, which tried to propagate <literal>FOR UPDATE</> into the
3873 <literal>WITH</> query but always failed due to assorted implementation
3874 restrictions. It also follows the design rule that <literal>WITH</>
3875 queries are executed as if independent of the main query.
3881 Fix bug with a <literal>WITH RECURSIVE</> query immediately inside
3888 Fix concurrency bug in hash indexes (Tom)
3892 Concurrent insertions could cause index scans to transiently report
3899 Fix incorrect logic for GiST index page splits, when the split depends
3900 on a non-first column of the index (Paul Ramsey)
3906 Fix wrong search results for a multi-column GIN index with
3907 <literal>fastupdate</> enabled (Teodor)
3913 Fix bugs in WAL entry creation for GIN indexes (Tom)
3917 These bugs were masked when <varname>full_page_writes</> was on, but
3918 with it off a WAL replay failure was certain if a crash occurred before
3919 the next checkpoint.
3925 Don't error out if recycling or removing an old WAL file fails at the
3926 end of checkpoint (Heikki)
3930 It's better to treat the problem as non-fatal and allow the checkpoint
3931 to complete. Future checkpoints will retry the removal. Such problems
3932 are not expected in normal operation, but have been seen to be
3933 caused by misdesigned Windows anti-virus and backup software.
3939 Ensure WAL files aren't repeatedly archived on Windows (Heikki)
3943 This is another symptom that could happen if some other process
3944 interfered with deletion of a no-longer-needed file.
3950 Fix PAM password processing to be more robust (Tom)
3954 The previous code is known to fail with the combination of the Linux
3955 <literal>pam_krb5</> PAM module with Microsoft Active Directory as the
3956 domain controller. It might have problems elsewhere too, since it was
3957 making unjustified assumptions about what arguments the PAM stack would
3964 Raise the maximum authentication token (Kerberos ticket) size in GSSAPI
3965 and SSPI authentication methods (Ian Turner)
3969 While the old 2000-byte limit was more than enough for Unix Kerberos
3970 implementations, tickets issued by Windows Domain Controllers can be
3977 Ensure that domain constraints are enforced in constructs like
3978 <literal>ARRAY[...]::domain</>, where the domain is over an array type
3985 Fix foreign-key logic for some cases involving composite-type columns
3986 as foreign keys (Tom)
3992 Ensure that a cursor's snapshot is not modified after it is created
3997 This could lead to a cursor delivering wrong results if later operations
3998 in the same transaction modify the data the cursor is supposed to return.
4004 Fix <literal>CREATE TABLE</> to properly merge default expressions
4005 coming from different inheritance parent tables (Tom)
4009 This used to work but was broken in 8.4.
4015 Re-enable collection of access statistics for sequences (Akira Kurosawa)
4019 This used to work but was broken in 8.3.
4025 Fix processing of ownership dependencies during <literal>CREATE OR
4026 REPLACE FUNCTION</> (Tom)
4032 Fix incorrect handling of <literal>WHERE</>
4033 <replaceable>x</>=<replaceable>x</> conditions (Tom)
4037 In some cases these could get ignored as redundant, but they aren't
4038 — they're equivalent to <replaceable>x</> <literal>IS NOT NULL</>.
4044 Fix incorrect plan construction when using hash aggregation to implement
4045 <literal>DISTINCT</> for textually identical volatile expressions (Tom)
4051 Fix Assert failure for a volatile <literal>SELECT DISTINCT ON</>
4058 Fix <function>ts_stat()</> to not fail on an empty <type>tsvector</>
4065 Make text search parser accept underscores in XML attributes (Peter)
4071 Fix encoding handling in <type>xml</> binary input (Heikki)
4075 If the XML header doesn't specify an encoding, we now assume UTF-8 by
4076 default; the previous handling was inconsistent.
4082 Fix bug with calling <literal>plperl</> from <literal>plperlu</> or vice
4087 An error exit from the inner function could result in crashes due to
4088 failure to re-select the correct Perl interpreter for the outer function.
4094 Fix session-lifespan memory leak when a PL/Perl function is redefined
4101 Ensure that Perl arrays are properly converted to
4102 <productname>PostgreSQL</> arrays when returned by a set-returning
4103 PL/Perl function (Andrew Dunstan, Abhijit Menon-Sen)
4107 This worked correctly already for non-set-returning functions.
4113 Fix rare crash in exception processing in PL/Python (Peter)
4119 Fix <application>ecpg</> problem with comments in <literal>DECLARE
4120 CURSOR</> statements (Michael)
4126 Fix <application>ecpg</> to not treat recently-added keywords as
4127 reserved words (Tom)
4131 This affected the keywords <literal>CALLED</>, <literal>CATALOG</>,
4132 <literal>DEFINER</>, <literal>ENUM</>, <literal>FOLLOWING</>,
4133 <literal>INVOKER</>, <literal>OPTIONS</>, <literal>PARTITION</>,
4134 <literal>PRECEDING</>, <literal>RANGE</>, <literal>SECURITY</>,
4135 <literal>SERVER</>, <literal>UNBOUNDED</>, and <literal>WRAPPER</>.
4141 Re-allow regular expression special characters in <application>psql</>'s
4142 <literal>\df</> function name parameter (Tom)
4148 In <filename>contrib/fuzzystrmatch</>, correct the calculation of
4149 <function>levenshtein</> distances with non-default costs (Marcin Mank)
4155 In <filename>contrib/pg_standby</>, disable triggering failover with a
4156 signal on Windows (Fujii Masao)
4160 This never did anything useful, because Windows doesn't have Unix-style
4161 signals, but recent changes made it actually crash.
4167 Put <literal>FREEZE</> and <literal>VERBOSE</> options in the right
4168 order in the <literal>VACUUM</> command that
4169 <filename>contrib/vacuumdb</> produces (Heikki)
4175 Fix possible leak of connections when <filename>contrib/dblink</>
4176 encounters an error (Tatsuhito Kasahara)
4182 Ensure <application>psql</>'s flex module is compiled with the correct
4183 system header definitions (Tom)
4187 This fixes build failures on platforms where
4188 <literal>--enable-largefile</> causes incompatible changes in the
4195 Make the postmaster ignore any <literal>application_name</> parameter in
4196 connection request packets, to improve compatibility with future libpq
4203 Update the timezone abbreviation files to match current reality (Joachim
4208 This includes adding <literal>IDT</> to the default
4209 timezone abbreviation set.
4215 Update time zone data files to <application>tzdata</> release 2009s
4216 for DST law changes in Antarctica, Argentina, Bangladesh, Fiji,
4217 Novokuznetsk, Pakistan, Palestine, Samoa, Syria; also historical
4218 corrections for Hong Kong.
4227 <sect1 id="release-8-4-1">
4228 <title>Release 8.4.1</title>
4231 <title>Release Date</title>
4232 <simpara>2009-09-09</simpara>
4236 This release contains a variety of fixes from 8.4.
4237 For information about new features in the 8.4 major release, see
4238 <xref linkend="release-8-4">.
4242 <title>Migration to Version 8.4.1</title>
4245 A dump/restore is not required for those running 8.4.X.
4251 <title>Changes</title>
4257 Fix WAL page header initialization at the end of archive recovery
4262 This could lead to failure to process the WAL in a subsequent
4269 Fix <quote>cannot make new WAL entries during recovery</> error (Tom)
4275 Fix problem that could make expired rows visible after a crash (Tom)
4279 This bug involved a page status bit potentially not being set
4280 correctly after a server crash.
4286 Disallow <command>RESET ROLE</> and <command>RESET SESSION
4287 AUTHORIZATION</> inside security-definer functions (Tom, Heikki)
4291 This covers a case that was missed in the previous patch that
4292 disallowed <command>SET ROLE</> and <command>SET SESSION
4293 AUTHORIZATION</> inside security-definer functions.
4300 Make <command>LOAD</> of an already-loaded loadable module
4305 Formerly, <command>LOAD</> would attempt to unload and re-load the
4306 module, but this is unsafe and not all that useful.
4312 Make window function <literal>PARTITION BY</> and <literal>ORDER BY</>
4313 items always be interpreted as simple expressions (Tom)
4317 In 8.4.0 these lists were parsed following the rules used for
4318 top-level <literal>GROUP BY</> and <literal>ORDER BY</> lists.
4319 But this was not correct per the SQL standard, and it led to possible
4326 Fix several errors in planning of semi-joins (Tom)
4330 These led to wrong query results in some cases where <literal>IN</>
4331 or <literal>EXISTS</> was used together with another join.
4337 Fix handling of whole-row references to subqueries that are within
4343 <literal>SELECT COUNT(ss.*) FROM ... LEFT JOIN (SELECT ...) ss ON ...</>.
4344 Here, <literal>ss.*</> would be treated as <literal>ROW(NULL,NULL,...)</>
4345 for null-extended join rows, which is not the same as a simple NULL.
4346 Now it is treated as a simple NULL.
4352 Fix Windows shared-memory allocation code (Tsutomu Yamada, Magnus)
4356 This bug led to the often-reported <quote>could not reattach
4357 to shared memory</> error message.
4363 Fix locale handling with plperl (Heikki)
4367 This bug could cause the server's locale setting to change when a
4368 plperl function is called, leading to data corruption.
4374 Fix handling of reloptions to ensure setting one option doesn't
4375 force default values for others (Itagaki Takahiro)
4381 Ensure that a <quote>fast shutdown</> request will forcibly terminate
4382 open sessions, even if a <quote>smart shutdown</> was already in progress
4389 Avoid memory leak for <function>array_agg()</> in <literal>GROUP BY</>
4396 Treat <function>to_char(..., 'TH')</> as an uppercase ordinal
4397 suffix with <literal>'HH'</>/<literal>'HH12'</> (Heikki)
4401 It was previously handled as <literal>'th'</> (lowercase).
4407 Include the fractional part in the result of
4408 <function>EXTRACT(second)</> and
4409 <function>EXTRACT(milliseconds)</> for
4410 <type>time</> and <type>time with time zone</> inputs (Tom)
4414 This has always worked for floating-point datetime configurations,
4415 but was broken in the integer datetime code.
4421 Fix overflow for <literal>INTERVAL '<replaceable>x</> ms'</literal>
4422 when <replaceable>x</> is more than 2 million and integer
4423 datetimes are in use (Alex Hunsaker)
4429 Improve performance when processing toasted values in index scans (Tom)
4433 This is particularly useful for <ulink
4434 url="http://postgis.refractions.net/">PostGIS</ulink>.
4440 Fix a typo that disabled <varname>commit_delay</> (Jeff Janes)
4446 Output early-startup messages to <filename>postmaster.log</> if the
4447 server is started in silent mode (Tom)
4451 Previously such error messages were discarded, leading to
4452 difficulty in debugging.
4458 Remove translated FAQs (Peter)
4462 They are now on the <ulink
4463 url="http://wiki.postgresql.org/wiki/FAQ">wiki</ulink>. The
4464 main FAQ was moved to the wiki some time ago.
4470 Fix <application>pg_ctl</> to not go into an infinite loop if
4471 <filename>postgresql.conf</> is empty (Jeff Davis)
4477 Fix several errors in <application>pg_dump</>'s
4478 <literal>--binary-upgrade</> mode (Bruce, Tom)
4482 <literal>pg_dump --binary-upgrade</> is used by pg_migrator.
4488 Fix <filename>contrib/xml2</>'s <function>xslt_process()</> to
4489 properly handle the maximum number of parameters (twenty) (Tom)
4495 Improve robustness of <application>libpq</>'s code to recover
4496 from errors during <command>COPY FROM STDIN</> (Tom)
4502 Avoid including conflicting readline and editline header files
4503 when both libraries are installed (Zdenek Kotala)
4509 Work around gcc bug that causes <quote>floating-point exception</>
4510 instead of <quote>division by zero</> on some platforms (Tom)
4516 Update time zone data files to <application>tzdata</> release 2009l
4517 for DST law changes in Bangladesh, Egypt, Mauritius.
4526 <sect1 id="release-8-4">
4527 <title>Release 8.4</title>
4530 <title>Release Date</title>
4531 <simpara>2009-07-01</simpara>
4535 <title>Overview</title>
4538 After many years of development, <productname>PostgreSQL</> has
4539 become feature-complete in many areas. This release shows a
4540 targeted approach to adding features (e.g., authentication,
4541 monitoring, space reuse), and adds capabilities defined in the
4542 later SQL standards. The major areas of enhancement are:
4547 <!-- This list duplicates items below, but without authors or details-->
4557 Common Table Expressions and Recursive Queries
4563 Default and variadic parameters for functions
4581 Per-database locale settings
4587 Improved hash indexes
4593 Improved join performance for <literal>EXISTS</> and <literal>NOT EXISTS</> queries
4599 Easier-to-use Warm Standby
4605 Automatic sizing of the Free Space Map
4611 Visibility Map (greatly reduces vacuum overhead for slowly-changing tables)
4617 Version-aware psql (backslash commands work against older servers)
4623 Support SSL certificates for user authentication
4629 Per-function runtime statistics
4635 Easy editing of functions in psql
4641 New contrib modules: pg_stat_statements, auto_explain, citext, btree_gin
4648 The above items are explained in more detail in the sections below.
4654 <title>Migration to Version 8.4</title>
4657 A dump/restore using <application>pg_dump</application> is
4658 required for those wishing to migrate data from any previous
4663 Observe the following incompatibilities:
4667 <title>General</title>
4672 Use 64-bit integer datetimes by default (Neil Conway)
4676 Previously this was selected by <application>configure</>'s
4677 <option>--enable-integer-datetimes</> option. To retain
4678 the old behavior, build with <option>--disable-integer-datetimes</>.
4684 Remove <application>ipcclean</> utility command (Bruce)
4688 The utility only worked on a few platforms. Users should use
4689 their operating system tools instead.
4698 <title>Server Settings</title>
4703 Change default setting for
4704 <literal>log_min_messages</> to <literal>warning</> (previously
4705 it was <literal>notice</>) to reduce log file volume (Tom)
4711 Change default setting for <literal>max_prepared_transactions</> to
4712 zero (previously it was 5) (Tom)
4718 Make <literal>debug_print_parse</>, <literal>debug_print_rewritten</>,
4719 and <literal>debug_print_plan</>
4720 output appear at <literal>LOG</> message level, not
4721 <literal>DEBUG1</> as formerly (Tom)
4727 Make <literal>debug_pretty_print</> default to <literal>on</> (Tom)
4733 Remove <varname>explain_pretty_print</> parameter (no longer needed) (Tom)
4739 Make <varname>log_temp_files</> settable by superusers only, like other
4740 logging options (Simon Riggs)
4746 Remove automatic appending of the epoch timestamp when no <literal>%</>
4747 escapes are present in <literal>log_filename</> (Robert Haas)
4751 This change was made because some users wanted a fixed log filename,
4752 for use with an external log rotation tool.
4758 Remove <varname>log_restartpoints</> from <filename>recovery.conf</>;
4759 instead use <varname>log_checkpoints</> (Simon)
4765 Remove <varname>krb_realm</> and <varname>krb_server_hostname</>;
4766 these are now set in <filename>pg_hba.conf</> instead (Magnus)
4772 There are also significant changes in <link
4773 linkend="release-8-4-pg-hba-conf"><filename>pg_hba.conf</></link>,
4783 <title>Queries</title>
4789 Change <command>TRUNCATE</> and <command>LOCK</> to
4790 apply to child tables of the specified table(s) (Peter)
4794 These commands now accept an <literal>ONLY</> option that prevents
4795 processing child tables; this option must be used if the old
4802 <command>SELECT DISTINCT</> and
4803 <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</>
4804 no longer always produce sorted output (Tom)
4808 Previously, these types of queries always removed duplicate rows
4809 by means of Sort/Unique processing (i.e., sort then remove adjacent
4810 duplicates). Now they can be implemented by hashing, which will not
4811 produce sorted output. If an application relied on the output being
4812 in sorted order, the recommended fix is to add an <literal>ORDER BY</>
4813 clause. As a short-term workaround, the previous behavior can be
4814 restored by disabling <literal>enable_hashagg</>, but that is a very
4815 performance-expensive fix. <literal>SELECT DISTINCT ON</> never uses
4816 hashing, however, so its behavior is unchanged.
4822 Force child tables to inherit <literal>CHECK</> constraints from parents
4823 (Alex Hunsaker, Nikhil Sontakke, Tom)
4827 Formerly it was possible to drop such a constraint from a child
4828 table, allowing rows that violate the constraint to be visible
4829 when scanning the parent table. This was deemed inconsistent,
4830 as well as contrary to SQL standard.
4836 Disallow negative <literal>LIMIT</> or <literal>OFFSET</>
4837 values, rather than treating them as zero (Simon)
4843 Disallow <command>LOCK TABLE</> outside a transaction block
4848 Such an operation is useless because the lock would be released
4855 Sequences now contain an additional <structfield>start_value</> column
4856 (Zoltan Boszormenyi)
4860 This supports <command>ALTER SEQUENCE ... RESTART</>.
4870 <title>Functions and Operators</title>
4876 Make <type>numeric</> zero raised to a fractional power return
4877 <literal>0</>, rather than throwing an error, and make
4878 <type>numeric</> zero raised to the zero power return <literal>1</>,
4879 rather than error (Bruce)
4883 This matches the longstanding <type>float8</> behavior.
4889 Allow unary minus of floating-point values to produce minus zero (Tom)
4893 The changed behavior is more <acronym>IEEE</>-standard
4900 Throw an error if an escape character is the last character in
4901 a <literal>LIKE</> pattern (i.e., it has nothing to escape) (Tom)
4905 Previously, such an escape character was silently ignored,
4906 thus possibly masking application logic errors.
4912 Remove <literal>~=~</> and <literal>~<>~</> operators
4913 formerly used for <literal>LIKE</> index comparisons (Tom)
4917 Pattern indexes now use the regular equality operator.
4923 <function>xpath()</> now passes its arguments to <application>libxml</>
4924 without any changes (Andrew)
4928 This means that the XML argument must be a well-formed XML document.
4929 The previous coding attempted to allow XML fragments, but it did not
4936 Make <function>xmlelement()</> format attribute values just like
4937 content values (Peter)
4941 Previously, attribute values were formatted according to the
4942 normal SQL output behavior, which is sometimes at odds with
4949 Rewrite memory management for <application>libxml</>-using functions
4954 This change should avoid some compatibility problems with use of
4955 <application>libxml</> in PL/Perl and other add-on code.
4961 Adopt a faster algorithm for hash functions (Kenneth Marshall,
4962 based on work of Bob Jenkins)
4966 Many of the built-in hash functions now deliver different results on
4967 little-endian and big-endian platforms.
4974 <title>Temporal Functions and Operators</title>
4980 <varname>DateStyle</> no longer controls <type>interval</> output
4981 formatting; instead there is a new variable <varname>IntervalStyle</>
4988 Improve consistency of handling of fractional seconds in
4989 <type>timestamp</> and <type>interval</> output (Ron Mayer)
4993 This may result in displaying a different number of fractional
4994 digits than before, or rounding instead of truncating.
5000 Make <function>to_char()</>'s localized month/day names depend
5001 on <varname>LC_TIME</>, not <varname>LC_MESSAGES</> (Euler
5002 Taveira de Oliveira)
5008 Cause <function>to_date()</> and <function>to_timestamp()</>
5009 to more consistently report errors for invalid input (Brendan
5014 Previous versions would often ignore or silently misread input
5015 that did not match the format string. Such cases will now
5022 Fix <function>to_timestamp()</> to not require upper/lower case
5023 matching for meridian (<literal>AM</>/<literal>PM</>) and era
5024 (<literal>BC</>/<literal>AD</>) format designations (Brendan
5029 For example, input value <literal>ad</> now matches the format
5030 string <literal>AD</>.
5043 <title>Changes</title>
5046 Below you will find a detailed account of the changes between
5047 <productname>PostgreSQL</productname> 8.4 and the previous major
5052 <title>Performance</title>
5057 Improve optimizer statistics calculations (Jan Urbanski, Tom)
5061 In particular, estimates for full-text-search operators are
5068 Allow <command>SELECT DISTINCT</> and
5069 <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</> to
5074 This means that these types of queries no longer automatically
5075 produce sorted output.
5081 Create explicit concepts of semi-joins and anti-joins (Tom)
5085 This work formalizes our previous ad-hoc treatment of <literal>IN
5086 (SELECT ...)</> clauses, and extends it to <literal>EXISTS</> and
5087 <literal>NOT EXISTS</> clauses. It should result in significantly
5088 better planning of <literal>EXISTS</> and <literal>NOT EXISTS</>
5089 queries. In general, logically equivalent <literal>IN</> and
5090 <literal>EXISTS</> clauses should now have similar performance,
5091 whereas previously <literal>IN</> often won.
5097 Improve optimization of sub-selects beneath outer joins (Tom)
5101 Formerly, a sub-select or view could not be optimized very well if it
5102 appeared within the nullable side of an outer join and contained
5103 non-strict expressions (for instance, constants) in its result list.
5109 Improve the performance of <function>text_position()</> and
5110 related functions by using Boyer-Moore-Horspool searching (David
5115 This is particularly helpful for long search patterns.
5121 Reduce I/O load of writing the statistics collection file
5122 by writing the file only when requested (Martin Pihlak)
5128 Improve performance for bulk inserts (Robert Haas, Simon)
5134 Increase the default value of <varname>default_statistics_target</>
5135 from <literal>10</> to <literal>100</> (Greg Sabino Mullane,
5140 The maximum value was also increased from <literal>1000</> to
5147 Perform <varname>constraint_exclusion</> checking by default
5148 in queries involving inheritance or <literal>UNION ALL</> (Tom)
5152 A new <varname>constraint_exclusion</> setting,
5153 <literal>partition</>, was added to specify this behavior.
5159 Allow I/O read-ahead for bitmap index scans (Greg Stark)
5163 The amount of read-ahead is controlled by
5164 <varname>effective_io_concurrency</>. This feature is available only
5165 if the kernel has <function>posix_fadvise()</> support.
5171 Inline simple set-returning <acronym>SQL</> functions in
5172 <literal>FROM</> clauses (Richard Rowell)
5178 Improve performance of multi-batch hash joins by providing a special
5179 case for join key values that are especially common in the outer
5180 relation (Bryce Cutt, Ramon Lawrence)
5186 Reduce volume of temporary data in multi-batch hash joins
5187 by suppressing <quote>physical tlist</> optimization (Michael
5188 Henderson, Ramon Lawrence)
5194 Avoid waiting for idle-in-transaction sessions during
5195 <command>CREATE INDEX CONCURRENTLY</> (Simon)
5201 Improve performance of shared cache invalidation (Tom)
5210 <title>Server</title>
5213 <title>Settings</title>
5219 Convert many <filename>postgresql.conf</> settings to enumerated
5220 values so that <literal>pg_settings</> can display the valid
5227 Add <varname>cursor_tuple_fraction</> parameter to control the
5228 fraction of a cursor's rows that the planner assumes will be
5229 fetched (Robert Hell)
5235 Allow underscores in the names of custom variable
5236 classes in <filename>postgresql.conf</> (Tom)
5245 <title>Authentication and security</title>
5250 Remove support for the (insecure) <literal>crypt</> authentication method
5255 This effectively obsoletes pre-<productname>PostgreSQL</> 7.2 client
5256 libraries, as there is no longer any non-plaintext password method that
5263 Support regular expressions in <filename>pg_ident.conf</>
5270 Allow <productname>Kerberos</>/<acronym>GSSAPI</> parameters
5271 to be changed without restarting the postmaster (Magnus)
5277 Support <acronym>SSL</> certificate chains in server certificate
5278 file (Andrew Gierth)
5282 Including the full certificate chain makes the client able
5283 to verify the certificate without having all intermediate CA
5284 certificates present in the local store, which is often the case for
5291 Report appropriate error message for combination of <literal>MD5</>
5292 authentication and <varname>db_user_namespace</> enabled (Bruce)
5299 <sect4 id="release-8-4-pg-hba-conf">
5300 <title><filename>pg_hba.conf</></title>
5305 Change all authentication options to use <literal>name=value</>
5310 This makes incompatible changes to the <literal>ldap</>,
5311 <literal>pam</> and <literal>ident</> authentication methods. All
5312 <filename>pg_hba.conf</> entries with these methods need to be
5313 rewritten using the new format.
5319 Remove the <literal>ident sameuser</> option, instead making that
5320 behavior the default if no usermap is specified (Magnus)
5326 Allow a usermap parameter for all external authentication methods
5331 Previously a usermap was only supported for <literal>ident</>
5338 Add <literal>clientcert</> option to control requesting of a
5339 client certificate (Magnus)
5343 Previously this was controlled by the presence of a root
5344 certificate file in the server's data directory.
5350 Add <literal>cert</> authentication method to allow
5351 <emphasis>user</> authentication via <acronym>SSL</> certificates
5356 Previously <acronym>SSL</> certificates could only verify that
5357 the client had access to a certificate, not authenticate a
5364 Allow <literal>krb5</>, <literal>gssapi</> and <literal>sspi</>
5365 realm and <literal>krb5</> host settings to be specified in
5366 <filename>pg_hba.conf</> (Magnus)
5370 These override the settings in <filename>postgresql.conf</>.
5376 Add <varname>include_realm</> parameter for <literal>krb5</>,
5377 <literal>gssapi</>, and <literal>sspi</> methods (Magnus)
5381 This allows identical usernames from different realms to be
5382 authenticated as different database users using usermaps.
5388 Parse <filename>pg_hba.conf</> fully when it is loaded,
5389 so that errors are reported immediately (Magnus)
5393 Previously, most errors in the file wouldn't be detected until clients
5394 tried to connect, so an erroneous file could render the system
5395 unusable. With the new behavior, if an error is detected during
5396 reload then the bad file is rejected and the postmaster continues
5397 to use its old copy.
5403 Show all parsing errors in <filename>pg_hba.conf</> instead of
5404 aborting after the first one (Selena Deckelmann)
5410 Support <literal>ident</> authentication over Unix-domain sockets
5411 on <productname>Solaris</> (Garick Hamlin)
5420 <title>Continuous Archiving</title>
5425 Provide an option to <function>pg_start_backup()</> to force its
5426 implied checkpoint to finish as quickly as possible (Tom)
5430 The default behavior avoids excess I/O consumption, but that is
5431 pointless if no concurrent query activity is going on.
5437 Make <function>pg_stop_backup()</> wait for modified <acronym>WAL</>
5438 files to be archived (Simon)
5442 This guarantees that the backup is valid at the time
5443 <function>pg_stop_backup()</> completes.
5449 When archiving is enabled, rotate the last WAL segment at shutdown
5450 so that all transactions can be archived immediately
5451 (Guillaume Smet, Heikki)
5457 Delay <quote>smart</> shutdown while a continuous archiving base backup
5458 is in progress (Laurenz Albe)
5464 Cancel a continuous archiving base backup if <quote>fast</> shutdown
5465 is requested (Laurenz Albe)
5471 Allow <filename>recovery.conf</> boolean variables to take the
5472 same range of string values as <filename>postgresql.conf</>
5483 <title>Monitoring</title>
5488 Add <function>pg_conf_load_time()</> to report when
5489 the <productname>PostgreSQL</> configuration files were last loaded
5496 Add <function>pg_terminate_backend()</> to safely terminate a
5497 backend (the <literal>SIGTERM</> signal works also) (Tom, Bruce)
5501 While it's always been possible to <literal>SIGTERM</> a single
5502 backend, this was previously considered unsupported; and testing
5503 of the case found some bugs that are now fixed.
5509 Add ability to track user-defined functions' call counts and
5510 runtimes (Martin Pihlak)
5514 Function statistics appear in a new system view,
5515 <literal>pg_stat_user_functions</>. Tracking is controlled
5516 by the new parameter <varname>track_functions</>.
5522 Allow specification of the maximum query string size in
5523 <literal>pg_stat_activity</> via new
5524 <varname>track_activity_query_size</> parameter (Thomas Lee)
5530 Increase the maximum line length sent to <application>syslog</>, in
5531 hopes of improving performance (Tom)
5537 Add read-only configuration variables <varname>segment_size</>,
5538 <varname>wal_block_size</>, and <varname>wal_segment_size</>
5545 When reporting a deadlock, report the text of all queries involved
5546 in the deadlock to the server log (Itagaki Takahiro)
5552 Add <function>pg_stat_get_activity(pid)</> function to return
5553 information about a specific process id (Magnus)
5559 Allow the location of the server's statistics file to be specified
5560 via <varname>stats_temp_directory</> (Magnus)
5564 This allows the statistics file to be placed in a
5565 <acronym>RAM</>-resident directory to reduce I/O requirements.
5566 On startup/shutdown, the file is copied to its traditional location
5567 (<literal>$PGDATA/global/</>) so it is preserved across restarts.
5578 <title>Queries</title>
5583 Add support for <literal>WINDOW</> functions (Hitoshi Harada)
5589 Add support for <literal>WITH</> clauses (CTEs), including <literal>WITH
5590 RECURSIVE</> (Yoshiyuki Asaba, Tatsuo Ishii, Tom)
5596 Add <command>TABLE</> command (Peter)
5600 <literal>TABLE tablename</> is a SQL standard short-hand for
5601 <literal>SELECT * FROM tablename</>.
5607 Allow <literal>AS</> to be optional when specifying a
5608 <command>SELECT</> (or <literal>RETURNING</>) column output
5609 label (Hiroshi Saito)
5613 This works so long as the column label is not any
5614 <productname>PostgreSQL</> keyword; otherwise <literal>AS</> is still
5621 Support set-returning functions in <command>SELECT</> result lists
5622 even for functions that return their result via a tuplestore (Tom)
5626 In particular, this means that functions written in PL/pgSQL
5627 and other PL languages can now be called this way.
5633 Support set-returning functions in the output of aggregation
5634 and grouping queries (Tom)
5640 Allow <command>SELECT FOR UPDATE</>/<literal>SHARE</> to work
5641 on inheritance trees (Tom)
5647 Add infrastructure for <acronym>SQL/MED</> (Martin Pihlak,
5652 There are no remote or external <acronym>SQL/MED</> capabilities
5653 yet, but this change provides a standardized and future-proof
5654 system for managing connection information for modules like
5655 <filename>dblink</> and <filename>plproxy</>.
5661 Invalidate cached plans when referenced schemas, functions, operators,
5662 or operator classes are modified (Martin Pihlak, Tom)
5666 This improves the system's ability to respond to on-the-fly
5672 Allow comparison of composite types and allow arrays of
5673 anonymous composite types (Tom)
5677 This allows constructs such as
5678 <literal>row(1, 1.1) = any (array[row(7, 7.7), row(1, 1.0)])</>.
5679 This is particularly useful in recursive queries.
5685 Add support for Unicode string literal and identifier specifications
5686 using code points, e.g. <literal>U&'d\0061t\+000061'</>
5693 Reject <literal>\000</> in string literals and <command>COPY</> data
5698 Previously, this was accepted but had the effect of terminating
5699 the string contents.
5705 Improve the parser's ability to report error locations (Tom)
5709 An error location is now reported for many semantic errors,
5710 such as mismatched datatypes, that previously could not be localized.
5717 <title><command>TRUNCATE</></title>
5722 Support statement-level <literal>ON TRUNCATE</> triggers (Simon)
5728 Add <literal>RESTART</>/<literal>CONTINUE IDENTITY</> options
5729 for <command>TRUNCATE TABLE</>
5730 (Zoltan Boszormenyi)
5734 The start value of a sequence can be changed by <command>ALTER
5735 SEQUENCE START WITH</>.
5741 Allow <command>TRUNCATE tab1, tab1</> to succeed (Bruce)
5747 Add a separate <command>TRUNCATE</> permission (Robert Haas)
5756 <title><command>EXPLAIN</></title>
5761 Make <command>EXPLAIN VERBOSE</> show the output columns of each
5766 Previously <command>EXPLAIN VERBOSE</> output an internal
5767 representation of the query plan. (That behavior is now
5768 available via <varname>debug_print_plan</>.)
5774 Make <command>EXPLAIN</> identify subplans and initplans with
5775 individual labels (Tom)
5781 Make <command>EXPLAIN</> honor <varname>debug_print_plan</> (Tom)
5787 Allow <command>EXPLAIN</> on <command>CREATE TABLE AS</> (Peter)
5796 <title><literal>LIMIT</>/<literal>OFFSET</></title>
5801 Allow sub-selects in <literal>LIMIT</> and <literal>OFFSET</> (Tom)
5807 Add <acronym>SQL</>-standard syntax for
5808 <literal>LIMIT</>/<literal>OFFSET</> capabilities (Peter)
5813 <literal>OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS}
5825 <title>Object Manipulation</title>
5830 Add support for column-level privileges (Stephen Frost, KaiGai
5837 Refactor multi-object <command>DROP</> operations to reduce the
5838 need for <literal>CASCADE</> (Alex Hunsaker)
5842 For example, if table <literal>B</> has a dependency on table
5843 <literal>A</>, the command <literal>DROP TABLE A, B</> no longer
5844 requires the <literal>CASCADE</> option.
5850 Fix various problems with concurrent <command>DROP</> commands
5851 by ensuring that locks are taken before we begin to drop dependencies
5858 Improve reporting of dependencies during <command>DROP</>
5865 Add <literal>WITH [NO] DATA</> clause to <command>CREATE TABLE
5866 AS</>, per the <acronym>SQL</> standard (Peter, Tom)
5872 Add support for user-defined I/O conversion casts (Heikki)
5878 Allow <command>CREATE AGGREGATE</> to use an <type>internal</>
5879 transition datatype (Tom)
5885 Add <literal>LIKE</> clause to <command>CREATE TYPE</> (Tom)
5889 This simplifies creation of data types that use the same internal
5890 representation as an existing type.
5896 Allow specification of the type category and <quote>preferred</>
5897 status for user-defined base types (Tom)
5901 This allows more control over the coercion behavior of user-defined
5908 Allow <command>CREATE OR REPLACE VIEW</> to add columns to the
5909 end of a view (Robert Haas)
5916 <title><command>ALTER</></title>
5921 Add <command>ALTER TYPE RENAME</> (Petr Jelinek)
5927 Add <command>ALTER SEQUENCE ... RESTART</> (with no parameter) to
5928 reset a sequence to its initial value (Zoltan Boszormenyi)
5934 Modify the <command>ALTER TABLE</> syntax to allow all reasonable
5935 combinations for tables, indexes, sequences, and views (Tom)
5939 This change allows the following new syntaxes:
5944 <command>ALTER SEQUENCE OWNER TO</>
5949 <command>ALTER VIEW ALTER COLUMN SET/DROP DEFAULT</>
5954 <command>ALTER VIEW OWNER TO</>
5959 <command>ALTER VIEW SET SCHEMA</>
5964 There is no actual new functionality here, but formerly
5965 you had to say <command>ALTER TABLE</> to do these things,
5966 which was confusing.
5972 Add support for the syntax <command>ALTER TABLE ... ALTER COLUMN
5973 ... SET DATA TYPE</> (Peter)
5977 This is <acronym>SQL</>-standard syntax for functionality that
5978 was already supported.
5984 Make <command>ALTER TABLE SET WITHOUT OIDS</> rewrite the table
5985 to physically remove <type>OID</> values (Tom)
5989 Also, add <command>ALTER TABLE SET WITH OIDS</> to rewrite the
5990 table to add <type>OID</>s.
5999 <title>Database Manipulation</title>
6004 Improve reporting of
6005 <command>CREATE</>/<command>DROP</>/<command>RENAME DATABASE</>
6006 failure when uncommitted prepared transactions are the cause
6013 Make <varname>LC_COLLATE</> and <varname>LC_CTYPE</> into
6014 per-database settings (Radek Strnad, Heikki)
6018 This makes collation similar to encoding, which was always
6019 configurable per database.
6025 Improve checks that the database encoding, collation
6026 (<varname>LC_COLLATE</>), and character classes
6027 (<varname>LC_CTYPE</>) match (Heikki, Tom)
6031 Note in particular that a new database's encoding and locale
6032 settings can be changed only when copying from <literal>template0</>.
6033 This prevents possibly copying data that doesn't match the settings.
6039 Add <command>ALTER DATABASE SET TABLESPACE</> to move a database
6040 to a new tablespace (Guillaume Lelarge, Bernd Helmle)
6051 <title>Utility Operations</title>
6057 Add a <literal>VERBOSE</> option to the <command>CLUSTER</> command and
6058 <application>clusterdb</> (Jim Cox)
6064 Decrease memory requirements for recording pending trigger
6072 <title>Indexes</title>
6077 Dramatically improve the speed of building and accessing hash
6078 indexes (Tom Raney, Shreya Bhargava)
6082 This allows hash indexes to be sometimes faster than btree
6083 indexes. However, hash indexes are still not crash-safe.
6089 Make hash indexes store only the hash code, not the full value of
6090 the indexed column (Xiao Meng)
6094 This greatly reduces the size of hash indexes for long indexed
6095 values, improving performance.
6101 Implement fast update option for GIN indexes (Teodor, Oleg)
6105 This option greatly improves update speed at a small penalty in search
6112 <literal>xxx_pattern_ops</> indexes can now be used for simple
6113 equality comparisons, not only for <literal>LIKE</> (Tom)
6122 <title>Full Text Indexes</title>
6127 Remove the requirement to use <literal>@@@</> when doing
6128 <acronym>GIN</> weighted lookups on full text indexes (Tom, Teodor)
6132 The normal <literal>@@</> text search operator can be used
6139 Add an optimizer selectivity function for <literal>@@</> text
6140 search operations (Jan Urbanski)
6146 Allow prefix matching in full text searches (Teodor Sigaev,
6153 Support multi-column <acronym>GIN</> indexes (Teodor Sigaev)
6159 Improve support for Nepali language and Devanagari alphabet (Teodor)
6168 <title><command>VACUUM</></title>
6173 Track free space in separate per-relation <quote>fork</> files (Heikki)
6177 Free space discovered by <command>VACUUM</> is now recorded in
6178 <filename>*_fsm</> files, rather than in a fixed-sized shared memory
6179 area. The <varname>max_fsm_pages</> and <varname>max_fsm_relations</>
6180 settings have been removed, greatly simplifying administration of
6181 free space management.
6187 Add a visibility map to track pages that do not require
6192 This allows <command>VACUUM</> to avoid scanning all of
6193 a table when only a portion of the table needs vacuuming.
6194 The visibility map is stored in per-relation <quote>fork</> files.
6200 Add <varname>vacuum_freeze_table_age</> parameter to control
6201 when <command>VACUUM</> should ignore the visibility map and
6202 do a full table scan to freeze tuples (Heikki)
6208 Track transaction snapshots more carefully (Alvaro)
6212 This improves <command>VACUUM</>'s ability to reclaim space
6213 in the presence of long-running transactions.
6219 Add ability to specify per-relation autovacuum and <acronym>TOAST</>
6220 parameters in <command>CREATE TABLE</> (Alvaro, Euler Taveira de
6225 Autovacuum options used to be stored in a system table.
6231 Add <literal>--freeze</> option to <application>vacuumdb</>
6243 <title>Data Types</title>
6248 Add a <literal>CaseSensitive</> option for text search synonym
6249 dictionaries (Simon)
6255 Improve the precision of <type>NUMERIC</> division (Tom)
6261 Add basic arithmetic operators for <type>int2</> with <type>int8</>
6266 This eliminates the need for explicit casting in some situations.
6272 Allow <type>UUID</> input to accept an optional hyphen after
6273 every fourth digit (Robert Haas)
6279 Allow <literal>on</>/<literal>off</> as input for the boolean data type
6286 Allow spaces around <literal>NaN</> in the input string for
6287 type <type>numeric</> (Sam Mason)
6294 <title>Temporal Data Types</title>
6299 Reject year <literal>0 BC</> and years <literal>000</> and
6300 <literal>0000</> (Tom)
6304 Previously these were interpreted as <literal>1 BC</>.
6305 (Note: years <literal>0</> and <literal>00</> are still assumed to be
6312 Include <literal>SGT</> (Singapore time) in the default list of
6313 known time zone abbreviations (Tom)
6319 Support <literal>infinity</> and <literal>-infinity</> as
6320 values of type <type>date</> (Tom)
6326 Make parsing of <type>interval</> literals more standard-compliant
6331 For example, <literal>INTERVAL '1' YEAR</> now does what it's
6338 Allow <type>interval</> fractional-seconds precision to be specified
6339 after the <literal>second</> keyword, for <acronym>SQL</> standard
6344 Formerly the precision had to be specified after the keyword
6345 <type>interval</>. (For backwards compatibility, this syntax is still
6346 supported, though deprecated.) Data type definitions will now be
6347 output using the standard format.
6353 Support the <acronym>IS0 8601</> <type>interval</> syntax (Ron
6354 Mayer, Kevin Grittner)
6358 For example, <literal>INTERVAL 'P1Y2M3DT4H5M6.7S'</> is now
6365 Add <varname>IntervalStyle</> parameter
6366 which controls how <type>interval</> values are output (Ron Mayer)
6370 Valid values are: <literal>postgres</>, <literal>postgres_verbose</>,
6371 <literal>sql_standard</>, <literal>iso_8601</>. This setting also
6372 controls the handling of negative <type>interval</> input when only
6373 some fields have positive/negative designations.
6379 Improve consistency of handling of fractional seconds in
6380 <type>timestamp</> and <type>interval</> output (Ron Mayer)
6389 <title>Arrays</title>
6394 Improve the handling of casts applied to <literal>ARRAY[]</>
6395 constructs, such as <literal>ARRAY[...]::integer[]</>
6400 Formerly <productname>PostgreSQL</> attempted to determine a data type
6401 for the <literal>ARRAY[]</> construct without reference to the ensuing
6402 cast. This could fail unnecessarily in many cases, in particular when
6403 the <literal>ARRAY[]</> construct was empty or contained only
6404 ambiguous entries such as <literal>NULL</>. Now the cast is consulted
6405 to determine the type that the array elements must be.
6411 Make <acronym>SQL</>-syntax <type>ARRAY</> dimensions optional
6412 to match the <acronym>SQL</> standard (Peter)
6418 Add <function>array_ndims()</> to return the number
6419 of dimensions of an array (Robert Haas)
6425 Add <function>array_length()</> to return the length
6426 of an array for a specified dimension (Jim Nasby, Robert
6427 Haas, Peter Eisentraut)
6433 Add aggregate function <function>array_agg()</>, which
6434 returns all aggregated values as a single array (Robert Haas,
6441 Add <function>unnest()</>, which converts an array to
6442 individual row values (Tom)
6446 This is the opposite of <function>array_agg()</>.
6452 Add <function>array_fill()</> to create arrays initialized with
6453 a value (Pavel Stehule)
6459 Add <function>generate_subscripts()</> to simplify generating
6460 the range of an array's subscripts (Pavel Stehule)
6469 <title>Wide-Value Storage (<acronym>TOAST</>)</title>
6474 Consider <acronym>TOAST</> compression on values as short as
6475 32 bytes (previously 256 bytes) (Greg Stark)
6481 Require 25% minimum space savings before using <acronym>TOAST</>
6482 compression (previously 20% for small values and any-savings-at-all
6483 for large values) (Greg)
6489 Improve <acronym>TOAST</> heuristics for rows that have a mix of large
6490 and small toastable fields, so that we prefer to push large values out
6491 of line and don't compress small values unnecessarily (Greg, Tom)
6502 <title>Functions</title>
6507 Document that <function>setseed()</> allows values from
6508 <literal>-1</> to <literal>1</> (not just <literal>0</> to
6509 <literal>1</>), and enforce the valid range (Kris Jurka)
6515 Add server-side function <function>lo_import(filename, oid)</>
6522 Add <function>quote_nullable()</>, which behaves like
6523 <function>quote_literal()</> but returns the string <literal>NULL</> for
6524 a null argument (Brendan Jurd)
6530 Improve full text search <function>headline()</> function to
6531 allow extracting several fragments of text (Sushant Sinha)
6537 Add <function>suppress_redundant_updates_trigger()</> trigger
6538 function to avoid overhead for non-data-changing updates (Andrew)
6544 Add <function>div(numeric, numeric)</> to perform <type>numeric</>
6545 division without rounding (Tom)
6551 Add <type>timestamp</> and <type>timestamptz</> versions of
6552 <function>generate_series()</> (Hitoshi Harada)
6559 <title>Object Information Functions</title>
6564 Implement <function>current_query()</> for use by functions
6565 that need to know the currently running query (Tomas Doran)
6571 Add <function>pg_get_keywords()</> to return a list of the
6572 parser keywords (Dave Page)
6578 Add <function>pg_get_functiondef()</> to see a function's
6579 definition (Abhijit Menon-Sen)
6585 Allow the second argument of <function>pg_get_expr()</> to be zero
6586 when deparsing an expression that does not contain variables (Tom)
6592 Modify <function>pg_relation_size()</> to use <literal>regclass</>
6597 <function>pg_relation_size(data_type_name)</> no longer works.
6603 Add <literal>boot_val</> and <literal>reset_val</> columns to
6604 <literal>pg_settings</> output (Greg Smith)
6610 Add source file name and line number columns to
6611 <literal>pg_settings</> output for variables set in a configuration
6612 file (Magnus, Alvaro)
6616 For security reasons, these columns are only visible to superusers.
6622 Add support for <varname>CURRENT_CATALOG</>,
6623 <varname>CURRENT_SCHEMA</>, <varname>SET CATALOG</>, <varname>SET
6628 These provide <acronym>SQL</>-standard syntax for existing features.
6634 Add <function>pg_typeof()</> which returns the data type
6635 of any value (Brendan Jurd)
6641 Make <function>version()</> return information about whether
6642 the server is a 32- or 64-bit binary (Bruce)
6648 Fix the behavior of information schema columns
6649 <structfield>is_insertable_into</> and <structfield>is_updatable</> to
6650 be consistent (Peter)
6656 Improve the behavior of information schema
6657 <structfield>datetime_precision</> columns (Peter)
6661 These columns now show zero for <type>date</> columns, and 6
6662 (the default precision) for <type>time</>, <type>timestamp</>, and
6663 <type>interval</> without a declared precision, rather than showing
6670 Convert remaining builtin set-returning functions to use
6671 <literal>OUT</> parameters (Jaime Casanova)
6675 This makes it possible to call these functions without specifying
6676 a column list: <function>pg_show_all_settings()</>,
6677 <function>pg_lock_status()</>, <function>pg_prepared_xact()</>,
6678 <function>pg_prepared_statement()</>, <function>pg_cursor()</>
6684 Make <function>pg_*_is_visible()</> and
6685 <function>has_*_privilege()</> functions return <literal>NULL</>
6686 for invalid OIDs, rather than reporting an error (Tom)
6692 Extend <function>has_*_privilege()</> functions to allow inquiring
6693 about the OR of multiple privileges in one call (Stephen
6700 Add <function>has_column_privilege()</> and
6701 <function>has_any_column_privilege()</> functions (Stephen
6711 <title>Function Creation</title>
6716 Support variadic functions (functions with a variable number
6717 of arguments) (Pavel Stehule)
6721 Only trailing arguments can be optional, and they all must be
6722 of the same data type.
6728 Support default values for function arguments (Pavel Stehule)
6734 Add <command>CREATE FUNCTION ... RETURNS TABLE</> clause (Pavel
6741 Allow <acronym>SQL</>-language functions to return the output
6742 of an <command>INSERT</>/<command>UPDATE</>/<command>DELETE</>
6743 <literal>RETURNING</> clause (Tom)
6752 <title>PL/pgSQL Server-Side Language</title>
6757 Support <literal>EXECUTE USING</> for easier insertion of data
6758 values into a dynamic query string (Pavel Stehule)
6764 Allow looping over the results of a cursor using a <literal>FOR</>
6765 loop (Pavel Stehule)
6771 Support <literal>RETURN QUERY EXECUTE</> (Pavel
6778 Improve the <literal>RAISE</> command (Pavel Stehule)
6783 Support <literal>DETAIL</> and <literal>HINT</> fields
6788 Support specification of the <literal>SQLSTATE</> error code
6793 Support an exception name parameter
6798 Allow <literal>RAISE</> without parameters in an exception
6799 block to re-throw the current error
6808 Allow specification of <varname>SQLSTATE</> codes
6809 in <literal>EXCEPTION</> lists (Pavel Stehule)
6813 This is useful for handling custom <varname>SQLSTATE</> codes.
6819 Support the <literal>CASE</> statement (Pavel Stehule)
6825 Make <command>RETURN QUERY</> set the special <literal>FOUND</> and
6826 <command>GET DIAGNOSTICS</> <literal>ROW_COUNT</> variables
6833 Make <command>FETCH</> and <command>MOVE</> set the
6834 <command>GET DIAGNOSTICS</> <literal>ROW_COUNT</> variable
6841 Make <command>EXIT</> without a label always exit the innermost
6846 Formerly, if there were a <literal>BEGIN</> block more closely nested
6847 than any loop, it would exit that block instead. The new behavior
6848 matches Oracle(TM) and is also what was previously stated by our own
6855 Make processing of string literals and nested block comments
6856 match the main SQL parser's processing (Tom)
6860 In particular, the format string in <command>RAISE</> now works
6861 the same as any other string literal, including being subject
6862 to <varname>standard_conforming_strings</>. This change also
6863 fixes other cases in which valid commands would fail when
6864 <varname>standard_conforming_strings</> is on.
6870 Avoid memory leakage when the same function is called at varying
6871 exception-block nesting depths (Tom)
6882 <title>Client Applications</title>
6888 Fix <literal>pg_ctl restart</> to preserve command-line arguments
6895 Add <literal>-w</>/<literal>--no-password</> option that
6896 prevents password prompting in all utilities that have a
6897 <literal>-W</>/<literal>--password</> option (Peter)
6903 Remove <option>-q</> (quiet) option of <application>createdb</>,
6904 <application>createuser</>, <application>dropdb</>,
6905 <application>dropuser</> (Peter)
6909 These options have had no effect since <productname>PostgreSQL</>
6917 <title><application>psql</></title>
6922 Remove verbose startup banner; now just suggest <literal>help</>
6929 Make <literal>help</> show common backslash commands (Greg
6936 Add <literal>\pset format wrapped</> mode to wrap output to the
6937 screen width, or file/pipe output too if <literal>\pset columns</>
6938 is set (Bryce Nesbitt)
6944 Allow all supported spellings of boolean values in <command>\pset</>,
6945 rather than just <literal>on</> and <literal>off</> (Bruce)
6949 Formerly, any string other than <quote>off</> was silently taken
6950 to mean <literal>true</>. <application>psql</> will now complain
6951 about unrecognized spellings (but still take them as <literal>true</>).
6957 Use the pager for wide output (Bruce)
6963 Require a space between a one-letter backslash command and its first
6964 argument (Bernd Helmle)
6968 This removes a historical source of ambiguity.
6974 Improve tab completion support for schema-qualified and
6975 quoted identifiers (Greg Sabino Mullane)
6981 Add optional <literal>on</>/<literal>off</> argument for
6982 <command>\timing</> (David Fetter)
6988 Display access control rights on multiple lines (Brendan
6989 Jurd, Andreas Scherbaum)
6995 Make <command>\l</> show database access privileges (Andrew Gilligan)
7001 Make <command>\l+</> show database sizes, if permissions
7002 allow (Andrew Gilligan)
7008 Add the <command>\ef</> command to edit function definitions
7018 <title><application>psql</> \d* commands</title>
7024 Make <command>\d*</> commands that do not have a pattern argument
7025 show system objects only if the <literal>S</> modifier is specified
7026 (Greg Sabino Mullane, Bruce)
7030 The former behavior was inconsistent across different variants
7031 of <command>\d</>, and in most cases it provided no easy way to see
7038 Improve <command>\d*</> commands to work with older
7039 <productname>PostgreSQL</> server versions (back to 7.4),
7040 not only the current server version
7047 Make <command>\d</> show foreign-key constraints that reference
7048 the selected table (Kenneth D'Souza)
7054 Make <command>\d</> on a sequence show its column values
7055 (Euler Taveira de Oliveira)
7061 Add column storage type and other relation options to the
7062 <command>\d+</> display (Gregory Stark, Euler Taveira de
7069 Show relation size in <command>\dt+</> output (Dickson S.
7076 Show the possible values of <literal>enum</> types in <command>\dT+</>
7083 Allow <command>\dC</> to accept a wildcard pattern, which matches
7084 either datatype involved in the cast (Tom)
7090 Add a function type column to <command>\df</>'s output, and add
7091 options to list only selected types of functions (David Fetter)
7097 Make <command>\df</> not hide functions that take or return
7098 type <type>cstring</> (Tom)
7102 Previously, such functions were hidden because most of them are
7103 datatype I/O functions, which were deemed uninteresting. The new
7104 policy about hiding system functions by default makes this wart
7114 <title><application>pg_dump</></title>
7119 Add a <literal>--no-tablespaces</> option to
7120 <application>pg_dump</>/<application>pg_dumpall</>/<application>pg_restore</>
7121 so that dumps can be restored to clusters that have non-matching
7122 tablespace layouts (Gavin Roy)
7128 Remove <option>-d</> and <option>-D</> options from
7129 <application>pg_dump</> and <application>pg_dumpall</> (Tom)
7133 These options were too frequently confused with the option to
7134 select a database name in other <productname>PostgreSQL</>
7135 client applications. The functionality is still available,
7136 but you must now spell out the long option name
7137 <option>--inserts</> or <option>--column-inserts</>.
7143 Remove <option>-i</>/<option>--ignore-version</> option from
7144 <application>pg_dump</> and <application>pg_dumpall</> (Tom)
7148 Use of this option does not throw an error, but it has no
7149 effect. This option was removed because the version checks
7150 are necessary for safety.
7156 Disable <varname>statement_timeout</> during dump and restore
7163 Add <application>pg_dump</>/<application>pg_dumpall</> option
7164 <option>--lock-wait-timeout</> (David Gould)
7168 This allows dumps to fail if unable to acquire a shared lock
7169 within the specified amount of time.
7175 Reorder <application>pg_dump</> <literal>--data-only</> output
7176 to dump tables referenced by foreign keys before
7177 the referencing tables (Tom)
7181 This allows data loads when foreign keys are already present.
7182 If circular references make a safe ordering impossible, a
7183 <literal>NOTICE</> is issued.
7189 Allow <application>pg_dump</>, <application>pg_dumpall</>, and
7190 <application>pg_restore</> to use a specified role (Benedek
7191 László)
7197 Allow <application>pg_restore</> to use multiple concurrent
7198 connections to do the restore (Andrew)
7202 The number of concurrent connections is controlled by the option
7203 <literal>--jobs</>. This is supported only for custom-format archives.
7214 <title>Programming Tools</title>
7217 <title><application>libpq</></title>
7222 Allow the <type>OID</> to be specified when importing a large
7223 object, via new function <function>lo_import_with_oid()</> (Tatsuo)
7229 Add <quote>events</> support (Andrew Chernow, Merlin Moncure)
7233 This adds the ability to register callbacks to manage private
7234 data associated with <structname>PGconn</> and <structname>PGresult</>
7241 Improve error handling to allow the return of multiple
7242 error messages as multi-line error reports (Magnus)
7248 Make <function>PQexecParams()</> and related functions return
7249 <varname>PGRES_EMPTY_QUERY</> for an empty query (Tom)
7253 They previously returned <varname>PGRES_COMMAND_OK</>.
7259 Document how to avoid the overhead of <function>WSACleanup()</>
7260 on Windows (Andrew Chernow)
7266 Do not rely on Kerberos tickets to determine the default database
7271 Previously, a Kerberos-capable build of libpq would use the
7272 principal name from any available Kerberos ticket as default
7273 database username, even if the connection wasn't using Kerberos
7274 authentication. This was deemed inconsistent and confusing.
7275 The default username is now determined the same way with or
7276 without Kerberos. Note however that the database username must still
7277 match the ticket when Kerberos authentication is used.
7285 <title><application>libpq</> <acronym>SSL</> (Secure Sockets Layer)
7291 Fix certificate validation for <acronym>SSL</> connections
7296 <application>libpq</> now supports verifying both the certificate
7297 and the name of the server when making <acronym>SSL</>
7298 connections. If a root certificate is not available to use for
7299 verification, <acronym>SSL</> connections will fail. The
7300 <literal>sslmode</> parameter is used to enable certificate
7301 verification and set the level of checking.
7302 The default is still not to do any verification, allowing connections
7303 to SSL-enabled servers without requiring a root certificate on the
7310 Support wildcard server certificates (Magnus)
7314 If a certificate <acronym>CN</> starts with <literal>*</>, it will
7315 be treated as a wildcard when matching the hostname, allowing the
7316 use of the same certificate for multiple servers.
7322 Allow the file locations for client certificates to be specified
7323 (Mark Woodward, Alvaro, Magnus)
7329 Add a <function>PQinitOpenSSL</> function to allow greater control
7330 over OpenSSL/libcrypto initialization (Andrew Chernow)
7336 Make <application>libpq</> unregister its <application>OpenSSL</>
7337 callbacks when no database connections remain open
7338 (Bruce, Magnus, Russell Smith)
7342 This is required for applications that unload the libpq library,
7343 otherwise invalid <application>OpenSSL</> callbacks will remain.
7352 <title><application>ecpg</></title>
7357 Add localization support for messages (Euler Taveira de
7364 ecpg parser is now automatically generated from the server
7369 Previously the ecpg parser was hand-maintained.
7378 <title>Server Programming Interface (<acronym>SPI</>)</title>
7383 Add support for single-use plans with out-of-line
7390 Add new <varname>SPI_OK_REWRITTEN</> return code for
7391 <function>SPI_execute()</> (Heikki)
7395 This is used when a command is rewritten to another type of
7402 Remove unnecessary inclusions from <filename>executor/spi.h</> (Tom)
7406 SPI-using modules might need to add some <literal>#include</>
7407 lines if they were depending on <filename>spi.h</> to include
7419 <title>Build Options</title>
7424 Update build system to use <productname>Autoconf</> 2.61 (Peter)
7430 Require <productname>GNU bison</> for source code builds (Peter)
7434 This has effectively been required for several years, but now there
7435 is no infrastructure claiming to support other parser tools.
7441 Add <application>pg_config</> <literal>--htmldir</> option
7448 Pass <type>float4</> by value inside the server (Zoltan
7453 Add <application>configure</> option
7454 <literal>--disable-float4-byval</> to use the old behavior.
7455 External C functions that use old-style (version 0) call convention
7456 and pass or return <type>float4</> values will be broken by this
7457 change, so you may need the <application>configure</> option if you
7458 have such functions and don't want to update them.
7464 Pass <type>float8</>, <type>int8</>, and related datatypes
7465 by value inside the server on 64-bit platforms (Zoltan Boszormenyi)
7469 Add <application>configure</> option
7470 <literal>--disable-float8-byval</> to use the old behavior.
7471 As above, this change might break old-style external C functions.
7477 Add configure options <literal>--with-segsize</>,
7478 <literal>--with-blocksize</>, <literal>--with-wal-blocksize</>,
7479 <literal>--with-wal-segsize</> (Zdenek Kotala, Tom)
7483 This simplifies build-time control over several constants that
7484 previously could only be changed by editing
7485 <filename>pg_config_manual.h</>.
7491 Allow threaded builds on <productname>Solaris</> 2.5 (Bruce)
7497 Use the system's <function>getopt_long()</> on <productname>Solaris</>
7498 (Zdenek Kotala, Tom)
7502 This makes option processing more consistent with what Solaris users
7509 Add support for the <productname>Sun Studio</> compiler on
7510 <productname>Linux</> (Julius Stroffek)
7516 Append the major version number to the backend <application>gettext</>
7517 domain, and the <literal>soname</> major version number to
7518 libraries' <application>gettext</> domain (Peter)
7522 This simplifies parallel installations of multiple versions.
7528 Add support for code coverage testing with <application>gcov</>
7535 Allow out-of-tree builds on <productname>Mingw</> and
7536 <productname>Cygwin</> (Richard Evans)
7542 Fix the use of <productname>Mingw</> as a cross-compiling source
7552 <title>Source Code</title>
7557 Support 64-bit time zone data files (Heikki)
7561 This adds support for daylight saving time (<acronym>DST</>)
7562 calculations beyond the year 2038.
7568 Deprecate use of platform's <type>time_t</> data type (Tom)
7572 Some platforms have migrated to 64-bit <type>time_t</>, some have
7573 not, and Windows can't make up its mind what it's doing. Define
7574 <type>pg_time_t</> to have the same meaning as <type>time_t</>,
7575 but always be 64 bits (unless the platform has no 64-bit integer type),
7576 and use that type in all module APIs and on-disk data formats.
7582 Fix bug in handling of the time zone database when cross-compiling
7589 Link backend object files in one step, rather than in stages
7596 Improve <application>gettext</> support to allow better translation
7603 Add message translation support to the PL languages (Alvaro, Peter)
7609 Add more <application>DTrace</> probes (Robert Lor)
7615 Enable <application>DTrace</> support on <application>Mac OS X
7616 Leopard</> and other non-Solaris platforms (Robert Lor)
7622 Simplify and standardize conversions between C strings and
7623 <type>text</> datums, by providing common functions for the purpose
7630 Clean up the <filename>include/catalog/</> header files so that
7631 frontend programs can include them without including
7632 <filename>postgres.h</>
7639 Make <type>name</> char-aligned, and suppress zero-padding of
7640 <type>name</> entries in indexes (Tom)
7646 Recover better if dynamically-loaded code executes <function>exit()</>
7653 Add a hook to let plug-ins monitor the executor (Itagaki
7660 Add a hook to allow the planner's statistics lookup behavior to
7661 be overridden (Simon Riggs)
7667 Add <function>shmem_startup_hook()</> for custom shared memory
7674 Replace the index access method <function>amgetmulti</> entry point
7675 with <function>amgetbitmap</>, and extend the API for
7676 <function>amgettuple</> to support run-time determination of
7677 operator lossiness (Heikki, Tom, Teodor)
7681 The API for GIN and GiST opclass <function>consistent</> functions
7682 has been extended as well.
7688 Add support for partial-match searches in <acronym>GIN</> indexes
7689 (Teodor Sigaev, Oleg Bartunov)
7695 Replace <structname>pg_class</> column <structfield>reltriggers</>
7696 with boolean <structfield>relhastriggers</> (Simon)
7700 Also remove unused <structname>pg_class</> columns
7701 <structfield>relukeys</>, <structfield>relfkeys</>, and
7702 <structfield>relrefs</>.
7708 Add a <structfield>relistemp</> column to <structname>pg_class</>
7709 to ease identification of temporary tables (Tom)
7715 Move platform <acronym>FAQ</>s into the main documentation
7722 Prevent parser input files from being built with any conflicts
7729 Add support for the <literal>KOI8U</> (Ukrainian) encoding
7736 Add Japanese message translations (Japan PostgreSQL Users Group)
7740 This used to be maintained as a separate project.
7746 Fix problem when setting <varname>LC_MESSAGES</> on
7747 <application>MSVC</>-built systems (Hiroshi Inoue, Hiroshi
7757 <title>Contrib</title>
7763 Add <filename>contrib/auto_explain</> to automatically run
7764 <command>EXPLAIN</> on queries exceeding a specified duration
7765 (Itagaki Takahiro, Tom)
7771 Add <filename>contrib/btree_gin</> to allow GIN indexes to
7772 handle more datatypes (Oleg, Teodor)
7778 Add <filename>contrib/citext</> to provide a case-insensitive,
7779 multibyte-aware text data type (David Wheeler)
7785 Add <filename>contrib/pg_stat_statements</> for server-wide
7786 tracking of statement execution statistics (Itagaki Takahiro)
7792 Add duration and query mode options to <filename>contrib/pgbench</>
7799 Make <filename>contrib/pgbench</> use table names
7800 <structname>pgbench_accounts</>, <structname>pgbench_branches</>,
7801 <structname>pgbench_history</>, and <structname>pgbench_tellers</>,
7802 rather than just <structname>accounts</>, <structname>branches</>,
7803 <structname>history</>, and <structname>tellers</> (Tom)
7807 This is to reduce the risk of accidentally destroying real data
7808 by running <application>pgbench</>.
7814 Fix <filename>contrib/pgstattuple</> to handle tables and
7815 indexes with over 2 billion pages (Tatsuhito Kasahara)
7821 In <filename>contrib/fuzzystrmatch</>, add a version of the
7822 Levenshtein string-distance function that allows the user to
7823 specify the costs of insertion, deletion, and substitution
7830 Make <filename>contrib/ltree</> support multibyte encodings
7837 Enable <filename>contrib/dblink</> to use connection information
7838 stored in the SQL/MED catalogs (Joe Conway)
7844 Improve <filename>contrib/dblink</>'s reporting of errors from
7845 the remote server (Joe Conway)
7851 Make <filename>contrib/dblink</> set <varname>client_encoding</>
7852 to match the local database's encoding (Joe Conway)
7856 This prevents encoding problems when communicating with a remote
7857 database that uses a different encoding.
7863 Make sure <filename>contrib/dblink</> uses a password supplied
7864 by the user, and not accidentally taken from the server's
7865 <filename>.pgpass</> file (Joe Conway)
7869 This is a minor security enhancement.
7875 Add <function>fsm_page_contents()</>
7876 to <filename>contrib/pageinspect</> (Heikki)
7882 Modify <function>get_raw_page()</> to support free space map
7883 (<filename>*_fsm</>) files. Also update
7884 <filename>contrib/pg_freespacemap</>.
7890 Add support for multibyte encodings to <filename>contrib/pg_trgm</>
7897 Rewrite <filename>contrib/intagg</> to use new
7898 functions <function>array_agg()</> and <function>unnest()</>
7905 Make <filename>contrib/pg_standby</> recover all available WAL before
7906 failover (Fujii Masao, Simon, Heikki)
7910 To make this work safely, you now need to set the new
7911 <literal>recovery_end_command</> option in <filename>recovery.conf</>
7912 to clean up the trigger file after failover. <application>pg_standby</>
7913 will no longer remove the trigger file itself.
7919 <filename>contrib/pg_standby</>'s <option>-l</> option is now a no-op,
7920 because it is unsafe to use a symlink (Simon)