1 <!-- doc/src/sgml/release-8.4.sgml -->
2 <!-- See header comment in release.sgml about typical markup -->
4 <sect1 id="release-8-4-12">
5 <title>Release 8.4.12</title>
8 <title>Release Date</title>
9 <simpara>2012-06-04</simpara>
13 This release contains a variety of fixes from 8.4.11.
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.12</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 Fix incorrect password transformation in
40 <filename>contrib/pgcrypto</>'s DES <function>crypt()</> function
45 If a password string contained the byte value <literal>0x80</>, the
46 remainder of the password was ignored, causing the password to be much
47 weaker than it appeared. With this fix, the rest of the string is
48 properly included in the DES hash. Any stored password values that are
49 affected by this bug will thus no longer match, so the stored values may
50 need to be updated. (CVE-2012-2143)
56 Ignore <literal>SECURITY DEFINER</> and <literal>SET</> attributes for
57 a procedural language's call handler (Tom Lane)
61 Applying such attributes to a call handler could crash the server.
68 Allow numeric timezone offsets in <type>timestamp</> input to be up to
69 16 hours away from UTC (Tom Lane)
73 Some historical time zones have offsets larger than 15 hours, the
74 previous limit. This could result in dumped data values being rejected
81 Fix timestamp conversion to cope when the given time is exactly the
82 last DST transition time for the current timezone (Tom Lane)
86 This oversight has been there a long time, but was not noticed
87 previously because most DST-using zones are presumed to have an
88 indefinite sequence of future DST transitions.
94 Fix <type>text</> to <type>name</> and <type>char</> to <type>name</>
95 casts to perform string truncation correctly in multibyte encodings
102 Fix memory copying bug in <function>to_tsquery()</> (Heikki Linnakangas)
108 Fix planner's handling of outer PlaceHolderVars within subqueries (Tom
113 This bug concerns sub-SELECTs that reference variables coming from the
114 nullable side of an outer join of the surrounding query.
115 In 9.1, queries affected by this bug would fail with <quote>ERROR:
116 Upper-level PlaceHolderVar found where not expected</>. But in 9.0 and
117 8.4, you'd silently get possibly-wrong answers, since the value
118 transmitted into the subquery wouldn't go to null when it should.
124 Fix slow session startup when <structname>pg_attribute</> is very large
129 If <structname>pg_attribute</> exceeds one-fourth of
130 <varname>shared_buffers</>, cache rebuilding code that is sometimes
131 needed during session start would trigger the synchronized-scan logic,
132 causing it to take many times longer than normal. The problem was
133 particularly acute if many new sessions were starting at once.
139 Ensure sequential scans check for query cancel reasonably often (Merlin
144 A scan encountering many consecutive pages that contain no live tuples
145 would not respond to interrupts meanwhile.
151 Ensure the Windows implementation of <function>PGSemaphoreLock()</>
152 clears <varname>ImmediateInterruptOK</> before returning (Tom Lane)
156 This oversight meant that a query-cancel interrupt received later
157 in the same query could be accepted at an unsafe time, with
158 unpredictable but not good consequences.
164 Show whole-row variables safely when printing views or rules
165 (Abbas Butt, Tom Lane)
169 Corner cases involving ambiguous names (that is, the name could be
170 either a table or column name of the query) were printed in an
171 ambiguous way, risking that the view or rule would be interpreted
172 differently after dump and reload. Avoid the ambiguous case by
173 attaching a no-op cast.
179 Fix <command>COPY FROM</> to properly handle null marker strings that
180 correspond to invalid encoding (Tom Lane)
184 A null marker string such as <literal>E'\\0'</> should work, and did
185 work in the past, but the case got broken in 8.4.
191 Ensure autovacuum worker processes perform stack depth checking
192 properly (Heikki Linnakangas)
196 Previously, infinite recursion in a function invoked by
197 auto-<command>ANALYZE</> could crash worker processes.
203 Fix logging collector to not lose log coherency under high load (Andrew
208 The collector previously could fail to reassemble large messages if it
215 Fix logging collector to ensure it will restart file rotation
216 after receiving <systemitem>SIGHUP</> (Tom Lane)
222 Fix WAL replay logic for GIN indexes to not fail if the index was
223 subsequently dropped (Tom Lane)
229 Fix memory leak in PL/pgSQL's <command>RETURN NEXT</> command (Joe
236 Fix PL/pgSQL's <command>GET DIAGNOSTICS</> command when the target
237 is the function's first variable (Tom Lane)
243 Fix potential access off the end of memory in <application>psql</>'s
244 expanded display (<command>\x</>) mode (Peter Eisentraut)
250 Fix several performance problems in <application>pg_dump</> when
251 the database contains many objects (Jeff Janes, Tom Lane)
255 <application>pg_dump</> could get very slow if the database contained
256 many schemas, or if many objects are in dependency loops, or if there
257 are many owned sequences.
263 Fix <filename>contrib/dblink</>'s <function>dblink_exec()</> to not leak
264 temporary database connections upon error (Tom Lane)
270 Fix <filename>contrib/dblink</> to report the correct connection name in
271 error messages (Kyotaro Horiguchi)
277 Update time zone data files to <application>tzdata</> release 2012c
278 for DST law changes in Antarctica, Armenia, Chile, Cuba, Falkland
279 Islands, Gaza, Haiti, Hebron, Morocco, Syria, and Tokelau Islands;
280 also historical corrections for Canada.
289 <sect1 id="release-8-4-11">
290 <title>Release 8.4.11</title>
293 <title>Release Date</title>
294 <simpara>2012-02-27</simpara>
298 This release contains a variety of fixes from 8.4.10.
299 For information about new features in the 8.4 major release, see
300 <xref linkend="release-8-4">.
304 <title>Migration to Version 8.4.11</title>
307 A dump/restore is not required for those running 8.4.X.
311 However, if you are upgrading from a version earlier than 8.4.10,
312 see the release notes for 8.4.10.
318 <title>Changes</title>
324 Require execute permission on the trigger function for
325 <command>CREATE TRIGGER</> (Robert Haas)
329 This missing check could allow another user to execute a trigger
330 function with forged input data, by installing it on a table he owns.
331 This is only of significance for trigger functions marked
332 <literal>SECURITY DEFINER</>, since otherwise trigger functions run
333 as the table owner anyway. (CVE-2012-0866)
339 Remove arbitrary limitation on length of common name in SSL
340 certificates (Heikki Linnakangas)
344 Both <application>libpq</> and the server truncated the common name
345 extracted from an SSL certificate at 32 bytes. Normally this would
346 cause nothing worse than an unexpected verification failure, but there
347 are some rather-implausible scenarios in which it might allow one
348 certificate holder to impersonate another. The victim would have to
349 have a common name exactly 32 bytes long, and the attacker would have
350 to persuade a trusted CA to issue a certificate in which the common
351 name has that string as a prefix. Impersonating a server would also
352 require some additional exploit to redirect client connections.
359 Convert newlines to spaces in names written in <application>pg_dump</>
360 comments (Robert Haas)
364 <application>pg_dump</> was incautious about sanitizing object names
365 that are emitted within SQL comments in its output script. A name
366 containing a newline would at least render the script syntactically
367 incorrect. Maliciously crafted object names could present a SQL
368 injection risk when the script is reloaded. (CVE-2012-0868)
374 Fix btree index corruption from insertions concurrent with vacuuming
379 An index page split caused by an insertion could sometimes cause a
380 concurrently-running <command>VACUUM</> to miss removing index entries
381 that it should remove. After the corresponding table rows are removed,
382 the dangling index entries would cause errors (such as <quote>could not
383 read block N in file ...</>) or worse, silently wrong query results
384 after unrelated rows are re-inserted at the now-free table locations.
385 This bug has been present since release 8.2, but occurs so infrequently
386 that it was not diagnosed until now. If you have reason to suspect
387 that it has happened in your database, reindexing the affected index
394 Update per-column permissions, not only per-table permissions, when
395 changing table owner (Tom Lane)
399 Failure to do this meant that any previously granted column permissions
400 were still shown as having been granted by the old owner. This meant
401 that neither the new owner nor a superuser could revoke the
402 now-untraceable-to-table-owner permissions.
408 Allow non-existent values for some settings in <command>ALTER
409 USER/DATABASE SET</> (Heikki Linnakangas)
413 Allow <varname>default_text_search_config</>,
414 <varname>default_tablespace</>, and <varname>temp_tablespaces</> to be
415 set to names that are not known. This is because they might be known
416 in another database where the setting is intended to be used, or for the
417 tablespace cases because the tablespace might not be created yet. The
418 same issue was previously recognized for <varname>search_path</>, and
419 these settings now act like that one.
425 Avoid crashing when we have problems deleting table files post-commit
430 Dropping a table should lead to deleting the underlying disk files only
431 after the transaction commits. In event of failure then (for instance,
432 because of wrong file permissions) the code is supposed to just emit a
433 warning message and go on, since it's too late to abort the
434 transaction. This logic got broken as of release 8.4, causing such
435 situations to result in a PANIC and an unrestartable database.
441 Track the OID counter correctly during WAL replay, even when it wraps
446 Previously the OID counter would remain stuck at a high value until the
447 system exited replay mode. The practical consequences of that are
448 usually nil, but there are scenarios wherein a standby server that's
449 been promoted to master might take a long time to advance the OID
450 counter to a reasonable value once values are needed.
456 Fix regular expression back-references with <literal>*</> attached
461 Rather than enforcing an exact string match, the code would effectively
462 accept any string that satisfies the pattern sub-expression referenced
463 by the back-reference symbol.
467 A similar problem still afflicts back-references that are embedded in a
468 larger quantified expression, rather than being the immediate subject
469 of the quantifier. This will be addressed in a future
470 <productname>PostgreSQL</> release.
476 Fix recently-introduced memory leak in processing of
477 <type>inet</>/<type>cidr</> values (Heikki Linnakangas)
481 A patch in the December 2011 releases of <productname>PostgreSQL</>
482 caused memory leakage in these operations, which could be significant
483 in scenarios such as building a btree index on such a column.
489 Fix dangling pointer after <command>CREATE TABLE AS</>/<command>SELECT
490 INTO</> in a SQL-language function (Tom Lane)
494 In most cases this only led to an assertion failure in assert-enabled
495 builds, but worse consequences seem possible.
501 Avoid double close of file handle in syslogger on Windows (MauMau)
505 Ordinarily this error was invisible, but it would cause an exception
506 when running on a debug version of Windows.
512 Fix I/O-conversion-related memory leaks in plpgsql
513 (Andres Freund, Jan Urbanski, Tom Lane)
517 Certain operations would leak memory until the end of the current
524 Improve <application>pg_dump</>'s handling of inherited table columns
529 <application>pg_dump</> mishandled situations where a child column has
530 a different default expression than its parent column. If the default
531 is textually identical to the parent's default, but not actually the
532 same (for instance, because of schema search path differences) it would
533 not be recognized as different, so that after dump and restore the
534 child would be allowed to inherit the parent's default. Child columns
535 that are <literal>NOT NULL</> where their parent is not could also be
536 restored subtly incorrectly.
542 Fix <application>pg_restore</>'s direct-to-database mode for
543 INSERT-style table data (Tom Lane)
547 Direct-to-database restores from archive files made with
548 <option>--inserts</> or <option>--column-inserts</> options fail when
549 using <application>pg_restore</> from a release dated September or
550 December 2011, as a result of an oversight in a fix for another
551 problem. The archive file itself is not at fault, and text-mode
558 Allow <literal>AT</> option in <application>ecpg</>
559 <literal>DEALLOCATE</> statements (Michael Meskes)
563 The infrastructure to support this has been there for awhile, but
564 through an oversight there was still an error check rejecting the case.
570 Fix error in <filename>contrib/intarray</>'s <literal>int[] &
571 int[]</> operator (Guillaume Lelarge)
575 If the smallest integer the two input arrays have in common is 1,
576 and there are smaller values in either array, then 1 would be
577 incorrectly omitted from the result.
583 Fix error detection in <filename>contrib/pgcrypto</>'s
584 <function>encrypt_iv()</> and <function>decrypt_iv()</>
589 These functions failed to report certain types of invalid-input errors,
590 and would instead return random garbage values for incorrect input.
596 Fix one-byte buffer overrun in <filename>contrib/test_parser</>
601 The code would try to read one more byte than it should, which would
602 crash in corner cases.
603 Since <filename>contrib/test_parser</> is only example code, this is
604 not a security issue in itself, but bad example code is still bad.
610 Use <function>__sync_lock_test_and_set()</> for spinlocks on ARM, if
611 available (Martin Pitt)
615 This function replaces our previous use of the <literal>SWPB</>
616 instruction, which is deprecated and not available on ARMv6 and later.
617 Reports suggest that the old code doesn't fail in an obvious way on
618 recent ARM boards, but simply doesn't interlock concurrent accesses,
619 leading to bizarre failures in multiprocess operation.
625 Use <option>-fexcess-precision=standard</> option when building with
626 gcc versions that accept it (Andrew Dunstan)
630 This prevents assorted scenarios wherein recent versions of gcc will
631 produce creative results.
637 Allow use of threaded Python on FreeBSD (Chris Rees)
641 Our configure script previously believed that this combination wouldn't
642 work; but FreeBSD fixed the problem, so remove that error check.
651 <sect1 id="release-8-4-10">
652 <title>Release 8.4.10</title>
655 <title>Release Date</title>
656 <simpara>2011-12-05</simpara>
660 This release contains a variety of fixes from 8.4.9.
661 For information about new features in the 8.4 major release, see
662 <xref linkend="release-8-4">.
666 <title>Migration to Version 8.4.10</title>
669 A dump/restore is not required for those running 8.4.X.
673 However, a longstanding error was discovered in the definition of the
674 <literal>information_schema.referential_constraints</> view. If you
675 rely on correct results from that view, you should replace its
676 definition as explained in the first changelog item below.
680 Also, if you are upgrading from a version earlier than 8.4.8,
681 see the release notes for 8.4.8.
687 <title>Changes</title>
693 Fix bugs in <literal>information_schema.referential_constraints</> view
698 This view was being insufficiently careful about matching the
699 foreign-key constraint to the depended-on primary or unique key
700 constraint. That could result in failure to show a foreign key
701 constraint at all, or showing it multiple times, or claiming that it
702 depends on a different constraint than the one it really does.
706 Since the view definition is installed by <application>initdb</>,
707 merely upgrading will not fix the problem. If you need to fix this
708 in an existing installation, you can (as a superuser) drop the
709 <literal>information_schema</> schema then re-create it by sourcing
710 <filename><replaceable>SHAREDIR</>/information_schema.sql</filename>.
711 (Run <literal>pg_config --sharedir</> if you're uncertain where
712 <replaceable>SHAREDIR</> is.) This must be repeated in each database
719 Fix incorrect replay of WAL records for GIN index updates
724 This could result in transiently failing to find index entries after
725 a crash, or on a hot-standby server. The problem would be repaired
726 by the next <command>VACUUM</> of the index, however.
732 Fix TOAST-related data corruption during <literal>CREATE TABLE dest AS
733 SELECT * FROM src</> or <literal>INSERT INTO dest SELECT * FROM src</>
738 If a table has been modified by <command>ALTER TABLE ADD COLUMN</>,
739 attempts to copy its data verbatim to another table could produce
740 corrupt results in certain corner cases.
741 The problem can only manifest in this precise form in 8.4 and later,
742 but we patched earlier versions as well in case there are other code
743 paths that could trigger the same bug.
749 Fix race condition during toast table access from stale syscache entries
754 The typical symptom was transient errors like <quote>missing chunk
755 number 0 for toast value NNNNN in pg_toast_2619</>, where the cited
756 toast table would always belong to a system catalog.
762 Track dependencies of functions on items used in parameter default
763 expressions (Tom Lane)
767 Previously, a referenced object could be dropped without having dropped
768 or modified the function, leading to misbehavior when the function was
769 used. Note that merely installing this update will not fix the missing
770 dependency entries; to do that, you'd need to <command>CREATE OR
771 REPLACE</> each such function afterwards. If you have functions whose
772 defaults depend on non-built-in objects, doing so is recommended.
778 Allow inlining of set-returning SQL functions with multiple OUT
779 parameters (Tom Lane)
785 Make <function>DatumGetInetP()</> unpack inet datums that have a 1-byte
786 header, and add a new macro, <function>DatumGetInetPP()</>, that does
787 not (Heikki Linnakangas)
791 This change affects no core code, but might prevent crashes in add-on
792 code that expects <function>DatumGetInetP()</> to produce an unpacked
793 datum as per usual convention.
799 Improve locale support in <type>money</> type's input and output
804 Aside from not supporting all standard
805 <link linkend="guc-lc-monetary"><varname>lc_monetary</></link>
806 formatting options, the input and output functions were inconsistent,
807 meaning there were locales in which dumped <type>money</> values could
815 linkend="guc-transform-null-equals"><varname>transform_null_equals</></link>
816 affect <literal>CASE foo WHEN NULL ...</> constructs
821 <varname>transform_null_equals</> is only supposed to affect
822 <literal>foo = NULL</> expressions written directly by the user, not
823 equality checks generated internally by this form of <literal>CASE</>.
829 Change foreign-key trigger creation order to better support
830 self-referential foreign keys (Tom Lane)
834 For a cascading foreign key that references its own table, a row update
835 will fire both the <literal>ON UPDATE</> trigger and the
836 <literal>CHECK</> trigger as one event. The <literal>ON UPDATE</>
837 trigger must execute first, else the <literal>CHECK</> will check a
838 non-final state of the row and possibly throw an inappropriate error.
839 However, the firing order of these triggers is determined by their
840 names, which generally sort in creation order since the triggers have
841 auto-generated names following the convention
842 <quote>RI_ConstraintTrigger_NNNN</>. A proper fix would require
843 modifying that convention, which we will do in 9.2, but it seems risky
844 to change it in existing releases. So this patch just changes the
845 creation order of the triggers. Users encountering this type of error
846 should drop and re-create the foreign key constraint to get its
847 triggers into the right order.
853 Avoid floating-point underflow while tracking buffer allocation rate
858 While harmless in itself, on certain platforms this would result in
859 annoying kernel log messages.
865 Preserve configuration file name and line number values when starting
866 child processes under Windows (Tom Lane)
870 Formerly, these would not be displayed correctly in the
871 <structname>pg_settings</> view.
877 Preserve blank lines within commands in <application>psql</>'s command
878 history (Robert Haas)
882 The former behavior could cause problems if an empty line was removed
883 from within a string literal, for example.
889 Fix <application>pg_dump</> to dump user-defined casts between
890 auto-generated types, such as table rowtypes (Tom Lane)
896 Use the preferred version of <application>xsubpp</> to build PL/Perl,
897 not necessarily the operating system's main copy
898 (David Wheeler and Alex Hunsaker)
904 Fix incorrect coding in <filename>contrib/dict_int</> and
905 <filename>contrib/dict_xsyn</> (Tom Lane)
909 Some functions incorrectly assumed that memory returned by
910 <function>palloc()</> is guaranteed zeroed.
916 Honor query cancel interrupts promptly in <function>pgstatindex()</>
923 Ensure VPATH builds properly install all server header files
930 Shorten file names reported in verbose error messages (Peter Eisentraut)
934 Regular builds have always reported just the name of the C file
935 containing the error message call, but VPATH builds formerly
936 reported an absolute path name.
942 Fix interpretation of Windows timezone names for Central America
947 Map <quote>Central America Standard Time</> to <literal>CST6</>, not
948 <literal>CST6CDT</>, because DST is generally not observed anywhere in
955 Update time zone data files to <application>tzdata</> release 2011n
956 for DST law changes in Brazil, Cuba, Fiji, Palestine, Russia, and Samoa;
957 also historical corrections for Alaska and British East Africa.
966 <sect1 id="release-8-4-9">
967 <title>Release 8.4.9</title>
970 <title>Release Date</title>
971 <simpara>2011-09-26</simpara>
975 This release contains a variety of fixes from 8.4.8.
976 For information about new features in the 8.4 major release, see
977 <xref linkend="release-8-4">.
981 <title>Migration to Version 8.4.9</title>
984 A dump/restore is not required for those running 8.4.X.
988 However, if you are upgrading from a version earlier than 8.4.8,
989 see the release notes for 8.4.8.
995 <title>Changes</title>
1001 Fix bugs in indexing of in-doubt HOT-updated tuples (Tom Lane)
1005 These bugs could result in index corruption after reindexing a system
1006 catalog. They are not believed to affect user indexes.
1012 Fix multiple bugs in GiST index page split processing (Heikki
1017 The probability of occurrence was low, but these could lead to index
1024 Fix possible buffer overrun in <function>tsvector_concat()</>
1029 The function could underestimate the amount of memory needed for its
1030 result, leading to server crashes.
1036 Fix crash in <function>xml_recv</> when processing a
1037 <quote>standalone</> parameter (Tom Lane)
1043 Make <function>pg_options_to_table</> return NULL for an option with no
1048 Previously such cases would result in a server crash.
1054 Avoid possibly accessing off the end of memory in <command>ANALYZE</>
1055 and in SJIS-2004 encoding conversion (Noah Misch)
1059 This fixes some very-low-probability server crash scenarios.
1065 Prevent intermittent hang in interactions of startup process with
1066 bgwriter process (Simon Riggs)
1070 This affected recovery in non-hot-standby cases.
1076 Fix race condition in relcache init file invalidation (Tom Lane)
1080 There was a window wherein a new backend process could read a stale init
1081 file but miss the inval messages that would tell it the data is stale.
1082 The result would be bizarre failures in catalog accesses, typically
1083 <quote>could not read block 0 in file ...</> later during startup.
1089 Fix memory leak at end of a GiST index scan (Tom Lane)
1093 Commands that perform many separate GiST index scans, such as
1094 verification of a new GiST-based exclusion constraint on a table
1095 already containing many rows, could transiently require large amounts of
1096 memory due to this leak.
1102 Fix incorrect memory accounting (leading to possible memory bloat) in
1103 tuplestores supporting holdable cursors and plpgsql's <literal>RETURN
1104 NEXT</> command (Tom Lane)
1110 Fix performance problem when constructing a large, lossy bitmap
1117 Fix join selectivity estimation for unique columns (Tom Lane)
1121 This fixes an erroneous planner heuristic that could lead to poor
1122 estimates of the result size of a join.
1128 Fix nested PlaceHolderVar expressions that appear only in sub-select
1129 target lists (Tom Lane)
1133 This mistake could result in outputs of an outer join incorrectly
1140 Allow nested <literal>EXISTS</> queries to be optimized properly (Tom
1147 Fix array- and path-creating functions to ensure padding bytes are
1152 This avoids some situations where the planner will think that
1153 semantically-equal constants are not equal, resulting in poor
1160 Fix <command>EXPLAIN</> to handle gating Result nodes within
1161 inner-indexscan subplans (Tom Lane)
1165 The usual symptom of this oversight was <quote>bogus varno</> errors.
1171 Work around gcc 4.6.0 bug that breaks WAL replay (Tom Lane)
1175 This could lead to loss of committed transactions after a server crash.
1181 Fix dump bug for <literal>VALUES</> in a view (Tom Lane)
1187 Disallow <literal>SELECT FOR UPDATE/SHARE</> on sequences (Tom Lane)
1191 This operation doesn't work as expected and can lead to failures.
1197 Fix <command>VACUUM</> so that it always updates
1198 <literal>pg_class</>.<literal>reltuples</>/<literal>relpages</> (Tom
1203 This fixes some scenarios where autovacuum could make increasingly poor
1204 decisions about when to vacuum tables.
1210 Defend against integer overflow when computing size of a hash table (Tom
1217 Fix cases where <command>CLUSTER</> might attempt to access
1218 already-removed TOAST data (Tom Lane)
1224 Fix portability bugs in use of credentials control messages for
1225 <quote>peer</> authentication (Tom Lane)
1231 Fix SSPI login when multiple roundtrips are required (Ahmed Shinwari,
1236 The typical symptom of this problem was <quote>The function requested is
1237 not supported</> errors during SSPI login.
1243 Throw an error if <filename>pg_hba.conf</> contains <literal>hostssl</>
1244 but SSL is disabled (Tom Lane)
1248 This was concluded to be more user-friendly than the previous behavior
1249 of silently ignoring such lines.
1255 Fix typo in <function>pg_srand48</> seed initialization (Andres Freund)
1259 This led to failure to use all bits of the provided seed. This function
1260 is not used on most platforms (only those without <function>srandom</>),
1261 and the potential security exposure from a less-random-than-expected
1262 seed seems minimal in any case.
1268 Avoid integer overflow when the sum of <literal>LIMIT</> and
1269 <literal>OFFSET</> values exceeds 2^63 (Heikki Linnakangas)
1275 Add overflow checks to <type>int4</> and <type>int8</> versions of
1276 <function>generate_series()</> (Robert Haas)
1282 Fix trailing-zero removal in <function>to_char()</> (Marti Raudsepp)
1286 In a format with <literal>FM</> and no digit positions
1287 after the decimal point, zeroes to the left of the decimal point could
1288 be removed incorrectly.
1294 Fix <function>pg_size_pretty()</> to avoid overflow for inputs close to
1301 Weaken plpgsql's check for typmod matching in record values (Tom Lane)
1305 An overly enthusiastic check could lead to discarding length modifiers
1306 that should have been kept.
1312 Correctly handle quotes in locale names during <application>initdb</>
1313 (Heikki Linnakangas)
1317 The case can arise with some Windows locales, such as <quote>People's
1318 Republic of China</>.
1324 Fix <application>pg_upgrade</> to preserve toast tables' relfrozenxids
1325 during an upgrade from 8.3 (Bruce Momjian)
1329 Failure to do this could lead to <filename>pg_clog</> files being
1330 removed too soon after the upgrade.
1336 In <application>pg_ctl</>, support silent mode for service registrations
1343 Fix <application>psql</>'s counting of script file line numbers during
1344 <literal>COPY</> from a different file (Tom Lane)
1350 Fix <application>pg_restore</>'s direct-to-database mode for
1351 <varname>standard_conforming_strings</> (Tom Lane)
1355 <application>pg_restore</> could emit incorrect commands when restoring
1356 directly to a database server from an archive file that had been made
1357 with <varname>standard_conforming_strings</> set to <literal>on</>.
1363 Be more user-friendly about unsupported cases for parallel
1364 <application>pg_restore</> (Tom Lane)
1368 This change ensures that such cases are detected and reported before
1369 any restore actions have been taken.
1375 Fix write-past-buffer-end and memory leak in <application>libpq</>'s
1376 LDAP service lookup code (Albe Laurenz)
1382 In <application>libpq</>, avoid failures when using nonblocking I/O
1383 and an SSL connection (Martin Pihlak, Tom Lane)
1389 Improve libpq's handling of failures during connection startup
1394 In particular, the response to a server report of <function>fork()</>
1395 failure during SSL connection startup is now saner.
1401 Improve <application>libpq</>'s error reporting for SSL failures (Tom
1408 Fix <function>PQsetvalue()</> to avoid possible crash when adding a new
1409 tuple to a <structname>PGresult</> originally obtained from a server
1410 query (Andrew Chernow)
1416 Make <application>ecpglib</> write <type>double</> values with 15 digits
1417 precision (Akira Kurosawa)
1423 In <application>ecpglib</>, be sure <literal>LC_NUMERIC</> setting is
1424 restored after an error (Michael Meskes)
1430 Apply upstream fix for blowfish signed-character bug (CVE-2011-2483)
1435 <filename>contrib/pg_crypto</>'s blowfish encryption code could give
1436 wrong results on platforms where char is signed (which is most),
1437 leading to encrypted passwords being weaker than they should be.
1443 Fix memory leak in <filename>contrib/seg</> (Heikki Linnakangas)
1449 Fix <function>pgstatindex()</> to give consistent results for empty
1456 Allow building with perl 5.14 (Alex Hunsaker)
1462 Update configure script's method for probing existence of system
1463 functions (Tom Lane)
1467 The version of autoconf we used in 8.3 and 8.2 could be fooled by
1468 compilers that perform link-time optimization.
1474 Fix assorted issues with build and install file paths containing spaces
1481 Update time zone data files to <application>tzdata</> release 2011i
1482 for DST law changes in Canada, Egypt, Russia, Samoa, and South Sudan.
1491 <sect1 id="release-8-4-8">
1492 <title>Release 8.4.8</title>
1495 <title>Release Date</title>
1496 <simpara>2011-04-18</simpara>
1500 This release contains a variety of fixes from 8.4.7.
1501 For information about new features in the 8.4 major release, see
1502 <xref linkend="release-8-4">.
1506 <title>Migration to Version 8.4.8</title>
1509 A dump/restore is not required for those running 8.4.X.
1513 However, if your installation was upgraded from a previous major
1514 release by running <application>pg_upgrade</>, you should take
1515 action to prevent possible data loss due to a now-fixed bug in
1516 <application>pg_upgrade</>. The recommended solution is to run
1517 <command>VACUUM FREEZE</> on all TOAST tables.
1518 More information is available at <ulink
1519 url="http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix">
1520 http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix</ulink>.
1524 Also, if you are upgrading from a version earlier than 8.4.2,
1525 see the release notes for 8.4.2.
1531 <title>Changes</title>
1537 Fix <application>pg_upgrade</>'s handling of TOAST tables
1542 The <structname>pg_class</>.<structfield>relfrozenxid</> value for
1543 TOAST tables was not correctly copied into the new installation
1544 during <application>pg_upgrade</>. This could later result in
1545 <literal>pg_clog</> files being discarded while they were still
1546 needed to validate tuples in the TOAST tables, leading to
1547 <quote>could not access status of transaction</> failures.
1551 This error poses a significant risk of data loss for installations
1552 that have been upgraded with <application>pg_upgrade</>. This patch
1553 corrects the problem for future uses of <application>pg_upgrade</>,
1554 but does not in itself cure the issue in installations that have been
1555 processed with a buggy version of <application>pg_upgrade</>.
1561 Suppress incorrect <quote>PD_ALL_VISIBLE flag was incorrectly set</>
1562 warning (Heikki Linnakangas)
1566 <command>VACUUM</> would sometimes issue this warning in cases that
1573 Disallow including a composite type in itself (Tom Lane)
1577 This prevents scenarios wherein the server could recurse infinitely
1578 while processing the composite type. While there are some possible
1579 uses for such a structure, they don't seem compelling enough to
1580 justify the effort required to make sure it always works safely.
1586 Avoid potential deadlock during catalog cache initialization
1591 In some cases the cache loading code would acquire share lock on a
1592 system index before locking the index's catalog. This could deadlock
1593 against processes trying to acquire exclusive locks in the other,
1594 more standard order.
1600 Fix dangling-pointer problem in <literal>BEFORE ROW UPDATE</> trigger
1601 handling when there was a concurrent update to the target tuple
1606 This bug has been observed to result in intermittent <quote>cannot
1607 extract system attribute from virtual tuple</> failures while trying to
1608 do <literal>UPDATE RETURNING ctid</>. There is a very small probability
1609 of more serious errors, such as generating incorrect index entries for
1616 Disallow <command>DROP TABLE</> when there are pending deferred trigger
1617 events for the table (Tom Lane)
1621 Formerly the <command>DROP</> would go through, leading to
1622 <quote>could not open relation with OID nnn</> errors when the
1623 triggers were eventually fired.
1629 Prevent crash triggered by constant-false WHERE conditions during
1630 GEQO optimization (Tom Lane)
1639 Improve planner's handling of semi-join and anti-join cases
1646 Fix selectivity estimation for text search to account for NULLs
1653 Improve PL/pgSQL's ability to handle row types with dropped columns
1658 This is a back-patch of fixes previously made in 9.0.
1664 Fix PL/Python memory leak involving array slices (Daniel Popowich)
1670 Fix <application>pg_restore</> to cope with long lines (over 1KB) in
1671 TOC files (Tom Lane)
1677 Put in more safeguards against crashing due to division-by-zero
1678 with overly enthusiastic compiler optimization (Aurelien Jarno)
1684 Support use of dlopen() in FreeBSD and OpenBSD on MIPS (Tom Lane)
1688 There was a hard-wired assumption that this system function was not
1689 available on MIPS hardware on these systems. Use a compile-time test
1690 instead, since more recent versions have it.
1696 Fix compilation failures on HP-UX (Heikki Linnakangas)
1702 Fix version-incompatibility problem with <application>libintl</> on
1703 Windows (Hiroshi Inoue)
1709 Fix usage of <application>xcopy</> in Windows build scripts to
1710 work correctly under Windows 7 (Andrew Dunstan)
1714 This affects the build scripts only, not installation or usage.
1720 Fix path separator used by <application>pg_regress</> on Cygwin
1727 Update time zone data files to <application>tzdata</> release 2011f
1728 for DST law changes in Chile, Cuba, Falkland Islands, Morocco, Samoa,
1729 and Turkey; also historical corrections for South Australia, Alaska,
1739 <sect1 id="release-8-4-7">
1740 <title>Release 8.4.7</title>
1743 <title>Release Date</title>
1744 <simpara>2011-01-31</simpara>
1748 This release contains a variety of fixes from 8.4.6.
1749 For information about new features in the 8.4 major release, see
1750 <xref linkend="release-8-4">.
1754 <title>Migration to Version 8.4.7</title>
1757 A dump/restore is not required for those running 8.4.X.
1758 However, 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 Avoid failures when <command>EXPLAIN</> tries to display a simple-form
1772 <literal>CASE</> expression (Tom Lane)
1776 If the <literal>CASE</>'s test expression was a constant, the planner
1777 could simplify the <literal>CASE</> into a form that confused the
1778 expression-display code, resulting in <quote>unexpected CASE WHEN
1785 Fix assignment to an array slice that is before the existing range
1786 of subscripts (Tom Lane)
1790 If there was a gap between the newly added subscripts and the first
1791 pre-existing subscript, the code miscalculated how many entries needed
1792 to be copied from the old array's null bitmap, potentially leading to
1793 data corruption or crash.
1799 Avoid unexpected conversion overflow in planner for very distant date
1804 The <type>date</> type supports a wider range of dates than can be
1805 represented by the <type>timestamp</> types, but the planner assumed it
1806 could always convert a date to timestamp with impunity.
1812 Fix <application>pg_restore</>'s text output for large objects (BLOBs)
1813 when <varname>standard_conforming_strings</> is on (Tom Lane)
1817 Although restoring directly to a database worked correctly, string
1818 escaping was incorrect if <application>pg_restore</> was asked for
1819 SQL text output and <varname>standard_conforming_strings</> had been
1820 enabled in the source database.
1826 Fix erroneous parsing of <type>tsquery</> values containing
1827 <literal>... & !(subexpression) | ...</literal> (Tom Lane)
1831 Queries containing this combination of operators were not executed
1832 correctly. The same error existed in <filename>contrib/intarray</>'s
1833 <type>query_int</> type and <filename>contrib/ltree</>'s
1834 <type>ltxtquery</> type.
1840 Fix buffer overrun in <filename>contrib/intarray</>'s input function
1841 for the <type>query_int</> type (Apple)
1845 This bug is a security risk since the function's return address could
1846 be overwritten. Thanks to Apple Inc's security team for reporting this
1847 issue and supplying the fix. (CVE-2010-4015)
1853 Fix bug in <filename>contrib/seg</>'s GiST picksplit algorithm
1854 (Alexander Korotkov)
1858 This could result in considerable inefficiency, though not actually
1859 incorrect answers, in a GiST index on a <type>seg</> column.
1860 If you have such an index, consider <command>REINDEX</>ing it after
1861 installing this update. (This is identical to the bug that was fixed in
1862 <filename>contrib/cube</> in the previous update.)
1871 <sect1 id="release-8-4-6">
1872 <title>Release 8.4.6</title>
1875 <title>Release Date</title>
1876 <simpara>2010-12-16</simpara>
1880 This release contains a variety of fixes from 8.4.5.
1881 For information about new features in the 8.4 major release, see
1882 <xref linkend="release-8-4">.
1886 <title>Migration to Version 8.4.6</title>
1889 A dump/restore is not required for those running 8.4.X.
1890 However, if you are upgrading from a version earlier than 8.4.2,
1891 see the release notes for 8.4.2.
1897 <title>Changes</title>
1904 <link linkend="guc-wal-sync-method"><varname>wal_sync_method</></link>
1905 to be <literal>fdatasync</> on Linux (Tom Lane, Marti Raudsepp)
1909 The default on Linux has actually been <literal>fdatasync</> for many
1910 years, but recent kernel changes caused <productname>PostgreSQL</> to
1911 choose <literal>open_datasync</> instead. This choice did not result
1912 in any performance improvement, and caused outright failures on
1913 certain filesystems, notably <literal>ext4</> with the
1914 <literal>data=journal</> mount option.
1920 Fix assorted bugs in WAL replay logic for GIN indexes (Tom Lane)
1924 This could result in <quote>bad buffer id: 0</> failures or
1925 corruption of index contents during replication.
1931 Fix recovery from base backup when the starting checkpoint WAL record
1932 is not in the same WAL segment as its redo point (Jeff Davis)
1938 Fix persistent slowdown of autovacuum workers when multiple workers
1939 remain active for a long time (Tom Lane)
1943 The effective <varname>vacuum_cost_limit</> for an autovacuum worker
1944 could drop to nearly zero if it processed enough tables, causing it
1945 to run extremely slowly.
1951 Add support for detecting register-stack overrun on <literal>IA64</>
1956 The <literal>IA64</> architecture has two hardware stacks. Full
1957 prevention of stack-overrun failures requires checking both.
1963 Add a check for stack overflow in <function>copyObject()</> (Tom Lane)
1967 Certain code paths could crash due to stack overflow given a
1968 sufficiently complex query.
1974 Fix detection of page splits in temporary GiST indexes (Heikki
1979 It is possible to have a <quote>concurrent</> page split in a
1980 temporary index, if for example there is an open cursor scanning the
1981 index when an insertion is done. GiST failed to detect this case and
1982 hence could deliver wrong results when execution of the cursor
1989 Fix error checking during early connection processing (Tom Lane)
1993 The check for too many child processes was skipped in some cases,
1994 possibly leading to postmaster crash when attempting to add the new
1995 child process to fixed-size arrays.
2001 Improve efficiency of window functions (Tom Lane)
2005 Certain cases where a large number of tuples needed to be read in
2006 advance, but <varname>work_mem</> was large enough to allow them all
2007 to be held in memory, were unexpectedly slow.
2008 <function>percent_rank()</>, <function>cume_dist()</> and
2009 <function>ntile()</> in particular were subject to this problem.
2015 Avoid memory leakage while <command>ANALYZE</>'ing complex index
2016 expressions (Tom Lane)
2022 Ensure an index that uses a whole-row Var still depends on its table
2027 An index declared like <literal>create index i on t (foo(t.*))</>
2028 would not automatically get dropped when its table was dropped.
2034 Do not <quote>inline</> a SQL function with multiple <literal>OUT</>
2035 parameters (Tom Lane)
2039 This avoids a possible crash due to loss of information about the
2040 expected result rowtype.
2046 Behave correctly if <literal>ORDER BY</>, <literal>LIMIT</>,
2047 <literal>FOR UPDATE</>, or <literal>WITH</> is attached to the
2048 <literal>VALUES</> part of <literal>INSERT ... VALUES</> (Tom Lane)
2054 Fix constant-folding of <literal>COALESCE()</> expressions (Tom Lane)
2058 The planner would sometimes attempt to evaluate sub-expressions that
2059 in fact could never be reached, possibly leading to unexpected errors.
2065 Fix postmaster crash when connection acceptance
2066 (<function>accept()</> or one of the calls made immediately after it)
2067 fails, and the postmaster was compiled with GSSAPI support (Alexander
2074 Fix missed unlink of temporary files when <varname>log_temp_files</>
2075 is active (Tom Lane)
2079 If an error occurred while attempting to emit the log message, the
2080 unlink was not done, resulting in accumulation of temp files.
2086 Add print functionality for <structname>InhRelation</> nodes (Tom Lane)
2090 This avoids a failure when <varname>debug_print_parse</> is enabled
2091 and certain types of query are executed.
2097 Fix incorrect calculation of distance from a point to a horizontal
2098 line segment (Tom Lane)
2102 This bug affected several different geometric distance-measurement
2109 Fix incorrect calculation of transaction status in
2110 <application>ecpg</> (Itagaki Takahiro)
2116 Fix <application>PL/pgSQL</>'s handling of <quote>simple</>
2117 expressions to not fail in recursion or error-recovery cases (Tom Lane)
2123 Fix <application>PL/Python</>'s handling of set-returning functions
2128 Attempts to call SPI functions within the iterator generating a set
2135 Fix bug in <filename>contrib/cube</>'s GiST picksplit algorithm
2136 (Alexander Korotkov)
2140 This could result in considerable inefficiency, though not actually
2141 incorrect answers, in a GiST index on a <type>cube</> column.
2142 If you have such an index, consider <command>REINDEX</>ing it after
2143 installing this update.
2149 Don't emit <quote>identifier will be truncated</> notices in
2150 <filename>contrib/dblink</> except when creating new connections
2157 Fix potential coredump on missing public key in
2158 <filename>contrib/pgcrypto</> (Marti Raudsepp)
2164 Fix memory leak in <filename>contrib/xml2</>'s XPath query functions
2171 Update time zone data files to <application>tzdata</> release 2010o
2172 for DST law changes in Fiji and Samoa;
2173 also historical corrections for Hong Kong.
2182 <sect1 id="release-8-4-5">
2183 <title>Release 8.4.5</title>
2186 <title>Release Date</title>
2187 <simpara>2010-10-04</simpara>
2191 This release contains a variety of fixes from 8.4.4.
2192 For information about new features in the 8.4 major release, see
2193 <xref linkend="release-8-4">.
2197 <title>Migration to Version 8.4.5</title>
2200 A dump/restore is not required for those running 8.4.X.
2201 However, if you are upgrading from a version earlier than 8.4.2,
2202 see the release notes for 8.4.2.
2208 <title>Changes</title>
2214 Use a separate interpreter for each calling SQL userid in PL/Perl and
2219 This change prevents security problems that can be caused by subverting
2220 Perl or Tcl code that will be executed later in the same session under
2221 another SQL user identity (for example, within a <literal>SECURITY
2222 DEFINER</> function). Most scripting languages offer numerous ways that
2223 that might be done, such as redefining standard functions or operators
2224 called by the target function. Without this change, any SQL user with
2225 Perl or Tcl language usage rights can do essentially anything with the
2226 SQL privileges of the target function's owner.
2230 The cost of this change is that intentional communication among Perl
2231 and Tcl functions becomes more difficult. To provide an escape hatch,
2232 PL/PerlU and PL/TclU functions continue to use only one interpreter
2233 per session. This is not considered a security issue since all such
2234 functions execute at the trust level of a database superuser already.
2238 It is likely that third-party procedural languages that claim to offer
2239 trusted execution have similar security issues. We advise contacting
2240 the authors of any PL you are depending on for security-critical
2245 Our thanks to Tim Bunce for pointing out this issue (CVE-2010-3433).
2251 Prevent possible crashes in <function>pg_get_expr()</> by disallowing
2252 it from being called with an argument that is not one of the system
2253 catalog columns it's intended to be used with
2254 (Heikki Linnakangas, Tom Lane)
2260 Treat exit code 128 (<literal>ERROR_WAIT_NO_CHILDREN</>) as non-fatal on
2261 Windows (Magnus Hagander)
2265 Under high load, Windows processes will sometimes fail at startup with
2266 this error code. Formerly the postmaster treated this as a panic
2267 condition and restarted the whole database, but that seems to be
2274 Fix incorrect placement of placeholder evaluation (Tom Lane)
2278 This bug could result in query outputs being non-null when they
2279 should be null, in cases where the inner side of an outer join
2280 is a sub-select with non-strict expressions in its output list.
2286 Fix possible duplicate scans of <literal>UNION ALL</> member relations
2293 Fix <quote>cannot handle unplanned sub-select</quote> error (Tom Lane)
2297 This occurred when a sub-select contains a join alias reference that
2298 expands into an expression containing another sub-select.
2304 Fix mishandling of whole-row Vars that reference a view or sub-select
2305 and appear within a nested sub-select (Tom Lane)
2311 Fix mishandling of cross-type <literal>IN</> comparisons (Tom Lane)
2315 This could result in failures if the planner tried to implement an
2316 <literal>IN</> join with a sort-then-unique-then-plain-join plan.
2322 Fix computation of <command>ANALYZE</> statistics for <type>tsvector</>
2323 columns (Jan Urbanski)
2327 The original coding could produce incorrect statistics, leading to
2328 poor plan choices later.
2334 Improve planner's estimate of memory used by <function>array_agg()</>,
2335 <function>string_agg()</>, and similar aggregate functions
2340 The previous drastic underestimate could lead to out-of-memory failures
2341 due to inappropriate choice of a hash-aggregation plan.
2347 Fix failure to mark cached plans as transient (Tom Lane)
2351 If a plan is prepared while <command>CREATE INDEX CONCURRENTLY</> is
2352 in progress for one of the referenced tables, it is supposed to be
2353 re-planned once the index is ready for use. This was not happening
2360 Reduce PANIC to ERROR in some occasionally-reported btree failure cases,
2361 and provide additional detail in the resulting error messages
2366 This should improve the system's robustness with corrupted indexes.
2372 Fix incorrect search logic for partial-match queries with GIN indexes
2377 Cases involving AND/OR combination of several GIN index conditions
2378 didn't always give the right answer, and were sometimes much slower
2385 Prevent show_session_authorization() from crashing within autovacuum
2386 processes (Tom Lane)
2392 Defend against functions returning setof record where not all the
2393 returned rows are actually of the same rowtype (Tom Lane)
2399 Fix possible corruption of pending trigger event lists during
2400 subtransaction rollback (Tom Lane)
2404 This could lead to a crash or incorrect firing of triggers.
2410 Fix possible failure when hashing a pass-by-reference function result
2417 Improve merge join's handling of NULLs in the join columns (Tom Lane)
2421 A merge join can now stop entirely upon reaching the first NULL,
2422 if the sort order is such that NULLs sort high.
2428 Take care to fsync the contents of lockfiles (both
2429 <filename>postmaster.pid</> and the socket lockfile) while writing them
2434 This omission could result in corrupted lockfile contents if the
2435 machine crashes shortly after postmaster start. That could in turn
2436 prevent subsequent attempts to start the postmaster from succeeding,
2437 until the lockfile is manually removed.
2443 Avoid recursion while assigning XIDs to heavily-nested
2444 subtransactions (Andres Freund, Robert Haas)
2448 The original coding could result in a crash if there was limited
2455 Avoid holding open old WAL segments in the walwriter process
2456 (Magnus Hagander, Heikki Linnakangas)
2460 The previous coding would prevent removal of no-longer-needed segments.
2466 Fix <varname>log_line_prefix</>'s <literal>%i</> escape,
2467 which could produce junk early in backend startup (Tom Lane)
2473 Prevent misinterpretation of partially-specified relation options
2474 for TOAST tables (Itagaki Takahiro)
2478 In particular, <literal>fillfactor</> would be read as zero if any
2479 other reloption had been set for the table, leading to serious bloat.
2485 Fix inheritance count tracking in <command>ALTER TABLE ... ADD
2486 CONSTRAINT</> (Robert Haas)
2492 Fix possible data corruption in <command>ALTER TABLE ... SET
2493 TABLESPACE</> when archiving is enabled (Jeff Davis)
2499 Allow <command>CREATE DATABASE</> and <command>ALTER DATABASE ... SET
2500 TABLESPACE</> to be interrupted by query-cancel (Guillaume Lelarge)
2506 Improve <command>CREATE INDEX</>'s checking of whether proposed index
2507 expressions are immutable (Tom Lane)
2513 Fix <command>REASSIGN OWNED</> to handle operator classes and families
2520 Fix possible core dump when comparing two empty <type>tsquery</> values
2527 Fix <literal>LIKE</>'s handling of patterns containing <literal>%</>
2528 followed by <literal>_</> (Tom Lane)
2532 We've fixed this before, but there were still some incorrectly-handled
2539 Re-allow input of Julian dates prior to 0001-01-01 AD (Tom Lane)
2543 Input such as <literal>'J100000'::date</> worked before 8.4,
2544 but was unintentionally broken by added error-checking.
2550 Fix PL/pgSQL to throw an error, not crash, if a cursor is closed within
2551 a <literal>FOR</> loop that is iterating over that cursor
2552 (Heikki Linnakangas)
2558 In PL/Python, defend against null pointer results from
2559 <function>PyCObject_AsVoidPtr</> and <function>PyCObject_FromVoidPtr</>
2566 In <application>libpq</>, fix full SSL certificate verification for the
2567 case where both <literal>host</> and <literal>hostaddr</> are specified
2574 Make psql recognize <command>DISCARD ALL</> as a command that should
2575 not be encased in a transaction block in autocommit-off mode
2582 Fix some issues in <application>pg_dump</>'s handling of SQL/MED objects
2587 Notably, <application>pg_dump</> would always fail if run by a
2588 non-superuser, which was not intended.
2594 Improve <application>pg_dump</> and <application>pg_restore</>'s
2595 handling of non-seekable archive files (Tom Lane, Robert Haas)
2599 This is important for proper functioning of parallel restore.
2605 Improve parallel pg_restore's ability to cope with selective restore
2606 (<literal>-L</> option) (Tom Lane)
2610 The original code tended to fail if the <literal>-L</> file commanded
2611 a non-default restore ordering.
2617 Fix <application>ecpg</> to process data from <literal>RETURNING</>
2618 clauses correctly (Michael Meskes)
2624 Fix some memory leaks in <application>ecpg</> (Zoltan Boszormenyi)
2630 Improve <filename>contrib/dblink</>'s handling of tables containing
2631 dropped columns (Tom Lane)
2637 Fix connection leak after <quote>duplicate connection name</quote>
2638 errors in <filename>contrib/dblink</> (Itagaki Takahiro)
2644 Fix <filename>contrib/dblink</> to handle connection names longer than
2645 62 bytes correctly (Itagaki Takahiro)
2651 Add <function>hstore(text, text)</>
2652 function to <filename>contrib/hstore</> (Robert Haas)
2656 This function is the recommended substitute for the now-deprecated
2657 <literal>=></> operator. It was back-patched so that future-proofed
2658 code can be used with older server versions. Note that the patch will
2659 be effective only after <filename>contrib/hstore</> is installed or
2660 reinstalled in a particular database. Users might prefer to execute
2661 the <command>CREATE FUNCTION</> command by hand, instead.
2667 Update build infrastructure and documentation to reflect the source code
2668 repository's move from CVS to Git (Magnus Hagander and others)
2674 Update time zone data files to <application>tzdata</> release 2010l
2675 for DST law changes in Egypt and Palestine; also historical corrections
2680 This change also adds new names for two Micronesian timezones:
2681 Pacific/Chuuk is now preferred over Pacific/Truk (and the preferred
2682 abbreviation is CHUT not TRUT) and Pacific/Pohnpei is preferred over
2689 Make Windows' <quote>N. Central Asia Standard Time</> timezone map to
2690 Asia/Novosibirsk, not Asia/Almaty (Magnus Hagander)
2694 Microsoft changed the DST behavior of this zone in the timezone update
2695 from KB976098. Asia/Novosibirsk is a better match to its new behavior.
2704 <sect1 id="release-8-4-4">
2705 <title>Release 8.4.4</title>
2708 <title>Release Date</title>
2709 <simpara>2010-05-17</simpara>
2713 This release contains a variety of fixes from 8.4.3.
2714 For information about new features in the 8.4 major release, see
2715 <xref linkend="release-8-4">.
2719 <title>Migration to Version 8.4.4</title>
2722 A dump/restore is not required for those running 8.4.X.
2723 However, if you are upgrading from a version earlier than 8.4.2,
2724 see the release notes for 8.4.2.
2730 <title>Changes</title>
2736 Enforce restrictions in <literal>plperl</> using an opmask applied to
2737 the whole interpreter, instead of using <filename>Safe.pm</>
2738 (Tim Bunce, Andrew Dunstan)
2742 Recent developments have convinced us that <filename>Safe.pm</> is too
2743 insecure to rely on for making <literal>plperl</> trustable. This
2744 change removes use of <filename>Safe.pm</> altogether, in favor of using
2745 a separate interpreter with an opcode mask that is always applied.
2746 Pleasant side effects of the change include that it is now possible to
2747 use Perl's <literal>strict</> pragma in a natural way in
2748 <literal>plperl</>, and that Perl's <literal>$a</> and <literal>$b</>
2749 variables work as expected in sort routines, and that function
2750 compilation is significantly faster. (CVE-2010-1169)
2756 Prevent PL/Tcl from executing untrustworthy code from
2757 <structname>pltcl_modules</> (Tom)
2761 PL/Tcl's feature for autoloading Tcl code from a database table
2762 could be exploited for trojan-horse attacks, because there was no
2763 restriction on who could create or insert into that table. This change
2764 disables the feature unless <structname>pltcl_modules</> is owned by a
2765 superuser. (However, the permissions on the table are not checked, so
2766 installations that really need a less-than-secure modules table can
2767 still grant suitable privileges to trusted non-superusers.) Also,
2768 prevent loading code into the unrestricted <quote>normal</> Tcl
2769 interpreter unless we are really going to execute a <literal>pltclu</>
2770 function. (CVE-2010-1170)
2776 Fix data corruption during WAL replay of
2777 <literal>ALTER ... SET TABLESPACE</> (Tom)
2781 When <varname>archive_mode</> is on, <literal>ALTER ... SET TABLESPACE</>
2782 generates a WAL record whose replay logic was incorrect. It could write
2783 the data to the wrong place, leading to possibly-unrecoverable data
2784 corruption. Data corruption would be observed on standby slaves, and
2785 could occur on the master as well if a database crash and recovery
2786 occurred after committing the <literal>ALTER</> and before the next
2793 Fix possible crash if a cache reset message is received during
2794 rebuild of a relcache entry (Heikki)
2798 This error was introduced in 8.4.3 while fixing a related failure.
2804 Apply per-function GUC settings while running the language validator
2805 for the function (Itagaki Takahiro)
2809 This avoids failures if the function's code is invalid without the
2810 setting; an example is that SQL functions may not parse if the
2811 <varname>search_path</> is not correct.
2817 Do constraint exclusion for inherited <command>UPDATE</> and
2818 <command>DELETE</> target tables when
2819 <varname>constraint_exclusion</> = <literal>partition</> (Tom)
2823 Due to an oversight, this setting previously only caused constraint
2824 exclusion to be checked in <command>SELECT</> commands.
2830 Do not allow an unprivileged user to reset superuser-only parameter
2835 Previously, if an unprivileged user ran <literal>ALTER USER ... RESET
2836 ALL</> for himself, or <literal>ALTER DATABASE ... RESET ALL</> for
2837 a database he owns, this would remove all special parameter settings
2838 for the user or database, even ones that are only supposed to be
2839 changeable by a superuser. Now, the <command>ALTER</> will only
2840 remove the parameters that the user has permission to change.
2846 Avoid possible crash during backend shutdown if shutdown occurs
2847 when a <literal>CONTEXT</> addition would be made to log entries (Tom)
2851 In some cases the context-printing function would fail because the
2852 current transaction had already been rolled back when it came time
2853 to print a log message.
2859 Fix erroneous handling of <literal>%r</> parameter in
2860 <varname>recovery_end_command</> (Heikki)
2864 The value always came out zero.
2870 Ensure the archiver process responds to changes in
2871 <varname>archive_command</> as soon as possible (Tom)
2877 Fix pl/pgsql's <literal>CASE</> statement to not fail when the
2878 case expression is a query that returns no rows (Tom)
2884 Update pl/perl's <filename>ppport.h</> for modern Perl versions
2891 Fix assorted memory leaks in pl/python (Andreas Freund, Tom)
2897 Handle empty-string connect parameters properly in ecpg (Michael)
2903 Prevent infinite recursion in <application>psql</> when expanding
2904 a variable that refers to itself (Tom)
2910 Fix <application>psql</>'s <literal>\copy</> to not add spaces around
2911 a dot within <literal>\copy (select ...)</> (Tom)
2915 Addition of spaces around the decimal point in a numeric literal would
2916 result in a syntax error.
2922 Avoid formatting failure in <application>psql</> when running in a
2923 locale context that doesn't match the <varname>client_encoding</>
2930 Fix unnecessary <quote>GIN indexes do not support whole-index scans</>
2931 errors for unsatisfiable queries using <filename>contrib/intarray</>
2938 Ensure that <filename>contrib/pgstattuple</> functions respond to cancel
2939 interrupts promptly (Tatsuhito Kasahara)
2945 Make server startup deal properly with the case that
2946 <function>shmget()</> returns <literal>EINVAL</> for an existing
2947 shared memory segment (Tom)
2951 This behavior has been observed on BSD-derived kernels including OS X.
2952 It resulted in an entirely-misleading startup failure complaining that
2953 the shared memory request size was too large.
2959 Avoid possible crashes in syslogger process on Windows (Heikki)
2965 Deal more robustly with incomplete time zone information in the
2966 Windows registry (Magnus)
2972 Update the set of known Windows time zone names (Magnus)
2978 Update time zone data files to <application>tzdata</> release 2010j
2979 for DST law changes in Argentina, Australian Antarctic, Bangladesh,
2980 Mexico, Morocco, Pakistan, Palestine, Russia, Syria, Tunisia;
2981 also historical corrections for Taiwan.
2985 Also, add <literal>PKST</> (Pakistan Summer Time) to the default set of
2986 timezone abbreviations.
2995 <sect1 id="release-8-4-3">
2996 <title>Release 8.4.3</title>
2999 <title>Release Date</title>
3000 <simpara>2010-03-15</simpara>
3004 This release contains a variety of fixes from 8.4.2.
3005 For information about new features in the 8.4 major release, see
3006 <xref linkend="release-8-4">.
3010 <title>Migration to Version 8.4.3</title>
3013 A dump/restore is not required for those running 8.4.X.
3014 However, if you are upgrading from a version earlier than 8.4.2,
3015 see the release notes for 8.4.2.
3021 <title>Changes</title>
3027 Add new configuration parameter <varname>ssl_renegotiation_limit</> to
3028 control how often we do session key renegotiation for an SSL connection
3033 This can be set to zero to disable renegotiation completely, which may
3034 be required if a broken SSL library is used. In particular, some
3035 vendors are shipping stopgap patches for CVE-2009-3555 that cause
3036 renegotiation attempts to fail.
3042 Fix possible deadlock during backend startup (Tom)
3048 Fix possible crashes due to not handling errors during relcache reload
3055 Fix possible crash due to use of dangling pointer to a cached plan
3062 Fix possible crash due to overenthusiastic invalidation of cached
3063 plan for <command>ROLLBACK</> (Tom)
3069 Fix possible crashes when trying to recover from a failure in
3070 subtransaction start (Tom)
3076 Fix server memory leak associated with use of savepoints and a client
3077 encoding different from server's encoding (Tom)
3083 Fix incorrect WAL data emitted during end-of-recovery cleanup of a GIST
3084 index page split (Yoichi Hirai)
3088 This would result in index corruption, or even more likely an error
3089 during WAL replay, if we were unlucky enough to crash during
3090 end-of-recovery cleanup after having completed an incomplete GIST
3097 Fix bug in WAL redo cleanup method for GIN indexes (Heikki)
3103 Fix incorrect comparison of scan key in GIN index search (Teodor)
3109 Make <function>substring()</> for <type>bit</> types treat any negative
3110 length as meaning <quote>all the rest of the string</> (Tom)
3114 The previous coding treated only -1 that way, and would produce an
3115 invalid result value for other negative values, possibly leading to
3116 a crash (CVE-2010-0442).
3122 Fix integer-to-bit-string conversions to handle the first fractional
3123 byte correctly when the output bit width is wider than the given
3124 integer by something other than a multiple of 8 bits (Tom)
3130 Fix some cases of pathologically slow regular expression matching (Tom)
3136 Fix bug occurring when trying to inline a SQL function that returns
3137 a set of a composite type that contains dropped columns (Tom)
3143 Fix bug with trying to update a field of an element of a
3144 composite-type array column (Tom)
3150 Avoid failure when <command>EXPLAIN</> has to print a FieldStore or
3151 assignment ArrayRef expression (Tom)
3155 These cases can arise now that <command>EXPLAIN VERBOSE</> tries to
3156 print plan node target lists.
3162 Avoid an unnecessary coercion failure in some cases where an undecorated
3163 literal string appears in a subquery within
3164 <command>UNION</>/<command>INTERSECT</>/<command>EXCEPT</> (Tom)
3168 This fixes a regression for some cases that worked before 8.4.
3174 Avoid undesirable rowtype compatibility check failures in some cases
3175 where a whole-row Var has a rowtype that contains dropped columns (Tom)
3181 Fix the <literal>STOP WAL LOCATION</> entry in backup history files to
3182 report the next WAL segment's name when the end location is exactly at a
3183 segment boundary (Itagaki Takahiro)
3189 Always pass the catalog ID to an option validator function specified in
3190 <command>CREATE FOREIGN DATA WRAPPER</> (Martin Pihlak)
3196 Fix some more cases of temporary-file leakage (Heikki)
3200 This corrects a problem introduced in the previous minor release.
3201 One case that failed is when a plpgsql function returning set is
3202 called within another function's exception handler.
3208 Add support for doing <literal>FULL JOIN ON FALSE</> (Tom)
3212 This prevents a regression from pre-8.4 releases for some queries that
3213 can now be simplified to a constant-false join condition.
3219 Improve constraint exclusion processing of boolean-variable cases,
3220 in particular make it possible to exclude a partition that has a
3221 <quote>bool_column = false</> constraint (Tom)
3227 Prevent treating an <literal>INOUT</> cast as representing binary
3228 compatibility (Heikki)
3234 Include column name in the message when warning about inability to
3235 grant or revoke column-level privileges (Stephen Frost)
3239 This is more useful than before and helps to prevent confusion when
3240 a <command>REVOKE</> generates multiple messages, which formerly
3241 appeared to be duplicates.
3247 When reading <filename>pg_hba.conf</> and related files, do not treat
3248 <literal>@something</> as a file inclusion request if the <literal>@</>
3249 appears inside quote marks; also, never treat <literal>@</> by itself
3250 as a file inclusion request (Tom)
3254 This prevents erratic behavior if a role or database name starts with
3255 <literal>@</>. If you need to include a file whose path name
3256 contains spaces, you can still do so, but you must write
3257 <literal>@"/path to/file"</> rather than putting the quotes around
3258 the whole construct.
3264 Prevent infinite loop on some platforms if a directory is named as
3265 an inclusion target in <filename>pg_hba.conf</> and related files
3272 Fix possible infinite loop if <function>SSL_read</> or
3273 <function>SSL_write</> fails without setting <varname>errno</> (Tom)
3277 This is reportedly possible with some Windows versions of
3278 <application>openssl</>.
3284 Disallow <acronym>GSSAPI</> authentication on local connections,
3285 since it requires a hostname to function correctly (Magnus)
3291 Protect <application>ecpg</> against applications freeing strings
3292 unexpectedly (Michael)
3298 Make <application>ecpg</> report the proper SQLSTATE if the connection
3299 disappears (Michael)
3305 Fix translation of cell contents in <application>psql</> <literal>\d</>
3312 Fix <application>psql</>'s <literal>numericlocale</> option to not
3313 format strings it shouldn't in latex and troff output formats (Heikki)
3319 Fix a small per-query memory leak in <application>psql</> (Tom)
3325 Make <application>psql</> return the correct exit status (3) when
3326 <literal>ON_ERROR_STOP</> and <literal>--single-transaction</> are
3327 both specified and an error occurs during the implied <command>COMMIT</>
3334 Fix <application>pg_dump</>'s output of permissions for foreign servers
3341 Fix possible crash in parallel <application>pg_restore</> due to
3342 out-of-range dependency IDs (Tom)
3348 Fix plpgsql failure in one case where a composite column is set to NULL
3355 Fix possible failure when calling PL/Perl functions from PL/PerlU
3356 or vice versa (Tim Bunce)
3362 Add <literal>volatile</> markings in PL/Python to avoid possible
3363 compiler-specific misbehavior (Zdenek Kotala)
3369 Ensure PL/Tcl initializes the Tcl interpreter fully (Tom)
3373 The only known symptom of this oversight is that the Tcl
3374 <literal>clock</> command misbehaves if using Tcl 8.5 or later.
3380 Prevent <function>ExecutorEnd</> from being run on portals created
3381 within a failed transaction or subtransaction (Tom)
3385 This is known to cause issues when using
3386 <filename>contrib/auto_explain</>.
3392 Prevent crash in <filename>contrib/dblink</> when too many key
3393 columns are specified to a <function>dblink_build_sql_*</> function
3394 (Rushabh Lathia, Joe Conway)
3400 Allow zero-dimensional arrays in <filename>contrib/ltree</> operations
3405 This case was formerly rejected as an error, but it's more convenient to
3406 treat it the same as a zero-element array. In particular this avoids
3407 unnecessary failures when an <type>ltree</> operation is applied to the
3408 result of <literal>ARRAY(SELECT ...)</> and the sub-select returns no
3415 Fix assorted crashes in <filename>contrib/xml2</> caused by sloppy
3416 memory management (Tom)
3422 Make building of <filename>contrib/xml2</> more robust on Windows
3429 Fix race condition in Windows signal handling (Radu Ilie)
3433 One known symptom of this bug is that rows in <structname>pg_listener</>
3434 could be dropped under heavy load.
3440 Make the configure script report failure if the C compiler does
3441 not provide a working 64-bit integer datatype (Tom)
3445 This case has been broken for some time, and no longer seems worth
3446 supporting, so just reject it at configure time instead.
3452 Update time zone data files to <application>tzdata</> release 2010e
3453 for DST law changes in Bangladesh, Chile, Fiji, Mexico, Paraguay, Samoa.
3462 <sect1 id="release-8-4-2">
3463 <title>Release 8.4.2</title>
3466 <title>Release Date</title>
3467 <simpara>2009-12-14</simpara>
3471 This release contains a variety of fixes from 8.4.1.
3472 For information about new features in the 8.4 major release, see
3473 <xref linkend="release-8-4">.
3477 <title>Migration to Version 8.4.2</title>
3480 A dump/restore is not required for those running 8.4.X.
3481 However, if you have any hash indexes,
3482 you should <command>REINDEX</> them after updating to 8.4.2,
3483 to repair possible damage.
3489 <title>Changes</title>
3495 Protect against indirect security threats caused by index functions
3496 changing session-local state (Gurjeet Singh, Tom)
3500 This change prevents allegedly-immutable index functions from possibly
3501 subverting a superuser's session (CVE-2009-4136).
3507 Reject SSL certificates containing an embedded null byte in the common
3508 name (CN) field (Magnus)
3512 This prevents unintended matching of a certificate to a server or client
3513 name during SSL validation (CVE-2009-4034).
3519 Fix hash index corruption (Tom)
3523 The 8.4 change that made hash indexes keep entries sorted by hash value
3524 failed to update the bucket splitting and compaction routines to
3525 preserve the ordering. So application of either of those operations
3526 could lead to permanent corruption of an index, in the sense that
3527 searches might fail to find entries that are present. To deal with
3528 this, it is recommended to <literal>REINDEX</> any hash indexes you may
3529 have after installing this update.
3535 Fix possible crash during backend-startup-time cache initialization (Tom)
3541 Avoid crash on empty thesaurus dictionary (Tom)
3547 Prevent signals from interrupting <literal>VACUUM</> at unsafe times
3552 This fix prevents a PANIC if a <literal>VACUUM FULL</> is canceled
3553 after it's already committed its tuple movements, as well as transient
3554 errors if a plain <literal>VACUUM</> is interrupted after having
3555 truncated the table.
3561 Fix possible crash due to integer overflow in hash table size
3566 This could occur with extremely large planner estimates for the size of
3567 a hashjoin's result.
3573 Fix crash if a <literal>DROP</> is attempted on an internally-dependent
3580 Fix very rare crash in <type>inet</>/<type>cidr</> comparisons (Chris
3587 Ensure that shared tuple-level locks held by prepared transactions are
3588 not ignored (Heikki)
3594 Fix premature drop of temporary files used for a cursor that is accessed
3595 within a subtransaction (Heikki)
3601 Fix memory leak in syslogger process when rotating to a new CSV logfile
3608 Fix memory leak in postmaster when re-parsing <filename>pg_hba.conf</>
3615 Fix Windows permission-downgrade logic (Jesse Morris)
3619 This fixes some cases where the database failed to start on Windows,
3620 often with misleading error messages such as <quote>could not locate
3621 matching postgres executable</quote>.
3627 Make <literal>FOR UPDATE/SHARE</> in the primary query not propagate
3628 into <literal>WITH</> queries (Tom)
3634 WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE
3636 the <literal>FOR UPDATE</> will now affect <literal>bar</> but not
3637 <literal>foo</>. This is more useful and consistent than the original
3638 8.4 behavior, which tried to propagate <literal>FOR UPDATE</> into the
3639 <literal>WITH</> query but always failed due to assorted implementation
3640 restrictions. It also follows the design rule that <literal>WITH</>
3641 queries are executed as if independent of the main query.
3647 Fix bug with a <literal>WITH RECURSIVE</> query immediately inside
3654 Fix concurrency bug in hash indexes (Tom)
3658 Concurrent insertions could cause index scans to transiently report
3665 Fix incorrect logic for GiST index page splits, when the split depends
3666 on a non-first column of the index (Paul Ramsey)
3672 Fix wrong search results for a multi-column GIN index with
3673 <literal>fastupdate</> enabled (Teodor)
3679 Fix bugs in WAL entry creation for GIN indexes (Tom)
3683 These bugs were masked when <varname>full_page_writes</> was on, but
3684 with it off a WAL replay failure was certain if a crash occurred before
3685 the next checkpoint.
3691 Don't error out if recycling or removing an old WAL file fails at the
3692 end of checkpoint (Heikki)
3696 It's better to treat the problem as non-fatal and allow the checkpoint
3697 to complete. Future checkpoints will retry the removal. Such problems
3698 are not expected in normal operation, but have been seen to be
3699 caused by misdesigned Windows anti-virus and backup software.
3705 Ensure WAL files aren't repeatedly archived on Windows (Heikki)
3709 This is another symptom that could happen if some other process
3710 interfered with deletion of a no-longer-needed file.
3716 Fix PAM password processing to be more robust (Tom)
3720 The previous code is known to fail with the combination of the Linux
3721 <literal>pam_krb5</> PAM module with Microsoft Active Directory as the
3722 domain controller. It might have problems elsewhere too, since it was
3723 making unjustified assumptions about what arguments the PAM stack would
3730 Raise the maximum authentication token (Kerberos ticket) size in GSSAPI
3731 and SSPI authentication methods (Ian Turner)
3735 While the old 2000-byte limit was more than enough for Unix Kerberos
3736 implementations, tickets issued by Windows Domain Controllers can be
3743 Ensure that domain constraints are enforced in constructs like
3744 <literal>ARRAY[...]::domain</>, where the domain is over an array type
3751 Fix foreign-key logic for some cases involving composite-type columns
3752 as foreign keys (Tom)
3758 Ensure that a cursor's snapshot is not modified after it is created
3763 This could lead to a cursor delivering wrong results if later operations
3764 in the same transaction modify the data the cursor is supposed to return.
3770 Fix <literal>CREATE TABLE</> to properly merge default expressions
3771 coming from different inheritance parent tables (Tom)
3775 This used to work but was broken in 8.4.
3781 Re-enable collection of access statistics for sequences (Akira Kurosawa)
3785 This used to work but was broken in 8.3.
3791 Fix processing of ownership dependencies during <literal>CREATE OR
3792 REPLACE FUNCTION</> (Tom)
3798 Fix incorrect handling of <literal>WHERE</>
3799 <replaceable>x</>=<replaceable>x</> conditions (Tom)
3803 In some cases these could get ignored as redundant, but they aren't
3804 — they're equivalent to <replaceable>x</> <literal>IS NOT NULL</>.
3810 Fix incorrect plan construction when using hash aggregation to implement
3811 <literal>DISTINCT</> for textually identical volatile expressions (Tom)
3817 Fix Assert failure for a volatile <literal>SELECT DISTINCT ON</>
3824 Fix <function>ts_stat()</> to not fail on an empty <type>tsvector</>
3831 Make text search parser accept underscores in XML attributes (Peter)
3837 Fix encoding handling in <type>xml</> binary input (Heikki)
3841 If the XML header doesn't specify an encoding, we now assume UTF-8 by
3842 default; the previous handling was inconsistent.
3848 Fix bug with calling <literal>plperl</> from <literal>plperlu</> or vice
3853 An error exit from the inner function could result in crashes due to
3854 failure to re-select the correct Perl interpreter for the outer function.
3860 Fix session-lifespan memory leak when a PL/Perl function is redefined
3867 Ensure that Perl arrays are properly converted to
3868 <productname>PostgreSQL</> arrays when returned by a set-returning
3869 PL/Perl function (Andrew Dunstan, Abhijit Menon-Sen)
3873 This worked correctly already for non-set-returning functions.
3879 Fix rare crash in exception processing in PL/Python (Peter)
3885 Fix <application>ecpg</> problem with comments in <literal>DECLARE
3886 CURSOR</> statements (Michael)
3892 Fix <application>ecpg</> to not treat recently-added keywords as
3893 reserved words (Tom)
3897 This affected the keywords <literal>CALLED</>, <literal>CATALOG</>,
3898 <literal>DEFINER</>, <literal>ENUM</>, <literal>FOLLOWING</>,
3899 <literal>INVOKER</>, <literal>OPTIONS</>, <literal>PARTITION</>,
3900 <literal>PRECEDING</>, <literal>RANGE</>, <literal>SECURITY</>,
3901 <literal>SERVER</>, <literal>UNBOUNDED</>, and <literal>WRAPPER</>.
3907 Re-allow regular expression special characters in <application>psql</>'s
3908 <literal>\df</> function name parameter (Tom)
3914 In <filename>contrib/fuzzystrmatch</>, correct the calculation of
3915 <function>levenshtein</> distances with non-default costs (Marcin Mank)
3921 In <filename>contrib/pg_standby</>, disable triggering failover with a
3922 signal on Windows (Fujii Masao)
3926 This never did anything useful, because Windows doesn't have Unix-style
3927 signals, but recent changes made it actually crash.
3933 Put <literal>FREEZE</> and <literal>VERBOSE</> options in the right
3934 order in the <literal>VACUUM</> command that
3935 <filename>contrib/vacuumdb</> produces (Heikki)
3941 Fix possible leak of connections when <filename>contrib/dblink</>
3942 encounters an error (Tatsuhito Kasahara)
3948 Ensure <application>psql</>'s flex module is compiled with the correct
3949 system header definitions (Tom)
3953 This fixes build failures on platforms where
3954 <literal>--enable-largefile</> causes incompatible changes in the
3961 Make the postmaster ignore any <literal>application_name</> parameter in
3962 connection request packets, to improve compatibility with future libpq
3969 Update the timezone abbreviation files to match current reality (Joachim
3974 This includes adding <literal>IDT</> to the default
3975 timezone abbreviation set.
3981 Update time zone data files to <application>tzdata</> release 2009s
3982 for DST law changes in Antarctica, Argentina, Bangladesh, Fiji,
3983 Novokuznetsk, Pakistan, Palestine, Samoa, Syria; also historical
3984 corrections for Hong Kong.
3993 <sect1 id="release-8-4-1">
3994 <title>Release 8.4.1</title>
3997 <title>Release Date</title>
3998 <simpara>2009-09-09</simpara>
4002 This release contains a variety of fixes from 8.4.
4003 For information about new features in the 8.4 major release, see
4004 <xref linkend="release-8-4">.
4008 <title>Migration to Version 8.4.1</title>
4011 A dump/restore is not required for those running 8.4.X.
4017 <title>Changes</title>
4023 Fix WAL page header initialization at the end of archive recovery
4028 This could lead to failure to process the WAL in a subsequent
4035 Fix <quote>cannot make new WAL entries during recovery</> error (Tom)
4041 Fix problem that could make expired rows visible after a crash (Tom)
4045 This bug involved a page status bit potentially not being set
4046 correctly after a server crash.
4052 Disallow <command>RESET ROLE</> and <command>RESET SESSION
4053 AUTHORIZATION</> inside security-definer functions (Tom, Heikki)
4057 This covers a case that was missed in the previous patch that
4058 disallowed <command>SET ROLE</> and <command>SET SESSION
4059 AUTHORIZATION</> inside security-definer functions.
4066 Make <command>LOAD</> of an already-loaded loadable module
4071 Formerly, <command>LOAD</> would attempt to unload and re-load the
4072 module, but this is unsafe and not all that useful.
4078 Make window function <literal>PARTITION BY</> and <literal>ORDER BY</>
4079 items always be interpreted as simple expressions (Tom)
4083 In 8.4.0 these lists were parsed following the rules used for
4084 top-level <literal>GROUP BY</> and <literal>ORDER BY</> lists.
4085 But this was not correct per the SQL standard, and it led to possible
4092 Fix several errors in planning of semi-joins (Tom)
4096 These led to wrong query results in some cases where <literal>IN</>
4097 or <literal>EXISTS</> was used together with another join.
4103 Fix handling of whole-row references to subqueries that are within
4109 <literal>SELECT COUNT(ss.*) FROM ... LEFT JOIN (SELECT ...) ss ON ...</>.
4110 Here, <literal>ss.*</> would be treated as <literal>ROW(NULL,NULL,...)</>
4111 for null-extended join rows, which is not the same as a simple NULL.
4112 Now it is treated as a simple NULL.
4118 Fix Windows shared-memory allocation code (Tsutomu Yamada, Magnus)
4122 This bug led to the often-reported <quote>could not reattach
4123 to shared memory</> error message.
4129 Fix locale handling with plperl (Heikki)
4133 This bug could cause the server's locale setting to change when a
4134 plperl function is called, leading to data corruption.
4140 Fix handling of reloptions to ensure setting one option doesn't
4141 force default values for others (Itagaki Takahiro)
4147 Ensure that a <quote>fast shutdown</> request will forcibly terminate
4148 open sessions, even if a <quote>smart shutdown</> was already in progress
4155 Avoid memory leak for <function>array_agg()</> in <literal>GROUP BY</>
4162 Treat <function>to_char(..., 'TH')</> as an uppercase ordinal
4163 suffix with <literal>'HH'</>/<literal>'HH12'</> (Heikki)
4167 It was previously handled as <literal>'th'</> (lowercase).
4173 Include the fractional part in the result of
4174 <function>EXTRACT(second)</> and
4175 <function>EXTRACT(milliseconds)</> for
4176 <type>time</> and <type>time with time zone</> inputs (Tom)
4180 This has always worked for floating-point datetime configurations,
4181 but was broken in the integer datetime code.
4187 Fix overflow for <literal>INTERVAL '<replaceable>x</> ms'</literal>
4188 when <replaceable>x</> is more than 2 million and integer
4189 datetimes are in use (Alex Hunsaker)
4195 Improve performance when processing toasted values in index scans (Tom)
4199 This is particularly useful for <ulink
4200 url="http://postgis.refractions.net/">PostGIS</ulink>.
4206 Fix a typo that disabled <varname>commit_delay</> (Jeff Janes)
4212 Output early-startup messages to <filename>postmaster.log</> if the
4213 server is started in silent mode (Tom)
4217 Previously such error messages were discarded, leading to
4218 difficulty in debugging.
4224 Remove translated FAQs (Peter)
4228 They are now on the <ulink
4229 url="http://wiki.postgresql.org/wiki/FAQ">wiki</ulink>. The
4230 main FAQ was moved to the wiki some time ago.
4236 Fix <application>pg_ctl</> to not go into an infinite loop if
4237 <filename>postgresql.conf</> is empty (Jeff Davis)
4243 Fix several errors in <application>pg_dump</>'s
4244 <literal>--binary-upgrade</> mode (Bruce, Tom)
4248 <literal>pg_dump --binary-upgrade</> is used by pg_migrator.
4254 Fix <filename>contrib/xml2</>'s <function>xslt_process()</> to
4255 properly handle the maximum number of parameters (twenty) (Tom)
4261 Improve robustness of <application>libpq</>'s code to recover
4262 from errors during <command>COPY FROM STDIN</> (Tom)
4268 Avoid including conflicting readline and editline header files
4269 when both libraries are installed (Zdenek Kotala)
4275 Work around gcc bug that causes <quote>floating-point exception</>
4276 instead of <quote>division by zero</> on some platforms (Tom)
4282 Update time zone data files to <application>tzdata</> release 2009l
4283 for DST law changes in Bangladesh, Egypt, Mauritius.
4292 <sect1 id="release-8-4">
4293 <title>Release 8.4</title>
4296 <title>Release Date</title>
4297 <simpara>2009-07-01</simpara>
4301 <title>Overview</title>
4304 After many years of development, <productname>PostgreSQL</> has
4305 become feature-complete in many areas. This release shows a
4306 targeted approach to adding features (e.g., authentication,
4307 monitoring, space reuse), and adds capabilities defined in the
4308 later SQL standards. The major areas of enhancement are:
4313 <!-- This list duplicates items below, but without authors or details-->
4323 Common Table Expressions and Recursive Queries
4329 Default and variadic parameters for functions
4347 Per-database locale settings
4353 Improved hash indexes
4359 Improved join performance for <literal>EXISTS</> and <literal>NOT EXISTS</> queries
4365 Easier-to-use Warm Standby
4371 Automatic sizing of the Free Space Map
4377 Visibility Map (greatly reduces vacuum overhead for slowly-changing tables)
4383 Version-aware psql (backslash commands work against older servers)
4389 Support SSL certificates for user authentication
4395 Per-function runtime statistics
4401 Easy editing of functions in psql
4407 New contrib modules: pg_stat_statements, auto_explain, citext, btree_gin
4414 The above items are explained in more detail in the sections below.
4420 <title>Migration to Version 8.4</title>
4423 A dump/restore using <application>pg_dump</application> is
4424 required for those wishing to migrate data from any previous
4429 Observe the following incompatibilities:
4433 <title>General</title>
4438 Use 64-bit integer datetimes by default (Neil Conway)
4442 Previously this was selected by <application>configure</>'s
4443 <option>--enable-integer-datetimes</> option. To retain
4444 the old behavior, build with <option>--disable-integer-datetimes</>.
4450 Remove <application>ipcclean</> utility command (Bruce)
4454 The utility only worked on a few platforms. Users should use
4455 their operating system tools instead.
4464 <title>Server Settings</title>
4469 Change default setting for
4470 <literal>log_min_messages</> to <literal>warning</> (previously
4471 it was <literal>notice</>) to reduce log file volume (Tom)
4477 Change default setting for <literal>max_prepared_transactions</> to
4478 zero (previously it was 5) (Tom)
4484 Make <literal>debug_print_parse</>, <literal>debug_print_rewritten</>,
4485 and <literal>debug_print_plan</>
4486 output appear at <literal>LOG</> message level, not
4487 <literal>DEBUG1</> as formerly (Tom)
4493 Make <literal>debug_pretty_print</> default to <literal>on</> (Tom)
4499 Remove <varname>explain_pretty_print</> parameter (no longer needed) (Tom)
4505 Make <varname>log_temp_files</> settable by superusers only, like other
4506 logging options (Simon Riggs)
4512 Remove automatic appending of the epoch timestamp when no <literal>%</>
4513 escapes are present in <literal>log_filename</> (Robert Haas)
4517 This change was made because some users wanted a fixed log filename,
4518 for use with an external log rotation tool.
4524 Remove <varname>log_restartpoints</> from <filename>recovery.conf</>;
4525 instead use <varname>log_checkpoints</> (Simon)
4531 Remove <varname>krb_realm</> and <varname>krb_server_hostname</>;
4532 these are now set in <filename>pg_hba.conf</> instead (Magnus)
4538 There are also significant changes in <link
4539 linkend="release-8-4-pg-hba-conf"><filename>pg_hba.conf</></link>,
4549 <title>Queries</title>
4555 Change <command>TRUNCATE</> and <command>LOCK</> to
4556 apply to child tables of the specified table(s) (Peter)
4560 These commands now accept an <literal>ONLY</> option that prevents
4561 processing child tables; this option must be used if the old
4568 <command>SELECT DISTINCT</> and
4569 <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</>
4570 no longer always produce sorted output (Tom)
4574 Previously, these types of queries always removed duplicate rows
4575 by means of Sort/Unique processing (i.e., sort then remove adjacent
4576 duplicates). Now they can be implemented by hashing, which will not
4577 produce sorted output. If an application relied on the output being
4578 in sorted order, the recommended fix is to add an <literal>ORDER BY</>
4579 clause. As a short-term workaround, the previous behavior can be
4580 restored by disabling <literal>enable_hashagg</>, but that is a very
4581 performance-expensive fix. <literal>SELECT DISTINCT ON</> never uses
4582 hashing, however, so its behavior is unchanged.
4588 Force child tables to inherit <literal>CHECK</> constraints from parents
4589 (Alex Hunsaker, Nikhil Sontakke, Tom)
4593 Formerly it was possible to drop such a constraint from a child
4594 table, allowing rows that violate the constraint to be visible
4595 when scanning the parent table. This was deemed inconsistent,
4596 as well as contrary to SQL standard.
4602 Disallow negative <literal>LIMIT</> or <literal>OFFSET</>
4603 values, rather than treating them as zero (Simon)
4609 Disallow <command>LOCK TABLE</> outside a transaction block
4614 Such an operation is useless because the lock would be released
4621 Sequences now contain an additional <structfield>start_value</> column
4622 (Zoltan Boszormenyi)
4626 This supports <command>ALTER SEQUENCE ... RESTART</>.
4636 <title>Functions and Operators</title>
4642 Make <type>numeric</> zero raised to a fractional power return
4643 <literal>0</>, rather than throwing an error, and make
4644 <type>numeric</> zero raised to the zero power return <literal>1</>,
4645 rather than error (Bruce)
4649 This matches the longstanding <type>float8</> behavior.
4655 Allow unary minus of floating-point values to produce minus zero (Tom)
4659 The changed behavior is more <acronym>IEEE</>-standard
4666 Throw an error if an escape character is the last character in
4667 a <literal>LIKE</> pattern (i.e., it has nothing to escape) (Tom)
4671 Previously, such an escape character was silently ignored,
4672 thus possibly masking application logic errors.
4678 Remove <literal>~=~</> and <literal>~<>~</> operators
4679 formerly used for <literal>LIKE</> index comparisons (Tom)
4683 Pattern indexes now use the regular equality operator.
4689 <function>xpath()</> now passes its arguments to <application>libxml</>
4690 without any changes (Andrew)
4694 This means that the XML argument must be a well-formed XML document.
4695 The previous coding attempted to allow XML fragments, but it did not
4702 Make <function>xmlelement()</> format attribute values just like
4703 content values (Peter)
4707 Previously, attribute values were formatted according to the
4708 normal SQL output behavior, which is sometimes at odds with
4715 Rewrite memory management for <application>libxml</>-using functions
4720 This change should avoid some compatibility problems with use of
4721 <application>libxml</> in PL/Perl and other add-on code.
4727 Adopt a faster algorithm for hash functions (Kenneth Marshall,
4728 based on work of Bob Jenkins)
4732 Many of the built-in hash functions now deliver different results on
4733 little-endian and big-endian platforms.
4740 <title>Temporal Functions and Operators</title>
4746 <varname>DateStyle</> no longer controls <type>interval</> output
4747 formatting; instead there is a new variable <varname>IntervalStyle</>
4754 Improve consistency of handling of fractional seconds in
4755 <type>timestamp</> and <type>interval</> output (Ron Mayer)
4759 This may result in displaying a different number of fractional
4760 digits than before, or rounding instead of truncating.
4766 Make <function>to_char()</>'s localized month/day names depend
4767 on <varname>LC_TIME</>, not <varname>LC_MESSAGES</> (Euler
4768 Taveira de Oliveira)
4774 Cause <function>to_date()</> and <function>to_timestamp()</>
4775 to more consistently report errors for invalid input (Brendan
4780 Previous versions would often ignore or silently misread input
4781 that did not match the format string. Such cases will now
4788 Fix <function>to_timestamp()</> to not require upper/lower case
4789 matching for meridian (<literal>AM</>/<literal>PM</>) and era
4790 (<literal>BC</>/<literal>AD</>) format designations (Brendan
4795 For example, input value <literal>ad</> now matches the format
4796 string <literal>AD</>.
4809 <title>Changes</title>
4812 Below you will find a detailed account of the changes between
4813 <productname>PostgreSQL</productname> 8.4 and the previous major
4818 <title>Performance</title>
4823 Improve optimizer statistics calculations (Jan Urbanski, Tom)
4827 In particular, estimates for full-text-search operators are
4834 Allow <command>SELECT DISTINCT</> and
4835 <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</> to
4840 This means that these types of queries no longer automatically
4841 produce sorted output.
4847 Create explicit concepts of semi-joins and anti-joins (Tom)
4851 This work formalizes our previous ad-hoc treatment of <literal>IN
4852 (SELECT ...)</> clauses, and extends it to <literal>EXISTS</> and
4853 <literal>NOT EXISTS</> clauses. It should result in significantly
4854 better planning of <literal>EXISTS</> and <literal>NOT EXISTS</>
4855 queries. In general, logically equivalent <literal>IN</> and
4856 <literal>EXISTS</> clauses should now have similar performance,
4857 whereas previously <literal>IN</> often won.
4863 Improve optimization of sub-selects beneath outer joins (Tom)
4867 Formerly, a sub-select or view could not be optimized very well if it
4868 appeared within the nullable side of an outer join and contained
4869 non-strict expressions (for instance, constants) in its result list.
4875 Improve the performance of <function>text_position()</> and
4876 related functions by using Boyer-Moore-Horspool searching (David
4881 This is particularly helpful for long search patterns.
4887 Reduce I/O load of writing the statistics collection file
4888 by writing the file only when requested (Martin Pihlak)
4894 Improve performance for bulk inserts (Robert Haas, Simon)
4900 Increase the default value of <varname>default_statistics_target</>
4901 from <literal>10</> to <literal>100</> (Greg Sabino Mullane,
4906 The maximum value was also increased from <literal>1000</> to
4913 Perform <varname>constraint_exclusion</> checking by default
4914 in queries involving inheritance or <literal>UNION ALL</> (Tom)
4918 A new <varname>constraint_exclusion</> setting,
4919 <literal>partition</>, was added to specify this behavior.
4925 Allow I/O read-ahead for bitmap index scans (Greg Stark)
4929 The amount of read-ahead is controlled by
4930 <varname>effective_io_concurrency</>. This feature is available only
4931 if the kernel has <function>posix_fadvise()</> support.
4937 Inline simple set-returning <acronym>SQL</> functions in
4938 <literal>FROM</> clauses (Richard Rowell)
4944 Improve performance of multi-batch hash joins by providing a special
4945 case for join key values that are especially common in the outer
4946 relation (Bryce Cutt, Ramon Lawrence)
4952 Reduce volume of temporary data in multi-batch hash joins
4953 by suppressing <quote>physical tlist</> optimization (Michael
4954 Henderson, Ramon Lawrence)
4960 Avoid waiting for idle-in-transaction sessions during
4961 <command>CREATE INDEX CONCURRENTLY</> (Simon)
4967 Improve performance of shared cache invalidation (Tom)
4976 <title>Server</title>
4979 <title>Settings</title>
4985 Convert many <filename>postgresql.conf</> settings to enumerated
4986 values so that <literal>pg_settings</> can display the valid
4993 Add <varname>cursor_tuple_fraction</> parameter to control the
4994 fraction of a cursor's rows that the planner assumes will be
4995 fetched (Robert Hell)
5001 Allow underscores in the names of custom variable
5002 classes in <filename>postgresql.conf</> (Tom)
5011 <title>Authentication and security</title>
5016 Remove support for the (insecure) <literal>crypt</> authentication method
5021 This effectively obsoletes pre-<productname>PostgreSQL</> 7.2 client
5022 libraries, as there is no longer any non-plaintext password method that
5029 Support regular expressions in <filename>pg_ident.conf</>
5036 Allow <productname>Kerberos</>/<acronym>GSSAPI</> parameters
5037 to be changed without restarting the postmaster (Magnus)
5043 Support <acronym>SSL</> certificate chains in server certificate
5044 file (Andrew Gierth)
5048 Including the full certificate chain makes the client able
5049 to verify the certificate without having all intermediate CA
5050 certificates present in the local store, which is often the case for
5057 Report appropriate error message for combination of <literal>MD5</>
5058 authentication and <varname>db_user_namespace</> enabled (Bruce)
5065 <sect4 id="release-8-4-pg-hba-conf">
5066 <title><filename>pg_hba.conf</></title>
5071 Change all authentication options to use <literal>name=value</>
5076 This makes incompatible changes to the <literal>ldap</>,
5077 <literal>pam</> and <literal>ident</> authentication methods. All
5078 <filename>pg_hba.conf</> entries with these methods need to be
5079 rewritten using the new format.
5085 Remove the <literal>ident sameuser</> option, instead making that
5086 behavior the default if no usermap is specified (Magnus)
5092 Allow a usermap parameter for all external authentication methods
5097 Previously a usermap was only supported for <literal>ident</>
5104 Add <literal>clientcert</> option to control requesting of a
5105 client certificate (Magnus)
5109 Previously this was controlled by the presence of a root
5110 certificate file in the server's data directory.
5116 Add <literal>cert</> authentication method to allow
5117 <emphasis>user</> authentication via <acronym>SSL</> certificates
5122 Previously <acronym>SSL</> certificates could only verify that
5123 the client had access to a certificate, not authenticate a
5130 Allow <literal>krb5</>, <literal>gssapi</> and <literal>sspi</>
5131 realm and <literal>krb5</> host settings to be specified in
5132 <filename>pg_hba.conf</> (Magnus)
5136 These override the settings in <filename>postgresql.conf</>.
5142 Add <varname>include_realm</> parameter for <literal>krb5</>,
5143 <literal>gssapi</>, and <literal>sspi</> methods (Magnus)
5147 This allows identical usernames from different realms to be
5148 authenticated as different database users using usermaps.
5154 Parse <filename>pg_hba.conf</> fully when it is loaded,
5155 so that errors are reported immediately (Magnus)
5159 Previously, most errors in the file wouldn't be detected until clients
5160 tried to connect, so an erroneous file could render the system
5161 unusable. With the new behavior, if an error is detected during
5162 reload then the bad file is rejected and the postmaster continues
5163 to use its old copy.
5169 Show all parsing errors in <filename>pg_hba.conf</> instead of
5170 aborting after the first one (Selena Deckelmann)
5176 Support <literal>ident</> authentication over Unix-domain sockets
5177 on <productname>Solaris</> (Garick Hamlin)
5186 <title>Continuous Archiving</title>
5191 Provide an option to <function>pg_start_backup()</> to force its
5192 implied checkpoint to finish as quickly as possible (Tom)
5196 The default behavior avoids excess I/O consumption, but that is
5197 pointless if no concurrent query activity is going on.
5203 Make <function>pg_stop_backup()</> wait for modified <acronym>WAL</>
5204 files to be archived (Simon)
5208 This guarantees that the backup is valid at the time
5209 <function>pg_stop_backup()</> completes.
5215 When archiving is enabled, rotate the last WAL segment at shutdown
5216 so that all transactions can be archived immediately
5217 (Guillaume Smet, Heikki)
5223 Delay <quote>smart</> shutdown while a continuous archiving base backup
5224 is in progress (Laurenz Albe)
5230 Cancel a continuous archiving base backup if <quote>fast</> shutdown
5231 is requested (Laurenz Albe)
5237 Allow <filename>recovery.conf</> boolean variables to take the
5238 same range of string values as <filename>postgresql.conf</>
5249 <title>Monitoring</title>
5254 Add <function>pg_conf_load_time()</> to report when
5255 the <productname>PostgreSQL</> configuration files were last loaded
5262 Add <function>pg_terminate_backend()</> to safely terminate a
5263 backend (the <literal>SIGTERM</> signal works also) (Tom, Bruce)
5267 While it's always been possible to <literal>SIGTERM</> a single
5268 backend, this was previously considered unsupported; and testing
5269 of the case found some bugs that are now fixed.
5275 Add ability to track user-defined functions' call counts and
5276 runtimes (Martin Pihlak)
5280 Function statistics appear in a new system view,
5281 <literal>pg_stat_user_functions</>. Tracking is controlled
5282 by the new parameter <varname>track_functions</>.
5288 Allow specification of the maximum query string size in
5289 <literal>pg_stat_activity</> via new
5290 <varname>track_activity_query_size</> parameter (Thomas Lee)
5296 Increase the maximum line length sent to <application>syslog</>, in
5297 hopes of improving performance (Tom)
5303 Add read-only configuration variables <varname>segment_size</>,
5304 <varname>wal_block_size</>, and <varname>wal_segment_size</>
5311 When reporting a deadlock, report the text of all queries involved
5312 in the deadlock to the server log (Itagaki Takahiro)
5318 Add <function>pg_stat_get_activity(pid)</> function to return
5319 information about a specific process id (Magnus)
5325 Allow the location of the server's statistics file to be specified
5326 via <varname>stats_temp_directory</> (Magnus)
5330 This allows the statistics file to be placed in a
5331 <acronym>RAM</>-resident directory to reduce I/O requirements.
5332 On startup/shutdown, the file is copied to its traditional location
5333 (<literal>$PGDATA/global/</>) so it is preserved across restarts.
5344 <title>Queries</title>
5349 Add support for <literal>WINDOW</> functions (Hitoshi Harada)
5355 Add support for <literal>WITH</> clauses (CTEs), including <literal>WITH
5356 RECURSIVE</> (Yoshiyuki Asaba, Tatsuo Ishii, Tom)
5362 Add <command>TABLE</> command (Peter)
5366 <literal>TABLE tablename</> is a SQL standard short-hand for
5367 <literal>SELECT * FROM tablename</>.
5373 Allow <literal>AS</> to be optional when specifying a
5374 <command>SELECT</> (or <literal>RETURNING</>) column output
5375 label (Hiroshi Saito)
5379 This works so long as the column label is not any
5380 <productname>PostgreSQL</> keyword; otherwise <literal>AS</> is still
5387 Support set-returning functions in <command>SELECT</> result lists
5388 even for functions that return their result via a tuplestore (Tom)
5392 In particular, this means that functions written in PL/pgSQL
5393 and other PL languages can now be called this way.
5399 Support set-returning functions in the output of aggregation
5400 and grouping queries (Tom)
5406 Allow <command>SELECT FOR UPDATE</>/<literal>SHARE</> to work
5407 on inheritance trees (Tom)
5413 Add infrastructure for <acronym>SQL/MED</> (Martin Pihlak,
5418 There are no remote or external <acronym>SQL/MED</> capabilities
5419 yet, but this change provides a standardized and future-proof
5420 system for managing connection information for modules like
5421 <filename>dblink</> and <filename>plproxy</>.
5427 Invalidate cached plans when referenced schemas, functions, operators,
5428 or operator classes are modified (Martin Pihlak, Tom)
5432 This improves the system's ability to respond to on-the-fly
5438 Allow comparison of composite types and allow arrays of
5439 anonymous composite types (Tom)
5443 This allows constructs such as
5444 <literal>row(1, 1.1) = any (array[row(7, 7.7), row(1, 1.0)])</>.
5445 This is particularly useful in recursive queries.
5451 Add support for Unicode string literal and identifier specifications
5452 using code points, e.g. <literal>U&'d\0061t\+000061'</>
5459 Reject <literal>\000</> in string literals and <command>COPY</> data
5464 Previously, this was accepted but had the effect of terminating
5465 the string contents.
5471 Improve the parser's ability to report error locations (Tom)
5475 An error location is now reported for many semantic errors,
5476 such as mismatched datatypes, that previously could not be localized.
5483 <title><command>TRUNCATE</></title>
5488 Support statement-level <literal>ON TRUNCATE</> triggers (Simon)
5494 Add <literal>RESTART</>/<literal>CONTINUE IDENTITY</> options
5495 for <command>TRUNCATE TABLE</>
5496 (Zoltan Boszormenyi)
5500 The start value of a sequence can be changed by <command>ALTER
5501 SEQUENCE START WITH</>.
5507 Allow <command>TRUNCATE tab1, tab1</> to succeed (Bruce)
5513 Add a separate <command>TRUNCATE</> permission (Robert Haas)
5522 <title><command>EXPLAIN</></title>
5527 Make <command>EXPLAIN VERBOSE</> show the output columns of each
5532 Previously <command>EXPLAIN VERBOSE</> output an internal
5533 representation of the query plan. (That behavior is now
5534 available via <varname>debug_print_plan</>.)
5540 Make <command>EXPLAIN</> identify subplans and initplans with
5541 individual labels (Tom)
5547 Make <command>EXPLAIN</> honor <varname>debug_print_plan</> (Tom)
5553 Allow <command>EXPLAIN</> on <command>CREATE TABLE AS</> (Peter)
5562 <title><literal>LIMIT</>/<literal>OFFSET</></title>
5567 Allow sub-selects in <literal>LIMIT</> and <literal>OFFSET</> (Tom)
5573 Add <acronym>SQL</>-standard syntax for
5574 <literal>LIMIT</>/<literal>OFFSET</> capabilities (Peter)
5579 <literal>OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS}
5591 <title>Object Manipulation</title>
5596 Add support for column-level privileges (Stephen Frost, KaiGai
5603 Refactor multi-object <command>DROP</> operations to reduce the
5604 need for <literal>CASCADE</> (Alex Hunsaker)
5608 For example, if table <literal>B</> has a dependency on table
5609 <literal>A</>, the command <literal>DROP TABLE A, B</> no longer
5610 requires the <literal>CASCADE</> option.
5616 Fix various problems with concurrent <command>DROP</> commands
5617 by ensuring that locks are taken before we begin to drop dependencies
5624 Improve reporting of dependencies during <command>DROP</>
5631 Add <literal>WITH [NO] DATA</> clause to <command>CREATE TABLE
5632 AS</>, per the <acronym>SQL</> standard (Peter, Tom)
5638 Add support for user-defined I/O conversion casts (Heikki)
5644 Allow <command>CREATE AGGREGATE</> to use an <type>internal</>
5645 transition datatype (Tom)
5651 Add <literal>LIKE</> clause to <command>CREATE TYPE</> (Tom)
5655 This simplifies creation of data types that use the same internal
5656 representation as an existing type.
5662 Allow specification of the type category and <quote>preferred</>
5663 status for user-defined base types (Tom)
5667 This allows more control over the coercion behavior of user-defined
5674 Allow <command>CREATE OR REPLACE VIEW</> to add columns to the
5675 end of a view (Robert Haas)
5682 <title><command>ALTER</></title>
5687 Add <command>ALTER TYPE RENAME</> (Petr Jelinek)
5693 Add <command>ALTER SEQUENCE ... RESTART</> (with no parameter) to
5694 reset a sequence to its initial value (Zoltan Boszormenyi)
5700 Modify the <command>ALTER TABLE</> syntax to allow all reasonable
5701 combinations for tables, indexes, sequences, and views (Tom)
5705 This change allows the following new syntaxes:
5710 <command>ALTER SEQUENCE OWNER TO</>
5715 <command>ALTER VIEW ALTER COLUMN SET/DROP DEFAULT</>
5720 <command>ALTER VIEW OWNER TO</>
5725 <command>ALTER VIEW SET SCHEMA</>
5730 There is no actual new functionality here, but formerly
5731 you had to say <command>ALTER TABLE</> to do these things,
5732 which was confusing.
5738 Add support for the syntax <command>ALTER TABLE ... ALTER COLUMN
5739 ... SET DATA TYPE</> (Peter)
5743 This is <acronym>SQL</>-standard syntax for functionality that
5744 was already supported.
5750 Make <command>ALTER TABLE SET WITHOUT OIDS</> rewrite the table
5751 to physically remove <type>OID</> values (Tom)
5755 Also, add <command>ALTER TABLE SET WITH OIDS</> to rewrite the
5756 table to add <type>OID</>s.
5765 <title>Database Manipulation</title>
5770 Improve reporting of
5771 <command>CREATE</>/<command>DROP</>/<command>RENAME DATABASE</>
5772 failure when uncommitted prepared transactions are the cause
5779 Make <varname>LC_COLLATE</> and <varname>LC_CTYPE</> into
5780 per-database settings (Radek Strnad, Heikki)
5784 This makes collation similar to encoding, which was always
5785 configurable per database.
5791 Improve checks that the database encoding, collation
5792 (<varname>LC_COLLATE</>), and character classes
5793 (<varname>LC_CTYPE</>) match (Heikki, Tom)
5797 Note in particular that a new database's encoding and locale
5798 settings can be changed only when copying from <literal>template0</>.
5799 This prevents possibly copying data that doesn't match the settings.
5805 Add <command>ALTER DATABASE SET TABLESPACE</> to move a database
5806 to a new tablespace (Guillaume Lelarge, Bernd Helmle)
5817 <title>Utility Operations</title>
5823 Add a <literal>VERBOSE</> option to the <command>CLUSTER</> command and
5824 <application>clusterdb</> (Jim Cox)
5830 Decrease memory requirements for recording pending trigger
5838 <title>Indexes</title>
5843 Dramatically improve the speed of building and accessing hash
5844 indexes (Tom Raney, Shreya Bhargava)
5848 This allows hash indexes to be sometimes faster than btree
5849 indexes. However, hash indexes are still not crash-safe.
5855 Make hash indexes store only the hash code, not the full value of
5856 the indexed column (Xiao Meng)
5860 This greatly reduces the size of hash indexes for long indexed
5861 values, improving performance.
5867 Implement fast update option for GIN indexes (Teodor, Oleg)
5871 This option greatly improves update speed at a small penalty in search
5878 <literal>xxx_pattern_ops</> indexes can now be used for simple
5879 equality comparisons, not only for <literal>LIKE</> (Tom)
5888 <title>Full Text Indexes</title>
5893 Remove the requirement to use <literal>@@@</> when doing
5894 <acronym>GIN</> weighted lookups on full text indexes (Tom, Teodor)
5898 The normal <literal>@@</> text search operator can be used
5905 Add an optimizer selectivity function for <literal>@@</> text
5906 search operations (Jan Urbanski)
5912 Allow prefix matching in full text searches (Teodor Sigaev,
5919 Support multi-column <acronym>GIN</> indexes (Teodor Sigaev)
5925 Improve support for Nepali language and Devanagari alphabet (Teodor)
5934 <title><command>VACUUM</></title>
5939 Track free space in separate per-relation <quote>fork</> files (Heikki)
5943 Free space discovered by <command>VACUUM</> is now recorded in
5944 <filename>*_fsm</> files, rather than in a fixed-sized shared memory
5945 area. The <varname>max_fsm_pages</> and <varname>max_fsm_relations</>
5946 settings have been removed, greatly simplifying administration of
5947 free space management.
5953 Add a visibility map to track pages that do not require
5958 This allows <command>VACUUM</> to avoid scanning all of
5959 a table when only a portion of the table needs vacuuming.
5960 The visibility map is stored in per-relation <quote>fork</> files.
5966 Add <varname>vacuum_freeze_table_age</> parameter to control
5967 when <command>VACUUM</> should ignore the visibility map and
5968 do a full table scan to freeze tuples (Heikki)
5974 Track transaction snapshots more carefully (Alvaro)
5978 This improves <command>VACUUM</>'s ability to reclaim space
5979 in the presence of long-running transactions.
5985 Add ability to specify per-relation autovacuum and <acronym>TOAST</>
5986 parameters in <command>CREATE TABLE</> (Alvaro, Euler Taveira de
5991 Autovacuum options used to be stored in a system table.
5997 Add <literal>--freeze</> option to <application>vacuumdb</>
6009 <title>Data Types</title>
6014 Add a <literal>CaseSensitive</> option for text search synonym
6015 dictionaries (Simon)
6021 Improve the precision of <type>NUMERIC</> division (Tom)
6027 Add basic arithmetic operators for <type>int2</> with <type>int8</>
6032 This eliminates the need for explicit casting in some situations.
6038 Allow <type>UUID</> input to accept an optional hyphen after
6039 every fourth digit (Robert Haas)
6045 Allow <literal>on</>/<literal>off</> as input for the boolean data type
6052 Allow spaces around <literal>NaN</> in the input string for
6053 type <type>numeric</> (Sam Mason)
6060 <title>Temporal Data Types</title>
6065 Reject year <literal>0 BC</> and years <literal>000</> and
6066 <literal>0000</> (Tom)
6070 Previously these were interpreted as <literal>1 BC</>.
6071 (Note: years <literal>0</> and <literal>00</> are still assumed to be
6078 Include <literal>SGT</> (Singapore time) in the default list of
6079 known time zone abbreviations (Tom)
6085 Support <literal>infinity</> and <literal>-infinity</> as
6086 values of type <type>date</> (Tom)
6092 Make parsing of <type>interval</> literals more standard-compliant
6097 For example, <literal>INTERVAL '1' YEAR</> now does what it's
6104 Allow <type>interval</> fractional-seconds precision to be specified
6105 after the <literal>second</> keyword, for <acronym>SQL</> standard
6110 Formerly the precision had to be specified after the keyword
6111 <type>interval</>. (For backwards compatibility, this syntax is still
6112 supported, though deprecated.) Data type definitions will now be
6113 output using the standard format.
6119 Support the <acronym>IS0 8601</> <type>interval</> syntax (Ron
6120 Mayer, Kevin Grittner)
6124 For example, <literal>INTERVAL 'P1Y2M3DT4H5M6.7S'</> is now
6131 Add <varname>IntervalStyle</> parameter
6132 which controls how <type>interval</> values are output (Ron Mayer)
6136 Valid values are: <literal>postgres</>, <literal>postgres_verbose</>,
6137 <literal>sql_standard</>, <literal>iso_8601</>. This setting also
6138 controls the handling of negative <type>interval</> input when only
6139 some fields have positive/negative designations.
6145 Improve consistency of handling of fractional seconds in
6146 <type>timestamp</> and <type>interval</> output (Ron Mayer)
6155 <title>Arrays</title>
6160 Improve the handling of casts applied to <literal>ARRAY[]</>
6161 constructs, such as <literal>ARRAY[...]::integer[]</>
6166 Formerly <productname>PostgreSQL</> attempted to determine a data type
6167 for the <literal>ARRAY[]</> construct without reference to the ensuing
6168 cast. This could fail unnecessarily in many cases, in particular when
6169 the <literal>ARRAY[]</> construct was empty or contained only
6170 ambiguous entries such as <literal>NULL</>. Now the cast is consulted
6171 to determine the type that the array elements must be.
6177 Make <acronym>SQL</>-syntax <type>ARRAY</> dimensions optional
6178 to match the <acronym>SQL</> standard (Peter)
6184 Add <function>array_ndims()</> to return the number
6185 of dimensions of an array (Robert Haas)
6191 Add <function>array_length()</> to return the length
6192 of an array for a specified dimension (Jim Nasby, Robert
6193 Haas, Peter Eisentraut)
6199 Add aggregate function <function>array_agg()</>, which
6200 returns all aggregated values as a single array (Robert Haas,
6207 Add <function>unnest()</>, which converts an array to
6208 individual row values (Tom)
6212 This is the opposite of <function>array_agg()</>.
6218 Add <function>array_fill()</> to create arrays initialized with
6219 a value (Pavel Stehule)
6225 Add <function>generate_subscripts()</> to simplify generating
6226 the range of an array's subscripts (Pavel Stehule)
6235 <title>Wide-Value Storage (<acronym>TOAST</>)</title>
6240 Consider <acronym>TOAST</> compression on values as short as
6241 32 bytes (previously 256 bytes) (Greg Stark)
6247 Require 25% minimum space savings before using <acronym>TOAST</>
6248 compression (previously 20% for small values and any-savings-at-all
6249 for large values) (Greg)
6255 Improve <acronym>TOAST</> heuristics for rows that have a mix of large
6256 and small toastable fields, so that we prefer to push large values out
6257 of line and don't compress small values unnecessarily (Greg, Tom)
6268 <title>Functions</title>
6273 Document that <function>setseed()</> allows values from
6274 <literal>-1</> to <literal>1</> (not just <literal>0</> to
6275 <literal>1</>), and enforce the valid range (Kris Jurka)
6281 Add server-side function <function>lo_import(filename, oid)</>
6288 Add <function>quote_nullable()</>, which behaves like
6289 <function>quote_literal()</> but returns the string <literal>NULL</> for
6290 a null argument (Brendan Jurd)
6296 Improve full text search <function>headline()</> function to
6297 allow extracting several fragments of text (Sushant Sinha)
6303 Add <function>suppress_redundant_updates_trigger()</> trigger
6304 function to avoid overhead for non-data-changing updates (Andrew)
6310 Add <function>div(numeric, numeric)</> to perform <type>numeric</>
6311 division without rounding (Tom)
6317 Add <type>timestamp</> and <type>timestamptz</> versions of
6318 <function>generate_series()</> (Hitoshi Harada)
6325 <title>Object Information Functions</title>
6330 Implement <function>current_query()</> for use by functions
6331 that need to know the currently running query (Tomas Doran)
6337 Add <function>pg_get_keywords()</> to return a list of the
6338 parser keywords (Dave Page)
6344 Add <function>pg_get_functiondef()</> to see a function's
6345 definition (Abhijit Menon-Sen)
6351 Allow the second argument of <function>pg_get_expr()</> to be zero
6352 when deparsing an expression that does not contain variables (Tom)
6358 Modify <function>pg_relation_size()</> to use <literal>regclass</>
6363 <function>pg_relation_size(data_type_name)</> no longer works.
6369 Add <literal>boot_val</> and <literal>reset_val</> columns to
6370 <literal>pg_settings</> output (Greg Smith)
6376 Add source file name and line number columns to
6377 <literal>pg_settings</> output for variables set in a configuration
6378 file (Magnus, Alvaro)
6382 For security reasons, these columns are only visible to superusers.
6388 Add support for <varname>CURRENT_CATALOG</>,
6389 <varname>CURRENT_SCHEMA</>, <varname>SET CATALOG</>, <varname>SET
6394 These provide <acronym>SQL</>-standard syntax for existing features.
6400 Add <function>pg_typeof()</> which returns the data type
6401 of any value (Brendan Jurd)
6407 Make <function>version()</> return information about whether
6408 the server is a 32- or 64-bit binary (Bruce)
6414 Fix the behavior of information schema columns
6415 <structfield>is_insertable_into</> and <structfield>is_updatable</> to
6416 be consistent (Peter)
6422 Improve the behavior of information schema
6423 <structfield>datetime_precision</> columns (Peter)
6427 These columns now show zero for <type>date</> columns, and 6
6428 (the default precision) for <type>time</>, <type>timestamp</>, and
6429 <type>interval</> without a declared precision, rather than showing
6436 Convert remaining builtin set-returning functions to use
6437 <literal>OUT</> parameters (Jaime Casanova)
6441 This makes it possible to call these functions without specifying
6442 a column list: <function>pg_show_all_settings()</>,
6443 <function>pg_lock_status()</>, <function>pg_prepared_xact()</>,
6444 <function>pg_prepared_statement()</>, <function>pg_cursor()</>
6450 Make <function>pg_*_is_visible()</> and
6451 <function>has_*_privilege()</> functions return <literal>NULL</>
6452 for invalid OIDs, rather than reporting an error (Tom)
6458 Extend <function>has_*_privilege()</> functions to allow inquiring
6459 about the OR of multiple privileges in one call (Stephen
6466 Add <function>has_column_privilege()</> and
6467 <function>has_any_column_privilege()</> functions (Stephen
6477 <title>Function Creation</title>
6482 Support variadic functions (functions with a variable number
6483 of arguments) (Pavel Stehule)
6487 Only trailing arguments can be optional, and they all must be
6488 of the same data type.
6494 Support default values for function arguments (Pavel Stehule)
6500 Add <command>CREATE FUNCTION ... RETURNS TABLE</> clause (Pavel
6507 Allow <acronym>SQL</>-language functions to return the output
6508 of an <command>INSERT</>/<command>UPDATE</>/<command>DELETE</>
6509 <literal>RETURNING</> clause (Tom)
6518 <title>PL/pgSQL Server-Side Language</title>
6523 Support <literal>EXECUTE USING</> for easier insertion of data
6524 values into a dynamic query string (Pavel Stehule)
6530 Allow looping over the results of a cursor using a <literal>FOR</>
6531 loop (Pavel Stehule)
6537 Support <literal>RETURN QUERY EXECUTE</> (Pavel
6544 Improve the <literal>RAISE</> command (Pavel Stehule)
6549 Support <literal>DETAIL</> and <literal>HINT</> fields
6554 Support specification of the <literal>SQLSTATE</> error code
6559 Support an exception name parameter
6564 Allow <literal>RAISE</> without parameters in an exception
6565 block to re-throw the current error
6574 Allow specification of <varname>SQLSTATE</> codes
6575 in <literal>EXCEPTION</> lists (Pavel Stehule)
6579 This is useful for handling custom <varname>SQLSTATE</> codes.
6585 Support the <literal>CASE</> statement (Pavel Stehule)
6591 Make <command>RETURN QUERY</> set the special <literal>FOUND</> and
6592 <command>GET DIAGNOSTICS</> <literal>ROW_COUNT</> variables
6599 Make <command>FETCH</> and <command>MOVE</> set the
6600 <command>GET DIAGNOSTICS</> <literal>ROW_COUNT</> variable
6607 Make <command>EXIT</> without a label always exit the innermost
6612 Formerly, if there were a <literal>BEGIN</> block more closely nested
6613 than any loop, it would exit that block instead. The new behavior
6614 matches Oracle(TM) and is also what was previously stated by our own
6621 Make processing of string literals and nested block comments
6622 match the main SQL parser's processing (Tom)
6626 In particular, the format string in <command>RAISE</> now works
6627 the same as any other string literal, including being subject
6628 to <varname>standard_conforming_strings</>. This change also
6629 fixes other cases in which valid commands would fail when
6630 <varname>standard_conforming_strings</> is on.
6636 Avoid memory leakage when the same function is called at varying
6637 exception-block nesting depths (Tom)
6648 <title>Client Applications</title>
6654 Fix <literal>pg_ctl restart</> to preserve command-line arguments
6661 Add <literal>-w</>/<literal>--no-password</> option that
6662 prevents password prompting in all utilities that have a
6663 <literal>-W</>/<literal>--password</> option (Peter)
6669 Remove <option>-q</> (quiet) option of <application>createdb</>,
6670 <application>createuser</>, <application>dropdb</>,
6671 <application>dropuser</> (Peter)
6675 These options have had no effect since <productname>PostgreSQL</>
6683 <title><application>psql</></title>
6688 Remove verbose startup banner; now just suggest <literal>help</>
6695 Make <literal>help</> show common backslash commands (Greg
6702 Add <literal>\pset format wrapped</> mode to wrap output to the
6703 screen width, or file/pipe output too if <literal>\pset columns</>
6704 is set (Bryce Nesbitt)
6710 Allow all supported spellings of boolean values in <command>\pset</>,
6711 rather than just <literal>on</> and <literal>off</> (Bruce)
6715 Formerly, any string other than <quote>off</> was silently taken
6716 to mean <literal>true</>. <application>psql</> will now complain
6717 about unrecognized spellings (but still take them as <literal>true</>).
6723 Use the pager for wide output (Bruce)
6729 Require a space between a one-letter backslash command and its first
6730 argument (Bernd Helmle)
6734 This removes a historical source of ambiguity.
6740 Improve tab completion support for schema-qualified and
6741 quoted identifiers (Greg Sabino Mullane)
6747 Add optional <literal>on</>/<literal>off</> argument for
6748 <command>\timing</> (David Fetter)
6754 Display access control rights on multiple lines (Brendan
6755 Jurd, Andreas Scherbaum)
6761 Make <command>\l</> show database access privileges (Andrew Gilligan)
6767 Make <command>\l+</> show database sizes, if permissions
6768 allow (Andrew Gilligan)
6774 Add the <command>\ef</> command to edit function definitions
6784 <title><application>psql</> \d* commands</title>
6790 Make <command>\d*</> commands that do not have a pattern argument
6791 show system objects only if the <literal>S</> modifier is specified
6792 (Greg Sabino Mullane, Bruce)
6796 The former behavior was inconsistent across different variants
6797 of <command>\d</>, and in most cases it provided no easy way to see
6804 Improve <command>\d*</> commands to work with older
6805 <productname>PostgreSQL</> server versions (back to 7.4),
6806 not only the current server version
6813 Make <command>\d</> show foreign-key constraints that reference
6814 the selected table (Kenneth D'Souza)
6820 Make <command>\d</> on a sequence show its column values
6821 (Euler Taveira de Oliveira)
6827 Add column storage type and other relation options to the
6828 <command>\d+</> display (Gregory Stark, Euler Taveira de
6835 Show relation size in <command>\dt+</> output (Dickson S.
6842 Show the possible values of <literal>enum</> types in <command>\dT+</>
6849 Allow <command>\dC</> to accept a wildcard pattern, which matches
6850 either datatype involved in the cast (Tom)
6856 Add a function type column to <command>\df</>'s output, and add
6857 options to list only selected types of functions (David Fetter)
6863 Make <command>\df</> not hide functions that take or return
6864 type <type>cstring</> (Tom)
6868 Previously, such functions were hidden because most of them are
6869 datatype I/O functions, which were deemed uninteresting. The new
6870 policy about hiding system functions by default makes this wart
6880 <title><application>pg_dump</></title>
6885 Add a <literal>--no-tablespaces</> option to
6886 <application>pg_dump</>/<application>pg_dumpall</>/<application>pg_restore</>
6887 so that dumps can be restored to clusters that have non-matching
6888 tablespace layouts (Gavin Roy)
6894 Remove <option>-d</> and <option>-D</> options from
6895 <application>pg_dump</> and <application>pg_dumpall</> (Tom)
6899 These options were too frequently confused with the option to
6900 select a database name in other <productname>PostgreSQL</>
6901 client applications. The functionality is still available,
6902 but you must now spell out the long option name
6903 <option>--inserts</> or <option>--column-inserts</>.
6909 Remove <option>-i</>/<option>--ignore-version</> option from
6910 <application>pg_dump</> and <application>pg_dumpall</> (Tom)
6914 Use of this option does not throw an error, but it has no
6915 effect. This option was removed because the version checks
6916 are necessary for safety.
6922 Disable <varname>statement_timeout</> during dump and restore
6929 Add <application>pg_dump</>/<application>pg_dumpall</> option
6930 <option>--lock-wait-timeout</> (David Gould)
6934 This allows dumps to fail if unable to acquire a shared lock
6935 within the specified amount of time.
6941 Reorder <application>pg_dump</> <literal>--data-only</> output
6942 to dump tables referenced by foreign keys before
6943 the referencing tables (Tom)
6947 This allows data loads when foreign keys are already present.
6948 If circular references make a safe ordering impossible, a
6949 <literal>NOTICE</> is issued.
6955 Allow <application>pg_dump</>, <application>pg_dumpall</>, and
6956 <application>pg_restore</> to use a specified role (Benedek
6957 László)
6963 Allow <application>pg_restore</> to use multiple concurrent
6964 connections to do the restore (Andrew)
6968 The number of concurrent connections is controlled by the option
6969 <literal>--jobs</>. This is supported only for custom-format archives.
6980 <title>Programming Tools</title>
6983 <title><application>libpq</></title>
6988 Allow the <type>OID</> to be specified when importing a large
6989 object, via new function <function>lo_import_with_oid()</> (Tatsuo)
6995 Add <quote>events</> support (Andrew Chernow, Merlin Moncure)
6999 This adds the ability to register callbacks to manage private
7000 data associated with <structname>PGconn</> and <structname>PGresult</>
7007 Improve error handling to allow the return of multiple
7008 error messages as multi-line error reports (Magnus)
7014 Make <function>PQexecParams()</> and related functions return
7015 <varname>PGRES_EMPTY_QUERY</> for an empty query (Tom)
7019 They previously returned <varname>PGRES_COMMAND_OK</>.
7025 Document how to avoid the overhead of <function>WSACleanup()</>
7026 on Windows (Andrew Chernow)
7032 Do not rely on Kerberos tickets to determine the default database
7037 Previously, a Kerberos-capable build of libpq would use the
7038 principal name from any available Kerberos ticket as default
7039 database username, even if the connection wasn't using Kerberos
7040 authentication. This was deemed inconsistent and confusing.
7041 The default username is now determined the same way with or
7042 without Kerberos. Note however that the database username must still
7043 match the ticket when Kerberos authentication is used.
7051 <title><application>libpq</> <acronym>SSL</> (Secure Sockets Layer)
7057 Fix certificate validation for <acronym>SSL</> connections
7062 <application>libpq</> now supports verifying both the certificate
7063 and the name of the server when making <acronym>SSL</>
7064 connections. If a root certificate is not available to use for
7065 verification, <acronym>SSL</> connections will fail. The
7066 <literal>sslmode</> parameter is used to enable certificate
7067 verification and set the level of checking.
7068 The default is still not to do any verification, allowing connections
7069 to SSL-enabled servers without requiring a root certificate on the
7076 Support wildcard server certificates (Magnus)
7080 If a certificate <acronym>CN</> starts with <literal>*</>, it will
7081 be treated as a wildcard when matching the hostname, allowing the
7082 use of the same certificate for multiple servers.
7088 Allow the file locations for client certificates to be specified
7089 (Mark Woodward, Alvaro, Magnus)
7095 Add a <function>PQinitOpenSSL</> function to allow greater control
7096 over OpenSSL/libcrypto initialization (Andrew Chernow)
7102 Make <application>libpq</> unregister its <application>OpenSSL</>
7103 callbacks when no database connections remain open
7104 (Bruce, Magnus, Russell Smith)
7108 This is required for applications that unload the libpq library,
7109 otherwise invalid <application>OpenSSL</> callbacks will remain.
7118 <title><application>ecpg</></title>
7123 Add localization support for messages (Euler Taveira de
7130 ecpg parser is now automatically generated from the server
7135 Previously the ecpg parser was hand-maintained.
7144 <title>Server Programming Interface (<acronym>SPI</>)</title>
7149 Add support for single-use plans with out-of-line
7156 Add new <varname>SPI_OK_REWRITTEN</> return code for
7157 <function>SPI_execute()</> (Heikki)
7161 This is used when a command is rewritten to another type of
7168 Remove unnecessary inclusions from <filename>executor/spi.h</> (Tom)
7172 SPI-using modules might need to add some <literal>#include</>
7173 lines if they were depending on <filename>spi.h</> to include
7185 <title>Build Options</title>
7190 Update build system to use <productname>Autoconf</> 2.61 (Peter)
7196 Require <productname>GNU bison</> for source code builds (Peter)
7200 This has effectively been required for several years, but now there
7201 is no infrastructure claiming to support other parser tools.
7207 Add <application>pg_config</> <literal>--htmldir</> option
7214 Pass <type>float4</> by value inside the server (Zoltan
7219 Add <application>configure</> option
7220 <literal>--disable-float4-byval</> to use the old behavior.
7221 External C functions that use old-style (version 0) call convention
7222 and pass or return <type>float4</> values will be broken by this
7223 change, so you may need the <application>configure</> option if you
7224 have such functions and don't want to update them.
7230 Pass <type>float8</>, <type>int8</>, and related datatypes
7231 by value inside the server on 64-bit platforms (Zoltan Boszormenyi)
7235 Add <application>configure</> option
7236 <literal>--disable-float8-byval</> to use the old behavior.
7237 As above, this change might break old-style external C functions.
7243 Add configure options <literal>--with-segsize</>,
7244 <literal>--with-blocksize</>, <literal>--with-wal-blocksize</>,
7245 <literal>--with-wal-segsize</> (Zdenek Kotala, Tom)
7249 This simplifies build-time control over several constants that
7250 previously could only be changed by editing
7251 <filename>pg_config_manual.h</>.
7257 Allow threaded builds on <productname>Solaris</> 2.5 (Bruce)
7263 Use the system's <function>getopt_long()</> on <productname>Solaris</>
7264 (Zdenek Kotala, Tom)
7268 This makes option processing more consistent with what Solaris users
7275 Add support for the <productname>Sun Studio</> compiler on
7276 <productname>Linux</> (Julius Stroffek)
7282 Append the major version number to the backend <application>gettext</>
7283 domain, and the <literal>soname</> major version number to
7284 libraries' <application>gettext</> domain (Peter)
7288 This simplifies parallel installations of multiple versions.
7294 Add support for code coverage testing with <application>gcov</>
7301 Allow out-of-tree builds on <productname>Mingw</> and
7302 <productname>Cygwin</> (Richard Evans)
7308 Fix the use of <productname>Mingw</> as a cross-compiling source
7318 <title>Source Code</title>
7323 Support 64-bit time zone data files (Heikki)
7327 This adds support for daylight saving time (<acronym>DST</>)
7328 calculations beyond the year 2038.
7334 Deprecate use of platform's <type>time_t</> data type (Tom)
7338 Some platforms have migrated to 64-bit <type>time_t</>, some have
7339 not, and Windows can't make up its mind what it's doing. Define
7340 <type>pg_time_t</> to have the same meaning as <type>time_t</>,
7341 but always be 64 bits (unless the platform has no 64-bit integer type),
7342 and use that type in all module APIs and on-disk data formats.
7348 Fix bug in handling of the time zone database when cross-compiling
7355 Link backend object files in one step, rather than in stages
7362 Improve <application>gettext</> support to allow better translation
7369 Add message translation support to the PL languages (Alvaro, Peter)
7375 Add more <application>DTrace</> probes (Robert Lor)
7381 Enable <application>DTrace</> support on <application>Mac OS X
7382 Leopard</> and other non-Solaris platforms (Robert Lor)
7388 Simplify and standardize conversions between C strings and
7389 <type>text</> datums, by providing common functions for the purpose
7396 Clean up the <filename>include/catalog/</> header files so that
7397 frontend programs can include them without including
7398 <filename>postgres.h</>
7405 Make <type>name</> char-aligned, and suppress zero-padding of
7406 <type>name</> entries in indexes (Tom)
7412 Recover better if dynamically-loaded code executes <function>exit()</>
7419 Add a hook to let plug-ins monitor the executor (Itagaki
7426 Add a hook to allow the planner's statistics lookup behavior to
7427 be overridden (Simon Riggs)
7433 Add <function>shmem_startup_hook()</> for custom shared memory
7440 Replace the index access method <function>amgetmulti</> entry point
7441 with <function>amgetbitmap</>, and extend the API for
7442 <function>amgettuple</> to support run-time determination of
7443 operator lossiness (Heikki, Tom, Teodor)
7447 The API for GIN and GiST opclass <function>consistent</> functions
7448 has been extended as well.
7454 Add support for partial-match searches in <acronym>GIN</> indexes
7455 (Teodor Sigaev, Oleg Bartunov)
7461 Replace <structname>pg_class</> column <structfield>reltriggers</>
7462 with boolean <structfield>relhastriggers</> (Simon)
7466 Also remove unused <structname>pg_class</> columns
7467 <structfield>relukeys</>, <structfield>relfkeys</>, and
7468 <structfield>relrefs</>.
7474 Add a <structfield>relistemp</> column to <structname>pg_class</>
7475 to ease identification of temporary tables (Tom)
7481 Move platform <acronym>FAQ</>s into the main documentation
7488 Prevent parser input files from being built with any conflicts
7495 Add support for the <literal>KOI8U</> (Ukrainian) encoding
7502 Add Japanese message translations (Japan PostgreSQL Users Group)
7506 This used to be maintained as a separate project.
7512 Fix problem when setting <varname>LC_MESSAGES</> on
7513 <application>MSVC</>-built systems (Hiroshi Inoue, Hiroshi
7523 <title>Contrib</title>
7529 Add <filename>contrib/auto_explain</> to automatically run
7530 <command>EXPLAIN</> on queries exceeding a specified duration
7531 (Itagaki Takahiro, Tom)
7537 Add <filename>contrib/btree_gin</> to allow GIN indexes to
7538 handle more datatypes (Oleg, Teodor)
7544 Add <filename>contrib/citext</> to provide a case-insensitive,
7545 multibyte-aware text data type (David Wheeler)
7551 Add <filename>contrib/pg_stat_statements</> for server-wide
7552 tracking of statement execution statistics (Itagaki Takahiro)
7558 Add duration and query mode options to <filename>contrib/pgbench</>
7565 Make <filename>contrib/pgbench</> use table names
7566 <structname>pgbench_accounts</>, <structname>pgbench_branches</>,
7567 <structname>pgbench_history</>, and <structname>pgbench_tellers</>,
7568 rather than just <structname>accounts</>, <structname>branches</>,
7569 <structname>history</>, and <structname>tellers</> (Tom)
7573 This is to reduce the risk of accidentally destroying real data
7574 by running <application>pgbench</>.
7580 Fix <filename>contrib/pgstattuple</> to handle tables and
7581 indexes with over 2 billion pages (Tatsuhito Kasahara)
7587 In <filename>contrib/fuzzystrmatch</>, add a version of the
7588 Levenshtein string-distance function that allows the user to
7589 specify the costs of insertion, deletion, and substitution
7596 Make <filename>contrib/ltree</> support multibyte encodings
7603 Enable <filename>contrib/dblink</> to use connection information
7604 stored in the SQL/MED catalogs (Joe Conway)
7610 Improve <filename>contrib/dblink</>'s reporting of errors from
7611 the remote server (Joe Conway)
7617 Make <filename>contrib/dblink</> set <varname>client_encoding</>
7618 to match the local database's encoding (Joe Conway)
7622 This prevents encoding problems when communicating with a remote
7623 database that uses a different encoding.
7629 Make sure <filename>contrib/dblink</> uses a password supplied
7630 by the user, and not accidentally taken from the server's
7631 <filename>.pgpass</> file (Joe Conway)
7635 This is a minor security enhancement.
7641 Add <function>fsm_page_contents()</>
7642 to <filename>contrib/pageinspect</> (Heikki)
7648 Modify <function>get_raw_page()</> to support free space map
7649 (<filename>*_fsm</>) files. Also update
7650 <filename>contrib/pg_freespacemap</>.
7656 Add support for multibyte encodings to <filename>contrib/pg_trgm</>
7663 Rewrite <filename>contrib/intagg</> to use new
7664 functions <function>array_agg()</> and <function>unnest()</>
7671 Make <filename>contrib/pg_standby</> recover all available WAL before
7672 failover (Fujii Masao, Simon, Heikki)
7676 To make this work safely, you now need to set the new
7677 <literal>recovery_end_command</> option in <filename>recovery.conf</>
7678 to clean up the trigger file after failover. <application>pg_standby</>
7679 will no longer remove the trigger file itself.
7685 <filename>contrib/pg_standby</>'s <option>-l</> option is now a no-op,
7686 because it is unsafe to use a symlink (Simon)