1 <!-- doc/src/sgml/release-8.3.sgml -->
2 <!-- See header comment in release.sgml about typical markup -->
4 <sect1 id="release-8-3-19">
5 <title>Release 8.3.19</title>
8 <title>Release Date</title>
9 <simpara>2012-06-04</simpara>
13 This release contains a variety of fixes from 8.3.18.
14 For information about new features in the 8.3 major release, see
15 <xref linkend="release-8-3">.
19 <title>Migration to Version 8.3.19</title>
22 A dump/restore is not required for those running 8.3.X.
26 However, if you are upgrading from a version earlier than 8.3.17,
27 see the release notes for 8.3.17.
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 slow session startup when <structname>pg_attribute</> is very large
113 If <structname>pg_attribute</> exceeds one-fourth of
114 <varname>shared_buffers</>, cache rebuilding code that is sometimes
115 needed during session start would trigger the synchronized-scan logic,
116 causing it to take many times longer than normal. The problem was
117 particularly acute if many new sessions were starting at once.
123 Ensure sequential scans check for query cancel reasonably often (Merlin
128 A scan encountering many consecutive pages that contain no live tuples
129 would not respond to interrupts meanwhile.
135 Ensure the Windows implementation of <function>PGSemaphoreLock()</>
136 clears <varname>ImmediateInterruptOK</> before returning (Tom Lane)
140 This oversight meant that a query-cancel interrupt received later
141 in the same query could be accepted at an unsafe time, with
142 unpredictable but not good consequences.
148 Show whole-row variables safely when printing views or rules
149 (Abbas Butt, Tom Lane)
153 Corner cases involving ambiguous names (that is, the name could be
154 either a table or column name of the query) were printed in an
155 ambiguous way, risking that the view or rule would be interpreted
156 differently after dump and reload. Avoid the ambiguous case by
157 attaching a no-op cast.
163 Ensure autovacuum worker processes perform stack depth checking
164 properly (Heikki Linnakangas)
168 Previously, infinite recursion in a function invoked by
169 auto-<command>ANALYZE</> could crash worker processes.
175 Fix logging collector to not lose log coherency under high load (Andrew
180 The collector previously could fail to reassemble large messages if it
187 Fix logging collector to ensure it will restart file rotation
188 after receiving <systemitem>SIGHUP</> (Tom Lane)
194 Fix PL/pgSQL's <command>GET DIAGNOSTICS</> command when the target
195 is the function's first variable (Tom Lane)
201 Fix several performance problems in <application>pg_dump</> when
202 the database contains many objects (Jeff Janes, Tom Lane)
206 <application>pg_dump</> could get very slow if the database contained
207 many schemas, or if many objects are in dependency loops, or if there
208 are many owned sequences.
214 Fix <filename>contrib/dblink</>'s <function>dblink_exec()</> to not leak
215 temporary database connections upon error (Tom Lane)
221 Update time zone data files to <application>tzdata</> release 2012c
222 for DST law changes in Antarctica, Armenia, Chile, Cuba, Falkland
223 Islands, Gaza, Haiti, Hebron, Morocco, Syria, and Tokelau Islands;
224 also historical corrections for Canada.
233 <sect1 id="release-8-3-18">
234 <title>Release 8.3.18</title>
237 <title>Release Date</title>
238 <simpara>2012-02-27</simpara>
242 This release contains a variety of fixes from 8.3.17.
243 For information about new features in the 8.3 major release, see
244 <xref linkend="release-8-3">.
248 <title>Migration to Version 8.3.18</title>
251 A dump/restore is not required for those running 8.3.X.
255 However, if you are upgrading from a version earlier than 8.3.17,
256 see the release notes for 8.3.17.
262 <title>Changes</title>
268 Require execute permission on the trigger function for
269 <command>CREATE TRIGGER</> (Robert Haas)
273 This missing check could allow another user to execute a trigger
274 function with forged input data, by installing it on a table he owns.
275 This is only of significance for trigger functions marked
276 <literal>SECURITY DEFINER</>, since otherwise trigger functions run
277 as the table owner anyway. (CVE-2012-0866)
283 Convert newlines to spaces in names written in <application>pg_dump</>
284 comments (Robert Haas)
288 <application>pg_dump</> was incautious about sanitizing object names
289 that are emitted within SQL comments in its output script. A name
290 containing a newline would at least render the script syntactically
291 incorrect. Maliciously crafted object names could present a SQL
292 injection risk when the script is reloaded. (CVE-2012-0868)
298 Fix btree index corruption from insertions concurrent with vacuuming
303 An index page split caused by an insertion could sometimes cause a
304 concurrently-running <command>VACUUM</> to miss removing index entries
305 that it should remove. After the corresponding table rows are removed,
306 the dangling index entries would cause errors (such as <quote>could not
307 read block N in file ...</>) or worse, silently wrong query results
308 after unrelated rows are re-inserted at the now-free table locations.
309 This bug has been present since release 8.2, but occurs so infrequently
310 that it was not diagnosed until now. If you have reason to suspect
311 that it has happened in your database, reindexing the affected index
318 Allow non-existent values for some settings in <command>ALTER
319 USER/DATABASE SET</> (Heikki Linnakangas)
323 Allow <varname>default_text_search_config</>,
324 <varname>default_tablespace</>, and <varname>temp_tablespaces</> to be
325 set to names that are not known. This is because they might be known
326 in another database where the setting is intended to be used, or for the
327 tablespace cases because the tablespace might not be created yet. The
328 same issue was previously recognized for <varname>search_path</>, and
329 these settings now act like that one.
335 Track the OID counter correctly during WAL replay, even when it wraps
340 Previously the OID counter would remain stuck at a high value until the
341 system exited replay mode. The practical consequences of that are
342 usually nil, but there are scenarios wherein a standby server that's
343 been promoted to master might take a long time to advance the OID
344 counter to a reasonable value once values are needed.
350 Fix regular expression back-references with <literal>*</> attached
355 Rather than enforcing an exact string match, the code would effectively
356 accept any string that satisfies the pattern sub-expression referenced
357 by the back-reference symbol.
361 A similar problem still afflicts back-references that are embedded in a
362 larger quantified expression, rather than being the immediate subject
363 of the quantifier. This will be addressed in a future
364 <productname>PostgreSQL</> release.
370 Fix recently-introduced memory leak in processing of
371 <type>inet</>/<type>cidr</> values (Heikki Linnakangas)
375 A patch in the December 2011 releases of <productname>PostgreSQL</>
376 caused memory leakage in these operations, which could be significant
377 in scenarios such as building a btree index on such a column.
383 Avoid double close of file handle in syslogger on Windows (MauMau)
387 Ordinarily this error was invisible, but it would cause an exception
388 when running on a debug version of Windows.
394 Fix I/O-conversion-related memory leaks in plpgsql
395 (Andres Freund, Jan Urbanski, Tom Lane)
399 Certain operations would leak memory until the end of the current
406 Improve <application>pg_dump</>'s handling of inherited table columns
411 <application>pg_dump</> mishandled situations where a child column has
412 a different default expression than its parent column. If the default
413 is textually identical to the parent's default, but not actually the
414 same (for instance, because of schema search path differences) it would
415 not be recognized as different, so that after dump and restore the
416 child would be allowed to inherit the parent's default. Child columns
417 that are <literal>NOT NULL</> where their parent is not could also be
418 restored subtly incorrectly.
424 Fix <application>pg_restore</>'s direct-to-database mode for
425 INSERT-style table data (Tom Lane)
429 Direct-to-database restores from archive files made with
430 <option>--inserts</> or <option>--column-inserts</> options fail when
431 using <application>pg_restore</> from a release dated September or
432 December 2011, as a result of an oversight in a fix for another
433 problem. The archive file itself is not at fault, and text-mode
440 Fix error in <filename>contrib/intarray</>'s <literal>int[] &
441 int[]</> operator (Guillaume Lelarge)
445 If the smallest integer the two input arrays have in common is 1,
446 and there are smaller values in either array, then 1 would be
447 incorrectly omitted from the result.
453 Fix error detection in <filename>contrib/pgcrypto</>'s
454 <function>encrypt_iv()</> and <function>decrypt_iv()</>
459 These functions failed to report certain types of invalid-input errors,
460 and would instead return random garbage values for incorrect input.
466 Fix one-byte buffer overrun in <filename>contrib/test_parser</>
471 The code would try to read one more byte than it should, which would
472 crash in corner cases.
473 Since <filename>contrib/test_parser</> is only example code, this is
474 not a security issue in itself, but bad example code is still bad.
480 Use <function>__sync_lock_test_and_set()</> for spinlocks on ARM, if
481 available (Martin Pitt)
485 This function replaces our previous use of the <literal>SWPB</>
486 instruction, which is deprecated and not available on ARMv6 and later.
487 Reports suggest that the old code doesn't fail in an obvious way on
488 recent ARM boards, but simply doesn't interlock concurrent accesses,
489 leading to bizarre failures in multiprocess operation.
495 Use <option>-fexcess-precision=standard</> option when building with
496 gcc versions that accept it (Andrew Dunstan)
500 This prevents assorted scenarios wherein recent versions of gcc will
501 produce creative results.
507 Allow use of threaded Python on FreeBSD (Chris Rees)
511 Our configure script previously believed that this combination wouldn't
512 work; but FreeBSD fixed the problem, so remove that error check.
521 <sect1 id="release-8-3-17">
522 <title>Release 8.3.17</title>
525 <title>Release Date</title>
526 <simpara>2011-12-05</simpara>
530 This release contains a variety of fixes from 8.3.16.
531 For information about new features in the 8.3 major release, see
532 <xref linkend="release-8-3">.
536 <title>Migration to Version 8.3.17</title>
539 A dump/restore is not required for those running 8.3.X.
543 However, a longstanding error was discovered in the definition of the
544 <literal>information_schema.referential_constraints</> view. If you
545 rely on correct results from that view, you should replace its
546 definition as explained in the first changelog item below.
550 Also, if you are upgrading from a version earlier than 8.3.8,
551 see the release notes for 8.3.8.
557 <title>Changes</title>
563 Fix bugs in <literal>information_schema.referential_constraints</> view
568 This view was being insufficiently careful about matching the
569 foreign-key constraint to the depended-on primary or unique key
570 constraint. That could result in failure to show a foreign key
571 constraint at all, or showing it multiple times, or claiming that it
572 depends on a different constraint than the one it really does.
576 Since the view definition is installed by <application>initdb</>,
577 merely upgrading will not fix the problem. If you need to fix this
578 in an existing installation, you can (as a superuser) drop the
579 <literal>information_schema</> schema then re-create it by sourcing
580 <filename><replaceable>SHAREDIR</>/information_schema.sql</filename>.
581 (Run <literal>pg_config --sharedir</> if you're uncertain where
582 <replaceable>SHAREDIR</> is.) This must be repeated in each database
589 Fix TOAST-related data corruption during <literal>CREATE TABLE dest AS
590 SELECT * FROM src</> or <literal>INSERT INTO dest SELECT * FROM src</>
595 If a table has been modified by <command>ALTER TABLE ADD COLUMN</>,
596 attempts to copy its data verbatim to another table could produce
597 corrupt results in certain corner cases.
598 The problem can only manifest in this precise form in 8.4 and later,
599 but we patched earlier versions as well in case there are other code
600 paths that could trigger the same bug.
606 Fix race condition during toast table access from stale syscache entries
611 The typical symptom was transient errors like <quote>missing chunk
612 number 0 for toast value NNNNN in pg_toast_2619</>, where the cited
613 toast table would always belong to a system catalog.
619 Make <function>DatumGetInetP()</> unpack inet datums that have a 1-byte
620 header, and add a new macro, <function>DatumGetInetPP()</>, that does
621 not (Heikki Linnakangas)
625 This change affects no core code, but might prevent crashes in add-on
626 code that expects <function>DatumGetInetP()</> to produce an unpacked
627 datum as per usual convention.
633 Improve locale support in <type>money</> type's input and output
638 Aside from not supporting all standard
639 <link linkend="guc-lc-monetary"><varname>lc_monetary</></link>
640 formatting options, the input and output functions were inconsistent,
641 meaning there were locales in which dumped <type>money</> values could
649 linkend="guc-transform-null-equals"><varname>transform_null_equals</></link>
650 affect <literal>CASE foo WHEN NULL ...</> constructs
655 <varname>transform_null_equals</> is only supposed to affect
656 <literal>foo = NULL</> expressions written directly by the user, not
657 equality checks generated internally by this form of <literal>CASE</>.
663 Change foreign-key trigger creation order to better support
664 self-referential foreign keys (Tom Lane)
668 For a cascading foreign key that references its own table, a row update
669 will fire both the <literal>ON UPDATE</> trigger and the
670 <literal>CHECK</> trigger as one event. The <literal>ON UPDATE</>
671 trigger must execute first, else the <literal>CHECK</> will check a
672 non-final state of the row and possibly throw an inappropriate error.
673 However, the firing order of these triggers is determined by their
674 names, which generally sort in creation order since the triggers have
675 auto-generated names following the convention
676 <quote>RI_ConstraintTrigger_NNNN</>. A proper fix would require
677 modifying that convention, which we will do in 9.2, but it seems risky
678 to change it in existing releases. So this patch just changes the
679 creation order of the triggers. Users encountering this type of error
680 should drop and re-create the foreign key constraint to get its
681 triggers into the right order.
687 Avoid floating-point underflow while tracking buffer allocation rate
692 While harmless in itself, on certain platforms this would result in
693 annoying kernel log messages.
699 Preserve blank lines within commands in <application>psql</>'s command
700 history (Robert Haas)
704 The former behavior could cause problems if an empty line was removed
705 from within a string literal, for example.
711 Fix <application>pg_dump</> to dump user-defined casts between
712 auto-generated types, such as table rowtypes (Tom Lane)
718 Use the preferred version of <application>xsubpp</> to build PL/Perl,
719 not necessarily the operating system's main copy
720 (David Wheeler and Alex Hunsaker)
726 Fix incorrect coding in <filename>contrib/dict_int</> and
727 <filename>contrib/dict_xsyn</> (Tom Lane)
731 Some functions incorrectly assumed that memory returned by
732 <function>palloc()</> is guaranteed zeroed.
738 Honor query cancel interrupts promptly in <function>pgstatindex()</>
745 Ensure VPATH builds properly install all server header files
752 Shorten file names reported in verbose error messages (Peter Eisentraut)
756 Regular builds have always reported just the name of the C file
757 containing the error message call, but VPATH builds formerly
758 reported an absolute path name.
764 Fix interpretation of Windows timezone names for Central America
769 Map <quote>Central America Standard Time</> to <literal>CST6</>, not
770 <literal>CST6CDT</>, because DST is generally not observed anywhere in
777 Update time zone data files to <application>tzdata</> release 2011n
778 for DST law changes in Brazil, Cuba, Fiji, Palestine, Russia, and Samoa;
779 also historical corrections for Alaska and British East Africa.
788 <sect1 id="release-8-3-16">
789 <title>Release 8.3.16</title>
792 <title>Release Date</title>
793 <simpara>2011-09-26</simpara>
797 This release contains a variety of fixes from 8.3.15.
798 For information about new features in the 8.3 major release, see
799 <xref linkend="release-8-3">.
803 <title>Migration to Version 8.3.16</title>
806 A dump/restore is not required for those running 8.3.X.
807 However, if you are upgrading from a version earlier than 8.3.8,
808 see the release notes for 8.3.8.
814 <title>Changes</title>
820 Fix bugs in indexing of in-doubt HOT-updated tuples (Tom Lane)
824 These bugs could result in index corruption after reindexing a system
825 catalog. They are not believed to affect user indexes.
831 Fix multiple bugs in GiST index page split processing (Heikki
836 The probability of occurrence was low, but these could lead to index
843 Fix possible buffer overrun in <function>tsvector_concat()</>
848 The function could underestimate the amount of memory needed for its
849 result, leading to server crashes.
855 Fix crash in <function>xml_recv</> when processing a
856 <quote>standalone</> parameter (Tom Lane)
862 Avoid possibly accessing off the end of memory in <command>ANALYZE</>
863 and in SJIS-2004 encoding conversion (Noah Misch)
867 This fixes some very-low-probability server crash scenarios.
873 Fix race condition in relcache init file invalidation (Tom Lane)
877 There was a window wherein a new backend process could read a stale init
878 file but miss the inval messages that would tell it the data is stale.
879 The result would be bizarre failures in catalog accesses, typically
880 <quote>could not read block 0 in file ...</> later during startup.
886 Fix memory leak at end of a GiST index scan (Tom Lane)
890 Commands that perform many separate GiST index scans, such as
891 verification of a new GiST-based exclusion constraint on a table
892 already containing many rows, could transiently require large amounts of
893 memory due to this leak.
899 Fix performance problem when constructing a large, lossy bitmap
906 Fix array- and path-creating functions to ensure padding bytes are
911 This avoids some situations where the planner will think that
912 semantically-equal constants are not equal, resulting in poor
919 Work around gcc 4.6.0 bug that breaks WAL replay (Tom Lane)
923 This could lead to loss of committed transactions after a server crash.
929 Fix dump bug for <literal>VALUES</> in a view (Tom Lane)
935 Disallow <literal>SELECT FOR UPDATE/SHARE</> on sequences (Tom Lane)
939 This operation doesn't work as expected and can lead to failures.
945 Defend against integer overflow when computing size of a hash table (Tom
952 Fix cases where <command>CLUSTER</> might attempt to access
953 already-removed TOAST data (Tom Lane)
959 Fix portability bugs in use of credentials control messages for
960 <quote>peer</> authentication (Tom Lane)
966 Fix SSPI login when multiple roundtrips are required (Ahmed Shinwari,
971 The typical symptom of this problem was <quote>The function requested is
972 not supported</> errors during SSPI login.
978 Fix typo in <function>pg_srand48</> seed initialization (Andres Freund)
982 This led to failure to use all bits of the provided seed. This function
983 is not used on most platforms (only those without <function>srandom</>),
984 and the potential security exposure from a less-random-than-expected
985 seed seems minimal in any case.
991 Avoid integer overflow when the sum of <literal>LIMIT</> and
992 <literal>OFFSET</> values exceeds 2^63 (Heikki Linnakangas)
998 Add overflow checks to <type>int4</> and <type>int8</> versions of
999 <function>generate_series()</> (Robert Haas)
1005 Fix trailing-zero removal in <function>to_char()</> (Marti Raudsepp)
1009 In a format with <literal>FM</> and no digit positions
1010 after the decimal point, zeroes to the left of the decimal point could
1011 be removed incorrectly.
1017 Fix <function>pg_size_pretty()</> to avoid overflow for inputs close to
1024 In <application>pg_ctl</>, support silent mode for service registrations
1031 Fix <application>psql</>'s counting of script file line numbers during
1032 <literal>COPY</> from a different file (Tom Lane)
1038 Fix <application>pg_restore</>'s direct-to-database mode for
1039 <varname>standard_conforming_strings</> (Tom Lane)
1043 <application>pg_restore</> could emit incorrect commands when restoring
1044 directly to a database server from an archive file that had been made
1045 with <varname>standard_conforming_strings</> set to <literal>on</>.
1051 Fix write-past-buffer-end and memory leak in <application>libpq</>'s
1052 LDAP service lookup code (Albe Laurenz)
1058 In <application>libpq</>, avoid failures when using nonblocking I/O
1059 and an SSL connection (Martin Pihlak, Tom Lane)
1065 Improve libpq's handling of failures during connection startup
1070 In particular, the response to a server report of <function>fork()</>
1071 failure during SSL connection startup is now saner.
1077 Improve <application>libpq</>'s error reporting for SSL failures (Tom
1084 Make <application>ecpglib</> write <type>double</> values with 15 digits
1085 precision (Akira Kurosawa)
1091 In <application>ecpglib</>, be sure <literal>LC_NUMERIC</> setting is
1092 restored after an error (Michael Meskes)
1098 Apply upstream fix for blowfish signed-character bug (CVE-2011-2483)
1103 <filename>contrib/pg_crypto</>'s blowfish encryption code could give
1104 wrong results on platforms where char is signed (which is most),
1105 leading to encrypted passwords being weaker than they should be.
1111 Fix memory leak in <filename>contrib/seg</> (Heikki Linnakangas)
1117 Fix <function>pgstatindex()</> to give consistent results for empty
1124 Allow building with perl 5.14 (Alex Hunsaker)
1130 Update configure script's method for probing existence of system
1131 functions (Tom Lane)
1135 The version of autoconf we used in 8.3 and 8.2 could be fooled by
1136 compilers that perform link-time optimization.
1142 Fix assorted issues with build and install file paths containing spaces
1149 Update time zone data files to <application>tzdata</> release 2011i
1150 for DST law changes in Canada, Egypt, Russia, Samoa, and South Sudan.
1159 <sect1 id="release-8-3-15">
1160 <title>Release 8.3.15</title>
1163 <title>Release Date</title>
1164 <simpara>2011-04-18</simpara>
1168 This release contains a variety of fixes from 8.3.14.
1169 For information about new features in the 8.3 major release, see
1170 <xref linkend="release-8-3">.
1174 <title>Migration to Version 8.3.15</title>
1177 A dump/restore is not required for those running 8.3.X.
1178 However, if you are upgrading from a version earlier than 8.3.8,
1179 see the release notes for 8.3.8.
1185 <title>Changes</title>
1191 Disallow including a composite type in itself (Tom Lane)
1195 This prevents scenarios wherein the server could recurse infinitely
1196 while processing the composite type. While there are some possible
1197 uses for such a structure, they don't seem compelling enough to
1198 justify the effort required to make sure it always works safely.
1204 Avoid potential deadlock during catalog cache initialization
1209 In some cases the cache loading code would acquire share lock on a
1210 system index before locking the index's catalog. This could deadlock
1211 against processes trying to acquire exclusive locks in the other,
1212 more standard order.
1218 Fix dangling-pointer problem in <literal>BEFORE ROW UPDATE</> trigger
1219 handling when there was a concurrent update to the target tuple
1224 This bug has been observed to result in intermittent <quote>cannot
1225 extract system attribute from virtual tuple</> failures while trying to
1226 do <literal>UPDATE RETURNING ctid</>. There is a very small probability
1227 of more serious errors, such as generating incorrect index entries for
1234 Disallow <command>DROP TABLE</> when there are pending deferred trigger
1235 events for the table (Tom Lane)
1239 Formerly the <command>DROP</> would go through, leading to
1240 <quote>could not open relation with OID nnn</> errors when the
1241 triggers were eventually fired.
1247 Fix PL/Python memory leak involving array slices (Daniel Popowich)
1253 Fix <application>pg_restore</> to cope with long lines (over 1KB) in
1254 TOC files (Tom Lane)
1260 Put in more safeguards against crashing due to division-by-zero
1261 with overly enthusiastic compiler optimization (Aurelien Jarno)
1267 Support use of dlopen() in FreeBSD and OpenBSD on MIPS (Tom Lane)
1271 There was a hard-wired assumption that this system function was not
1272 available on MIPS hardware on these systems. Use a compile-time test
1273 instead, since more recent versions have it.
1279 Fix compilation failures on HP-UX (Heikki Linnakangas)
1285 Fix version-incompatibility problem with <application>libintl</> on
1286 Windows (Hiroshi Inoue)
1292 Fix usage of <application>xcopy</> in Windows build scripts to
1293 work correctly under Windows 7 (Andrew Dunstan)
1297 This affects the build scripts only, not installation or usage.
1303 Fix path separator used by <application>pg_regress</> on Cygwin
1310 Update time zone data files to <application>tzdata</> release 2011f
1311 for DST law changes in Chile, Cuba, Falkland Islands, Morocco, Samoa,
1312 and Turkey; also historical corrections for South Australia, Alaska,
1322 <sect1 id="release-8-3-14">
1323 <title>Release 8.3.14</title>
1326 <title>Release Date</title>
1327 <simpara>2011-01-31</simpara>
1331 This release contains a variety of fixes from 8.3.13.
1332 For information about new features in the 8.3 major release, see
1333 <xref linkend="release-8-3">.
1337 <title>Migration to Version 8.3.14</title>
1340 A dump/restore is not required for those running 8.3.X.
1341 However, if you are upgrading from a version earlier than 8.3.8,
1342 see the release notes for 8.3.8.
1348 <title>Changes</title>
1354 Avoid failures when <command>EXPLAIN</> tries to display a simple-form
1355 <literal>CASE</> expression (Tom Lane)
1359 If the <literal>CASE</>'s test expression was a constant, the planner
1360 could simplify the <literal>CASE</> into a form that confused the
1361 expression-display code, resulting in <quote>unexpected CASE WHEN
1368 Fix assignment to an array slice that is before the existing range
1369 of subscripts (Tom Lane)
1373 If there was a gap between the newly added subscripts and the first
1374 pre-existing subscript, the code miscalculated how many entries needed
1375 to be copied from the old array's null bitmap, potentially leading to
1376 data corruption or crash.
1382 Avoid unexpected conversion overflow in planner for very distant date
1387 The <type>date</> type supports a wider range of dates than can be
1388 represented by the <type>timestamp</> types, but the planner assumed it
1389 could always convert a date to timestamp with impunity.
1395 Fix <application>pg_restore</>'s text output for large objects (BLOBs)
1396 when <varname>standard_conforming_strings</> is on (Tom Lane)
1400 Although restoring directly to a database worked correctly, string
1401 escaping was incorrect if <application>pg_restore</> was asked for
1402 SQL text output and <varname>standard_conforming_strings</> had been
1403 enabled in the source database.
1409 Fix erroneous parsing of <type>tsquery</> values containing
1410 <literal>... & !(subexpression) | ...</literal> (Tom Lane)
1414 Queries containing this combination of operators were not executed
1415 correctly. The same error existed in <filename>contrib/intarray</>'s
1416 <type>query_int</> type and <filename>contrib/ltree</>'s
1417 <type>ltxtquery</> type.
1423 Fix buffer overrun in <filename>contrib/intarray</>'s input function
1424 for the <type>query_int</> type (Apple)
1428 This bug is a security risk since the function's return address could
1429 be overwritten. Thanks to Apple Inc's security team for reporting this
1430 issue and supplying the fix. (CVE-2010-4015)
1436 Fix bug in <filename>contrib/seg</>'s GiST picksplit algorithm
1437 (Alexander Korotkov)
1441 This could result in considerable inefficiency, though not actually
1442 incorrect answers, in a GiST index on a <type>seg</> column.
1443 If you have such an index, consider <command>REINDEX</>ing it after
1444 installing this update. (This is identical to the bug that was fixed in
1445 <filename>contrib/cube</> in the previous update.)
1454 <sect1 id="release-8-3-13">
1455 <title>Release 8.3.13</title>
1458 <title>Release Date</title>
1459 <simpara>2010-12-16</simpara>
1463 This release contains a variety of fixes from 8.3.12.
1464 For information about new features in the 8.3 major release, see
1465 <xref linkend="release-8-3">.
1469 <title>Migration to Version 8.3.13</title>
1472 A dump/restore is not required for those running 8.3.X.
1473 However, if you are upgrading from a version earlier than 8.3.8,
1474 see the release notes for 8.3.8.
1480 <title>Changes</title>
1487 <link linkend="guc-wal-sync-method"><varname>wal_sync_method</></link>
1488 to be <literal>fdatasync</> on Linux (Tom Lane, Marti Raudsepp)
1492 The default on Linux has actually been <literal>fdatasync</> for many
1493 years, but recent kernel changes caused <productname>PostgreSQL</> to
1494 choose <literal>open_datasync</> instead. This choice did not result
1495 in any performance improvement, and caused outright failures on
1496 certain filesystems, notably <literal>ext4</> with the
1497 <literal>data=journal</> mount option.
1503 Fix assorted bugs in WAL replay logic for GIN indexes (Tom Lane)
1507 This could result in <quote>bad buffer id: 0</> failures or
1508 corruption of index contents during replication.
1514 Fix recovery from base backup when the starting checkpoint WAL record
1515 is not in the same WAL segment as its redo point (Jeff Davis)
1521 Fix persistent slowdown of autovacuum workers when multiple workers
1522 remain active for a long time (Tom Lane)
1526 The effective <varname>vacuum_cost_limit</> for an autovacuum worker
1527 could drop to nearly zero if it processed enough tables, causing it
1528 to run extremely slowly.
1534 Add support for detecting register-stack overrun on <literal>IA64</>
1539 The <literal>IA64</> architecture has two hardware stacks. Full
1540 prevention of stack-overrun failures requires checking both.
1546 Add a check for stack overflow in <function>copyObject()</> (Tom Lane)
1550 Certain code paths could crash due to stack overflow given a
1551 sufficiently complex query.
1557 Fix detection of page splits in temporary GiST indexes (Heikki
1562 It is possible to have a <quote>concurrent</> page split in a
1563 temporary index, if for example there is an open cursor scanning the
1564 index when an insertion is done. GiST failed to detect this case and
1565 hence could deliver wrong results when execution of the cursor
1572 Avoid memory leakage while <command>ANALYZE</>'ing complex index
1573 expressions (Tom Lane)
1579 Ensure an index that uses a whole-row Var still depends on its table
1584 An index declared like <literal>create index i on t (foo(t.*))</>
1585 would not automatically get dropped when its table was dropped.
1591 Do not <quote>inline</> a SQL function with multiple <literal>OUT</>
1592 parameters (Tom Lane)
1596 This avoids a possible crash due to loss of information about the
1597 expected result rowtype.
1603 Behave correctly if <literal>ORDER BY</>, <literal>LIMIT</>,
1604 <literal>FOR UPDATE</>, or <literal>WITH</> is attached to the
1605 <literal>VALUES</> part of <literal>INSERT ... VALUES</> (Tom Lane)
1611 Fix constant-folding of <literal>COALESCE()</> expressions (Tom Lane)
1615 The planner would sometimes attempt to evaluate sub-expressions that
1616 in fact could never be reached, possibly leading to unexpected errors.
1622 Fix postmaster crash when connection acceptance
1623 (<function>accept()</> or one of the calls made immediately after it)
1624 fails, and the postmaster was compiled with GSSAPI support (Alexander
1631 Fix missed unlink of temporary files when <varname>log_temp_files</>
1632 is active (Tom Lane)
1636 If an error occurred while attempting to emit the log message, the
1637 unlink was not done, resulting in accumulation of temp files.
1643 Add print functionality for <structname>InhRelation</> nodes (Tom Lane)
1647 This avoids a failure when <varname>debug_print_parse</> is enabled
1648 and certain types of query are executed.
1654 Fix incorrect calculation of distance from a point to a horizontal
1655 line segment (Tom Lane)
1659 This bug affected several different geometric distance-measurement
1666 Fix <application>PL/pgSQL</>'s handling of <quote>simple</>
1667 expressions to not fail in recursion or error-recovery cases (Tom Lane)
1673 Fix <application>PL/Python</>'s handling of set-returning functions
1678 Attempts to call SPI functions within the iterator generating a set
1685 Fix bug in <filename>contrib/cube</>'s GiST picksplit algorithm
1686 (Alexander Korotkov)
1690 This could result in considerable inefficiency, though not actually
1691 incorrect answers, in a GiST index on a <type>cube</> column.
1692 If you have such an index, consider <command>REINDEX</>ing it after
1693 installing this update.
1699 Don't emit <quote>identifier will be truncated</> notices in
1700 <filename>contrib/dblink</> except when creating new connections
1707 Fix potential coredump on missing public key in
1708 <filename>contrib/pgcrypto</> (Marti Raudsepp)
1714 Fix memory leak in <filename>contrib/xml2</>'s XPath query functions
1721 Update time zone data files to <application>tzdata</> release 2010o
1722 for DST law changes in Fiji and Samoa;
1723 also historical corrections for Hong Kong.
1732 <sect1 id="release-8-3-12">
1733 <title>Release 8.3.12</title>
1736 <title>Release Date</title>
1737 <simpara>2010-10-04</simpara>
1741 This release contains a variety of fixes from 8.3.11.
1742 For information about new features in the 8.3 major release, see
1743 <xref linkend="release-8-3">.
1747 <title>Migration to Version 8.3.12</title>
1750 A dump/restore is not required for those running 8.3.X.
1751 However, if you are upgrading from a version earlier than 8.3.8,
1752 see the release notes for 8.3.8.
1758 <title>Changes</title>
1764 Use a separate interpreter for each calling SQL userid in PL/Perl and
1769 This change prevents security problems that can be caused by subverting
1770 Perl or Tcl code that will be executed later in the same session under
1771 another SQL user identity (for example, within a <literal>SECURITY
1772 DEFINER</> function). Most scripting languages offer numerous ways that
1773 that might be done, such as redefining standard functions or operators
1774 called by the target function. Without this change, any SQL user with
1775 Perl or Tcl language usage rights can do essentially anything with the
1776 SQL privileges of the target function's owner.
1780 The cost of this change is that intentional communication among Perl
1781 and Tcl functions becomes more difficult. To provide an escape hatch,
1782 PL/PerlU and PL/TclU functions continue to use only one interpreter
1783 per session. This is not considered a security issue since all such
1784 functions execute at the trust level of a database superuser already.
1788 It is likely that third-party procedural languages that claim to offer
1789 trusted execution have similar security issues. We advise contacting
1790 the authors of any PL you are depending on for security-critical
1795 Our thanks to Tim Bunce for pointing out this issue (CVE-2010-3433).
1801 Prevent possible crashes in <function>pg_get_expr()</> by disallowing
1802 it from being called with an argument that is not one of the system
1803 catalog columns it's intended to be used with
1804 (Heikki Linnakangas, Tom Lane)
1810 Treat exit code 128 (<literal>ERROR_WAIT_NO_CHILDREN</>) as non-fatal on
1811 Windows (Magnus Hagander)
1815 Under high load, Windows processes will sometimes fail at startup with
1816 this error code. Formerly the postmaster treated this as a panic
1817 condition and restarted the whole database, but that seems to be
1824 Fix incorrect usage of non-strict OR joinclauses in Append indexscans
1829 This is a back-patch of an 8.4 fix that was missed in the 8.3 branch.
1830 This corrects an error introduced in 8.3.8 that could cause incorrect
1831 results for outer joins when the inner relation is an inheritance tree
1832 or <literal>UNION ALL</> subquery.
1838 Fix possible duplicate scans of <literal>UNION ALL</> member relations
1845 Fix <quote>cannot handle unplanned sub-select</quote> error (Tom Lane)
1849 This occurred when a sub-select contains a join alias reference that
1850 expands into an expression containing another sub-select.
1856 Fix failure to mark cached plans as transient (Tom Lane)
1860 If a plan is prepared while <command>CREATE INDEX CONCURRENTLY</> is
1861 in progress for one of the referenced tables, it is supposed to be
1862 re-planned once the index is ready for use. This was not happening
1869 Reduce PANIC to ERROR in some occasionally-reported btree failure cases,
1870 and provide additional detail in the resulting error messages
1875 This should improve the system's robustness with corrupted indexes.
1881 Prevent show_session_authorization() from crashing within autovacuum
1882 processes (Tom Lane)
1888 Defend against functions returning setof record where not all the
1889 returned rows are actually of the same rowtype (Tom Lane)
1895 Fix possible failure when hashing a pass-by-reference function result
1902 Improve merge join's handling of NULLs in the join columns (Tom Lane)
1906 A merge join can now stop entirely upon reaching the first NULL,
1907 if the sort order is such that NULLs sort high.
1913 Take care to fsync the contents of lockfiles (both
1914 <filename>postmaster.pid</> and the socket lockfile) while writing them
1919 This omission could result in corrupted lockfile contents if the
1920 machine crashes shortly after postmaster start. That could in turn
1921 prevent subsequent attempts to start the postmaster from succeeding,
1922 until the lockfile is manually removed.
1928 Avoid recursion while assigning XIDs to heavily-nested
1929 subtransactions (Andres Freund, Robert Haas)
1933 The original coding could result in a crash if there was limited
1940 Avoid holding open old WAL segments in the walwriter process
1941 (Magnus Hagander, Heikki Linnakangas)
1945 The previous coding would prevent removal of no-longer-needed segments.
1951 Fix <varname>log_line_prefix</>'s <literal>%i</> escape,
1952 which could produce junk early in backend startup (Tom Lane)
1958 Fix possible data corruption in <command>ALTER TABLE ... SET
1959 TABLESPACE</> when archiving is enabled (Jeff Davis)
1965 Allow <command>CREATE DATABASE</> and <command>ALTER DATABASE ... SET
1966 TABLESPACE</> to be interrupted by query-cancel (Guillaume Lelarge)
1972 Fix <command>REASSIGN OWNED</> to handle operator classes and families
1979 Fix possible core dump when comparing two empty <type>tsquery</> values
1986 Fix <literal>LIKE</>'s handling of patterns containing <literal>%</>
1987 followed by <literal>_</> (Tom Lane)
1991 We've fixed this before, but there were still some incorrectly-handled
1998 In PL/Python, defend against null pointer results from
1999 <function>PyCObject_AsVoidPtr</> and <function>PyCObject_FromVoidPtr</>
2006 Make psql recognize <command>DISCARD ALL</> as a command that should
2007 not be encased in a transaction block in autocommit-off mode
2014 Fix <application>ecpg</> to process data from <literal>RETURNING</>
2015 clauses correctly (Michael Meskes)
2021 Improve <filename>contrib/dblink</>'s handling of tables containing
2022 dropped columns (Tom Lane)
2028 Fix connection leak after <quote>duplicate connection name</quote>
2029 errors in <filename>contrib/dblink</> (Itagaki Takahiro)
2035 Fix <filename>contrib/dblink</> to handle connection names longer than
2036 62 bytes correctly (Itagaki Takahiro)
2042 Add <function>hstore(text, text)</>
2043 function to <filename>contrib/hstore</> (Robert Haas)
2047 This function is the recommended substitute for the now-deprecated
2048 <literal>=></> operator. It was back-patched so that future-proofed
2049 code can be used with older server versions. Note that the patch will
2050 be effective only after <filename>contrib/hstore</> is installed or
2051 reinstalled in a particular database. Users might prefer to execute
2052 the <command>CREATE FUNCTION</> command by hand, instead.
2058 Update build infrastructure and documentation to reflect the source code
2059 repository's move from CVS to Git (Magnus Hagander and others)
2065 Update time zone data files to <application>tzdata</> release 2010l
2066 for DST law changes in Egypt and Palestine; also historical corrections
2071 This change also adds new names for two Micronesian timezones:
2072 Pacific/Chuuk is now preferred over Pacific/Truk (and the preferred
2073 abbreviation is CHUT not TRUT) and Pacific/Pohnpei is preferred over
2080 Make Windows' <quote>N. Central Asia Standard Time</> timezone map to
2081 Asia/Novosibirsk, not Asia/Almaty (Magnus Hagander)
2085 Microsoft changed the DST behavior of this zone in the timezone update
2086 from KB976098. Asia/Novosibirsk is a better match to its new behavior.
2095 <sect1 id="release-8-3-11">
2096 <title>Release 8.3.11</title>
2099 <title>Release Date</title>
2100 <simpara>2010-05-17</simpara>
2104 This release contains a variety of fixes from 8.3.10.
2105 For information about new features in the 8.3 major release, see
2106 <xref linkend="release-8-3">.
2110 <title>Migration to Version 8.3.11</title>
2113 A dump/restore is not required for those running 8.3.X.
2114 However, if you are upgrading from a version earlier than 8.3.8,
2115 see the release notes for 8.3.8.
2121 <title>Changes</title>
2127 Enforce restrictions in <literal>plperl</> using an opmask applied to
2128 the whole interpreter, instead of using <filename>Safe.pm</>
2129 (Tim Bunce, Andrew Dunstan)
2133 Recent developments have convinced us that <filename>Safe.pm</> is too
2134 insecure to rely on for making <literal>plperl</> trustable. This
2135 change removes use of <filename>Safe.pm</> altogether, in favor of using
2136 a separate interpreter with an opcode mask that is always applied.
2137 Pleasant side effects of the change include that it is now possible to
2138 use Perl's <literal>strict</> pragma in a natural way in
2139 <literal>plperl</>, and that Perl's <literal>$a</> and <literal>$b</>
2140 variables work as expected in sort routines, and that function
2141 compilation is significantly faster. (CVE-2010-1169)
2147 Prevent PL/Tcl from executing untrustworthy code from
2148 <structname>pltcl_modules</> (Tom)
2152 PL/Tcl's feature for autoloading Tcl code from a database table
2153 could be exploited for trojan-horse attacks, because there was no
2154 restriction on who could create or insert into that table. This change
2155 disables the feature unless <structname>pltcl_modules</> is owned by a
2156 superuser. (However, the permissions on the table are not checked, so
2157 installations that really need a less-than-secure modules table can
2158 still grant suitable privileges to trusted non-superusers.) Also,
2159 prevent loading code into the unrestricted <quote>normal</> Tcl
2160 interpreter unless we are really going to execute a <literal>pltclu</>
2161 function. (CVE-2010-1170)
2167 Fix possible crash if a cache reset message is received during
2168 rebuild of a relcache entry (Heikki)
2172 This error was introduced in 8.3.10 while fixing a related failure.
2178 Apply per-function GUC settings while running the language validator
2179 for the function (Itagaki Takahiro)
2183 This avoids failures if the function's code is invalid without the
2184 setting; an example is that SQL functions may not parse if the
2185 <varname>search_path</> is not correct.
2191 Do not allow an unprivileged user to reset superuser-only parameter
2196 Previously, if an unprivileged user ran <literal>ALTER USER ... RESET
2197 ALL</> for himself, or <literal>ALTER DATABASE ... RESET ALL</> for
2198 a database he owns, this would remove all special parameter settings
2199 for the user or database, even ones that are only supposed to be
2200 changeable by a superuser. Now, the <command>ALTER</> will only
2201 remove the parameters that the user has permission to change.
2207 Avoid possible crash during backend shutdown if shutdown occurs
2208 when a <literal>CONTEXT</> addition would be made to log entries (Tom)
2212 In some cases the context-printing function would fail because the
2213 current transaction had already been rolled back when it came time
2214 to print a log message.
2220 Ensure the archiver process responds to changes in
2221 <varname>archive_command</> as soon as possible (Tom)
2227 Update pl/perl's <filename>ppport.h</> for modern Perl versions
2234 Fix assorted memory leaks in pl/python (Andreas Freund, Tom)
2240 Prevent infinite recursion in <application>psql</> when expanding
2241 a variable that refers to itself (Tom)
2247 Fix <application>psql</>'s <literal>\copy</> to not add spaces around
2248 a dot within <literal>\copy (select ...)</> (Tom)
2252 Addition of spaces around the decimal point in a numeric literal would
2253 result in a syntax error.
2259 Fix unnecessary <quote>GIN indexes do not support whole-index scans</>
2260 errors for unsatisfiable queries using <filename>contrib/intarray</>
2267 Ensure that <filename>contrib/pgstattuple</> functions respond to cancel
2268 interrupts promptly (Tatsuhito Kasahara)
2274 Make server startup deal properly with the case that
2275 <function>shmget()</> returns <literal>EINVAL</> for an existing
2276 shared memory segment (Tom)
2280 This behavior has been observed on BSD-derived kernels including OS X.
2281 It resulted in an entirely-misleading startup failure complaining that
2282 the shared memory request size was too large.
2288 Avoid possible crashes in syslogger process on Windows (Heikki)
2294 Deal more robustly with incomplete time zone information in the
2295 Windows registry (Magnus)
2301 Update the set of known Windows time zone names (Magnus)
2307 Update time zone data files to <application>tzdata</> release 2010j
2308 for DST law changes in Argentina, Australian Antarctic, Bangladesh,
2309 Mexico, Morocco, Pakistan, Palestine, Russia, Syria, Tunisia;
2310 also historical corrections for Taiwan.
2314 Also, add <literal>PKST</> (Pakistan Summer Time) to the default set of
2315 timezone abbreviations.
2324 <sect1 id="release-8-3-10">
2325 <title>Release 8.3.10</title>
2328 <title>Release Date</title>
2329 <simpara>2010-03-15</simpara>
2333 This release contains a variety of fixes from 8.3.9.
2334 For information about new features in the 8.3 major release, see
2335 <xref linkend="release-8-3">.
2339 <title>Migration to Version 8.3.10</title>
2342 A dump/restore is not required for those running 8.3.X.
2343 However, if you are upgrading from a version earlier than 8.3.8,
2344 see the release notes for 8.3.8.
2350 <title>Changes</title>
2356 Add new configuration parameter <varname>ssl_renegotiation_limit</> to
2357 control how often we do session key renegotiation for an SSL connection
2362 This can be set to zero to disable renegotiation completely, which may
2363 be required if a broken SSL library is used. In particular, some
2364 vendors are shipping stopgap patches for CVE-2009-3555 that cause
2365 renegotiation attempts to fail.
2371 Fix possible deadlock during backend startup (Tom)
2377 Fix possible crashes due to not handling errors during relcache reload
2384 Fix possible crash due to use of dangling pointer to a cached plan
2391 Fix possible crashes when trying to recover from a failure in
2392 subtransaction start (Tom)
2398 Fix server memory leak associated with use of savepoints and a client
2399 encoding different from server's encoding (Tom)
2405 Fix incorrect WAL data emitted during end-of-recovery cleanup of a GIST
2406 index page split (Yoichi Hirai)
2410 This would result in index corruption, or even more likely an error
2411 during WAL replay, if we were unlucky enough to crash during
2412 end-of-recovery cleanup after having completed an incomplete GIST
2419 Make <function>substring()</> for <type>bit</> types treat any negative
2420 length as meaning <quote>all the rest of the string</> (Tom)
2424 The previous coding treated only -1 that way, and would produce an
2425 invalid result value for other negative values, possibly leading to
2426 a crash (CVE-2010-0442).
2432 Fix integer-to-bit-string conversions to handle the first fractional
2433 byte correctly when the output bit width is wider than the given
2434 integer by something other than a multiple of 8 bits (Tom)
2440 Fix some cases of pathologically slow regular expression matching (Tom)
2446 Fix assorted crashes in <type>xml</> processing caused by sloppy
2447 memory management (Tom)
2451 This is a back-patch of changes first applied in 8.4. The 8.3 code
2452 was known buggy, but the new code was sufficiently different to not
2453 want to back-patch it until it had gotten some field testing.
2459 Fix bug with trying to update a field of an element of a
2460 composite-type array column (Tom)
2466 Fix the <literal>STOP WAL LOCATION</> entry in backup history files to
2467 report the next WAL segment's name when the end location is exactly at a
2468 segment boundary (Itagaki Takahiro)
2474 Fix some more cases of temporary-file leakage (Heikki)
2478 This corrects a problem introduced in the previous minor release.
2479 One case that failed is when a plpgsql function returning set is
2480 called within another function's exception handler.
2486 Improve constraint exclusion processing of boolean-variable cases,
2487 in particular make it possible to exclude a partition that has a
2488 <quote>bool_column = false</> constraint (Tom)
2494 When reading <filename>pg_hba.conf</> and related files, do not treat
2495 <literal>@something</> as a file inclusion request if the <literal>@</>
2496 appears inside quote marks; also, never treat <literal>@</> by itself
2497 as a file inclusion request (Tom)
2501 This prevents erratic behavior if a role or database name starts with
2502 <literal>@</>. If you need to include a file whose path name
2503 contains spaces, you can still do so, but you must write
2504 <literal>@"/path to/file"</> rather than putting the quotes around
2505 the whole construct.
2511 Prevent infinite loop on some platforms if a directory is named as
2512 an inclusion target in <filename>pg_hba.conf</> and related files
2519 Fix possible infinite loop if <function>SSL_read</> or
2520 <function>SSL_write</> fails without setting <varname>errno</> (Tom)
2524 This is reportedly possible with some Windows versions of
2525 <application>openssl</>.
2531 Disallow <acronym>GSSAPI</> authentication on local connections,
2532 since it requires a hostname to function correctly (Magnus)
2538 Make <application>ecpg</> report the proper SQLSTATE if the connection
2539 disappears (Michael)
2545 Fix <application>psql</>'s <literal>numericlocale</> option to not
2546 format strings it shouldn't in latex and troff output formats (Heikki)
2552 Make <application>psql</> return the correct exit status (3) when
2553 <literal>ON_ERROR_STOP</> and <literal>--single-transaction</> are
2554 both specified and an error occurs during the implied <command>COMMIT</>
2561 Fix plpgsql failure in one case where a composite column is set to NULL
2568 Fix possible failure when calling PL/Perl functions from PL/PerlU
2569 or vice versa (Tim Bunce)
2575 Add <literal>volatile</> markings in PL/Python to avoid possible
2576 compiler-specific misbehavior (Zdenek Kotala)
2582 Ensure PL/Tcl initializes the Tcl interpreter fully (Tom)
2586 The only known symptom of this oversight is that the Tcl
2587 <literal>clock</> command misbehaves if using Tcl 8.5 or later.
2593 Prevent crash in <filename>contrib/dblink</> when too many key
2594 columns are specified to a <function>dblink_build_sql_*</> function
2595 (Rushabh Lathia, Joe Conway)
2601 Allow zero-dimensional arrays in <filename>contrib/ltree</> operations
2606 This case was formerly rejected as an error, but it's more convenient to
2607 treat it the same as a zero-element array. In particular this avoids
2608 unnecessary failures when an <type>ltree</> operation is applied to the
2609 result of <literal>ARRAY(SELECT ...)</> and the sub-select returns no
2616 Fix assorted crashes in <filename>contrib/xml2</> caused by sloppy
2617 memory management (Tom)
2623 Make building of <filename>contrib/xml2</> more robust on Windows
2630 Fix race condition in Windows signal handling (Radu Ilie)
2634 One known symptom of this bug is that rows in <structname>pg_listener</>
2635 could be dropped under heavy load.
2641 Update time zone data files to <application>tzdata</> release 2010e
2642 for DST law changes in Bangladesh, Chile, Fiji, Mexico, Paraguay, Samoa.
2651 <sect1 id="release-8-3-9">
2652 <title>Release 8.3.9</title>
2655 <title>Release Date</title>
2656 <simpara>2009-12-14</simpara>
2660 This release contains a variety of fixes from 8.3.8.
2661 For information about new features in the 8.3 major release, see
2662 <xref linkend="release-8-3">.
2666 <title>Migration to Version 8.3.9</title>
2669 A dump/restore is not required for those running 8.3.X.
2670 However, if you are upgrading from a version earlier than 8.3.8,
2671 see the release notes for 8.3.8.
2677 <title>Changes</title>
2683 Protect against indirect security threats caused by index functions
2684 changing session-local state (Gurjeet Singh, Tom)
2688 This change prevents allegedly-immutable index functions from possibly
2689 subverting a superuser's session (CVE-2009-4136).
2695 Reject SSL certificates containing an embedded null byte in the common
2696 name (CN) field (Magnus)
2700 This prevents unintended matching of a certificate to a server or client
2701 name during SSL validation (CVE-2009-4034).
2707 Fix possible crash during backend-startup-time cache initialization (Tom)
2713 Avoid crash on empty thesaurus dictionary (Tom)
2719 Prevent signals from interrupting <literal>VACUUM</> at unsafe times
2724 This fix prevents a PANIC if a <literal>VACUUM FULL</> is canceled
2725 after it's already committed its tuple movements, as well as transient
2726 errors if a plain <literal>VACUUM</> is interrupted after having
2727 truncated the table.
2733 Fix possible crash due to integer overflow in hash table size
2738 This could occur with extremely large planner estimates for the size of
2739 a hashjoin's result.
2745 Fix very rare crash in <type>inet</>/<type>cidr</> comparisons (Chris
2752 Ensure that shared tuple-level locks held by prepared transactions are
2753 not ignored (Heikki)
2759 Fix premature drop of temporary files used for a cursor that is accessed
2760 within a subtransaction (Heikki)
2766 Fix memory leak in syslogger process when rotating to a new CSV logfile
2773 Fix Windows permission-downgrade logic (Jesse Morris)
2777 This fixes some cases where the database failed to start on Windows,
2778 often with misleading error messages such as <quote>could not locate
2779 matching postgres executable</quote>.
2785 Fix incorrect logic for GiST index page splits, when the split depends
2786 on a non-first column of the index (Paul Ramsey)
2792 Don't error out if recycling or removing an old WAL file fails at the
2793 end of checkpoint (Heikki)
2797 It's better to treat the problem as non-fatal and allow the checkpoint
2798 to complete. Future checkpoints will retry the removal. Such problems
2799 are not expected in normal operation, but have been seen to be
2800 caused by misdesigned Windows anti-virus and backup software.
2806 Ensure WAL files aren't repeatedly archived on Windows (Heikki)
2810 This is another symptom that could happen if some other process
2811 interfered with deletion of a no-longer-needed file.
2817 Fix PAM password processing to be more robust (Tom)
2821 The previous code is known to fail with the combination of the Linux
2822 <literal>pam_krb5</> PAM module with Microsoft Active Directory as the
2823 domain controller. It might have problems elsewhere too, since it was
2824 making unjustified assumptions about what arguments the PAM stack would
2831 Raise the maximum authentication token (Kerberos ticket) size in GSSAPI
2832 and SSPI authentication methods (Ian Turner)
2836 While the old 2000-byte limit was more than enough for Unix Kerberos
2837 implementations, tickets issued by Windows Domain Controllers can be
2844 Re-enable collection of access statistics for sequences (Akira Kurosawa)
2848 This used to work but was broken in 8.3.
2854 Fix processing of ownership dependencies during <literal>CREATE OR
2855 REPLACE FUNCTION</> (Tom)
2861 Fix incorrect handling of <literal>WHERE</>
2862 <replaceable>x</>=<replaceable>x</> conditions (Tom)
2866 In some cases these could get ignored as redundant, but they aren't
2867 — they're equivalent to <replaceable>x</> <literal>IS NOT NULL</>.
2873 Make text search parser accept underscores in XML attributes (Peter)
2879 Fix encoding handling in <type>xml</> binary input (Heikki)
2883 If the XML header doesn't specify an encoding, we now assume UTF-8 by
2884 default; the previous handling was inconsistent.
2890 Fix bug with calling <literal>plperl</> from <literal>plperlu</> or vice
2895 An error exit from the inner function could result in crashes due to
2896 failure to re-select the correct Perl interpreter for the outer function.
2902 Fix session-lifespan memory leak when a PL/Perl function is redefined
2909 Ensure that Perl arrays are properly converted to
2910 <productname>PostgreSQL</> arrays when returned by a set-returning
2911 PL/Perl function (Andrew Dunstan, Abhijit Menon-Sen)
2915 This worked correctly already for non-set-returning functions.
2921 Fix rare crash in exception processing in PL/Python (Peter)
2927 In <filename>contrib/pg_standby</>, disable triggering failover with a
2928 signal on Windows (Fujii Masao)
2932 This never did anything useful, because Windows doesn't have Unix-style
2933 signals, but recent changes made it actually crash.
2939 Ensure <application>psql</>'s flex module is compiled with the correct
2940 system header definitions (Tom)
2944 This fixes build failures on platforms where
2945 <literal>--enable-largefile</> causes incompatible changes in the
2952 Make the postmaster ignore any <literal>application_name</> parameter in
2953 connection request packets, to improve compatibility with future libpq
2960 Update the timezone abbreviation files to match current reality (Joachim
2965 This includes adding <literal>IDT</> and <literal>SGT</> to the default
2966 timezone abbreviation set.
2972 Update time zone data files to <application>tzdata</> release 2009s
2973 for DST law changes in Antarctica, Argentina, Bangladesh, Fiji,
2974 Novokuznetsk, Pakistan, Palestine, Samoa, Syria; also historical
2975 corrections for Hong Kong.
2984 <sect1 id="release-8-3-8">
2985 <title>Release 8.3.8</title>
2988 <title>Release Date</title>
2989 <simpara>2009-09-09</simpara>
2993 This release contains a variety of fixes from 8.3.7.
2994 For information about new features in the 8.3 major release, see
2995 <xref linkend="release-8-3">.
2999 <title>Migration to Version 8.3.8</title>
3002 A dump/restore is not required for those running 8.3.X.
3003 However, if you have any hash indexes on <type>interval</> columns,
3004 you must <command>REINDEX</> them after updating to 8.3.8.
3005 Also, if you are upgrading from a version earlier than 8.3.5,
3006 see the release notes for 8.3.5.
3012 <title>Changes</title>
3018 Fix Windows shared-memory allocation code (Tsutomu Yamada, Magnus)
3022 This bug led to the often-reported <quote>could not reattach
3023 to shared memory</> error message.
3029 Force WAL segment switch during <function>pg_start_backup()</>
3034 This avoids corner cases that could render a base backup unusable.
3040 Disallow <command>RESET ROLE</> and <command>RESET SESSION
3041 AUTHORIZATION</> inside security-definer functions (Tom, Heikki)
3045 This covers a case that was missed in the previous patch that
3046 disallowed <command>SET ROLE</> and <command>SET SESSION
3047 AUTHORIZATION</> inside security-definer functions.
3054 Make <command>LOAD</> of an already-loaded loadable module
3059 Formerly, <command>LOAD</> would attempt to unload and re-load the
3060 module, but this is unsafe and not all that useful.
3066 Disallow empty passwords during LDAP authentication (Magnus)
3072 Fix handling of sub-SELECTs appearing in the arguments of
3073 an outer-level aggregate function (Tom)
3079 Fix bugs associated with fetching a whole-row value from the
3080 output of a Sort or Materialize plan node (Tom)
3086 Prevent <varname>synchronize_seqscans</> from changing the results of
3087 scrollable and <literal>WITH HOLD</> cursors (Tom)
3093 Revert planner change that disabled partial-index and constraint
3094 exclusion optimizations when there were more than 100 clauses in
3095 an AND or OR list (Tom)
3101 Fix hash calculation for data type <type>interval</> (Tom)
3105 This corrects wrong results for hash joins on interval values.
3106 It also changes the contents of hash indexes on interval columns.
3107 If you have any such indexes, you must <command>REINDEX</> them
3114 Treat <function>to_char(..., 'TH')</> as an uppercase ordinal
3115 suffix with <literal>'HH'</>/<literal>'HH12'</> (Heikki)
3119 It was previously handled as <literal>'th'</> (lowercase).
3125 Fix overflow for <literal>INTERVAL '<replaceable>x</> ms'</literal>
3126 when <replaceable>x</> is more than 2 million and integer
3127 datetimes are in use (Alex Hunsaker)
3133 Fix calculation of distance between a point and a line segment (Tom)
3137 This led to incorrect results from a number of geometric operators.
3143 Fix <type>money</> data type to work in locales where currency
3144 amounts have no fractional digits, e.g. Japan (Itagaki Takahiro)
3150 Fix <literal>LIKE</> for case where pattern contains <literal>%_</>
3157 Properly round datetime input like
3158 <literal>00:12:57.9999999999999999999999999999</> (Tom)
3164 Fix memory leaks in XML operations (Tom)
3170 Fix poor choice of page split point in GiST R-tree operator classes
3177 Ensure that a <quote>fast shutdown</> request will forcibly terminate
3178 open sessions, even if a <quote>smart shutdown</> was already in progress
3185 Avoid performance degradation in bulk inserts into GIN indexes
3186 when the input values are (nearly) in sorted order (Tom)
3192 Correctly enforce NOT NULL domain constraints in some contexts in
3199 Fix portability issues in plperl initialization (Andrew Dunstan)
3205 Fix <application>pg_ctl</> to not go into an infinite loop if
3206 <filename>postgresql.conf</> is empty (Jeff Davis)
3212 Improve <application>pg_dump</>'s efficiency when there are
3213 many large objects (Tamas Vincze)
3219 Use <literal>SIGUSR1</>, not <literal>SIGQUIT</>, as the
3220 failover signal for <application>pg_standby</> (Heikki)
3226 Make <application>pg_standby</>'s <literal>maxretries</> option
3227 behave as documented (Fujii Masao)
3233 Make <filename>contrib/hstore</> throw an error when a key or
3234 value is too long to fit in its data structure, rather than
3235 silently truncating it (Andrew Gierth)
3241 Fix <filename>contrib/xml2</>'s <function>xslt_process()</> to
3242 properly handle the maximum number of parameters (twenty) (Tom)
3248 Improve robustness of <application>libpq</>'s code to recover
3249 from errors during <command>COPY FROM STDIN</> (Tom)
3255 Avoid including conflicting readline and editline header files
3256 when both libraries are installed (Zdenek Kotala)
3262 Update time zone data files to <application>tzdata</> release 2009l
3263 for DST law changes in Bangladesh, Egypt, Jordan, Pakistan,
3264 Argentina/San_Luis, Cuba, Jordan (historical correction only),
3265 Mauritius, Morocco, Palestine, Syria, Tunisia.
3274 <sect1 id="release-8-3-7">
3275 <title>Release 8.3.7</title>
3278 <title>Release Date</title>
3279 <simpara>2009-03-16</simpara>
3283 This release contains a variety of fixes from 8.3.6.
3284 For information about new features in the 8.3 major release, see
3285 <xref linkend="release-8-3">.
3289 <title>Migration to Version 8.3.7</title>
3292 A dump/restore is not required for those running 8.3.X.
3293 However, if you are upgrading from a version earlier than 8.3.5,
3294 see the release notes for 8.3.5.
3300 <title>Changes</title>
3306 Prevent error recursion crashes when encoding conversion fails (Tom)
3310 This change extends fixes made in the last two minor releases for
3311 related failure scenarios. The previous fixes were narrowly tailored
3312 for the original problem reports, but we have now recognized that
3313 <emphasis>any</> error thrown by an encoding conversion function could
3314 potentially lead to infinite recursion while trying to report the
3315 error. The solution therefore is to disable translation and encoding
3316 conversion and report the plain-ASCII form of any error message,
3317 if we find we have gotten into a recursive error reporting situation.
3324 Disallow <command>CREATE CONVERSION</> with the wrong encodings
3325 for the specified conversion function (Heikki)
3329 This prevents one possible scenario for encoding conversion failure.
3330 The previous change is a backstop to guard against other kinds of
3331 failures in the same area.
3337 Fix <function>xpath()</> to not modify the path expression unless
3338 necessary, and to make a saner attempt at it when necessary (Andrew)
3342 The SQL standard suggests that <function>xpath</> should work on data
3343 that is a document fragment, but <application>libxml</> doesn't support
3344 that, and indeed it's not clear that this is sensible according to the
3345 XPath standard. <function>xpath</> attempted to work around this
3346 mismatch by modifying both the data and the path expression, but the
3347 modification was buggy and could cause valid searches to fail. Now,
3348 <function>xpath</> checks whether the data is in fact a well-formed
3349 document, and if so invokes <application>libxml</> with no change to the
3350 data or path expression. Otherwise, a different modification method
3351 that is somewhat less likely to fail is used.
3356 The new modification method is still not 100% satisfactory, and it
3357 seems likely that no real solution is possible. This patch should
3358 therefore be viewed as a band-aid to keep from breaking existing
3359 applications unnecessarily. It is likely that
3360 <productname>PostgreSQL</> 8.4 will simply reject use of
3361 <function>xpath</> on data that is not a well-formed document.
3368 Fix core dump when <function>to_char()</> is given format codes that
3369 are inappropriate for the type of the data argument (Tom)
3375 Fix possible failure in text search when C locale is used with
3376 a multi-byte encoding (Teodor)
3380 Crashes were possible on platforms where <type>wchar_t</> is narrower
3381 than <type>int</>; Windows in particular.
3387 Fix extreme inefficiency in text search parser's handling of an
3388 email-like string containing multiple <literal>@</> characters (Heikki)
3394 Fix planner problem with sub-<command>SELECT</> in the output list
3395 of a larger subquery (Tom)
3399 The known symptom of this bug is a <quote>failed to locate grouping
3400 columns</> error that is dependent on the datatype involved;
3401 but there could be other issues as well.
3407 Fix decompilation of <literal>CASE WHEN</> with an implicit coercion
3412 This mistake could lead to Assert failures in an Assert-enabled build,
3413 or an <quote>unexpected CASE WHEN clause</> error message in other
3414 cases, when trying to examine or dump a view.
3420 Fix possible misassignment of the owner of a TOAST table's rowtype (Tom)
3424 If <command>CLUSTER</> or a rewriting variant of <command>ALTER TABLE</>
3425 were executed by someone other than the table owner, the
3426 <structname>pg_type</> entry for the table's TOAST table would end up
3427 marked as owned by that someone. This caused no immediate problems,
3428 since the permissions on the TOAST rowtype aren't examined by any
3429 ordinary database operation. However, it could lead to unexpected
3430 failures if one later tried to drop the role that issued the command
3431 (in 8.1 or 8.2), or <quote>owner of data type appears to be invalid</>
3432 warnings from <application>pg_dump</> after having done so (in 8.3).
3438 Change <command>UNLISTEN</> to exit quickly if the current session has
3439 never executed any <command>LISTEN</> command (Tom)
3443 Most of the time this is not a particularly useful optimization, but
3444 since <command>DISCARD ALL</> invokes <command>UNLISTEN</>, the previous
3445 coding caused a substantial performance problem for applications that
3446 made heavy use of <command>DISCARD ALL</>.
3452 Fix PL/pgSQL to not treat <literal>INTO</> after <command>INSERT</> as
3453 an INTO-variables clause anywhere in the string, not only at the start;
3454 in particular, don't fail for <command>INSERT INTO</> within
3455 <command>CREATE RULE</> (Tom)
3461 Clean up PL/pgSQL error status variables fully at block exit
3462 (Ashesh Vashi and Dave Page)
3466 This is not a problem for PL/pgSQL itself, but the omission could cause
3467 the PL/pgSQL Debugger to crash while examining the state of a function.
3473 Retry failed calls to <function>CallNamedPipe()</> on Windows
3474 (Steve Marshall, Magnus)
3478 It appears that this function can sometimes fail transiently;
3479 we previously treated any failure as a hard error, which could
3480 confuse <command>LISTEN</>/<command>NOTIFY</> as well as other
3487 Add <literal>MUST</> (Mauritius Island Summer Time) to the default list
3488 of known timezone abbreviations (Xavier Bugaud)
3497 <sect1 id="release-8-3-6">
3498 <title>Release 8.3.6</title>
3501 <title>Release Date</title>
3502 <simpara>2009-02-02</simpara>
3506 This release contains a variety of fixes from 8.3.5.
3507 For information about new features in the 8.3 major release, see
3508 <xref linkend="release-8-3">.
3512 <title>Migration to Version 8.3.6</title>
3515 A dump/restore is not required for those running 8.3.X.
3516 However, if you are upgrading from a version earlier than 8.3.5,
3517 see the release notes for 8.3.5.
3523 <title>Changes</title>
3529 Make <command>DISCARD ALL</> release advisory locks, in addition
3530 to everything it already did (Tom)
3534 This was decided to be the most appropriate behavior. This could
3535 affect existing applications, however.
3541 Fix whole-index GiST scans to work correctly (Teodor)
3545 This error could cause rows to be lost if a table is clustered
3552 Fix crash of <literal>xmlconcat(NULL)</> (Peter)
3558 Fix possible crash in <literal>ispell</> dictionary if high-bit-set
3559 characters are used as flags (Teodor)
3563 This is known to be done by one widely available Norwegian dictionary,
3564 and the same condition may exist in others.
3570 Fix misordering of <application>pg_dump</> output for composite types
3575 The most likely problem was for user-defined operator classes to
3576 be dumped after indexes or views that needed them.
3582 Improve handling of URLs in <function>headline()</> function (Teodor)
3588 Improve handling of overlength headlines in <function>headline()</>
3595 Prevent possible Assert failure or misconversion if an encoding
3596 conversion is created with the wrong conversion function for the
3597 specified pair of encodings (Tom, Heikki)
3603 Fix possible Assert failure if a statement executed in PL/pgSQL is
3604 rewritten into another kind of statement, for example if an
3605 <command>INSERT</> is rewritten into an <command>UPDATE</> (Heikki)
3611 Ensure that a snapshot is available to datatype input functions (Tom)
3615 This primarily affects domains that are declared with <literal>CHECK</>
3616 constraints involving user-defined stable or immutable functions. Such
3617 functions typically fail if no snapshot has been set.
3623 Make it safer for SPI-using functions to be used within datatype I/O;
3624 in particular, to be used in domain check constraints (Tom)
3630 Avoid unnecessary locking of small tables in <command>VACUUM</>
3637 Fix a problem that sometimes kept <command>ALTER TABLE ENABLE/DISABLE
3638 RULE</> from being recognized by active sessions (Tom)
3644 Fix a problem that made <literal>UPDATE RETURNING tableoid</>
3645 return zero instead of the correct OID (Tom)
3651 Allow functions declared as taking <type>ANYARRAY</> to work on
3652 the <structname>pg_statistic</> columns of that type (Tom)
3656 This used to work, but was unintentionally broken in 8.3.
3662 Fix planner misestimation of selectivity when transitive equality
3663 is applied to an outer-join clause (Tom)
3667 This could result in bad plans for queries like
3668 <literal>... from a left join b on a.a1 = b.b1 where a.a1 = 42 ...</>
3674 Improve optimizer's handling of long <literal>IN</> lists (Tom)
3678 This change avoids wasting large amounts of time on such lists
3679 when constraint exclusion is enabled.
3685 Prevent synchronous scan during GIN index build (Tom)
3689 Because GIN is optimized for inserting tuples in increasing TID order,
3690 choosing to use a synchronous scan could slow the build by a factor of
3697 Ensure that the contents of a holdable cursor don't depend on the
3698 contents of TOAST tables (Tom)
3702 Previously, large field values in a cursor result might be represented
3703 as TOAST pointers, which would fail if the referenced table got dropped
3704 before the cursor is read, or if the large value is deleted and then
3705 vacuumed away. This cannot happen with an ordinary cursor,
3706 but it could with a cursor that is held past its creating transaction.
3712 Fix memory leak when a set-returning function is terminated without
3713 reading its whole result (Tom)
3719 Fix encoding conversion problems in XML functions when the database
3720 encoding isn't UTF-8 (Tom)
3726 Fix <filename>contrib/dblink</>'s
3727 <function>dblink_get_result(text,bool)</> function (Joe)
3733 Fix possible garbage output from <filename>contrib/sslinfo</> functions
3740 Fix incorrect behavior of <filename>contrib/tsearch2</> compatibility
3741 trigger when it's fired more than once in a command (Teodor)
3747 Fix possible mis-signaling in autovacuum (Heikki)
3753 Support running as a service on Windows 7 beta (Dave and Magnus)
3759 Fix <application>ecpg</>'s handling of varchar structs (Michael)
3765 Fix <application>configure</> script to properly report failure when
3766 unable to obtain linkage information for PL/Perl (Andrew)
3772 Make all documentation reference <literal>pgsql-bugs</> and/or
3773 <literal>pgsql-hackers</> as appropriate, instead of the
3774 now-decommissioned <literal>pgsql-ports</> and <literal>pgsql-patches</>
3781 Update time zone data files to <application>tzdata</> release 2009a (for
3782 Kathmandu and historical DST corrections in Switzerland, Cuba)
3791 <sect1 id="release-8-3-5">
3792 <title>Release 8.3.5</title>
3795 <title>Release Date</title>
3796 <simpara>2008-11-03</simpara>
3800 This release contains a variety of fixes from 8.3.4.
3801 For information about new features in the 8.3 major release, see
3802 <xref linkend="release-8-3">.
3806 <title>Migration to Version 8.3.5</title>
3809 A dump/restore is not required for those running 8.3.X.
3810 However, if you are upgrading from a version earlier than 8.3.1,
3811 see the release notes for 8.3.1. Also, if you were running a previous
3812 8.3.X release, it is recommended to <command>REINDEX</> all GiST
3813 indexes after the upgrade.
3819 <title>Changes</title>
3825 Fix GiST index corruption due to marking the wrong index entry
3826 <quote>dead</> after a deletion (Teodor)
3830 This would result in index searches failing to find rows they
3831 should have found. Corrupted indexes can be fixed with
3832 <command>REINDEX</>.
3838 Fix backend crash when the client encoding cannot represent a localized
3843 We have addressed similar issues before, but it would still fail if
3844 the <quote>character has no equivalent</> message itself couldn't
3845 be converted. The fix is to disable localization and send the plain
3846 ASCII error message when we detect such a situation.
3852 Fix possible crash in <type>bytea</>-to-XML mapping (Michael McMaster)
3858 Fix possible crash when deeply nested functions are invoked from
3865 Improve optimization of <replaceable>expression</> <literal>IN</>
3866 (<replaceable>expression-list</>) queries (Tom, per an idea from Robert
3871 Cases in which there are query variables on the right-hand side had been
3872 handled less efficiently in 8.2.x and 8.3.x than in prior versions.
3873 The fix restores 8.1 behavior for such cases.
3879 Fix mis-expansion of rule queries when a sub-<literal>SELECT</> appears
3880 in a function call in <literal>FROM</>, a multi-row <literal>VALUES</>
3881 list, or a <literal>RETURNING</> list (Tom)
3885 The usual symptom of this problem is an <quote>unrecognized node type</>
3892 Fix Assert failure during rescan of an <literal>IS NULL</>
3893 search of a GiST index (Teodor)
3899 Fix memory leak during rescan of a hashed aggregation plan (Neil)
3905 Ensure an error is reported when a newly-defined PL/pgSQL trigger
3906 function is invoked as a normal function (Tom)
3912 Force a checkpoint before <command>CREATE DATABASE</> starts to copy
3917 This prevents a possible failure if files had recently been deleted
3918 in the source database.
3924 Prevent possible collision of <structfield>relfilenode</> numbers
3925 when moving a table to another tablespace with <command>ALTER SET
3926 TABLESPACE</> (Heikki)
3930 The command tried to re-use the existing filename, instead of
3931 picking one that is known unused in the destination directory.
3937 Fix incorrect text search headline generation when single query
3938 item matches first word of text (Sushant Sinha)
3944 Fix improper display of fractional seconds in interval values when
3945 using a non-ISO datestyle in an <option>--enable-integer-datetimes</>
3952 Make <literal>ILIKE</> compare characters case-insensitively
3953 even when they're escaped (Andrew)
3959 Ensure <command>DISCARD</> is handled properly by statement logging (Tom)
3965 Fix incorrect logging of last-completed-transaction time during
3972 Ensure <function>SPI_getvalue</> and <function>SPI_getbinval</>
3973 behave correctly when the passed tuple and tuple descriptor have
3974 different numbers of columns (Tom)
3978 This situation is normal when a table has had columns added or removed,
3979 but these two functions didn't handle it properly.
3980 The only likely consequence is an incorrect error indication.
3986 Mark <varname>SessionReplicationRole</> as <literal>PGDLLIMPORT</>
3987 so it can be used by <application>Slony</> on Windows (Magnus)
3993 Fix small memory leak when using <application>libpq</>'s
3994 <literal>gsslib</> parameter (Magnus)
3998 The space used by the parameter string was not freed at connection
4005 Ensure <application>libgssapi</> is linked into <application>libpq</>
4006 if needed (Markus Schaaf)
4012 Fix <application>ecpg</>'s parsing of <command>CREATE ROLE</> (Michael)
4018 Fix recent breakage of <literal>pg_ctl restart</> (Tom)
4024 Ensure <filename>pg_control</> is opened in binary mode
4029 <application>pg_controldata</> and <application>pg_resetxlog</>
4030 did this incorrectly, and so could fail on Windows.
4036 Update time zone data files to <application>tzdata</> release 2008i (for
4037 DST law changes in Argentina, Brazil, Mauritius, Syria)
4046 <sect1 id="release-8-3-4">
4047 <title>Release 8.3.4</title>
4050 <title>Release Date</title>
4051 <simpara>2008-09-22</simpara>
4055 This release contains a variety of fixes from 8.3.3.
4056 For information about new features in the 8.3 major release, see
4057 <xref linkend="release-8-3">.
4061 <title>Migration to Version 8.3.4</title>
4064 A dump/restore is not required for those running 8.3.X.
4065 However, if you are upgrading from a version earlier than 8.3.1,
4066 see the release notes for 8.3.1.
4072 <title>Changes</title>
4078 Fix bug in btree WAL recovery code (Heikki)
4082 Recovery failed if the WAL ended partway through a page split operation.
4088 Fix potential use of wrong cutoff XID for HOT page pruning (Alvaro)
4092 This error created a risk of corruption in system
4093 catalogs that are consulted by <command>VACUUM</>: dead tuple versions
4094 might be removed too soon. The impact of this on actual database
4095 operations would be minimal, since the system doesn't follow MVCC
4096 rules while examining catalogs, but it might result in transiently
4097 wrong output from <application>pg_dump</> or other client programs.
4103 Fix potential miscalculation of <structfield>datfrozenxid</> (Alvaro)
4107 This error may explain some recent reports of failure to remove old
4108 <structname>pg_clog</> data.
4114 Fix incorrect HOT updates after <structname>pg_class</> is reindexed
4119 Corruption of <structname>pg_class</> could occur if <literal>REINDEX
4120 TABLE pg_class</> was followed in the same session by an <literal>ALTER
4121 TABLE RENAME</> or <literal>ALTER TABLE SET SCHEMA</> command.
4127 Fix missed <quote>combo cid</> case (Karl Schnaitter)
4131 This error made rows incorrectly invisible to a transaction in which they
4132 had been deleted by multiple subtransactions that all aborted.
4138 Prevent autovacuum from crashing if the table it's currently
4139 checking is deleted at just the wrong time (Alvaro)
4145 Widen local lock counters from 32 to 64 bits (Tom)
4149 This responds to reports that the counters could overflow in
4150 sufficiently long transactions, leading to unexpected <quote>lock is
4151 already held</> errors.
4157 Fix possible duplicate output of tuples during a GiST index scan (Teodor)
4163 Regenerate foreign key checking queries from scratch when either
4164 table is modified (Tom)
4168 Previously, 8.3 would attempt to replan the query, but would work from
4169 previously generated query text. This led to failures if a
4170 table or column was renamed.
4176 Fix missed permissions checks when a view contains a simple
4177 <literal>UNION ALL</> construct (Heikki)
4181 Permissions for the referenced tables were checked properly, but not
4182 permissions for the view itself.
4188 Add checks in executor startup to ensure that the tuples produced by an
4189 <command>INSERT</> or <command>UPDATE</> will match the target table's
4190 current rowtype (Tom)
4194 This situation is believed to be impossible in 8.3, but it can happen in
4195 prior releases, so a check seems prudent.
4201 Fix possible repeated drops during <command>DROP OWNED</> (Tom)
4205 This would typically result in strange errors such as <quote>cache
4206 lookup failed for relation NNN</>.
4212 Fix several memory leaks in XML operations (Kris Jurka, Tom)
4218 Fix <function>xmlserialize()</> to raise error properly for
4219 unacceptable target data type (Tom)
4225 Fix a couple of places that mis-handled multibyte characters in text
4226 search configuration file parsing (Tom)
4230 Certain characters occurring in configuration files would always cause
4231 <quote>invalid byte sequence for encoding</> failures.
4237 Provide file name and line number location for all errors reported
4238 in text search configuration files (Tom)
4244 Fix <literal>AT TIME ZONE</> to first try to interpret its timezone
4245 argument as a timezone abbreviation, and only try it as a full timezone
4246 name if that fails, rather than the other way around as formerly (Tom)
4250 The timestamp input functions have always resolved ambiguous zone names
4251 in this order. Making <literal>AT TIME ZONE</> do so as well improves
4252 consistency, and fixes a compatibility bug introduced in 8.1:
4253 in ambiguous cases we now behave the same as 8.0 and before did,
4254 since in the older versions <literal>AT TIME ZONE</> accepted
4255 <emphasis>only</> abbreviations.
4261 Fix datetime input functions to correctly detect integer overflow when
4262 running on a 64-bit platform (Tom)
4268 Prevent integer overflows during units conversion when displaying a
4269 configuration parameter that has units (Tom)
4275 Improve performance of writing very long log messages to syslog (Tom)
4281 Allow spaces in the suffix part of an LDAP URL in
4282 <filename>pg_hba.conf</> (Tom)
4288 Fix bug in backwards scanning of a cursor on a <literal>SELECT DISTINCT
4295 Fix planner bug that could improperly push down <literal>IS NULL</>
4296 tests below an outer join (Tom)
4300 This was triggered by occurrence of <literal>IS NULL</> tests for
4301 the same relation in all arms of an upper <literal>OR</> clause.
4307 Fix planner bug with nested sub-select expressions (Tom)
4311 If the outer sub-select has no direct dependency on the parent query,
4312 but the inner one does, the outer value might not get recalculated
4313 for new parent query rows.
4319 Fix planner to estimate that <literal>GROUP BY</> expressions yielding
4320 boolean results always result in two groups, regardless of the
4321 expressions' contents (Tom)
4325 This is very substantially more accurate than the regular <literal>GROUP
4326 BY</> estimate for certain boolean tests like <replaceable>col</>
4327 <literal>IS NULL</>.
4333 Fix PL/pgSQL to not fail when a <literal>FOR</> loop's target variable
4334 is a record containing composite-type fields (Tom)
4340 Fix PL/Tcl to behave correctly with Tcl 8.5, and to be more careful
4341 about the encoding of data sent to or from Tcl (Tom)
4347 Improve performance of <function>PQescapeBytea()</> (Rudolf Leitgeb)
4353 On Windows, work around a Microsoft bug by preventing
4354 <application>libpq</> from trying to send more than 64kB per system call
4361 Fix <application>ecpg</> to handle variables properly in <command>SET</>
4368 Improve <application>pg_dump</> and <application>pg_restore</>'s
4369 error reporting after failure to send a SQL command (Tom)
4375 Fix <application>pg_ctl</> to properly preserve postmaster
4376 command-line arguments across a <literal>restart</> (Bruce)
4382 Fix erroneous WAL file cutoff point calculation in
4383 <application>pg_standby</> (Simon)
4389 Update time zone data files to <application>tzdata</> release 2008f (for
4390 DST law changes in Argentina, Bahamas, Brazil, Mauritius, Morocco,
4391 Pakistan, Palestine, and Paraguay)
4400 <sect1 id="release-8-3-3">
4401 <title>Release 8.3.3</title>
4404 <title>Release Date</title>
4405 <simpara>2008-06-12</simpara>
4409 This release contains one serious and one minor bug fix over 8.3.2.
4410 For information about new features in the 8.3 major release, see
4411 <xref linkend="release-8-3">.
4415 <title>Migration to Version 8.3.3</title>
4418 A dump/restore is not required for those running 8.3.X.
4419 However, if you are upgrading from a version earlier than 8.3.1,
4420 see the release notes for 8.3.1.
4426 <title>Changes</title>
4432 Make <function>pg_get_ruledef()</> parenthesize negative constants (Tom)
4436 Before this fix, a negative constant in a view or rule might be dumped
4437 as, say, <literal>-42::integer</>, which is subtly incorrect: it should
4438 be <literal>(-42)::integer</> due to operator precedence rules.
4439 Usually this would make little difference, but it could interact with
4440 another recent patch to cause
4441 <productname>PostgreSQL</> to reject what had been a valid
4442 <command>SELECT DISTINCT</> view query. Since this could result in
4443 <application>pg_dump</> output failing to reload, it is being treated
4444 as a high-priority fix. The only released versions in which dump
4445 output is actually incorrect are 8.3.1 and 8.2.7.
4451 Make <command>ALTER AGGREGATE ... OWNER TO</> update
4452 <structname>pg_shdepend</> (Tom)
4456 This oversight could lead to problems if the aggregate was later
4457 involved in a <command>DROP OWNED</> or <command>REASSIGN OWNED</>
4467 <sect1 id="release-8-3-2">
4468 <title>Release 8.3.2</title>
4471 <title>Release Date</title>
4472 <simpara>never released</simpara>
4476 This release contains a variety of fixes from 8.3.1.
4477 For information about new features in the 8.3 major release, see
4478 <xref linkend="release-8-3">.
4482 <title>Migration to Version 8.3.2</title>
4485 A dump/restore is not required for those running 8.3.X.
4486 However, if you are upgrading from a version earlier than 8.3.1,
4487 see the release notes for 8.3.1.
4493 <title>Changes</title>
4499 Fix <literal>ERRORDATA_STACK_SIZE exceeded</literal> crash that
4500 occurred on Windows when using UTF-8 database encoding and a different
4501 client encoding (Tom)
4507 Fix incorrect archive truncation point calculation for the
4508 <literal>%r</> macro in <varname>recovery_command</> parameters
4513 This could lead to data loss if a warm-standby script relied on
4514 <literal>%r</> to decide when to throw away WAL segment files.
4520 Fix <command>ALTER TABLE ADD COLUMN ... PRIMARY KEY</> so that the new
4521 column is correctly checked to see if it's been initialized to all
4522 non-nulls (Brendan Jurd)
4526 Previous versions neglected to check this requirement at all.
4532 Fix <command>REASSIGN OWNED</> so that it works on procedural
4533 languages too (Alvaro)
4539 Fix problems with <command>SELECT FOR UPDATE/SHARE</> occurring as a
4540 subquery in a query with a non-<command>SELECT</> top-level operation
4547 Fix possible <command>CREATE TABLE</> failure when inheriting the
4548 <quote>same</> constraint from multiple parent relations that
4549 inherited that constraint from a common ancestor (Tom)
4555 Fix <function>pg_get_ruledef()</> to show the alias, if any, attached
4556 to the target table of an <command>UPDATE</> or <command>DELETE</>
4563 Restore the pre-8.3 behavior that an out-of-range block number in a
4564 TID being used in a TidScan plan results in silently not matching any
4569 8.3.0 and 8.3.1 threw an error instead.
4575 Fix GIN bug that could result in a <literal>too many LWLocks
4576 taken</literal> failure (Teodor)
4582 Fix broken GiST comparison function for <type>tsquery</> (Teodor)
4588 Fix <function>tsvector_update_trigger()</> and <function>ts_stat()</>
4589 to accept domains over the types they expect to work with (Tom)
4595 Fix failure to support enum data types as foreign keys (Tom)
4601 Avoid possible crash when decompressing corrupted data
4608 Fix race conditions between delayed unlinks and <command>DROP
4609 DATABASE</> (Heikki)
4613 In the worst case this could result in deleting a newly created table
4614 in a new database that happened to get the same OID as the
4615 recently-dropped one; but of course that is an extremely
4616 low-probability scenario.
4622 Repair two places where SIGTERM exit of a backend could leave corrupted
4623 state in shared memory (Tom)
4627 Neither case is very important if SIGTERM is used to shut down the
4628 whole database cluster together, but there was a problem if someone
4629 tried to SIGTERM individual backends.
4635 Fix possible crash due to incorrect plan generated for an
4636 <literal><replaceable>x</> IN (SELECT <replaceable>y</>
4637 FROM ...)</literal> clause when <replaceable>x</> and <replaceable>y</>
4638 have different data types; and make sure the behavior is semantically
4639 correct when the conversion from <replaceable>y</>'s type to
4640 <replaceable>x</>'s type is lossy (Tom)
4646 Fix oversight that prevented the planner from substituting known Param
4647 values as if they were constants (Tom)
4651 This mistake partially disabled optimization of unnamed
4652 extended-Query statements in 8.3.0 and 8.3.1: in particular the
4653 LIKE-to-indexscan optimization would never be applied if the LIKE
4654 pattern was passed as a parameter, and constraint exclusion
4655 depending on a parameter value didn't work either.
4661 Fix planner failure when an indexable <function>MIN</> or
4662 <function>MAX</> aggregate is used with <literal>DISTINCT</> or
4663 <literal>ORDER BY</> (Tom)
4669 Fix planner to ensure it never uses a <quote>physical tlist</> for a
4670 plan node that is feeding a Sort node (Tom)
4674 This led to the sort having to push around more data than it really
4675 needed to, since unused column values were included in the sorted
4682 Avoid unnecessary copying of query strings (Tom)
4686 This fixes a performance problem introduced in 8.3.0 when a very large
4687 number of commands are submitted as a single query string.
4693 Make <function>TransactionIdIsCurrentTransactionId()</> use binary
4694 search instead of linear search when checking child-transaction XIDs
4699 This fixes some cases in which 8.3.0 was significantly
4700 slower than earlier releases.
4706 Fix conversions between ISO-8859-5 and other encodings to handle
4707 Cyrillic <quote>Yo</> characters (<literal>e</> and <literal>E</> with
4708 two dots) (Sergey Burladyan)
4714 Fix several datatype input functions, notably <function>array_in()</>,
4715 that were allowing unused bytes in their results to contain
4716 uninitialized, unpredictable values (Tom)
4720 This could lead to failures in which two apparently identical literal
4721 values were not seen as equal, resulting in the parser complaining
4722 about unmatched <literal>ORDER BY</> and <literal>DISTINCT</>
4729 Fix a corner case in regular-expression substring matching
4730 (<literal>substring(<replaceable>string</> from
4731 <replaceable>pattern</>)</literal>) (Tom)
4735 The problem occurs when there is a match to the pattern overall but
4736 the user has specified a parenthesized subexpression and that
4737 subexpression hasn't got a match. An example is
4738 <literal>substring('foo' from 'foo(bar)?')</>.
4739 This should return NULL, since <literal>(bar)</> isn't matched, but
4740 it was mistakenly returning the whole-pattern match instead (ie,
4747 Prevent cancellation of an auto-vacuum that was launched to prevent
4748 XID wraparound (Alvaro)
4754 Improve <command>ANALYZE</>'s handling of in-doubt tuples (those
4755 inserted or deleted by a not-yet-committed transaction) so that the
4756 counts it reports to the stats collector are more likely to be correct
4763 Fix <application>initdb</> to reject a relative path for its
4764 <literal>--xlogdir</> (<literal>-X</>) option (Tom)
4770 Make <application>psql</> print tab characters as an appropriate
4771 number of spaces, rather than <literal>\x09</literal> as was done in
4772 8.3.0 and 8.3.1 (Bruce)
4778 Update time zone data files to <application>tzdata</> release 2008c (for
4779 DST law changes in Morocco, Iraq, Choibalsan, Pakistan, Syria, Cuba, and
4786 Add <function>ECPGget_PGconn()</> function to
4787 <application>ecpglib</> (Michael)
4793 Fix incorrect result from <application>ecpg</>'s
4794 <function>PGTYPEStimestamp_sub()</> function (Michael)
4800 Fix handling of continuation line markers in <application>ecpg</>
4807 Fix possible crashes in <filename>contrib/cube</> functions (Tom)
4813 Fix core dump in <filename>contrib/xml2</>'s
4814 <function>xpath_table()</> function when the input query returns a
4821 Fix <filename>contrib/xml2</>'s makefile to not override
4822 <literal>CFLAGS</>, and make it auto-configure properly for
4823 <application>libxslt</> present or not (Tom)
4832 <sect1 id="release-8-3-1">
4833 <title>Release 8.3.1</title>
4836 <title>Release Date</title>
4837 <simpara>2008-03-17</simpara>
4841 This release contains a variety of fixes from 8.3.0.
4842 For information about new features in the 8.3 major release, see
4843 <xref linkend="release-8-3">.
4847 <title>Migration to Version 8.3.1</title>
4850 A dump/restore is not required for those running 8.3.X.
4851 However, you might need to <command>REINDEX</> indexes on textual
4852 columns after updating, if you are affected by the Windows locale
4853 issue described below.
4859 <title>Changes</title>
4865 Fix character string comparison for Windows locales that consider
4866 different character combinations as equal (Tom)
4870 This fix applies only on Windows and only when using UTF-8
4871 database encoding. The same fix was made for all other cases
4872 over two years ago, but Windows with UTF-8 uses a separate code
4873 path that was not updated. If you are using a locale that
4874 considers some non-identical strings as equal, you may need to
4875 <command>REINDEX</> to fix existing indexes on textual columns.
4881 Repair corner-case bugs in <command>VACUUM FULL</> (Tom)
4885 A potential deadlock between concurrent <command>VACUUM FULL</>
4886 operations on different system catalogs was introduced in 8.2.
4887 This has now been corrected. 8.3 made this worse because the
4888 deadlock could occur within a critical code section, making it
4889 a PANIC rather than just ERROR condition.
4893 Also, a <command>VACUUM FULL</> that failed partway through
4894 vacuuming a system catalog could result in cache corruption in
4895 concurrent database sessions.
4899 Another <command>VACUUM FULL</> bug introduced in 8.3 could
4900 result in a crash or out-of-memory report when dealing with
4901 pages containing no live tuples.
4907 Fix misbehavior of foreign key checks involving <type>character</>
4908 or <type>bit</> columns (Tom)
4912 If the referencing column were of a different but compatible type
4913 (for instance <type>varchar</>), the constraint was enforced incorrectly.
4919 Avoid needless deadlock failures in no-op foreign-key checks (Stephan
4926 Fix possible core dump when re-planning a prepared query (Tom)
4930 This bug affected only protocol-level prepare operations, not
4931 SQL <command>PREPARE</>, and so tended to be seen only with
4932 JDBC, DBI, and other client-side drivers that use prepared
4939 Fix possible failure when re-planning a query that calls an SPI-using
4946 Fix failure in row-wise comparisons involving columns of different
4953 Fix longstanding <command>LISTEN</>/<command>NOTIFY</>
4954 race condition (Tom)
4958 In rare cases a session that had just executed a
4959 <command>LISTEN</> might not get a notification, even though
4960 one would be expected because the concurrent transaction executing
4961 <command>NOTIFY</> was observed to commit later.
4965 A side effect of the fix is that a transaction that has executed
4966 a not-yet-committed <command>LISTEN</> command will not see any
4967 row in <structname>pg_listener</> for the <command>LISTEN</>,
4968 should it choose to look; formerly it would have. This behavior
4969 was never documented one way or the other, but it is possible that
4970 some applications depend on the old behavior.
4976 Disallow <command>LISTEN</> and <command>UNLISTEN</> within a
4977 prepared transaction (Tom)
4981 This was formerly allowed but trying to do it had various unpleasant
4982 consequences, notably that the originating backend could not exit
4983 as long as an <command>UNLISTEN</> remained uncommitted.
4989 Disallow dropping a temporary table within a
4990 prepared transaction (Heikki)
4994 This was correctly disallowed by 8.1, but the check was inadvertently
4995 broken in 8.2 and 8.3.
5001 Fix rare crash when an error occurs during a query using a hash index
5008 Fix incorrect comparison of <type>tsquery</> values (Teodor)
5014 Fix incorrect behavior of <literal>LIKE</> with non-ASCII characters
5015 in single-byte encodings (Rolf Jentsch)
5021 Disable <function>xmlvalidate</> (Tom)
5025 This function should have been removed before 8.3 release, but
5026 was inadvertently left in the source code. It poses a small
5027 security risk since unprivileged users could use it to read the
5028 first few characters of any file accessible to the server.
5034 Fix memory leaks in certain usages of set-returning functions (Neil)
5040 Make <function>encode(<replaceable>bytea</>, 'escape')</> convert all
5041 high-bit-set byte values into <literal>\</><replaceable>nnn</> octal
5042 escape sequences (Tom)
5046 This is necessary to avoid encoding problems when the database
5047 encoding is multi-byte. This change could pose compatibility issues
5048 for applications that are expecting specific results from
5049 <function>encode</>.
5055 Fix input of datetime values for February 29 in years BC (Tom)
5059 The former coding was mistaken about which years were leap years.
5065 Fix <quote>unrecognized node type</> error in some variants of
5066 <command>ALTER OWNER</> (Tom)
5072 Avoid tablespace permissions errors in <command>CREATE TABLE LIKE
5073 INCLUDING INDEXES</> (Tom)
5079 Ensure <structname>pg_stat_activity</>.<structfield>waiting</> flag
5080 is cleared when a lock wait is aborted (Tom)
5086 Fix handling of process permissions on Windows Vista (Dave, Magnus)
5090 In particular, this fix allows starting the server as the Administrator
5097 Update time zone data files to <application>tzdata</> release 2008a
5098 (in particular, recent Chile changes); adjust timezone abbreviation
5099 <literal>VET</> (Venezuela) to mean UTC-4:30, not UTC-4:00 (Tom)
5105 Fix <application>ecpg</> problems with arrays (Michael)
5111 Fix <application>pg_ctl</> to correctly extract the postmaster's port
5112 number from command-line options (Itagaki Takahiro, Tom)
5116 Previously, <literal>pg_ctl start -w</> could try to contact the
5117 postmaster on the wrong port, leading to bogus reports of startup
5124 Use <option>-fwrapv</> to defend against possible misoptimization
5125 in recent <application>gcc</> versions (Tom)
5129 This is known to be necessary when building <productname>PostgreSQL</>
5130 with <application>gcc</> 4.3 or later.
5136 Enable building <filename>contrib/uuid-ossp</> with MSVC (Hiroshi Saito)
5145 <sect1 id="release-8-3">
5146 <title>Release 8.3</title>
5149 <title>Release Date</title>
5150 <simpara>2008-02-04</simpara>
5154 <title>Overview</title>
5157 With significant new functionality and performance enhancements,
5158 this release represents a major leap forward for
5159 <productname>PostgreSQL</>. This was made possible by a growing
5160 community that has dramatically accelerated the pace of
5161 development. This release adds the following major features:
5168 Full text search is integrated into the core database system
5174 Support for the SQL/XML standard, including new operators and an
5175 <type>XML</type> data type
5181 Enumerated data types (<type>ENUM</type>)
5187 Arrays of composite types
5193 Universally Unique Identifier (<type>UUID</>) data type
5199 Add control over whether <literal>NULL</>s sort first or last
5211 Server configuration parameters can now be set on a per-function
5218 User-defined types can now have type modifiers
5224 Automatically re-plan cached queries when table
5225 definitions change or statistics are updated
5231 Numerous improvements in logging and statistics collection
5237 Support Security Service Provider Interface (<acronym>SSPI</>) for
5238 authentication on Windows
5244 Support multiple concurrent autovacuum processes, and other
5245 autovacuum improvements
5251 Allow the whole <productname>PostgreSQL</> distribution to be compiled
5252 with <productname>Microsoft Visual C++</>
5259 Major performance improvements are listed below. Most of
5260 these enhancements are automatic and do not require user changes or
5268 Asynchronous commit delays writes to WAL during transaction commit
5274 Checkpoint writes can be spread over a longer time period to smooth
5275 the I/O spike during each checkpoint
5281 Heap-Only Tuples (<acronym>HOT</>) accelerate space reuse for
5282 most <command>UPDATE</>s and <command>DELETE</>s
5288 Just-in-time background writer strategy improves disk write
5295 Using non-persistent transaction IDs for read-only transactions
5296 reduces overhead and <command>VACUUM</> requirements
5302 Per-field and per-row storage overhead has been reduced
5308 Large sequential scans no longer force out frequently used
5315 Concurrent large sequential scans can now share disk reads
5321 <literal>ORDER BY ... LIMIT</> can be done without sorting
5328 The above items are explained in more detail in the sections below.
5334 <title>Migration to Version 8.3</title>
5337 A dump/restore using <application>pg_dump</application> is
5338 required for those wishing to migrate data from any previous
5343 Observe the following incompatibilities:
5347 <title>General</title>
5352 Non-character data types are no longer automatically cast to
5353 <type>TEXT</> (Peter, Tom)
5357 Previously, if a non-character value was supplied to an operator or
5358 function that requires <type>text</> input, it was automatically
5359 cast to <type>text</>, for most (though not all) built-in data types.
5360 This no longer happens: an explicit cast to <type>text</> is now
5361 required for all non-character-string types. For example, these
5362 expressions formerly worked:
5365 substr(current_date, 1, 4)
5369 but will now draw <quote>function does not exist</> and <quote>operator
5370 does not exist</> errors respectively. Use an explicit cast instead:
5373 substr(current_date::text, 1, 4)
5377 (Of course, you can use the more verbose <literal>CAST()</> syntax too.)
5378 The reason for the change is that these automatic casts too often caused
5379 surprising behavior. An example is that in previous releases, this
5380 expression was accepted but did not do what was expected:
5383 current_date < 2017-11-17
5386 This is actually comparing a date to an integer, which should be
5387 (and now is) rejected — but in the presence of automatic
5388 casts both sides were cast to <type>text</> and a textual comparison
5389 was done, because the <literal>text < text</> operator was able
5390 to match the expression when no other <literal><</> operator could.
5394 Types <type>char(<replaceable>n</>)</type> and
5395 <type>varchar(<replaceable>n</>)</type> still cast to <type>text</>
5396 automatically. Also, automatic casting to <type>text</> still works for
5397 inputs to the concatenation (<literal>||</>) operator, so long as least
5398 one input is a character-string type.
5404 Full text search features from <filename>contrib/tsearch2</> have
5405 been moved into the core server, with some minor syntax changes
5409 <filename>contrib/tsearch2</> now contains a compatibility
5416 <literal>ARRAY(SELECT ...)</literal>, where the <command>SELECT</>
5417 returns no rows, now returns an empty array, rather than NULL
5424 The array type name for a base data type is no longer always the base
5425 type's name with an underscore prefix
5429 The old naming convention is still honored when possible, but
5430 application code should no longer depend on it. Instead
5431 use the new <literal>pg_type.typarray</literal> column to
5432 identify the array data type associated with a given type.
5438 <literal>ORDER BY ... USING</> <replaceable>operator</> must now
5439 use a less-than or greater-than <replaceable>operator</> that is
5440 defined in a btree operator class
5444 This restriction was added to prevent inconsistent results.
5450 <command>SET LOCAL</command> changes now persist until
5451 the end of the outermost transaction, unless rolled back (Tom)
5455 Previously <command>SET LOCAL</command>'s effects were lost
5456 after subtransaction commit (<command>RELEASE SAVEPOINT</>
5457 or exit from a PL/pgSQL exception block).
5463 Commands rejected in transaction blocks are now also rejected in
5464 multiple-statement query strings (Tom)
5468 For example, <literal>"BEGIN; DROP DATABASE; COMMIT"</> will now be
5469 rejected even if submitted as a single query message.
5475 <command>ROLLBACK</> outside a transaction block now
5476 issues <literal>NOTICE</> instead of <literal>WARNING</> (Bruce)
5482 Prevent <command>NOTIFY</command>/<command>LISTEN</command>/<command>UNLISTEN</command>
5483 from accepting schema-qualified names (Bruce)
5487 Formerly, these commands accepted <literal>schema.relation</> but
5488 ignored the schema part, which was confusing.
5494 <command>ALTER SEQUENCE</> no longer affects the sequence's
5495 <function>currval()</> state (Tom)
5501 Foreign keys now must match indexable conditions for
5502 cross-data-type references (Tom)
5506 This improves semantic consistency and helps avoid
5507 performance problems.
5513 Restrict object size functions to users who have reasonable
5514 permissions to view such information (Tom)
5518 For example, <function>pg_database_size()</function> now requires
5519 <literal>CONNECT</> permission, which is granted to everyone by
5520 default. <function>pg_tablespace_size()</function> requires
5521 <literal>CREATE</> permission in the tablespace, or is allowed if
5522 the tablespace is the default tablespace for the database.
5528 Remove the undocumented <literal>!!=</> (not in) operator (Tom)
5532 <literal>NOT IN (SELECT ...)</literal> is the proper way to
5533 perform this operation.
5539 Internal hashing functions are now more uniformly-distributed (Tom)
5543 If application code was computing and storing hash values using
5544 internal <productname>PostgreSQL</> hashing functions, the hash
5545 values must be regenerated.
5551 C-code conventions for handling variable-length data values
5552 have changed (Greg Stark, Tom)
5556 The new <function>SET_VARSIZE()</> macro <emphasis>must</> be used
5557 to set the length of generated <type>varlena</> values. Also, it
5558 might be necessary to expand (<quote>de-TOAST</quote>) input values
5565 Continuous archiving no longer reports each successful archive
5566 operation to the server logs unless <literal>DEBUG</> level is used
5576 <title>Configuration Parameters</title>
5582 Numerous changes in administrative server parameters
5586 <varname>bgwriter_lru_percent</>,
5587 <varname>bgwriter_all_percent</>,
5588 <varname>bgwriter_all_maxpages</>,
5589 <varname>stats_start_collector</>, and
5590 <varname>stats_reset_on_server_start</> are removed.
5591 <varname>redirect_stderr</> is renamed to
5592 <varname>logging_collector</>.
5593 <varname>stats_command_string</> is renamed to
5594 <varname>track_activities</>.
5595 <varname>stats_block_level</> and <varname>stats_row_level</>
5596 are merged into <varname>track_counts</>.
5597 A new boolean configuration parameter, <varname>archive_mode</>,
5598 controls archiving. Autovacuum's default settings have changed.
5604 Remove <varname>stats_start_collector</varname> parameter (Tom)
5608 We now always start the collector process, unless <acronym>UDP</>
5609 socket creation fails.
5615 Remove <varname>stats_reset_on_server_start</varname> parameter (Tom)
5619 This was removed because <function>pg_stat_reset()</function>
5620 can be used for this purpose.
5626 Commenting out a parameter in <filename>postgresql.conf</> now
5627 causes it to revert to its default value (Joachim Wieland)
5631 Previously, commenting out an entry left the parameter's value unchanged
5632 until the next server restart.
5642 <title>Character Encodings</title>
5648 Add more checks for invalidly-encoded data (Andrew)
5652 This change plugs some holes that existed in literal backslash
5653 escape string processing and <command>COPY</command> escape
5654 processing. Now the de-escaped string is rechecked to see if the
5655 result created an invalid multi-byte character.
5661 Disallow database encodings that are inconsistent with the server's
5662 locale setting (Tom)
5666 On most platforms, <literal>C</> locale is the only locale that
5667 will work with any database encoding. Other locale settings imply
5668 a specific encoding and will misbehave if the database encoding
5669 is something different. (Typical symptoms include bogus textual
5670 sort order and wrong results from <function>upper()</> or
5671 <function>lower()</>.) The server now rejects attempts to create
5672 databases that have an incompatible encoding.
5678 Ensure that <function>chr()</function> cannot create
5679 invalidly-encoded values (Andrew)
5683 In UTF8-encoded databases the argument of <function>chr()</function> is
5684 now treated as a Unicode code point. In other multi-byte encodings
5685 <function>chr()</function>'s argument must designate a 7-bit ASCII
5686 character. Zero is no longer accepted.
5687 <function>ascii()</function> has been adjusted to match.
5693 Adjust <function>convert()</function> behavior to ensure encoding
5698 The two argument form of <function>convert()</function> has been
5699 removed. The three argument form now takes a <type>bytea</type>
5700 first argument and returns a <type>bytea</type>. To cover the
5701 loss of functionality, three new functions have been added:
5707 <function>convert_from(bytea, name)</function> returns
5708 <type>text</> — converts the first argument from the named
5709 encoding to the database encoding
5715 <function>convert_to(text, name)</function> returns
5716 <type>bytea</> — converts the first argument from the
5717 database encoding to the named encoding
5723 <function>length(bytea, name)</function> returns
5724 <type>integer</> — gives the length of the first
5725 argument in characters in the named encoding
5733 Remove <literal>convert(argument USING conversion_name)</literal>
5738 Its behavior did not match the SQL standard.
5744 Make JOHAB encoding client-only (Tatsuo)
5748 JOHAB is not safe as a server-side encoding.
5759 <title>Changes</title>
5762 Below you will find a detailed account of the
5763 changes between <productname>PostgreSQL</productname> 8.3 and
5764 the previous major release.
5768 <title>Performance</title>
5773 Asynchronous commit delays writes to WAL during transaction commit
5778 This feature dramatically increases performance for short data-modifying
5779 transactions. The disadvantage is that because disk writes are delayed,
5780 if the database or operating system crashes before data is written to
5781 the disk, committed data will be lost. This feature is useful for
5782 applications that can accept some data loss. Unlike turning off
5783 <varname>fsync</varname>, using asynchronous commit does not put
5784 database consistency at risk; the worst case is that after a crash the
5785 last few reportedly-committed transactions might not be committed after
5787 This feature is enabled by turning off <varname>synchronous_commit</>
5788 (which can be done per-session or per-transaction, if some transactions
5789 are critical and others are not).
5790 <varname>wal_writer_delay</> can be adjusted to control the maximum
5791 delay before transactions actually reach disk.
5797 Checkpoint writes can be spread over a longer time period to smooth
5798 the I/O spike during each checkpoint (Itagaki Takahiro and Heikki
5803 Previously all modified buffers were forced to disk as quickly as
5805 checkpoint, causing an I/O spike that decreased server performance.
5806 This new approach spreads out disk writes during checkpoints,
5807 reducing peak I/O usage. (User-requested and shutdown checkpoints
5808 are still written as quickly as possible.)
5814 Heap-Only Tuples (<acronym>HOT</>) accelerate space reuse for most
5815 <command>UPDATE</>s and <command>DELETE</>s (Pavan Deolasee, with
5816 ideas from many others)
5820 <command>UPDATE</>s and <command>DELETE</>s leave dead tuples
5821 behind, as do failed <command>INSERT</>s. Previously only
5822 <command>VACUUM</> could reclaim space taken by dead tuples. With
5823 <acronym>HOT</> dead tuple space can be automatically reclaimed at
5824 the time of <command>INSERT</> or <command>UPDATE</> if no changes
5825 are made to indexed columns. This allows for more consistent
5826 performance. Also, <acronym>HOT</> avoids adding duplicate index
5833 Just-in-time background writer strategy improves disk write
5834 efficiency (Greg Smith, Itagaki Takahiro)
5838 This greatly reduces the need for manual tuning of the background
5845 Per-field and per-row storage overhead have been reduced
5846 (Greg Stark, Heikki Linnakangas)
5850 Variable-length data types with data values less than 128 bytes long
5851 will see a storage decrease of 3 to 6 bytes. For example, two adjacent
5852 <type>char(1)</type> fields now use 4 bytes instead of 16. Row headers
5853 are also 4 bytes shorter than before.
5859 Using non-persistent transaction IDs for read-only transactions
5860 reduces overhead and <command>VACUUM</> requirements (Florian Pflug)
5864 Non-persistent transaction IDs do not increment the global
5865 transaction counter. Therefore, they reduce the load on
5866 <structname>pg_clog</> and increase the time between forced
5867 vacuums to prevent transaction ID wraparound.
5869 improvements were also made that should improve concurrency.
5875 Avoid incrementing the command counter after a read-only command (Tom)
5879 There was formerly a hard limit of 2<superscript>32</>
5880 (4 billion) commands per transaction. Now only commands that
5881 actually changed the database count, so while this limit still
5882 exists, it should be significantly less annoying.
5888 Create a dedicated <acronym>WAL</> writer process to off-load
5889 work from backends (Simon)
5895 Skip unnecessary WAL writes for <command>CLUSTER</command> and
5896 <command>COPY</command> (Simon)
5900 Unless WAL archiving is enabled, the system now avoids WAL writes
5901 for <command>CLUSTER</command> and just <function>fsync()</>s the
5902 table at the end of the command. It also does the same for
5903 <command>COPY</command> if the table was created in the same
5910 Large sequential scans no longer force out frequently used
5911 cached pages (Simon, Heikki, Tom)
5917 Concurrent large sequential scans can now share disk reads (Jeff Davis)
5921 This is accomplished by starting the new sequential scan in the
5922 middle of the table (where another sequential scan is already
5923 in-progress) and wrapping around to the beginning to finish. This
5924 can affect the order of returned rows in a query that does not
5925 specify <literal>ORDER BY</>. The <varname>synchronize_seqscans</>
5926 configuration parameter can be used to disable this if necessary.
5932 <literal>ORDER BY ... LIMIT</> can be done without sorting
5937 This is done by sequentially scanning the table and tracking just
5938 the <quote>top N</> candidate rows, rather than performing a
5939 full sort of the entire table. This is useful when there is no
5940 matching index and the <literal>LIMIT</> is not large.
5946 Put a rate limit on messages sent to the statistics
5947 collector by backends
5952 This reduces overhead for short transactions, but might sometimes
5953 increase the delay before statistics are tallied.
5959 Improve hash join performance for cases with many NULLs (Tom)
5965 Speed up operator lookup for cases with non-exact datatype matches (Tom)
5974 <title>Server</title>
5979 Autovacuum is now enabled by default (Alvaro)
5983 Several changes were made to eliminate disadvantages of having
5984 autovacuum enabled, thereby justifying the change in default.
5985 Several other autovacuum parameter defaults were also modified.
5991 Support multiple concurrent autovacuum processes (Alvaro, Itagaki
5996 This allows multiple vacuums to run concurrently. This prevents
5997 vacuuming of a large table from delaying vacuuming of smaller tables.
6003 Automatically re-plan cached queries when table
6004 definitions change or statistics are updated (Tom)
6008 Previously PL/pgSQL functions that referenced temporary tables
6009 would fail if the temporary table was dropped and recreated
6010 between function invocations, unless <literal>EXECUTE</> was
6011 used. This improvement fixes that problem and many related issues.
6017 Add a <varname>temp_tablespaces</varname> parameter to control
6018 the tablespaces for temporary tables and files (Jaime Casanova,
6019 Albert Cervera, Bernd Helmle)
6023 This parameter defines a list of tablespaces to be used. This
6024 enables spreading the I/O load across multiple tablespaces. A random
6025 tablespace is chosen each time a temporary object is created.
6026 Temporary files are no longer stored in per-database
6027 <filename>pgsql_tmp/</filename> directories but in per-tablespace
6034 Place temporary tables' TOAST tables in special schemas named
6035 <literal>pg_toast_temp_<replaceable>nnn</></literal> (Tom)
6039 This allows low-level code to recognize these tables as temporary,
6040 which enables various optimizations such as not WAL-logging changes
6041 and using local rather than shared buffers for access. This also
6042 fixes a bug wherein backends unexpectedly held open file references
6043 to temporary TOAST tables.
6049 Fix problem that a constant flow of new connection requests could
6050 indefinitely delay the postmaster from completing a shutdown or
6051 a crash restart (Tom)
6057 Guard against a very-low-probability data loss scenario by preventing
6058 re-use of a deleted table's relfilenode until after the next
6065 Fix <command>CREATE CONSTRAINT TRIGGER</>
6066 to convert old-style foreign key trigger definitions into regular
6067 foreign key constraints (Tom)
6071 This will ease porting of foreign key constraints carried forward from
6072 pre-7.3 databases, if they were never converted using
6073 <filename>contrib/adddepend</>.
6079 Fix <literal>DEFAULT NULL</> to override inherited defaults (Tom)
6083 <literal>DEFAULT NULL</> was formerly considered a noise phrase, but it
6084 should (and now does) override non-null defaults that would otherwise
6085 be inherited from a parent table or domain.
6091 Add new encodings EUC_JIS_2004 and SHIFT_JIS_2004 (Tatsuo)
6095 These new encodings can be converted to and from UTF-8.
6101 Change server startup log message from <quote>database system is
6102 ready</quote> to <quote>database system is ready to accept
6103 connections</quote>, and adjust its timing
6107 The message now appears only when the postmaster is really ready
6108 to accept connections.
6117 <title>Monitoring</title>
6122 Add <varname>log_autovacuum_min_duration</varname> parameter to
6123 support configurable logging of autovacuum activity (Simon, Alvaro)
6129 Add <varname>log_lock_waits</varname> parameter to log lock waiting
6136 Add <varname>log_temp_files</varname> parameter to log temporary
6137 file usage (Bill Moran)
6143 Add <varname>log_checkpoints</varname> parameter to improve logging
6144 of checkpoints (Greg Smith, Heikki)
6150 <varname>log_line_prefix</varname> now supports
6151 <literal>%s</literal> and <literal>%c</literal> escapes in all
6156 Previously these escapes worked only for user sessions, not for
6157 background database processes.
6163 Add <varname>log_restartpoints</varname> to control logging of
6164 point-in-time recovery restart points (Simon)
6170 Last transaction end time is now logged at end of recovery and at
6171 each logged restart point (Simon)
6177 Autovacuum now reports its activity start time in
6178 <literal>pg_stat_activity</literal> (Tom)
6184 Allow server log output in comma-separated value (CSV) format (Arul
6185 Shaji, Greg Smith, Andrew Dunstan)
6189 CSV-format log files can easily be loaded into a database table for
6190 subsequent analysis.
6196 Use PostgreSQL-supplied timezone support for formatting timestamps
6197 displayed in the server log (Tom)
6201 This avoids Windows-specific problems with localized time zone
6202 names that are in the wrong encoding. There is a new
6203 <varname>log_timezone</> parameter that controls the timezone
6204 used in log messages, independently of the client-visible
6205 <varname>timezone</> parameter.
6211 New system view <literal>pg_stat_bgwriter</literal> displays
6212 statistics about background writer activity (Magnus)
6218 Add new columns for database-wide tuple statistics to
6219 <literal>pg_stat_database</literal> (Magnus)
6225 Add an <literal>xact_start</literal> (transaction start time) column to
6226 <literal>pg_stat_activity</literal> (Neil)
6230 This makes it easier to identify long-running transactions.
6236 Add <literal>n_live_tuples</> and <literal>n_dead_tuples</> columns
6237 to <literal>pg_stat_all_tables</literal> and related views (Glen
6244 Merge <varname>stats_block_level</> and <varname>stats_row_level</>
6245 parameters into a single parameter <varname>track_counts</>, which
6246 controls all messages sent to the statistics collector process
6253 Rename <varname>stats_command_string</varname> parameter to
6254 <varname>track_activities</varname> (Tom)
6260 Fix statistical counting of live and dead tuples to recognize that
6261 committed and aborted transactions have different effects (Tom)
6270 <title>Authentication</title>
6275 Support Security Service Provider Interface (<acronym>SSPI</>) for
6276 authentication on Windows (Magnus)
6282 Support GSSAPI authentication (Henry Hotz, Magnus)
6286 This should be preferred to native Kerberos authentication because
6287 GSSAPI is an industry standard.
6293 Support a global SSL configuration file (Victor Wagner)
6299 Add <varname>ssl_ciphers</> parameter to control accepted SSL ciphers
6306 Add a Kerberos realm parameter, <varname>krb_realm</> (Magnus)
6315 <title>Write-Ahead Log (<acronym>WAL</>) and Continuous Archiving</title>
6320 Change the timestamps recorded in transaction WAL records from
6321 time_t to TimestampTz representation (Tom)
6325 This provides sub-second resolution in WAL, which can be useful for
6326 point-in-time recovery.
6332 Reduce WAL disk space needed by warm standby servers (Simon)
6336 This change allows a warm standby server to pass the name of the earliest
6337 still-needed WAL file to the recovery script, allowing automatic removal
6338 of no-longer-needed WAL files. This is done using <literal>%r</> in
6339 the <varname>restore_command</varname> parameter of
6340 <filename>recovery.conf</filename>.
6346 New boolean configuration parameter, <varname>archive_mode</>,
6347 controls archiving (Simon)
6351 Previously setting <varname>archive_command</> to an empty string
6352 turned off archiving. Now <varname>archive_mode</> turns archiving
6353 on and off, independently of <varname>archive_command</>. This is
6354 useful for stopping archiving temporarily.
6363 <title>Queries</title>
6368 Full text search is integrated into the core database
6369 system (Teodor, Oleg)
6373 Text search has been improved, moved into the core code, and is now
6374 installed by default. <filename>contrib/tsearch2</> now contains
6375 a compatibility interface.
6381 Add control over whether <literal>NULL</>s sort first or last (Teodor, Tom)
6385 The syntax is <literal>ORDER BY ... NULLS FIRST/LAST</>.
6391 Allow per-column ascending/descending (<literal>ASC</>/<literal>DESC</>)
6392 ordering options for indexes (Teodor, Tom)
6396 Previously a query using <literal>ORDER BY</> with mixed
6397 <literal>ASC</>/<literal>DESC</> specifiers could not fully use
6398 an index. Now an index can be fully used in such cases if the
6399 index was created with matching
6400 <literal>ASC</>/<literal>DESC</> specifications.
6401 <literal>NULL</> sort order within an index can be controlled, too.
6407 Allow <literal>col IS NULL</> to use an index (Teodor)
6413 Updatable cursors (Arul Shaji, Tom)
6417 This eliminates the need to reference a primary key to
6418 <command>UPDATE</> or <command>DELETE</> rows returned by a cursor.
6419 The syntax is <literal>UPDATE/DELETE WHERE CURRENT OF</>.
6425 Allow <literal>FOR UPDATE</literal> in cursors (Arul Shaji, Tom)
6431 Create a general mechanism that supports casts to and from the
6432 standard string types (<type>TEXT</type>, <type>VARCHAR</type>,
6433 <type>CHAR</type>) for <emphasis>every</emphasis> datatype, by
6434 invoking the datatype's I/O functions (Tom)
6438 Previously, such casts were available only for types that had
6439 specialized function(s) for the purpose.
6440 These new casts are assignment-only in the to-string direction,
6441 explicit-only in the other direction, and therefore should create no
6442 surprising behavior.
6448 Allow <literal>UNION</> and related constructs to return a domain
6449 type, when all inputs are of that domain type (Tom)
6453 Formerly, the output would be considered to be of the domain's base
6460 Allow limited hashing when using two different data types (Tom)
6464 This allows hash joins, hash indexes, hashed subplans, and hash
6465 aggregation to be used in situations involving cross-data-type
6466 comparisons, if the data types have compatible hash functions.
6467 Currently, cross-data-type hashing support exists for
6468 <type>smallint</type>/<type>integer</type>/<type>bigint</type>,
6469 and for <type>float4</type>/<type>float8</type>.
6475 Improve optimizer logic for detecting when variables are equal
6476 in a <literal>WHERE</> clause (Tom)
6480 This allows mergejoins to work with descending sort orders, and
6481 improves recognition of redundant sort columns.
6487 Improve performance when planning large inheritance trees in
6488 cases where most tables are excluded by constraints (Tom)
6497 <title>Object Manipulation</title>
6503 Arrays of composite types (David Fetter, Andrew, Tom)
6507 In addition to arrays of explicitly-declared composite types,
6508 arrays of the rowtypes of regular tables and views are now
6509 supported, except for rowtypes of system catalogs, sequences, and TOAST
6517 Server configuration parameters can now be set on a per-function
6522 For example, functions can now set their own
6523 <varname>search_path</> to prevent unexpected behavior if a
6524 different <varname>search_path</> exists at run-time. Security
6525 definer functions should set <varname>search_path</varname> to
6526 avoid security loopholes.
6532 <command>CREATE/ALTER FUNCTION</command> now supports
6533 <literal>COST</literal> and <literal>ROWS</literal> options (Tom)
6537 <literal>COST</literal> allows specification of the cost of a
6538 function call. <literal>ROWS</literal> allows specification of
6539 the average number or rows returned by a set-returning function.
6540 These values are used by the optimizer in choosing the best plan.
6546 Implement <command>CREATE TABLE LIKE ... INCLUDING
6547 INDEXES</command> (Trevor Hardcastle, Nikhil Sontakke, Neil)
6553 Allow <command>CREATE INDEX CONCURRENTLY</command> to ignore
6554 transactions in other databases (Simon)
6560 Add <command>ALTER VIEW ... RENAME TO</command> and <command>ALTER
6561 SEQUENCE ... RENAME TO</command> (David Fetter, Neil)
6565 Previously this could only be done via <command>ALTER TABLE ...
6566 RENAME TO</command>.
6572 Make <command>CREATE/DROP/RENAME DATABASE</> wait briefly for
6573 conflicting backends to exit before failing (Tom)
6577 This increases the likelihood that these commands will succeed.
6583 Allow triggers and rules to be deactivated in groups using a
6584 configuration parameter, for replication purposes (Jan)
6588 This allows replication systems to disable triggers and rewrite
6589 rules as a group without modifying the system catalogs directly.
6590 The behavior is controlled by <command>ALTER TABLE</> and a new
6591 parameter <varname>session_replication_role</varname>.
6597 User-defined types can now have type modifiers (Teodor, Tom)
6601 This allows a user-defined type to take a modifier, like
6602 <type>ssnum(7)</>. Previously only built-in
6603 data types could have modifiers.
6612 <title>Utility Commands</title>
6617 Non-superuser database owners now are able to add trusted procedural
6618 languages to their databases by default (Jeremy Drake)
6622 While this is reasonably safe, some administrators might wish to
6623 revoke the privilege. It is controlled by
6624 <structname>pg_pltemplate</>.<structfield>tmpldbacreate</>.
6630 Allow a session's current parameter setting to be used as the
6631 default for future sessions (Tom)
6635 This is done with <literal>SET ... FROM CURRENT</literal> in
6636 <command>CREATE/ALTER FUNCTION</command>, <command>ALTER
6637 DATABASE</command>, or <command>ALTER ROLE</command>.
6643 Implement new commands <command>DISCARD ALL</command>,
6644 <command>DISCARD PLANS</command>, <command>DISCARD
6645 TEMPORARY</command>, <command>CLOSE ALL</command>, and
6646 <command>DEALLOCATE ALL</command> (Marko Kreen, Neil)
6650 These commands simplify resetting a database session to its initial
6651 state, and are particularly useful for connection-pooling software.
6657 Make <command>CLUSTER</command> MVCC-safe (Heikki Linnakangas)
6661 Formerly, <command>CLUSTER</command> would discard all tuples
6662 that were committed dead, even if there were still transactions
6663 that should be able to see them under MVCC visibility rules.
6669 Add new <command>CLUSTER</command> syntax: <literal>CLUSTER
6670 <replaceable>table</> USING <replaceable>index</></literal>
6675 The old <command>CLUSTER</command> syntax is still supported, but
6676 the new form is considered more logical.
6682 Fix <command>EXPLAIN</command> so it can show complex plans
6683 more accurately (Tom)
6687 References to subplan outputs are now always shown correctly,
6688 instead of using <literal>?column<replaceable>N</>?</literal>
6689 for complicated cases.
6695 Limit the amount of information reported when a user is dropped
6700 Previously, dropping (or attempting to drop) a user who owned many
6701 objects could result in large <literal>NOTICE</literal> or
6702 <literal>ERROR</literal> messages listing all these objects; this
6703 caused problems for some client applications. The length of the
6704 message is now limited, although a full list is still sent to the
6714 <title>Data Types</title>
6719 Support for the SQL/XML standard, including new operators and an
6720 <type>XML</type> data type (Nikolay Samokhvalov, Pavel Stehule, Peter)
6726 Enumerated data types (<type>ENUM</type>) (Tom Dunstan)
6730 This feature provides convenient support for fields that have a
6731 small, fixed set of allowed values. An example of creating an
6732 <literal>ENUM</> type is
6733 <literal>CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy')</>.
6739 Universally Unique Identifier (<type>UUID</>) data type (Gevik
6744 This closely matches <acronym>RFC</> 4122.
6750 Widen the <type>MONEY</type> data type to 64 bits (D'Arcy Cain)
6754 This greatly increases the range of supported <type>MONEY</>
6761 Fix <type>float4</type>/<type>float8</type> to handle
6762 <literal>Infinity</> and <literal>NAN</> (Not A Number)
6763 consistently (Bruce)
6767 The code formerly was not consistent about distinguishing
6768 <literal>Infinity</> from overflow conditions.
6774 Allow leading and trailing whitespace during input of
6775 <type>boolean</type> values (Neil)
6781 Prevent <command>COPY</> from using digits and lowercase letters as
6791 <title>Functions</title>
6796 Add new regular expression functions
6797 <function>regexp_matches()</function>,
6798 <function>regexp_split_to_array()</function>, and
6799 <function>regexp_split_to_table()</function> (Jeremy Drake, Neil)
6803 These functions provide extraction of regular expression
6804 subexpressions and allow splitting a string using a POSIX regular
6811 Add <function>lo_truncate()</function> for large object truncation
6818 Implement <function>width_bucket()</function> for the <type>float8</>
6825 Add <function>pg_stat_clear_snapshot()</function> to discard
6826 statistics snapshots collected during the current transaction
6831 The first request for statistics in a transaction takes a statistics
6832 snapshot that does not change during the transaction. This function
6833 allows the snapshot to be discarded and a new snapshot loaded during
6834 the next statistics query. This is particularly useful for PL/pgSQL
6835 functions, which are confined to a single transaction.
6841 Add <literal>isodow</> option to <function>EXTRACT()</> and
6842 <function>date_part()</> (Bruce)
6846 This returns the day of the week, with Sunday as seven.
6847 (<literal>dow</> returns Sunday as zero.)
6853 Add <literal>ID</> (ISO day of week) and <literal>IDDD</> (ISO
6854 day of year) format codes for <function>to_char()</>,
6855 <function>to_date()</>, and <function>to_timestamp()</> (Brendan
6862 Make <function>to_timestamp()</> and <function>to_date()</>
6863 assume <literal>TM</literal> (trim) option for potentially
6864 variable-width fields (Bruce)
6868 This matches <productname>Oracle</>'s behavior.
6874 Fix off-by-one conversion error in
6875 <function>to_date()</function>/<function>to_timestamp()</function>
6876 <literal>D</> (non-ISO day of week) fields (Bruce)
6882 Make <function>setseed()</function> return void, rather than a
6883 useless integer value (Neil)
6889 Add a hash function for <type>NUMERIC</type> (Neil)
6893 This allows hash indexes and hash-based plans to be used with
6894 <type>NUMERIC</type> columns.
6900 Improve efficiency of
6901 <literal>LIKE</literal>/<literal>ILIKE</literal>, especially for
6902 multi-byte character sets like UTF-8 (Andrew, Itagaki Takahiro)
6908 Make <function>currtid()</function> functions require
6909 <literal>SELECT</literal> privileges on the target table (Tom)
6915 Add several <function>txid_*()</function> functions to query
6916 active transaction IDs (Jan)
6920 This is useful for various replication solutions.
6929 <title>PL/pgSQL Server-Side Language</title>
6934 Add scrollable cursor support, including directional control in
6935 <command>FETCH</command> (Pavel Stehule)
6941 Allow <literal>IN</literal> as an alternative to
6942 <literal>FROM</literal> in PL/pgSQL's <command>FETCH</command>
6943 statement, for consistency with the backend's
6944 <command>FETCH</command> command (Pavel Stehule)
6950 Add <command>MOVE</command> to PL/pgSQL (Magnus, Pavel Stehule,
6957 Implement <command>RETURN QUERY</command> (Pavel Stehule, Neil)
6961 This adds convenient syntax for PL/pgSQL set-returning functions
6962 that want to return the result of a query. <command>RETURN QUERY</>
6963 is easier and more efficient than a loop
6964 around <command>RETURN NEXT</command>.
6970 Allow function parameter names to be qualified with the
6971 function's name (Tom)
6975 For example, <literal>myfunc.myvar</>. This is particularly
6976 useful for specifying variables in a query where the variable
6977 name might match a column name.
6983 Make qualification of variables with block labels work properly (Tom)
6987 Formerly, outer-level block labels could unexpectedly interfere with
6988 recognition of inner-level record or row references.
6994 Tighten requirements for <literal>FOR</literal> loop
6995 <literal>STEP</> values (Tom)
6999 Prevent non-positive <literal>STEP</> values, and handle
7006 Improve accuracy when reporting syntax error locations (Tom)
7015 <title>Other Server-Side Languages</title>
7020 Allow type-name arguments to PL/Perl
7021 <function>spi_prepare()</function> to be data type aliases in
7022 addition to names found in <literal>pg_type</literal> (Andrew)
7028 Allow type-name arguments to PL/Python
7029 <function>plpy.prepare()</function> to be data type aliases in
7030 addition to names found in <literal>pg_type</literal> (Andrew)
7036 Allow type-name arguments to PL/Tcl <function>spi_prepare</> to
7037 be data type aliases in addition to names found in
7038 <literal>pg_type</literal> (Andrew)
7044 Enable PL/PythonU to compile on Python 2.5 (Marko Kreen)
7050 Support a true PL/Python boolean type in compatible Python versions
7051 (Python 2.3 and later) (Marko Kreen)
7057 Fix PL/Tcl problems with thread-enabled <filename>libtcl</> spawning
7058 multiple threads within the backend (Steve Marshall, Paul Bayer,
7063 This caused all sorts of unpleasantness.
7072 <title><link linkend="APP-PSQL"><application>psql</></link></title>
7077 List disabled triggers separately in <literal>\d</literal> output
7084 In <literal>\d</literal> patterns, always match <literal>$</literal>
7091 Show aggregate return types in <literal>\da</literal> output
7092 (Greg Sabino Mullane)
7098 Add the function's volatility status to the output of
7099 <literal>\df+</literal> (Neil)
7105 Add <literal>\prompt</literal> capability (Chad Wagner)
7111 Allow <literal>\pset</literal>, <literal>\t</literal>, and
7112 <literal>\x</literal> to specify <literal>on</> or <literal>off</>,
7113 rather than just toggling (Chad Wagner)
7119 Add <literal>\sleep</> capability (Jan)
7125 Enable <literal>\timing</> output for <literal>\copy</> (Andrew)
7131 Improve <literal>\timing</literal> resolution on Windows
7138 Flush <literal>\o</> output after each backslash command (Tom)
7144 Correctly detect and report errors while reading a <literal>-f</>
7151 Remove <literal>-u</> option (this option has long been deprecated)
7161 <title><link linkend="APP-PGDUMP"><application>pg_dump</></link></title>
7166 Add <literal>--tablespaces-only</> and <literal>--roles-only</>
7167 options to <application>pg_dumpall</application> (Dave Page)
7173 Add an output file option to
7174 <application>pg_dumpall</application> (Dave Page)
7178 This is primarily useful on Windows, where output redirection of
7179 child <application>pg_dump</application> processes does not work.
7185 Allow <application>pg_dumpall</> to accept an initial-connection
7186 database name rather than the default
7187 <literal>template1</literal> (Dave Page)
7193 In <literal>-n</> and <literal>-t</> switches, always match
7194 <literal>$</literal> literally (Tom)
7200 Improve performance when a database has thousands of objects (Tom)
7206 Remove <literal>-u</> option (this option has long been deprecated)
7216 <title>Other Client Applications</title>
7221 In <application>initdb</>, allow the location of the
7222 <filename>pg_xlog</filename> directory to be specified
7223 (Euler Taveira de Oliveira)
7229 Enable server core dump generation in <application>pg_regress</>
7230 on supported operating systems (Andrew)
7236 Add a <literal>-t</> (timeout) parameter to <application>pg_ctl</>
7241 This controls how long <application>pg_ctl</> will wait when waiting
7242 for server startup or shutdown. Formerly the timeout was hard-wired
7249 Add a <application>pg_ctl</> option to control generation
7250 of server core dumps (Andrew)
7256 Allow Control-C to cancel <application>clusterdb</>,
7257 <application>reindexdb</>, and <application>vacuumdb</> (Itagaki
7264 Suppress command tag output for <application>createdb</>,
7265 <application>createuser</>, <application>dropdb</>, and
7266 <application>dropuser</> (Peter)
7270 The <literal>--quiet</> option is ignored and will be removed in 8.4.
7271 Progress messages when acting on all databases now go to stdout
7272 instead of stderr because they are not actually errors.
7281 <title><link linkend="libpq"><application>libpq</></link></title>
7286 Interpret the <literal>dbName</> parameter of
7287 <function>PQsetdbLogin()</> as a <literal>conninfo</> string if
7288 it contains an equals sign (Andrew)
7292 This allows use of <literal>conninfo</> strings in client
7293 programs that still use <literal>PQsetdbLogin()</>.
7299 Support a global <acronym>SSL</> configuration file (Victor
7306 Add environment variable <varname>PGSSLKEY</> to control
7307 <acronym>SSL</> hardware keys (Victor Wagner)
7313 Add <function>lo_truncate()</function> for large object
7314 truncation (Kris Jurka)
7320 Add <function>PQconnectionNeedsPassword()</function> that returns
7321 true if the server required a password but none was supplied
7326 If this returns true after a failed connection attempt, a client
7327 application should prompt the user for a password. In the past
7328 applications have had to check for a specific error message string to
7329 decide whether a password is needed; that approach is now
7336 Add <function>PQconnectionUsedPassword()</function> that returns
7337 true if the supplied password was actually used
7342 This is useful in some security contexts where it is important
7343 to know whether a user-supplied password is actually valid.
7352 <title><link linkend="ecpg"><application>ecpg</></link></title>
7357 Use V3 frontend/backend protocol (Michael)
7361 This adds support for server-side prepared statements.
7367 Use native threads, instead of pthreads, on Windows (Magnus)
7373 Improve thread-safety of ecpglib (Itagaki Takahiro)
7379 Make the ecpg libraries export only necessary API symbols (Michael)
7388 <title><application>Windows</> Port</title>
7393 Allow the whole <productname>PostgreSQL</> distribution to be compiled
7394 with <productname>Microsoft Visual C++</> (Magnus and others)
7398 This allows Windows-based developers to use familiar development
7399 and debugging tools.
7400 Windows executables made with Visual C++ might also have better
7401 stability and performance than those made with other tool sets.
7402 The client-only Visual C++ build scripts have been removed.
7408 Drastically reduce postmaster's memory usage when it has many child
7415 Allow regression tests to be started by an administrative
7422 Add native shared memory implementation (Magnus)
7431 <title>Server Programming Interface (<acronym>SPI</>)</title>
7436 Add cursor-related functionality in SPI (Pavel Stehule)
7440 Allow access to the cursor-related planning options, and add
7441 <command>FETCH</>/<command>MOVE</> routines.
7447 Allow execution of cursor commands through
7448 <function>SPI_execute</function> (Tom)
7452 The macro <literal>SPI_ERROR_CURSOR</> still exists but will
7459 SPI plan pointers are now declared as <literal>SPIPlanPtr</> instead of
7460 <literal>void *</> (Tom)
7464 This does not break application code, but switching is
7465 recommended to help catch simple programming mistakes.
7474 <title>Build Options</title>
7479 Add <application>configure</> option <literal>--enable-profiling</>
7480 to enable code profiling (works only with <application>gcc</>)
7481 (Korry Douglas and Nikhil Sontakke)
7487 Add <application>configure</> option <literal>--with-system-tzdata</>
7488 to use the operating system's time zone database (Peter)
7494 Fix <acronym>PGXS</> so extensions can be built against PostgreSQL
7495 installations whose <application>pg_config</> program does not
7496 appear first in the <varname>PATH</> (Tom)
7502 Support <command>gmake draft</command> when building the
7503 <acronym>SGML</> documentation (Bruce)
7507 Unless <literal>draft</> is used, the documentation build will
7508 now be repeated if necessary to ensure the index is up-to-date.
7517 <title>Source Code</title>
7522 Rename macro <literal>DLLIMPORT</> to <literal>PGDLLIMPORT</> to
7523 avoid conflicting with third party includes (like Tcl) that
7524 define <literal>DLLIMPORT</> (Magnus)
7530 Create <quote>operator families</quote> to improve planning of
7531 queries involving cross-data-type comparisons (Tom)
7537 Update GIN <function>extractQuery()</> API to allow signalling
7538 that nothing can satisfy the query (Teodor)
7544 Move <literal>NAMEDATALEN</> definition from
7545 <filename>postgres_ext.h</> to <filename>pg_config_manual.h</>
7552 Provide <function>strlcpy()</function> and
7553 <function>strlcat()</function> on all platforms, and replace
7554 error-prone uses of <function>strncpy()</function>,
7555 <function>strncat()</function>, etc (Peter)
7561 Create hooks to let an external plugin monitor (or even replace) the
7562 planner and create plans for hypothetical situations (Gurjeet
7569 Create a function variable <literal>join_search_hook</> to let plugins
7570 override the join search order portion of the planner (Julius
7577 Add <function>tas()</> support for Renesas' M32R processor
7584 <function>quote_identifier()</function> and
7585 <application>pg_dump</application> no longer quote keywords that are
7586 unreserved according to the grammar (Tom)
7592 Change the on-disk representation of the <type>NUMERIC</type>
7593 data type so that the <structfield>sign_dscale</> word comes
7594 before the weight (Tom)
7600 Use <acronym>SYSV</> semaphores rather than POSIX on Darwin
7601 >= 6.0, i.e., OS X 10.2 and up (Chris Marcellino)
7607 Add <link linkend="acronyms">acronym</link> and <link
7608 linkend="creating-cluster-nfs">NFS</link> documentation
7615 "Postgres" is now documented as an accepted alias for
7616 "PostgreSQL" (Peter)
7622 Add documentation about preventing database server spoofing when
7623 the server is down (Bruce)
7632 <title>Contrib</title>
7637 Move <filename>contrib</> <filename>README</> content into the
7638 main <productname>PostgreSQL</> documentation (Albert Cervera i
7645 Add <filename>contrib/pageinspect</filename> module for low-level
7646 page inspection (Simon, Heikki)
7652 Add <filename>contrib/pg_standby</filename> module for controlling
7653 warm standby operation (Simon)
7659 Add <filename>contrib/uuid-ossp</filename> module for generating
7660 <type>UUID</> values using the OSSP UUID library (Peter)
7664 Use <application>configure</>
7665 <literal>--with-ossp-uuid</literal> to activate. This takes
7666 advantage of the new <type>UUID</type> builtin type.
7672 Add <filename>contrib/dict_int</filename>,
7673 <filename>contrib/dict_xsyn</filename>, and
7674 <filename>contrib/test_parser</filename> modules to provide
7675 sample add-on text search dictionary templates and parsers
7682 Allow <application>contrib/pgbench</> to set the fillfactor (Pavan
7689 Add timestamps to <application>contrib/pgbench</> <literal>-l</>
7696 Add usage count statistics to
7697 <filename>contrib/pgbuffercache</filename> (Greg Smith)
7703 Add GIN support for <filename>contrib/hstore</> (Teodor)
7709 Add GIN support for <filename>contrib/pg_trgm</> (Guillaume Smet, Teodor)
7715 Update OS/X startup scripts in
7716 <filename>contrib/start-scripts</filename> (Mark Cotner, David
7723 Restrict <function>pgrowlocks()</function> and
7724 <function>dblink_get_pkey()</function> to users who have
7725 <literal>SELECT</literal> privilege on the target table (Tom)
7731 Restrict <filename>contrib/pgstattuple</filename> functions to
7738 <filename>contrib/xml2</filename> is deprecated and planned for
7739 removal in 8.4 (Peter)
7743 The new XML support in core PostgreSQL supersedes this module.