1 <!-- doc/src/sgml/release-8.4.sgml -->
2 <!-- See header comment in release.sgml about typical markup -->
4 <sect1 id="release-8-4-18">
5 <title>Release 8.4.18</title>
8 <title>Release Date</title>
9 <simpara>2013-10-10</simpara>
13 This release contains a variety of fixes from 8.4.17.
14 For information about new features in the 8.4 major release, see
15 <xref linkend="release-8-4">.
19 <title>Migration to Version 8.4.18</title>
22 A dump/restore is not required for those running 8.4.X.
26 However, if you are upgrading from a version earlier than 8.4.17,
27 see the release notes for 8.4.17.
33 <title>Changes</title>
39 Prevent corruption of multi-byte characters when attempting to
40 case-fold identifiers (Andrew Dunstan)
44 <productname>PostgreSQL</> case-folds non-ASCII characters only
45 when using a single-byte server encoding.
51 Fix memory leak caused by <function>lo_open()</function> failure
58 Fix memory overcommit bug when <varname>work_mem</> is using more
59 than 24GB of memory (Stephen Frost)
65 Fix deadlock bug in libpq when using SSL (Stephen Frost)
71 Properly compute row estimates for boolean columns containing many NULL
72 values (Andrew Gierth)
76 Previously tests like <literal>col IS NOT TRUE</> and <literal>col IS
77 NOT FALSE</> did not properly factor in NULL values when estimating
84 Prevent pushing down <literal>WHERE</> clauses into unsafe
85 <literal>UNION/INTERSECT</> subqueries (Tom Lane)
89 Subqueries of a <literal>UNION</> or <literal>INTERSECT</> that
90 contain set-returning functions or volatile functions in their
91 <literal>SELECT</> lists could be improperly optimized, leading to
92 run-time errors or incorrect query results.
98 Fix rare case of <quote>failed to locate grouping columns</>
99 planner failure (Tom Lane)
105 Improve view dumping code's handling of dropped columns in referenced
112 Fix possible deadlock during concurrent <command>CREATE INDEX
113 CONCURRENTLY</> operations (Tom Lane)
119 Fix <function>regexp_matches()</> handling of zero-length matches
124 Previously, zero-length matches like '^' could return too many matches.
130 Fix crash for overly-complex regular expressions (Heikki Linnakangas)
136 Fix regular expression match failures for back references combined with
137 non-greedy quantifiers (Jeevan Chalke)
143 Prevent <command>CREATE FUNCTION</> from checking <command>SET</>
144 variables unless function body checking is enabled (Tom Lane)
150 Fix <function>pgp_pub_decrypt()</> so it works for secret keys with
151 passwords (Marko Kreen)
157 Remove rare inaccurate warning during vacuum of index-less tables
164 Avoid possible failure when performing transaction control commands (e.g
165 <command>ROLLBACK</>) in prepared queries (Tom Lane)
171 Ensure that floating-point data input accepts standard spellings
172 of <quote>infinity</> on all platforms (Tom Lane)
176 The C99 standard says that allowable spellings are <literal>inf</>,
177 <literal>+inf</>, <literal>-inf</>, <literal>infinity</>,
178 <literal>+infinity</>, and <literal>-infinity</>. Make sure we
179 recognize these even if the platform's <function>strtod</> function
186 Expand ability to compare rows to records and arrays (Rafal Rzepecki,
193 Update time zone data files to <application>tzdata</> release 2013d
194 for DST law changes in Israel, Morocco, Palestine, and Paraguay.
195 Also, historical zone data corrections for Macquarie Island.
204 <sect1 id="release-8-4-17">
205 <title>Release 8.4.17</title>
208 <title>Release Date</title>
209 <simpara>2013-04-04</simpara>
213 This release contains a variety of fixes from 8.4.16.
214 For information about new features in the 8.4 major release, see
215 <xref linkend="release-8-4">.
219 <title>Migration to Version 8.4.17</title>
222 A dump/restore is not required for those running 8.4.X.
226 However, this release corrects several errors in management of GiST
227 indexes. After installing this update, it is advisable to
228 <command>REINDEX</> any GiST indexes that meet one or more of the
229 conditions described below.
233 Also, if you are upgrading from a version earlier than 8.4.10,
234 see the release notes for 8.4.10.
240 <title>Changes</title>
246 Reset OpenSSL randomness state in each postmaster child process
251 This avoids a scenario wherein random numbers generated by
252 <filename>contrib/pgcrypto</> functions might be relatively easy for
253 another database user to guess. The risk is only significant when
254 the postmaster is configured with <varname>ssl</> = <literal>on</>
255 but most connections don't use SSL encryption. (CVE-2013-1900)
261 Fix GiST indexes to not use <quote>fuzzy</> geometric comparisons when
262 it's not appropriate to do so (Alexander Korotkov)
266 The core geometric types perform comparisons using <quote>fuzzy</>
267 equality, but <function>gist_box_same</> must do exact comparisons,
268 else GiST indexes using it might become inconsistent. After installing
269 this update, users should <command>REINDEX</> any GiST indexes on
270 <type>box</>, <type>polygon</>, <type>circle</>, or <type>point</>
271 columns, since all of these use <function>gist_box_same</>.
277 Fix erroneous range-union and penalty logic in GiST indexes that use
278 <filename>contrib/btree_gist</> for variable-width data types, that is
279 <type>text</>, <type>bytea</>, <type>bit</>, and <type>numeric</>
284 These errors could result in inconsistent indexes in which some keys
285 that are present would not be found by searches, and also in useless
286 index bloat. Users are advised to <command>REINDEX</> such indexes
287 after installing this update.
293 Fix bugs in GiST page splitting code for multi-column indexes
298 These errors could result in inconsistent indexes in which some keys
299 that are present would not be found by searches, and also in indexes
300 that are unnecessarily inefficient to search. Users are advised to
301 <command>REINDEX</> multi-column GiST indexes after installing this
308 Fix infinite-loop risk in regular expression compilation (Tom Lane,
315 Fix potential null-pointer dereference in regular expression compilation
322 Fix <function>to_char()</> to use ASCII-only case-folding rules where
323 appropriate (Tom Lane)
327 This fixes misbehavior of some template patterns that should be
328 locale-independent, but mishandled <quote><literal>I</></quote> and
329 <quote><literal>i</></quote> in Turkish locales.
335 Fix unwanted rejection of timestamp <literal>1999-12-31 24:00:00</>
342 Remove useless <quote>picksplit doesn't support secondary split</> log
343 messages (Josh Hansen, Tom Lane)
347 This message seems to have been added in expectation of code that was
348 never written, and probably never will be, since GiST's default
349 handling of secondary splits is actually pretty good. So stop nagging
356 Fix possible failure to send a session's last few transaction
357 commit/abort counts to the statistics collector (Tom Lane)
363 Eliminate memory leaks in PL/Perl's <function>spi_prepare()</> function
364 (Alex Hunsaker, Tom Lane)
370 Fix <application>pg_dumpall</> to handle database names containing
371 <quote><literal>=</></quote> correctly (Heikki Linnakangas)
377 Avoid crash in <application>pg_dump</> when an incorrect connection
378 string is given (Heikki Linnakangas)
384 Ignore invalid indexes in <application>pg_dump</> (Michael Paquier)
388 Dumping invalid indexes can cause problems at restore time, for example
389 if the reason the index creation failed was because it tried to enforce
390 a uniqueness condition not satisfied by the table's data. Also, if the
391 index creation is in fact still in progress, it seems reasonable to
392 consider it to be an uncommitted DDL change, which
393 <application>pg_dump</> wouldn't be expected to dump anyway.
399 Fix <filename>contrib/pg_trgm</>'s <function>similarity()</> function
400 to return zero for trigram-less strings (Tom Lane)
404 Previously it returned <literal>NaN</> due to internal division by zero.
410 Update time zone data files to <application>tzdata</> release 2013b
411 for DST law changes in Chile, Haiti, Morocco, Paraguay, and some
412 Russian areas. Also, historical zone data corrections for numerous
417 Also, update the time zone abbreviation files for recent changes in
418 Russia and elsewhere: <literal>CHOT</>, <literal>GET</>,
419 <literal>IRKT</>, <literal>KGT</>, <literal>KRAT</>, <literal>MAGT</>,
420 <literal>MAWT</>, <literal>MSK</>, <literal>NOVT</>, <literal>OMST</>,
421 <literal>TKT</>, <literal>VLAT</>, <literal>WST</>, <literal>YAKT</>,
422 <literal>YEKT</> now follow their current meanings, and
423 <literal>VOLT</> (Europe/Volgograd) and <literal>MIST</>
424 (Antarctica/Macquarie) are added to the default abbreviations list.
433 <sect1 id="release-8-4-16">
434 <title>Release 8.4.16</title>
437 <title>Release Date</title>
438 <simpara>2013-02-07</simpara>
442 This release contains a variety of fixes from 8.4.15.
443 For information about new features in the 8.4 major release, see
444 <xref linkend="release-8-4">.
448 <title>Migration to Version 8.4.16</title>
451 A dump/restore is not required for those running 8.4.X.
455 However, if you are upgrading from a version earlier than 8.4.10,
456 see the release notes for 8.4.10.
462 <title>Changes</title>
468 Prevent execution of <function>enum_recv</> from SQL (Tom Lane)
472 The function was misdeclared, allowing a simple SQL command to crash the
473 server. In principle an attacker might be able to use it to examine the
474 contents of server memory. Our thanks to Sumit Soni (via Secunia SVCRP)
475 for reporting this issue. (CVE-2013-0255)
481 Update minimum recovery point when truncating a relation file (Heikki
486 Once data has been discarded, it's no longer safe to stop recovery at
487 an earlier point in the timeline.
493 Fix SQL grammar to allow subscripting or field selection from a
494 sub-SELECT result (Tom Lane)
500 Protect against race conditions when scanning
501 <structname>pg_tablespace</> (Stephen Frost, Tom Lane)
505 <command>CREATE DATABASE</> and <command>DROP DATABASE</> could
506 misbehave if there were concurrent updates of
507 <structname>pg_tablespace</> entries.
513 Prevent <command>DROP OWNED</> from trying to drop whole databases or
514 tablespaces (Álvaro Herrera)
518 For safety, ownership of these objects must be reassigned, not dropped.
525 linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</></link>
526 implementation (Andres Freund)
530 In installations that have existed for more than <link
531 linkend="guc-vacuum-freeze-min-age"><varname>vacuum_freeze_min_age</></link>
532 transactions, this mistake prevented autovacuum from using partial-table
533 scans, so that a full-table scan would always happen instead.
539 Prevent misbehavior when a <symbol>RowExpr</> or <symbol>XmlExpr</>
540 is parse-analyzed twice (Andres Freund, Tom Lane)
544 This mistake could be user-visible in contexts such as
545 <literal>CREATE TABLE LIKE INCLUDING INDEXES</>.
551 Improve defenses against integer overflow in hashtable sizing
552 calculations (Jeff Davis)
558 Reject out-of-range dates in <function>to_date()</> (Hitoshi Harada)
564 Ensure that non-ASCII prompt strings are translated to the correct
565 code page on Windows (Alexander Law, Noah Misch)
569 This bug affected <application>psql</> and some other client programs.
575 Fix possible crash in <application>psql</>'s <command>\?</> command
576 when not connected to a database (Meng Qingzhong)
582 Fix one-byte buffer overrun in <application>libpq</>'s
583 <function>PQprintTuples</> (Xi Wang)
587 This ancient function is not used anywhere by
588 <productname>PostgreSQL</> itself, but it might still be used by some
595 Make <application>ecpglib</> use translated messages properly
602 Properly install <application>ecpg_compat</> and
603 <application>pgtypes</> libraries on MSVC (Jiang Guiqing)
609 Rearrange configure's tests for supplied functions so it is not
610 fooled by bogus exports from libedit/libreadline (Christoph Berg)
616 Ensure Windows build number increases over time (Magnus Hagander)
622 Make <application>pgxs</> build executables with the right
623 <literal>.exe</> suffix when cross-compiling for Windows
630 Add new timezone abbreviation <literal>FET</> (Tom Lane)
634 This is now used in some eastern-European time zones.
643 <sect1 id="release-8-4-15">
644 <title>Release 8.4.15</title>
647 <title>Release Date</title>
648 <simpara>2012-12-06</simpara>
652 This release contains a variety of fixes from 8.4.14.
653 For information about new features in the 8.4 major release, see
654 <xref linkend="release-8-4">.
658 <title>Migration to Version 8.4.15</title>
661 A dump/restore is not required for those running 8.4.X.
665 However, if you are upgrading from a version earlier than 8.4.10,
666 see the release notes for 8.4.10.
672 <title>Changes</title>
678 Fix multiple bugs associated with <command>CREATE INDEX
679 CONCURRENTLY</> (Andres Freund, Tom Lane)
683 Fix <command>CREATE INDEX CONCURRENTLY</> to use
684 in-place updates when changing the state of an index's
685 <structname>pg_index</> row. This prevents race conditions that could
686 cause concurrent sessions to miss updating the target index, thus
687 resulting in corrupt concurrently-created indexes.
691 Also, fix various other operations to ensure that they ignore
692 invalid indexes resulting from a failed <command>CREATE INDEX
693 CONCURRENTLY</> command. The most important of these is
694 <command>VACUUM</>, because an auto-vacuum could easily be launched
695 on the table before corrective action can be taken to fix or remove
702 Avoid corruption of internal hash tables when out of memory
709 Fix planning of non-strict equivalence clauses above outer joins
714 The planner could derive incorrect constraints from a clause equating
715 a non-strict construct to something else, for example
716 <literal>WHERE COALESCE(foo, 0) = 0</>
717 when <literal>foo</> is coming from the nullable side of an outer join.
723 Improve planner's ability to prove exclusion constraints from
724 equivalence classes (Tom Lane)
730 Fix partial-row matching in hashed subplans to handle cross-type cases
735 This affects multicolumn <literal>NOT IN</> subplans, such as
736 <literal>WHERE (a, b) NOT IN (SELECT x, y FROM ...)</>
737 when for instance <literal>b</> and <literal>y</> are <type>int4</>
738 and <type>int8</> respectively. This mistake led to wrong answers
739 or crashes depending on the specific datatypes involved.
745 Acquire buffer lock when re-fetching the old tuple for an
746 <literal>AFTER ROW UPDATE/DELETE</> trigger (Andres Freund)
750 In very unusual circumstances, this oversight could result in passing
751 incorrect data to the precheck logic for a foreign-key enforcement
752 trigger. That could result in a crash, or in an incorrect decision
753 about whether to fire the trigger.
759 Fix <command>ALTER COLUMN TYPE</> to handle inherited check
760 constraints properly (Pavan Deolasee)
764 This worked correctly in pre-8.4 releases, and now works correctly
771 Fix <command>REASSIGN OWNED</> to handle grants on tablespaces
772 (Álvaro Herrera)
778 Ignore incorrect <structname>pg_attribute</> entries for system
779 columns for views (Tom Lane)
783 Views do not have any system columns. However, we forgot to
784 remove such entries when converting a table to a view. That's fixed
785 properly for 9.3 and later, but in previous branches we need to defend
786 against existing mis-converted views.
792 Fix rule printing to dump <literal>INSERT INTO <replaceable>table</>
793 DEFAULT VALUES</literal> correctly (Tom Lane)
799 Guard against stack overflow when there are too many
800 <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</> clauses
801 in a query (Tom Lane)
807 Prevent platform-dependent failures when dividing the minimum possible
808 integer value by -1 (Xi Wang, Tom Lane)
814 Fix possible access past end of string in date parsing
821 Produce an understandable error message if the length of the path name
822 for a Unix-domain socket exceeds the platform-specific limit
823 (Tom Lane, Andrew Dunstan)
827 Formerly, this would result in something quite unhelpful, such as
828 <quote>Non-recoverable failure in name resolution</>.
834 Fix memory leaks when sending composite column values to the client
841 Make <application>pg_ctl</> more robust about reading the
842 <filename>postmaster.pid</> file (Heikki Linnakangas)
846 Fix race conditions and possible file descriptor leakage.
852 Fix possible crash in <application>psql</> if incorrectly-encoded data
853 is presented and the <varname>client_encoding</> setting is a
854 client-only encoding, such as SJIS (Jiang Guiqing)
860 Fix bugs in the <filename>restore.sql</> script emitted by
861 <application>pg_dump</> in <literal>tar</> output format (Tom Lane)
865 The script would fail outright on tables whose names include
866 upper-case characters. Also, make the script capable of restoring
867 data in <option>--inserts</> mode as well as the regular COPY mode.
873 Fix <application>pg_restore</> to accept POSIX-conformant
874 <literal>tar</> files (Brian Weaver, Tom Lane)
878 The original coding of <application>pg_dump</>'s <literal>tar</>
879 output mode produced files that are not fully conformant with the
880 POSIX standard. This has been corrected for version 9.3. This
881 patch updates previous branches so that they will accept both the
882 incorrect and the corrected formats, in hopes of avoiding
883 compatibility problems when 9.3 comes out.
889 Fix <application>pg_resetxlog</> to locate <filename>postmaster.pid</>
890 correctly when given a relative path to the data directory (Tom Lane)
894 This mistake could lead to <application>pg_resetxlog</> not noticing
895 that there is an active postmaster using the data directory.
901 Fix <application>libpq</>'s <function>lo_import()</> and
902 <function>lo_export()</> functions to report file I/O errors properly
909 Fix <application>ecpg</>'s processing of nested structure pointer
910 variables (Muhammad Usama)
916 Make <filename>contrib/pageinspect</>'s btree page inspection
917 functions take buffer locks while examining pages (Tom Lane)
923 Fix <application>pgxs</> support for building loadable modules on AIX
928 Building modules outside the original source tree didn't work on AIX.
934 Update time zone data files to <application>tzdata</> release 2012j
935 for DST law changes in Cuba, Israel, Jordan, Libya, Palestine, Western
936 Samoa, and portions of Brazil.
945 <sect1 id="release-8-4-14">
946 <title>Release 8.4.14</title>
949 <title>Release Date</title>
950 <simpara>2012-09-24</simpara>
954 This release contains a variety of fixes from 8.4.13.
955 For information about new features in the 8.4 major release, see
956 <xref linkend="release-8-4">.
960 <title>Migration to Version 8.4.14</title>
963 A dump/restore is not required for those running 8.4.X.
967 However, if you are upgrading from a version earlier than 8.4.10,
968 see the release notes for 8.4.10.
974 <title>Changes</title>
980 Fix planner's assignment of executor parameters, and fix executor's
981 rescan logic for CTE plan nodes (Tom Lane)
985 These errors could result in wrong answers from queries that scan the
986 same <literal>WITH</> subquery multiple times.
992 Improve page-splitting decisions in GiST indexes (Alexander Korotkov,
993 Robert Haas, Tom Lane)
997 Multi-column GiST indexes might suffer unexpected bloat due to this
1004 Fix cascading privilege revoke to stop if privileges are still held
1009 If we revoke a grant option from some role <replaceable>X</>, but
1010 <replaceable>X</> still holds that option via a grant from someone
1011 else, we should not recursively revoke the corresponding privilege
1012 from role(s) <replaceable>Y</> that <replaceable>X</> had granted it
1019 Fix handling of <literal>SIGFPE</> when PL/Perl is in use (Andres Freund)
1023 Perl resets the process's <literal>SIGFPE</> handler to
1024 <literal>SIG_IGN</>, which could result in crashes later on. Restore
1025 the normal Postgres signal handler after initializing PL/Perl.
1031 Prevent PL/Perl from crashing if a recursive PL/Perl function is
1032 redefined while being executed (Tom Lane)
1038 Work around possible misoptimization in PL/Perl (Tom Lane)
1042 Some Linux distributions contain an incorrect version of
1043 <filename>pthread.h</> that results in incorrect compiled code in
1044 PL/Perl, leading to crashes if a PL/Perl function calls another one
1045 that throws an error.
1051 Update time zone data files to <application>tzdata</> release 2012f
1052 for DST law changes in Fiji
1061 <sect1 id="release-8-4-13">
1062 <title>Release 8.4.13</title>
1065 <title>Release Date</title>
1066 <simpara>2012-08-17</simpara>
1070 This release contains a variety of fixes from 8.4.12.
1071 For information about new features in the 8.4 major release, see
1072 <xref linkend="release-8-4">.
1076 <title>Migration to Version 8.4.13</title>
1079 A dump/restore is not required for those running 8.4.X.
1083 However, if you are upgrading from a version earlier than 8.4.10,
1084 see the release notes for 8.4.10.
1090 <title>Changes</title>
1096 Prevent access to external files/URLs via XML entity references
1097 (Noah Misch, Tom Lane)
1101 <function>xml_parse()</> would attempt to fetch external files or
1102 URLs as needed to resolve DTD and entity references in an XML value,
1103 thus allowing unprivileged database users to attempt to fetch data
1104 with the privileges of the database server. While the external data
1105 wouldn't get returned directly to the user, portions of it could be
1106 exposed in error messages if the data didn't parse as valid XML; and
1107 in any case the mere ability to check existence of a file might be
1108 useful to an attacker. (CVE-2012-3489)
1114 Prevent access to external files/URLs via <filename>contrib/xml2</>'s
1115 <function>xslt_process()</> (Peter Eisentraut)
1119 <application>libxslt</> offers the ability to read and write both
1120 files and URLs through stylesheet commands, thus allowing
1121 unprivileged database users to both read and write data with the
1122 privileges of the database server. Disable that through proper use
1123 of <application>libxslt</>'s security options. (CVE-2012-3488)
1127 Also, remove <function>xslt_process()</>'s ability to fetch documents
1128 and stylesheets from external files/URLs. While this was a
1129 documented <quote>feature</>, it was long regarded as a bad idea.
1130 The fix for CVE-2012-3489 broke that capability, and rather than
1131 expend effort on trying to fix it, we're just going to summarily
1138 Prevent too-early recycling of btree index pages (Noah Misch)
1142 When we allowed read-only transactions to skip assigning XIDs, we
1143 introduced the possibility that a deleted btree page could be
1144 recycled while a read-only transaction was still in flight to it.
1145 This would result in incorrect index search results. The probability
1146 of such an error occurring in the field seems very low because of the
1147 timing requirements, but nonetheless it should be fixed.
1153 Fix crash-safety bug with newly-created-or-reset sequences (Tom Lane)
1157 If <command>ALTER SEQUENCE</> was executed on a freshly created or
1158 reset sequence, and then precisely one <function>nextval()</> call
1159 was made on it, and then the server crashed, WAL replay would restore
1160 the sequence to a state in which it appeared that no
1161 <function>nextval()</> had been done, thus allowing the first
1162 sequence value to be returned again by the next
1163 <function>nextval()</> call. In particular this could manifest for
1164 <type>serial</> columns, since creation of a serial column's sequence
1165 includes an <command>ALTER SEQUENCE OWNED BY</> step.
1171 Ensure the <filename>backup_label</> file is fsync'd after
1172 <function>pg_start_backup()</> (Dave Kerr)
1178 Back-patch 9.1 improvement to compress the fsync request queue
1183 This improves performance during checkpoints. The 9.1 change
1184 has now seen enough field testing to seem safe to back-patch.
1190 Only allow autovacuum to be auto-canceled by a directly blocked
1195 The original coding could allow inconsistent behavior in some cases;
1196 in particular, an autovacuum could get canceled after less than
1197 <literal>deadlock_timeout</> grace period.
1203 Improve logging of autovacuum cancels (Robert Haas)
1209 Fix log collector so that <literal>log_truncate_on_rotation</> works
1210 during the very first log rotation after server start (Tom Lane)
1216 Fix <literal>WITH</> attached to a nested set operation
1217 (<literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</>)
1224 Ensure that a whole-row reference to a subquery doesn't include any
1225 extra <literal>GROUP BY</> or <literal>ORDER BY</> columns (Tom Lane)
1231 Disallow copying whole-row references in <literal>CHECK</>
1232 constraints and index definitions during <command>CREATE TABLE</>
1237 This situation can arise in <command>CREATE TABLE</> with
1238 <literal>LIKE</> or <literal>INHERITS</>. The copied whole-row
1239 variable was incorrectly labeled with the row type of the original
1240 table not the new one. Rejecting the case seems reasonable for
1241 <literal>LIKE</>, since the row types might well diverge later. For
1242 <literal>INHERITS</> we should ideally allow it, with an implicit
1243 coercion to the parent table's row type; but that will require more
1244 work than seems safe to back-patch.
1250 Fix memory leak in <literal>ARRAY(SELECT ...)</> subqueries (Heikki
1251 Linnakangas, Tom Lane)
1257 Fix extraction of common prefixes from regular expressions (Tom Lane)
1261 The code could get confused by quantified parenthesized
1262 subexpressions, such as <literal>^(foo)?bar</>. This would lead to
1263 incorrect index optimization of searches for such patterns.
1269 Fix bugs with parsing signed
1270 <replaceable>hh</><literal>:</><replaceable>mm</> and
1271 <replaceable>hh</><literal>:</><replaceable>mm</><literal>:</><replaceable>ss</>
1272 fields in <type>interval</> constants (Amit Kapila, Tom Lane)
1278 Report errors properly in <filename>contrib/xml2</>'s
1279 <function>xslt_process()</> (Tom Lane)
1285 Update time zone data files to <application>tzdata</> release 2012e
1286 for DST law changes in Morocco and Tokelau
1295 <sect1 id="release-8-4-12">
1296 <title>Release 8.4.12</title>
1299 <title>Release Date</title>
1300 <simpara>2012-06-04</simpara>
1304 This release contains a variety of fixes from 8.4.11.
1305 For information about new features in the 8.4 major release, see
1306 <xref linkend="release-8-4">.
1310 <title>Migration to Version 8.4.12</title>
1313 A dump/restore is not required for those running 8.4.X.
1317 However, if you are upgrading from a version earlier than 8.4.10,
1318 see the release notes for 8.4.10.
1324 <title>Changes</title>
1330 Fix incorrect password transformation in
1331 <filename>contrib/pgcrypto</>'s DES <function>crypt()</> function
1336 If a password string contained the byte value <literal>0x80</>, the
1337 remainder of the password was ignored, causing the password to be much
1338 weaker than it appeared. With this fix, the rest of the string is
1339 properly included in the DES hash. Any stored password values that are
1340 affected by this bug will thus no longer match, so the stored values may
1341 need to be updated. (CVE-2012-2143)
1347 Ignore <literal>SECURITY DEFINER</> and <literal>SET</> attributes for
1348 a procedural language's call handler (Tom Lane)
1352 Applying such attributes to a call handler could crash the server.
1359 Allow numeric timezone offsets in <type>timestamp</> input to be up to
1360 16 hours away from UTC (Tom Lane)
1364 Some historical time zones have offsets larger than 15 hours, the
1365 previous limit. This could result in dumped data values being rejected
1372 Fix timestamp conversion to cope when the given time is exactly the
1373 last DST transition time for the current timezone (Tom Lane)
1377 This oversight has been there a long time, but was not noticed
1378 previously because most DST-using zones are presumed to have an
1379 indefinite sequence of future DST transitions.
1385 Fix <type>text</> to <type>name</> and <type>char</> to <type>name</>
1386 casts to perform string truncation correctly in multibyte encodings
1393 Fix memory copying bug in <function>to_tsquery()</> (Heikki Linnakangas)
1399 Fix planner's handling of outer PlaceHolderVars within subqueries (Tom
1404 This bug concerns sub-SELECTs that reference variables coming from the
1405 nullable side of an outer join of the surrounding query.
1406 In 9.1, queries affected by this bug would fail with <quote>ERROR:
1407 Upper-level PlaceHolderVar found where not expected</>. But in 9.0 and
1408 8.4, you'd silently get possibly-wrong answers, since the value
1409 transmitted into the subquery wouldn't go to null when it should.
1415 Fix slow session startup when <structname>pg_attribute</> is very large
1420 If <structname>pg_attribute</> exceeds one-fourth of
1421 <varname>shared_buffers</>, cache rebuilding code that is sometimes
1422 needed during session start would trigger the synchronized-scan logic,
1423 causing it to take many times longer than normal. The problem was
1424 particularly acute if many new sessions were starting at once.
1430 Ensure sequential scans check for query cancel reasonably often (Merlin
1435 A scan encountering many consecutive pages that contain no live tuples
1436 would not respond to interrupts meanwhile.
1442 Ensure the Windows implementation of <function>PGSemaphoreLock()</>
1443 clears <varname>ImmediateInterruptOK</> before returning (Tom Lane)
1447 This oversight meant that a query-cancel interrupt received later
1448 in the same query could be accepted at an unsafe time, with
1449 unpredictable but not good consequences.
1455 Show whole-row variables safely when printing views or rules
1456 (Abbas Butt, Tom Lane)
1460 Corner cases involving ambiguous names (that is, the name could be
1461 either a table or column name of the query) were printed in an
1462 ambiguous way, risking that the view or rule would be interpreted
1463 differently after dump and reload. Avoid the ambiguous case by
1464 attaching a no-op cast.
1470 Fix <command>COPY FROM</> to properly handle null marker strings that
1471 correspond to invalid encoding (Tom Lane)
1475 A null marker string such as <literal>E'\\0'</> should work, and did
1476 work in the past, but the case got broken in 8.4.
1482 Ensure autovacuum worker processes perform stack depth checking
1483 properly (Heikki Linnakangas)
1487 Previously, infinite recursion in a function invoked by
1488 auto-<command>ANALYZE</> could crash worker processes.
1494 Fix logging collector to not lose log coherency under high load (Andrew
1499 The collector previously could fail to reassemble large messages if it
1506 Fix logging collector to ensure it will restart file rotation
1507 after receiving <systemitem>SIGHUP</> (Tom Lane)
1513 Fix WAL replay logic for GIN indexes to not fail if the index was
1514 subsequently dropped (Tom Lane)
1520 Fix memory leak in PL/pgSQL's <command>RETURN NEXT</> command (Joe
1527 Fix PL/pgSQL's <command>GET DIAGNOSTICS</> command when the target
1528 is the function's first variable (Tom Lane)
1534 Fix potential access off the end of memory in <application>psql</>'s
1535 expanded display (<command>\x</>) mode (Peter Eisentraut)
1541 Fix several performance problems in <application>pg_dump</> when
1542 the database contains many objects (Jeff Janes, Tom Lane)
1546 <application>pg_dump</> could get very slow if the database contained
1547 many schemas, or if many objects are in dependency loops, or if there
1548 are many owned sequences.
1554 Fix <filename>contrib/dblink</>'s <function>dblink_exec()</> to not leak
1555 temporary database connections upon error (Tom Lane)
1561 Fix <filename>contrib/dblink</> to report the correct connection name in
1562 error messages (Kyotaro Horiguchi)
1568 Update time zone data files to <application>tzdata</> release 2012c
1569 for DST law changes in Antarctica, Armenia, Chile, Cuba, Falkland
1570 Islands, Gaza, Haiti, Hebron, Morocco, Syria, and Tokelau Islands;
1571 also historical corrections for Canada.
1580 <sect1 id="release-8-4-11">
1581 <title>Release 8.4.11</title>
1584 <title>Release Date</title>
1585 <simpara>2012-02-27</simpara>
1589 This release contains a variety of fixes from 8.4.10.
1590 For information about new features in the 8.4 major release, see
1591 <xref linkend="release-8-4">.
1595 <title>Migration to Version 8.4.11</title>
1598 A dump/restore is not required for those running 8.4.X.
1602 However, if you are upgrading from a version earlier than 8.4.10,
1603 see the release notes for 8.4.10.
1609 <title>Changes</title>
1615 Require execute permission on the trigger function for
1616 <command>CREATE TRIGGER</> (Robert Haas)
1620 This missing check could allow another user to execute a trigger
1621 function with forged input data, by installing it on a table he owns.
1622 This is only of significance for trigger functions marked
1623 <literal>SECURITY DEFINER</>, since otherwise trigger functions run
1624 as the table owner anyway. (CVE-2012-0866)
1630 Remove arbitrary limitation on length of common name in SSL
1631 certificates (Heikki Linnakangas)
1635 Both <application>libpq</> and the server truncated the common name
1636 extracted from an SSL certificate at 32 bytes. Normally this would
1637 cause nothing worse than an unexpected verification failure, but there
1638 are some rather-implausible scenarios in which it might allow one
1639 certificate holder to impersonate another. The victim would have to
1640 have a common name exactly 32 bytes long, and the attacker would have
1641 to persuade a trusted CA to issue a certificate in which the common
1642 name has that string as a prefix. Impersonating a server would also
1643 require some additional exploit to redirect client connections.
1650 Convert newlines to spaces in names written in <application>pg_dump</>
1651 comments (Robert Haas)
1655 <application>pg_dump</> was incautious about sanitizing object names
1656 that are emitted within SQL comments in its output script. A name
1657 containing a newline would at least render the script syntactically
1658 incorrect. Maliciously crafted object names could present a SQL
1659 injection risk when the script is reloaded. (CVE-2012-0868)
1665 Fix btree index corruption from insertions concurrent with vacuuming
1670 An index page split caused by an insertion could sometimes cause a
1671 concurrently-running <command>VACUUM</> to miss removing index entries
1672 that it should remove. After the corresponding table rows are removed,
1673 the dangling index entries would cause errors (such as <quote>could not
1674 read block N in file ...</>) or worse, silently wrong query results
1675 after unrelated rows are re-inserted at the now-free table locations.
1676 This bug has been present since release 8.2, but occurs so infrequently
1677 that it was not diagnosed until now. If you have reason to suspect
1678 that it has happened in your database, reindexing the affected index
1685 Update per-column permissions, not only per-table permissions, when
1686 changing table owner (Tom Lane)
1690 Failure to do this meant that any previously granted column permissions
1691 were still shown as having been granted by the old owner. This meant
1692 that neither the new owner nor a superuser could revoke the
1693 now-untraceable-to-table-owner permissions.
1699 Allow non-existent values for some settings in <command>ALTER
1700 USER/DATABASE SET</> (Heikki Linnakangas)
1704 Allow <varname>default_text_search_config</>,
1705 <varname>default_tablespace</>, and <varname>temp_tablespaces</> to be
1706 set to names that are not known. This is because they might be known
1707 in another database where the setting is intended to be used, or for the
1708 tablespace cases because the tablespace might not be created yet. The
1709 same issue was previously recognized for <varname>search_path</>, and
1710 these settings now act like that one.
1716 Avoid crashing when we have problems deleting table files post-commit
1721 Dropping a table should lead to deleting the underlying disk files only
1722 after the transaction commits. In event of failure then (for instance,
1723 because of wrong file permissions) the code is supposed to just emit a
1724 warning message and go on, since it's too late to abort the
1725 transaction. This logic got broken as of release 8.4, causing such
1726 situations to result in a PANIC and an unrestartable database.
1732 Track the OID counter correctly during WAL replay, even when it wraps
1737 Previously the OID counter would remain stuck at a high value until the
1738 system exited replay mode. The practical consequences of that are
1739 usually nil, but there are scenarios wherein a standby server that's
1740 been promoted to master might take a long time to advance the OID
1741 counter to a reasonable value once values are needed.
1747 Fix regular expression back-references with <literal>*</> attached
1752 Rather than enforcing an exact string match, the code would effectively
1753 accept any string that satisfies the pattern sub-expression referenced
1754 by the back-reference symbol.
1758 A similar problem still afflicts back-references that are embedded in a
1759 larger quantified expression, rather than being the immediate subject
1760 of the quantifier. This will be addressed in a future
1761 <productname>PostgreSQL</> release.
1767 Fix recently-introduced memory leak in processing of
1768 <type>inet</>/<type>cidr</> values (Heikki Linnakangas)
1772 A patch in the December 2011 releases of <productname>PostgreSQL</>
1773 caused memory leakage in these operations, which could be significant
1774 in scenarios such as building a btree index on such a column.
1780 Fix dangling pointer after <command>CREATE TABLE AS</>/<command>SELECT
1781 INTO</> in a SQL-language function (Tom Lane)
1785 In most cases this only led to an assertion failure in assert-enabled
1786 builds, but worse consequences seem possible.
1792 Avoid double close of file handle in syslogger on Windows (MauMau)
1796 Ordinarily this error was invisible, but it would cause an exception
1797 when running on a debug version of Windows.
1803 Fix I/O-conversion-related memory leaks in plpgsql
1804 (Andres Freund, Jan Urbanski, Tom Lane)
1808 Certain operations would leak memory until the end of the current
1815 Improve <application>pg_dump</>'s handling of inherited table columns
1820 <application>pg_dump</> mishandled situations where a child column has
1821 a different default expression than its parent column. If the default
1822 is textually identical to the parent's default, but not actually the
1823 same (for instance, because of schema search path differences) it would
1824 not be recognized as different, so that after dump and restore the
1825 child would be allowed to inherit the parent's default. Child columns
1826 that are <literal>NOT NULL</> where their parent is not could also be
1827 restored subtly incorrectly.
1833 Fix <application>pg_restore</>'s direct-to-database mode for
1834 INSERT-style table data (Tom Lane)
1838 Direct-to-database restores from archive files made with
1839 <option>--inserts</> or <option>--column-inserts</> options fail when
1840 using <application>pg_restore</> from a release dated September or
1841 December 2011, as a result of an oversight in a fix for another
1842 problem. The archive file itself is not at fault, and text-mode
1849 Allow <literal>AT</> option in <application>ecpg</>
1850 <literal>DEALLOCATE</> statements (Michael Meskes)
1854 The infrastructure to support this has been there for awhile, but
1855 through an oversight there was still an error check rejecting the case.
1861 Fix error in <filename>contrib/intarray</>'s <literal>int[] &
1862 int[]</> operator (Guillaume Lelarge)
1866 If the smallest integer the two input arrays have in common is 1,
1867 and there are smaller values in either array, then 1 would be
1868 incorrectly omitted from the result.
1874 Fix error detection in <filename>contrib/pgcrypto</>'s
1875 <function>encrypt_iv()</> and <function>decrypt_iv()</>
1880 These functions failed to report certain types of invalid-input errors,
1881 and would instead return random garbage values for incorrect input.
1887 Fix one-byte buffer overrun in <filename>contrib/test_parser</>
1892 The code would try to read one more byte than it should, which would
1893 crash in corner cases.
1894 Since <filename>contrib/test_parser</> is only example code, this is
1895 not a security issue in itself, but bad example code is still bad.
1901 Use <function>__sync_lock_test_and_set()</> for spinlocks on ARM, if
1902 available (Martin Pitt)
1906 This function replaces our previous use of the <literal>SWPB</>
1907 instruction, which is deprecated and not available on ARMv6 and later.
1908 Reports suggest that the old code doesn't fail in an obvious way on
1909 recent ARM boards, but simply doesn't interlock concurrent accesses,
1910 leading to bizarre failures in multiprocess operation.
1916 Use <option>-fexcess-precision=standard</> option when building with
1917 gcc versions that accept it (Andrew Dunstan)
1921 This prevents assorted scenarios wherein recent versions of gcc will
1922 produce creative results.
1928 Allow use of threaded Python on FreeBSD (Chris Rees)
1932 Our configure script previously believed that this combination wouldn't
1933 work; but FreeBSD fixed the problem, so remove that error check.
1942 <sect1 id="release-8-4-10">
1943 <title>Release 8.4.10</title>
1946 <title>Release Date</title>
1947 <simpara>2011-12-05</simpara>
1951 This release contains a variety of fixes from 8.4.9.
1952 For information about new features in the 8.4 major release, see
1953 <xref linkend="release-8-4">.
1957 <title>Migration to Version 8.4.10</title>
1960 A dump/restore is not required for those running 8.4.X.
1964 However, a longstanding error was discovered in the definition of the
1965 <literal>information_schema.referential_constraints</> view. If you
1966 rely on correct results from that view, you should replace its
1967 definition as explained in the first changelog item below.
1971 Also, if you are upgrading from a version earlier than 8.4.8,
1972 see the release notes for 8.4.8.
1978 <title>Changes</title>
1984 Fix bugs in <literal>information_schema.referential_constraints</> view
1989 This view was being insufficiently careful about matching the
1990 foreign-key constraint to the depended-on primary or unique key
1991 constraint. That could result in failure to show a foreign key
1992 constraint at all, or showing it multiple times, or claiming that it
1993 depends on a different constraint than the one it really does.
1997 Since the view definition is installed by <application>initdb</>,
1998 merely upgrading will not fix the problem. If you need to fix this
1999 in an existing installation, you can (as a superuser) drop the
2000 <literal>information_schema</> schema then re-create it by sourcing
2001 <filename><replaceable>SHAREDIR</>/information_schema.sql</filename>.
2002 (Run <literal>pg_config --sharedir</> if you're uncertain where
2003 <replaceable>SHAREDIR</> is.) This must be repeated in each database
2010 Fix incorrect replay of WAL records for GIN index updates
2015 This could result in transiently failing to find index entries after
2016 a crash, or on a hot-standby server. The problem would be repaired
2017 by the next <command>VACUUM</> of the index, however.
2023 Fix TOAST-related data corruption during <literal>CREATE TABLE dest AS
2024 SELECT * FROM src</> or <literal>INSERT INTO dest SELECT * FROM src</>
2029 If a table has been modified by <command>ALTER TABLE ADD COLUMN</>,
2030 attempts to copy its data verbatim to another table could produce
2031 corrupt results in certain corner cases.
2032 The problem can only manifest in this precise form in 8.4 and later,
2033 but we patched earlier versions as well in case there are other code
2034 paths that could trigger the same bug.
2040 Fix race condition during toast table access from stale syscache entries
2045 The typical symptom was transient errors like <quote>missing chunk
2046 number 0 for toast value NNNNN in pg_toast_2619</>, where the cited
2047 toast table would always belong to a system catalog.
2053 Track dependencies of functions on items used in parameter default
2054 expressions (Tom Lane)
2058 Previously, a referenced object could be dropped without having dropped
2059 or modified the function, leading to misbehavior when the function was
2060 used. Note that merely installing this update will not fix the missing
2061 dependency entries; to do that, you'd need to <command>CREATE OR
2062 REPLACE</> each such function afterwards. If you have functions whose
2063 defaults depend on non-built-in objects, doing so is recommended.
2069 Allow inlining of set-returning SQL functions with multiple OUT
2070 parameters (Tom Lane)
2076 Make <function>DatumGetInetP()</> unpack inet datums that have a 1-byte
2077 header, and add a new macro, <function>DatumGetInetPP()</>, that does
2078 not (Heikki Linnakangas)
2082 This change affects no core code, but might prevent crashes in add-on
2083 code that expects <function>DatumGetInetP()</> to produce an unpacked
2084 datum as per usual convention.
2090 Improve locale support in <type>money</> type's input and output
2095 Aside from not supporting all standard
2096 <link linkend="guc-lc-monetary"><varname>lc_monetary</></link>
2097 formatting options, the input and output functions were inconsistent,
2098 meaning there were locales in which dumped <type>money</> values could
2106 linkend="guc-transform-null-equals"><varname>transform_null_equals</></link>
2107 affect <literal>CASE foo WHEN NULL ...</> constructs
2108 (Heikki Linnakangas)
2112 <varname>transform_null_equals</> is only supposed to affect
2113 <literal>foo = NULL</> expressions written directly by the user, not
2114 equality checks generated internally by this form of <literal>CASE</>.
2120 Change foreign-key trigger creation order to better support
2121 self-referential foreign keys (Tom Lane)
2125 For a cascading foreign key that references its own table, a row update
2126 will fire both the <literal>ON UPDATE</> trigger and the
2127 <literal>CHECK</> trigger as one event. The <literal>ON UPDATE</>
2128 trigger must execute first, else the <literal>CHECK</> will check a
2129 non-final state of the row and possibly throw an inappropriate error.
2130 However, the firing order of these triggers is determined by their
2131 names, which generally sort in creation order since the triggers have
2132 auto-generated names following the convention
2133 <quote>RI_ConstraintTrigger_NNNN</>. A proper fix would require
2134 modifying that convention, which we will do in 9.2, but it seems risky
2135 to change it in existing releases. So this patch just changes the
2136 creation order of the triggers. Users encountering this type of error
2137 should drop and re-create the foreign key constraint to get its
2138 triggers into the right order.
2144 Avoid floating-point underflow while tracking buffer allocation rate
2149 While harmless in itself, on certain platforms this would result in
2150 annoying kernel log messages.
2156 Preserve configuration file name and line number values when starting
2157 child processes under Windows (Tom Lane)
2161 Formerly, these would not be displayed correctly in the
2162 <structname>pg_settings</> view.
2168 Preserve blank lines within commands in <application>psql</>'s command
2169 history (Robert Haas)
2173 The former behavior could cause problems if an empty line was removed
2174 from within a string literal, for example.
2180 Fix <application>pg_dump</> to dump user-defined casts between
2181 auto-generated types, such as table rowtypes (Tom Lane)
2187 Use the preferred version of <application>xsubpp</> to build PL/Perl,
2188 not necessarily the operating system's main copy
2189 (David Wheeler and Alex Hunsaker)
2195 Fix incorrect coding in <filename>contrib/dict_int</> and
2196 <filename>contrib/dict_xsyn</> (Tom Lane)
2200 Some functions incorrectly assumed that memory returned by
2201 <function>palloc()</> is guaranteed zeroed.
2207 Honor query cancel interrupts promptly in <function>pgstatindex()</>
2214 Ensure VPATH builds properly install all server header files
2221 Shorten file names reported in verbose error messages (Peter Eisentraut)
2225 Regular builds have always reported just the name of the C file
2226 containing the error message call, but VPATH builds formerly
2227 reported an absolute path name.
2233 Fix interpretation of Windows timezone names for Central America
2238 Map <quote>Central America Standard Time</> to <literal>CST6</>, not
2239 <literal>CST6CDT</>, because DST is generally not observed anywhere in
2246 Update time zone data files to <application>tzdata</> release 2011n
2247 for DST law changes in Brazil, Cuba, Fiji, Palestine, Russia, and Samoa;
2248 also historical corrections for Alaska and British East Africa.
2257 <sect1 id="release-8-4-9">
2258 <title>Release 8.4.9</title>
2261 <title>Release Date</title>
2262 <simpara>2011-09-26</simpara>
2266 This release contains a variety of fixes from 8.4.8.
2267 For information about new features in the 8.4 major release, see
2268 <xref linkend="release-8-4">.
2272 <title>Migration to Version 8.4.9</title>
2275 A dump/restore is not required for those running 8.4.X.
2279 However, if you are upgrading from a version earlier than 8.4.8,
2280 see the release notes for 8.4.8.
2286 <title>Changes</title>
2292 Fix bugs in indexing of in-doubt HOT-updated tuples (Tom Lane)
2296 These bugs could result in index corruption after reindexing a system
2297 catalog. They are not believed to affect user indexes.
2303 Fix multiple bugs in GiST index page split processing (Heikki
2308 The probability of occurrence was low, but these could lead to index
2315 Fix possible buffer overrun in <function>tsvector_concat()</>
2320 The function could underestimate the amount of memory needed for its
2321 result, leading to server crashes.
2327 Fix crash in <function>xml_recv</> when processing a
2328 <quote>standalone</> parameter (Tom Lane)
2334 Make <function>pg_options_to_table</> return NULL for an option with no
2339 Previously such cases would result in a server crash.
2345 Avoid possibly accessing off the end of memory in <command>ANALYZE</>
2346 and in SJIS-2004 encoding conversion (Noah Misch)
2350 This fixes some very-low-probability server crash scenarios.
2356 Prevent intermittent hang in interactions of startup process with
2357 bgwriter process (Simon Riggs)
2361 This affected recovery in non-hot-standby cases.
2367 Fix race condition in relcache init file invalidation (Tom Lane)
2371 There was a window wherein a new backend process could read a stale init
2372 file but miss the inval messages that would tell it the data is stale.
2373 The result would be bizarre failures in catalog accesses, typically
2374 <quote>could not read block 0 in file ...</> later during startup.
2380 Fix memory leak at end of a GiST index scan (Tom Lane)
2384 Commands that perform many separate GiST index scans, such as
2385 verification of a new GiST-based exclusion constraint on a table
2386 already containing many rows, could transiently require large amounts of
2387 memory due to this leak.
2393 Fix incorrect memory accounting (leading to possible memory bloat) in
2394 tuplestores supporting holdable cursors and plpgsql's <literal>RETURN
2395 NEXT</> command (Tom Lane)
2401 Fix performance problem when constructing a large, lossy bitmap
2408 Fix join selectivity estimation for unique columns (Tom Lane)
2412 This fixes an erroneous planner heuristic that could lead to poor
2413 estimates of the result size of a join.
2419 Fix nested PlaceHolderVar expressions that appear only in sub-select
2420 target lists (Tom Lane)
2424 This mistake could result in outputs of an outer join incorrectly
2431 Allow nested <literal>EXISTS</> queries to be optimized properly (Tom
2438 Fix array- and path-creating functions to ensure padding bytes are
2443 This avoids some situations where the planner will think that
2444 semantically-equal constants are not equal, resulting in poor
2451 Fix <command>EXPLAIN</> to handle gating Result nodes within
2452 inner-indexscan subplans (Tom Lane)
2456 The usual symptom of this oversight was <quote>bogus varno</> errors.
2462 Work around gcc 4.6.0 bug that breaks WAL replay (Tom Lane)
2466 This could lead to loss of committed transactions after a server crash.
2472 Fix dump bug for <literal>VALUES</> in a view (Tom Lane)
2478 Disallow <literal>SELECT FOR UPDATE/SHARE</> on sequences (Tom Lane)
2482 This operation doesn't work as expected and can lead to failures.
2488 Fix <command>VACUUM</> so that it always updates
2489 <literal>pg_class</>.<literal>reltuples</>/<literal>relpages</> (Tom
2494 This fixes some scenarios where autovacuum could make increasingly poor
2495 decisions about when to vacuum tables.
2501 Defend against integer overflow when computing size of a hash table (Tom
2508 Fix cases where <command>CLUSTER</> might attempt to access
2509 already-removed TOAST data (Tom Lane)
2515 Fix portability bugs in use of credentials control messages for
2516 <quote>peer</> authentication (Tom Lane)
2522 Fix SSPI login when multiple roundtrips are required (Ahmed Shinwari,
2527 The typical symptom of this problem was <quote>The function requested is
2528 not supported</> errors during SSPI login.
2534 Throw an error if <filename>pg_hba.conf</> contains <literal>hostssl</>
2535 but SSL is disabled (Tom Lane)
2539 This was concluded to be more user-friendly than the previous behavior
2540 of silently ignoring such lines.
2546 Fix typo in <function>pg_srand48</> seed initialization (Andres Freund)
2550 This led to failure to use all bits of the provided seed. This function
2551 is not used on most platforms (only those without <function>srandom</>),
2552 and the potential security exposure from a less-random-than-expected
2553 seed seems minimal in any case.
2559 Avoid integer overflow when the sum of <literal>LIMIT</> and
2560 <literal>OFFSET</> values exceeds 2^63 (Heikki Linnakangas)
2566 Add overflow checks to <type>int4</> and <type>int8</> versions of
2567 <function>generate_series()</> (Robert Haas)
2573 Fix trailing-zero removal in <function>to_char()</> (Marti Raudsepp)
2577 In a format with <literal>FM</> and no digit positions
2578 after the decimal point, zeroes to the left of the decimal point could
2579 be removed incorrectly.
2585 Fix <function>pg_size_pretty()</> to avoid overflow for inputs close to
2592 Weaken plpgsql's check for typmod matching in record values (Tom Lane)
2596 An overly enthusiastic check could lead to discarding length modifiers
2597 that should have been kept.
2603 Correctly handle quotes in locale names during <application>initdb</>
2604 (Heikki Linnakangas)
2608 The case can arise with some Windows locales, such as <quote>People's
2609 Republic of China</>.
2615 Fix <application>pg_upgrade</> to preserve toast tables' relfrozenxids
2616 during an upgrade from 8.3 (Bruce Momjian)
2620 Failure to do this could lead to <filename>pg_clog</> files being
2621 removed too soon after the upgrade.
2627 In <application>pg_ctl</>, support silent mode for service registrations
2634 Fix <application>psql</>'s counting of script file line numbers during
2635 <literal>COPY</> from a different file (Tom Lane)
2641 Fix <application>pg_restore</>'s direct-to-database mode for
2642 <varname>standard_conforming_strings</> (Tom Lane)
2646 <application>pg_restore</> could emit incorrect commands when restoring
2647 directly to a database server from an archive file that had been made
2648 with <varname>standard_conforming_strings</> set to <literal>on</>.
2654 Be more user-friendly about unsupported cases for parallel
2655 <application>pg_restore</> (Tom Lane)
2659 This change ensures that such cases are detected and reported before
2660 any restore actions have been taken.
2666 Fix write-past-buffer-end and memory leak in <application>libpq</>'s
2667 LDAP service lookup code (Albe Laurenz)
2673 In <application>libpq</>, avoid failures when using nonblocking I/O
2674 and an SSL connection (Martin Pihlak, Tom Lane)
2680 Improve libpq's handling of failures during connection startup
2685 In particular, the response to a server report of <function>fork()</>
2686 failure during SSL connection startup is now saner.
2692 Improve <application>libpq</>'s error reporting for SSL failures (Tom
2699 Fix <function>PQsetvalue()</> to avoid possible crash when adding a new
2700 tuple to a <structname>PGresult</> originally obtained from a server
2701 query (Andrew Chernow)
2707 Make <application>ecpglib</> write <type>double</> values with 15 digits
2708 precision (Akira Kurosawa)
2714 In <application>ecpglib</>, be sure <literal>LC_NUMERIC</> setting is
2715 restored after an error (Michael Meskes)
2721 Apply upstream fix for blowfish signed-character bug (CVE-2011-2483)
2726 <filename>contrib/pg_crypto</>'s blowfish encryption code could give
2727 wrong results on platforms where char is signed (which is most),
2728 leading to encrypted passwords being weaker than they should be.
2734 Fix memory leak in <filename>contrib/seg</> (Heikki Linnakangas)
2740 Fix <function>pgstatindex()</> to give consistent results for empty
2747 Allow building with perl 5.14 (Alex Hunsaker)
2753 Update configure script's method for probing existence of system
2754 functions (Tom Lane)
2758 The version of autoconf we used in 8.3 and 8.2 could be fooled by
2759 compilers that perform link-time optimization.
2765 Fix assorted issues with build and install file paths containing spaces
2772 Update time zone data files to <application>tzdata</> release 2011i
2773 for DST law changes in Canada, Egypt, Russia, Samoa, and South Sudan.
2782 <sect1 id="release-8-4-8">
2783 <title>Release 8.4.8</title>
2786 <title>Release Date</title>
2787 <simpara>2011-04-18</simpara>
2791 This release contains a variety of fixes from 8.4.7.
2792 For information about new features in the 8.4 major release, see
2793 <xref linkend="release-8-4">.
2797 <title>Migration to Version 8.4.8</title>
2800 A dump/restore is not required for those running 8.4.X.
2804 However, if your installation was upgraded from a previous major
2805 release by running <application>pg_upgrade</>, you should take
2806 action to prevent possible data loss due to a now-fixed bug in
2807 <application>pg_upgrade</>. The recommended solution is to run
2808 <command>VACUUM FREEZE</> on all TOAST tables.
2809 More information is available at <ulink
2810 url="http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix">
2811 http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix</ulink>.
2815 Also, if you are upgrading from a version earlier than 8.4.2,
2816 see the release notes for 8.4.2.
2822 <title>Changes</title>
2828 Fix <application>pg_upgrade</>'s handling of TOAST tables
2833 The <structname>pg_class</>.<structfield>relfrozenxid</> value for
2834 TOAST tables was not correctly copied into the new installation
2835 during <application>pg_upgrade</>. This could later result in
2836 <literal>pg_clog</> files being discarded while they were still
2837 needed to validate tuples in the TOAST tables, leading to
2838 <quote>could not access status of transaction</> failures.
2842 This error poses a significant risk of data loss for installations
2843 that have been upgraded with <application>pg_upgrade</>. This patch
2844 corrects the problem for future uses of <application>pg_upgrade</>,
2845 but does not in itself cure the issue in installations that have been
2846 processed with a buggy version of <application>pg_upgrade</>.
2852 Suppress incorrect <quote>PD_ALL_VISIBLE flag was incorrectly set</>
2853 warning (Heikki Linnakangas)
2857 <command>VACUUM</> would sometimes issue this warning in cases that
2864 Disallow including a composite type in itself (Tom Lane)
2868 This prevents scenarios wherein the server could recurse infinitely
2869 while processing the composite type. While there are some possible
2870 uses for such a structure, they don't seem compelling enough to
2871 justify the effort required to make sure it always works safely.
2877 Avoid potential deadlock during catalog cache initialization
2882 In some cases the cache loading code would acquire share lock on a
2883 system index before locking the index's catalog. This could deadlock
2884 against processes trying to acquire exclusive locks in the other,
2885 more standard order.
2891 Fix dangling-pointer problem in <literal>BEFORE ROW UPDATE</> trigger
2892 handling when there was a concurrent update to the target tuple
2897 This bug has been observed to result in intermittent <quote>cannot
2898 extract system attribute from virtual tuple</> failures while trying to
2899 do <literal>UPDATE RETURNING ctid</>. There is a very small probability
2900 of more serious errors, such as generating incorrect index entries for
2907 Disallow <command>DROP TABLE</> when there are pending deferred trigger
2908 events for the table (Tom Lane)
2912 Formerly the <command>DROP</> would go through, leading to
2913 <quote>could not open relation with OID nnn</> errors when the
2914 triggers were eventually fired.
2920 Prevent crash triggered by constant-false WHERE conditions during
2921 GEQO optimization (Tom Lane)
2930 Improve planner's handling of semi-join and anti-join cases
2937 Fix selectivity estimation for text search to account for NULLs
2944 Improve PL/pgSQL's ability to handle row types with dropped columns
2949 This is a back-patch of fixes previously made in 9.0.
2955 Fix PL/Python memory leak involving array slices (Daniel Popowich)
2961 Fix <application>pg_restore</> to cope with long lines (over 1KB) in
2962 TOC files (Tom Lane)
2968 Put in more safeguards against crashing due to division-by-zero
2969 with overly enthusiastic compiler optimization (Aurelien Jarno)
2975 Support use of dlopen() in FreeBSD and OpenBSD on MIPS (Tom Lane)
2979 There was a hard-wired assumption that this system function was not
2980 available on MIPS hardware on these systems. Use a compile-time test
2981 instead, since more recent versions have it.
2987 Fix compilation failures on HP-UX (Heikki Linnakangas)
2993 Fix version-incompatibility problem with <application>libintl</> on
2994 Windows (Hiroshi Inoue)
3000 Fix usage of <application>xcopy</> in Windows build scripts to
3001 work correctly under Windows 7 (Andrew Dunstan)
3005 This affects the build scripts only, not installation or usage.
3011 Fix path separator used by <application>pg_regress</> on Cygwin
3018 Update time zone data files to <application>tzdata</> release 2011f
3019 for DST law changes in Chile, Cuba, Falkland Islands, Morocco, Samoa,
3020 and Turkey; also historical corrections for South Australia, Alaska,
3030 <sect1 id="release-8-4-7">
3031 <title>Release 8.4.7</title>
3034 <title>Release Date</title>
3035 <simpara>2011-01-31</simpara>
3039 This release contains a variety of fixes from 8.4.6.
3040 For information about new features in the 8.4 major release, see
3041 <xref linkend="release-8-4">.
3045 <title>Migration to Version 8.4.7</title>
3048 A dump/restore is not required for those running 8.4.X.
3049 However, if you are upgrading from a version earlier than 8.4.2,
3050 see the release notes for 8.4.2.
3056 <title>Changes</title>
3062 Avoid failures when <command>EXPLAIN</> tries to display a simple-form
3063 <literal>CASE</> expression (Tom Lane)
3067 If the <literal>CASE</>'s test expression was a constant, the planner
3068 could simplify the <literal>CASE</> into a form that confused the
3069 expression-display code, resulting in <quote>unexpected CASE WHEN
3076 Fix assignment to an array slice that is before the existing range
3077 of subscripts (Tom Lane)
3081 If there was a gap between the newly added subscripts and the first
3082 pre-existing subscript, the code miscalculated how many entries needed
3083 to be copied from the old array's null bitmap, potentially leading to
3084 data corruption or crash.
3090 Avoid unexpected conversion overflow in planner for very distant date
3095 The <type>date</> type supports a wider range of dates than can be
3096 represented by the <type>timestamp</> types, but the planner assumed it
3097 could always convert a date to timestamp with impunity.
3103 Fix <application>pg_restore</>'s text output for large objects (BLOBs)
3104 when <varname>standard_conforming_strings</> is on (Tom Lane)
3108 Although restoring directly to a database worked correctly, string
3109 escaping was incorrect if <application>pg_restore</> was asked for
3110 SQL text output and <varname>standard_conforming_strings</> had been
3111 enabled in the source database.
3117 Fix erroneous parsing of <type>tsquery</> values containing
3118 <literal>... & !(subexpression) | ...</literal> (Tom Lane)
3122 Queries containing this combination of operators were not executed
3123 correctly. The same error existed in <filename>contrib/intarray</>'s
3124 <type>query_int</> type and <filename>contrib/ltree</>'s
3125 <type>ltxtquery</> type.
3131 Fix buffer overrun in <filename>contrib/intarray</>'s input function
3132 for the <type>query_int</> type (Apple)
3136 This bug is a security risk since the function's return address could
3137 be overwritten. Thanks to Apple Inc's security team for reporting this
3138 issue and supplying the fix. (CVE-2010-4015)
3144 Fix bug in <filename>contrib/seg</>'s GiST picksplit algorithm
3145 (Alexander Korotkov)
3149 This could result in considerable inefficiency, though not actually
3150 incorrect answers, in a GiST index on a <type>seg</> column.
3151 If you have such an index, consider <command>REINDEX</>ing it after
3152 installing this update. (This is identical to the bug that was fixed in
3153 <filename>contrib/cube</> in the previous update.)
3162 <sect1 id="release-8-4-6">
3163 <title>Release 8.4.6</title>
3166 <title>Release Date</title>
3167 <simpara>2010-12-16</simpara>
3171 This release contains a variety of fixes from 8.4.5.
3172 For information about new features in the 8.4 major release, see
3173 <xref linkend="release-8-4">.
3177 <title>Migration to Version 8.4.6</title>
3180 A dump/restore is not required for those running 8.4.X.
3181 However, if you are upgrading from a version earlier than 8.4.2,
3182 see the release notes for 8.4.2.
3188 <title>Changes</title>
3195 <link linkend="guc-wal-sync-method"><varname>wal_sync_method</></link>
3196 to be <literal>fdatasync</> on Linux (Tom Lane, Marti Raudsepp)
3200 The default on Linux has actually been <literal>fdatasync</> for many
3201 years, but recent kernel changes caused <productname>PostgreSQL</> to
3202 choose <literal>open_datasync</> instead. This choice did not result
3203 in any performance improvement, and caused outright failures on
3204 certain filesystems, notably <literal>ext4</> with the
3205 <literal>data=journal</> mount option.
3211 Fix assorted bugs in WAL replay logic for GIN indexes (Tom Lane)
3215 This could result in <quote>bad buffer id: 0</> failures or
3216 corruption of index contents during replication.
3222 Fix recovery from base backup when the starting checkpoint WAL record
3223 is not in the same WAL segment as its redo point (Jeff Davis)
3229 Fix persistent slowdown of autovacuum workers when multiple workers
3230 remain active for a long time (Tom Lane)
3234 The effective <varname>vacuum_cost_limit</> for an autovacuum worker
3235 could drop to nearly zero if it processed enough tables, causing it
3236 to run extremely slowly.
3242 Add support for detecting register-stack overrun on <literal>IA64</>
3247 The <literal>IA64</> architecture has two hardware stacks. Full
3248 prevention of stack-overrun failures requires checking both.
3254 Add a check for stack overflow in <function>copyObject()</> (Tom Lane)
3258 Certain code paths could crash due to stack overflow given a
3259 sufficiently complex query.
3265 Fix detection of page splits in temporary GiST indexes (Heikki
3270 It is possible to have a <quote>concurrent</> page split in a
3271 temporary index, if for example there is an open cursor scanning the
3272 index when an insertion is done. GiST failed to detect this case and
3273 hence could deliver wrong results when execution of the cursor
3280 Fix error checking during early connection processing (Tom Lane)
3284 The check for too many child processes was skipped in some cases,
3285 possibly leading to postmaster crash when attempting to add the new
3286 child process to fixed-size arrays.
3292 Improve efficiency of window functions (Tom Lane)
3296 Certain cases where a large number of tuples needed to be read in
3297 advance, but <varname>work_mem</> was large enough to allow them all
3298 to be held in memory, were unexpectedly slow.
3299 <function>percent_rank()</>, <function>cume_dist()</> and
3300 <function>ntile()</> in particular were subject to this problem.
3306 Avoid memory leakage while <command>ANALYZE</>'ing complex index
3307 expressions (Tom Lane)
3313 Ensure an index that uses a whole-row Var still depends on its table
3318 An index declared like <literal>create index i on t (foo(t.*))</>
3319 would not automatically get dropped when its table was dropped.
3325 Do not <quote>inline</> a SQL function with multiple <literal>OUT</>
3326 parameters (Tom Lane)
3330 This avoids a possible crash due to loss of information about the
3331 expected result rowtype.
3337 Behave correctly if <literal>ORDER BY</>, <literal>LIMIT</>,
3338 <literal>FOR UPDATE</>, or <literal>WITH</> is attached to the
3339 <literal>VALUES</> part of <literal>INSERT ... VALUES</> (Tom Lane)
3345 Fix constant-folding of <literal>COALESCE()</> expressions (Tom Lane)
3349 The planner would sometimes attempt to evaluate sub-expressions that
3350 in fact could never be reached, possibly leading to unexpected errors.
3356 Fix postmaster crash when connection acceptance
3357 (<function>accept()</> or one of the calls made immediately after it)
3358 fails, and the postmaster was compiled with GSSAPI support (Alexander
3365 Fix missed unlink of temporary files when <varname>log_temp_files</>
3366 is active (Tom Lane)
3370 If an error occurred while attempting to emit the log message, the
3371 unlink was not done, resulting in accumulation of temp files.
3377 Add print functionality for <structname>InhRelation</> nodes (Tom Lane)
3381 This avoids a failure when <varname>debug_print_parse</> is enabled
3382 and certain types of query are executed.
3388 Fix incorrect calculation of distance from a point to a horizontal
3389 line segment (Tom Lane)
3393 This bug affected several different geometric distance-measurement
3400 Fix incorrect calculation of transaction status in
3401 <application>ecpg</> (Itagaki Takahiro)
3407 Fix <application>PL/pgSQL</>'s handling of <quote>simple</>
3408 expressions to not fail in recursion or error-recovery cases (Tom Lane)
3414 Fix <application>PL/Python</>'s handling of set-returning functions
3419 Attempts to call SPI functions within the iterator generating a set
3426 Fix bug in <filename>contrib/cube</>'s GiST picksplit algorithm
3427 (Alexander Korotkov)
3431 This could result in considerable inefficiency, though not actually
3432 incorrect answers, in a GiST index on a <type>cube</> column.
3433 If you have such an index, consider <command>REINDEX</>ing it after
3434 installing this update.
3440 Don't emit <quote>identifier will be truncated</> notices in
3441 <filename>contrib/dblink</> except when creating new connections
3448 Fix potential coredump on missing public key in
3449 <filename>contrib/pgcrypto</> (Marti Raudsepp)
3455 Fix memory leak in <filename>contrib/xml2</>'s XPath query functions
3462 Update time zone data files to <application>tzdata</> release 2010o
3463 for DST law changes in Fiji and Samoa;
3464 also historical corrections for Hong Kong.
3473 <sect1 id="release-8-4-5">
3474 <title>Release 8.4.5</title>
3477 <title>Release Date</title>
3478 <simpara>2010-10-04</simpara>
3482 This release contains a variety of fixes from 8.4.4.
3483 For information about new features in the 8.4 major release, see
3484 <xref linkend="release-8-4">.
3488 <title>Migration to Version 8.4.5</title>
3491 A dump/restore is not required for those running 8.4.X.
3492 However, if you are upgrading from a version earlier than 8.4.2,
3493 see the release notes for 8.4.2.
3499 <title>Changes</title>
3505 Use a separate interpreter for each calling SQL userid in PL/Perl and
3510 This change prevents security problems that can be caused by subverting
3511 Perl or Tcl code that will be executed later in the same session under
3512 another SQL user identity (for example, within a <literal>SECURITY
3513 DEFINER</> function). Most scripting languages offer numerous ways that
3514 that might be done, such as redefining standard functions or operators
3515 called by the target function. Without this change, any SQL user with
3516 Perl or Tcl language usage rights can do essentially anything with the
3517 SQL privileges of the target function's owner.
3521 The cost of this change is that intentional communication among Perl
3522 and Tcl functions becomes more difficult. To provide an escape hatch,
3523 PL/PerlU and PL/TclU functions continue to use only one interpreter
3524 per session. This is not considered a security issue since all such
3525 functions execute at the trust level of a database superuser already.
3529 It is likely that third-party procedural languages that claim to offer
3530 trusted execution have similar security issues. We advise contacting
3531 the authors of any PL you are depending on for security-critical
3536 Our thanks to Tim Bunce for pointing out this issue (CVE-2010-3433).
3542 Prevent possible crashes in <function>pg_get_expr()</> by disallowing
3543 it from being called with an argument that is not one of the system
3544 catalog columns it's intended to be used with
3545 (Heikki Linnakangas, Tom Lane)
3551 Treat exit code 128 (<literal>ERROR_WAIT_NO_CHILDREN</>) as non-fatal on
3552 Windows (Magnus Hagander)
3556 Under high load, Windows processes will sometimes fail at startup with
3557 this error code. Formerly the postmaster treated this as a panic
3558 condition and restarted the whole database, but that seems to be
3565 Fix incorrect placement of placeholder evaluation (Tom Lane)
3569 This bug could result in query outputs being non-null when they
3570 should be null, in cases where the inner side of an outer join
3571 is a sub-select with non-strict expressions in its output list.
3577 Fix possible duplicate scans of <literal>UNION ALL</> member relations
3584 Fix <quote>cannot handle unplanned sub-select</quote> error (Tom Lane)
3588 This occurred when a sub-select contains a join alias reference that
3589 expands into an expression containing another sub-select.
3595 Fix mishandling of whole-row Vars that reference a view or sub-select
3596 and appear within a nested sub-select (Tom Lane)
3602 Fix mishandling of cross-type <literal>IN</> comparisons (Tom Lane)
3606 This could result in failures if the planner tried to implement an
3607 <literal>IN</> join with a sort-then-unique-then-plain-join plan.
3613 Fix computation of <command>ANALYZE</> statistics for <type>tsvector</>
3614 columns (Jan Urbanski)
3618 The original coding could produce incorrect statistics, leading to
3619 poor plan choices later.
3625 Improve planner's estimate of memory used by <function>array_agg()</>,
3626 <function>string_agg()</>, and similar aggregate functions
3631 The previous drastic underestimate could lead to out-of-memory failures
3632 due to inappropriate choice of a hash-aggregation plan.
3638 Fix failure to mark cached plans as transient (Tom Lane)
3642 If a plan is prepared while <command>CREATE INDEX CONCURRENTLY</> is
3643 in progress for one of the referenced tables, it is supposed to be
3644 re-planned once the index is ready for use. This was not happening
3651 Reduce PANIC to ERROR in some occasionally-reported btree failure cases,
3652 and provide additional detail in the resulting error messages
3657 This should improve the system's robustness with corrupted indexes.
3663 Fix incorrect search logic for partial-match queries with GIN indexes
3668 Cases involving AND/OR combination of several GIN index conditions
3669 didn't always give the right answer, and were sometimes much slower
3676 Prevent show_session_authorization() from crashing within autovacuum
3677 processes (Tom Lane)
3683 Defend against functions returning setof record where not all the
3684 returned rows are actually of the same rowtype (Tom Lane)
3690 Fix possible corruption of pending trigger event lists during
3691 subtransaction rollback (Tom Lane)
3695 This could lead to a crash or incorrect firing of triggers.
3701 Fix possible failure when hashing a pass-by-reference function result
3708 Improve merge join's handling of NULLs in the join columns (Tom Lane)
3712 A merge join can now stop entirely upon reaching the first NULL,
3713 if the sort order is such that NULLs sort high.
3719 Take care to fsync the contents of lockfiles (both
3720 <filename>postmaster.pid</> and the socket lockfile) while writing them
3725 This omission could result in corrupted lockfile contents if the
3726 machine crashes shortly after postmaster start. That could in turn
3727 prevent subsequent attempts to start the postmaster from succeeding,
3728 until the lockfile is manually removed.
3734 Avoid recursion while assigning XIDs to heavily-nested
3735 subtransactions (Andres Freund, Robert Haas)
3739 The original coding could result in a crash if there was limited
3746 Avoid holding open old WAL segments in the walwriter process
3747 (Magnus Hagander, Heikki Linnakangas)
3751 The previous coding would prevent removal of no-longer-needed segments.
3757 Fix <varname>log_line_prefix</>'s <literal>%i</> escape,
3758 which could produce junk early in backend startup (Tom Lane)
3764 Prevent misinterpretation of partially-specified relation options
3765 for TOAST tables (Itagaki Takahiro)
3769 In particular, <literal>fillfactor</> would be read as zero if any
3770 other reloption had been set for the table, leading to serious bloat.
3776 Fix inheritance count tracking in <command>ALTER TABLE ... ADD
3777 CONSTRAINT</> (Robert Haas)
3783 Fix possible data corruption in <command>ALTER TABLE ... SET
3784 TABLESPACE</> when archiving is enabled (Jeff Davis)
3790 Allow <command>CREATE DATABASE</> and <command>ALTER DATABASE ... SET
3791 TABLESPACE</> to be interrupted by query-cancel (Guillaume Lelarge)
3797 Improve <command>CREATE INDEX</>'s checking of whether proposed index
3798 expressions are immutable (Tom Lane)
3804 Fix <command>REASSIGN OWNED</> to handle operator classes and families
3811 Fix possible core dump when comparing two empty <type>tsquery</> values
3818 Fix <literal>LIKE</>'s handling of patterns containing <literal>%</>
3819 followed by <literal>_</> (Tom Lane)
3823 We've fixed this before, but there were still some incorrectly-handled
3830 Re-allow input of Julian dates prior to 0001-01-01 AD (Tom Lane)
3834 Input such as <literal>'J100000'::date</> worked before 8.4,
3835 but was unintentionally broken by added error-checking.
3841 Fix PL/pgSQL to throw an error, not crash, if a cursor is closed within
3842 a <literal>FOR</> loop that is iterating over that cursor
3843 (Heikki Linnakangas)
3849 In PL/Python, defend against null pointer results from
3850 <function>PyCObject_AsVoidPtr</> and <function>PyCObject_FromVoidPtr</>
3857 In <application>libpq</>, fix full SSL certificate verification for the
3858 case where both <literal>host</> and <literal>hostaddr</> are specified
3865 Make psql recognize <command>DISCARD ALL</> as a command that should
3866 not be encased in a transaction block in autocommit-off mode
3873 Fix some issues in <application>pg_dump</>'s handling of SQL/MED objects
3878 Notably, <application>pg_dump</> would always fail if run by a
3879 non-superuser, which was not intended.
3885 Improve <application>pg_dump</> and <application>pg_restore</>'s
3886 handling of non-seekable archive files (Tom Lane, Robert Haas)
3890 This is important for proper functioning of parallel restore.
3896 Improve parallel pg_restore's ability to cope with selective restore
3897 (<literal>-L</> option) (Tom Lane)
3901 The original code tended to fail if the <literal>-L</> file commanded
3902 a non-default restore ordering.
3908 Fix <application>ecpg</> to process data from <literal>RETURNING</>
3909 clauses correctly (Michael Meskes)
3915 Fix some memory leaks in <application>ecpg</> (Zoltan Boszormenyi)
3921 Improve <filename>contrib/dblink</>'s handling of tables containing
3922 dropped columns (Tom Lane)
3928 Fix connection leak after <quote>duplicate connection name</quote>
3929 errors in <filename>contrib/dblink</> (Itagaki Takahiro)
3935 Fix <filename>contrib/dblink</> to handle connection names longer than
3936 62 bytes correctly (Itagaki Takahiro)
3942 Add <function>hstore(text, text)</>
3943 function to <filename>contrib/hstore</> (Robert Haas)
3947 This function is the recommended substitute for the now-deprecated
3948 <literal>=></> operator. It was back-patched so that future-proofed
3949 code can be used with older server versions. Note that the patch will
3950 be effective only after <filename>contrib/hstore</> is installed or
3951 reinstalled in a particular database. Users might prefer to execute
3952 the <command>CREATE FUNCTION</> command by hand, instead.
3958 Update build infrastructure and documentation to reflect the source code
3959 repository's move from CVS to Git (Magnus Hagander and others)
3965 Update time zone data files to <application>tzdata</> release 2010l
3966 for DST law changes in Egypt and Palestine; also historical corrections
3971 This change also adds new names for two Micronesian timezones:
3972 Pacific/Chuuk is now preferred over Pacific/Truk (and the preferred
3973 abbreviation is CHUT not TRUT) and Pacific/Pohnpei is preferred over
3980 Make Windows' <quote>N. Central Asia Standard Time</> timezone map to
3981 Asia/Novosibirsk, not Asia/Almaty (Magnus Hagander)
3985 Microsoft changed the DST behavior of this zone in the timezone update
3986 from KB976098. Asia/Novosibirsk is a better match to its new behavior.
3995 <sect1 id="release-8-4-4">
3996 <title>Release 8.4.4</title>
3999 <title>Release Date</title>
4000 <simpara>2010-05-17</simpara>
4004 This release contains a variety of fixes from 8.4.3.
4005 For information about new features in the 8.4 major release, see
4006 <xref linkend="release-8-4">.
4010 <title>Migration to Version 8.4.4</title>
4013 A dump/restore is not required for those running 8.4.X.
4014 However, if you are upgrading from a version earlier than 8.4.2,
4015 see the release notes for 8.4.2.
4021 <title>Changes</title>
4027 Enforce restrictions in <literal>plperl</> using an opmask applied to
4028 the whole interpreter, instead of using <filename>Safe.pm</>
4029 (Tim Bunce, Andrew Dunstan)
4033 Recent developments have convinced us that <filename>Safe.pm</> is too
4034 insecure to rely on for making <literal>plperl</> trustable. This
4035 change removes use of <filename>Safe.pm</> altogether, in favor of using
4036 a separate interpreter with an opcode mask that is always applied.
4037 Pleasant side effects of the change include that it is now possible to
4038 use Perl's <literal>strict</> pragma in a natural way in
4039 <literal>plperl</>, and that Perl's <literal>$a</> and <literal>$b</>
4040 variables work as expected in sort routines, and that function
4041 compilation is significantly faster. (CVE-2010-1169)
4047 Prevent PL/Tcl from executing untrustworthy code from
4048 <structname>pltcl_modules</> (Tom)
4052 PL/Tcl's feature for autoloading Tcl code from a database table
4053 could be exploited for trojan-horse attacks, because there was no
4054 restriction on who could create or insert into that table. This change
4055 disables the feature unless <structname>pltcl_modules</> is owned by a
4056 superuser. (However, the permissions on the table are not checked, so
4057 installations that really need a less-than-secure modules table can
4058 still grant suitable privileges to trusted non-superusers.) Also,
4059 prevent loading code into the unrestricted <quote>normal</> Tcl
4060 interpreter unless we are really going to execute a <literal>pltclu</>
4061 function. (CVE-2010-1170)
4067 Fix data corruption during WAL replay of
4068 <literal>ALTER ... SET TABLESPACE</> (Tom)
4072 When <varname>archive_mode</> is on, <literal>ALTER ... SET TABLESPACE</>
4073 generates a WAL record whose replay logic was incorrect. It could write
4074 the data to the wrong place, leading to possibly-unrecoverable data
4075 corruption. Data corruption would be observed on standby slaves, and
4076 could occur on the master as well if a database crash and recovery
4077 occurred after committing the <literal>ALTER</> and before the next
4084 Fix possible crash if a cache reset message is received during
4085 rebuild of a relcache entry (Heikki)
4089 This error was introduced in 8.4.3 while fixing a related failure.
4095 Apply per-function GUC settings while running the language validator
4096 for the function (Itagaki Takahiro)
4100 This avoids failures if the function's code is invalid without the
4101 setting; an example is that SQL functions may not parse if the
4102 <varname>search_path</> is not correct.
4108 Do constraint exclusion for inherited <command>UPDATE</> and
4109 <command>DELETE</> target tables when
4110 <varname>constraint_exclusion</> = <literal>partition</> (Tom)
4114 Due to an oversight, this setting previously only caused constraint
4115 exclusion to be checked in <command>SELECT</> commands.
4121 Do not allow an unprivileged user to reset superuser-only parameter
4126 Previously, if an unprivileged user ran <literal>ALTER USER ... RESET
4127 ALL</> for himself, or <literal>ALTER DATABASE ... RESET ALL</> for
4128 a database he owns, this would remove all special parameter settings
4129 for the user or database, even ones that are only supposed to be
4130 changeable by a superuser. Now, the <command>ALTER</> will only
4131 remove the parameters that the user has permission to change.
4137 Avoid possible crash during backend shutdown if shutdown occurs
4138 when a <literal>CONTEXT</> addition would be made to log entries (Tom)
4142 In some cases the context-printing function would fail because the
4143 current transaction had already been rolled back when it came time
4144 to print a log message.
4150 Fix erroneous handling of <literal>%r</> parameter in
4151 <varname>recovery_end_command</> (Heikki)
4155 The value always came out zero.
4161 Ensure the archiver process responds to changes in
4162 <varname>archive_command</> as soon as possible (Tom)
4168 Fix pl/pgsql's <literal>CASE</> statement to not fail when the
4169 case expression is a query that returns no rows (Tom)
4175 Update pl/perl's <filename>ppport.h</> for modern Perl versions
4182 Fix assorted memory leaks in pl/python (Andreas Freund, Tom)
4188 Handle empty-string connect parameters properly in ecpg (Michael)
4194 Prevent infinite recursion in <application>psql</> when expanding
4195 a variable that refers to itself (Tom)
4201 Fix <application>psql</>'s <literal>\copy</> to not add spaces around
4202 a dot within <literal>\copy (select ...)</> (Tom)
4206 Addition of spaces around the decimal point in a numeric literal would
4207 result in a syntax error.
4213 Avoid formatting failure in <application>psql</> when running in a
4214 locale context that doesn't match the <varname>client_encoding</>
4221 Fix unnecessary <quote>GIN indexes do not support whole-index scans</>
4222 errors for unsatisfiable queries using <filename>contrib/intarray</>
4229 Ensure that <filename>contrib/pgstattuple</> functions respond to cancel
4230 interrupts promptly (Tatsuhito Kasahara)
4236 Make server startup deal properly with the case that
4237 <function>shmget()</> returns <literal>EINVAL</> for an existing
4238 shared memory segment (Tom)
4242 This behavior has been observed on BSD-derived kernels including OS X.
4243 It resulted in an entirely-misleading startup failure complaining that
4244 the shared memory request size was too large.
4250 Avoid possible crashes in syslogger process on Windows (Heikki)
4256 Deal more robustly with incomplete time zone information in the
4257 Windows registry (Magnus)
4263 Update the set of known Windows time zone names (Magnus)
4269 Update time zone data files to <application>tzdata</> release 2010j
4270 for DST law changes in Argentina, Australian Antarctic, Bangladesh,
4271 Mexico, Morocco, Pakistan, Palestine, Russia, Syria, Tunisia;
4272 also historical corrections for Taiwan.
4276 Also, add <literal>PKST</> (Pakistan Summer Time) to the default set of
4277 timezone abbreviations.
4286 <sect1 id="release-8-4-3">
4287 <title>Release 8.4.3</title>
4290 <title>Release Date</title>
4291 <simpara>2010-03-15</simpara>
4295 This release contains a variety of fixes from 8.4.2.
4296 For information about new features in the 8.4 major release, see
4297 <xref linkend="release-8-4">.
4301 <title>Migration to Version 8.4.3</title>
4304 A dump/restore is not required for those running 8.4.X.
4305 However, if you are upgrading from a version earlier than 8.4.2,
4306 see the release notes for 8.4.2.
4312 <title>Changes</title>
4318 Add new configuration parameter <varname>ssl_renegotiation_limit</> to
4319 control how often we do session key renegotiation for an SSL connection
4324 This can be set to zero to disable renegotiation completely, which may
4325 be required if a broken SSL library is used. In particular, some
4326 vendors are shipping stopgap patches for CVE-2009-3555 that cause
4327 renegotiation attempts to fail.
4333 Fix possible deadlock during backend startup (Tom)
4339 Fix possible crashes due to not handling errors during relcache reload
4346 Fix possible crash due to use of dangling pointer to a cached plan
4353 Fix possible crash due to overenthusiastic invalidation of cached
4354 plan for <command>ROLLBACK</> (Tom)
4360 Fix possible crashes when trying to recover from a failure in
4361 subtransaction start (Tom)
4367 Fix server memory leak associated with use of savepoints and a client
4368 encoding different from server's encoding (Tom)
4374 Fix incorrect WAL data emitted during end-of-recovery cleanup of a GIST
4375 index page split (Yoichi Hirai)
4379 This would result in index corruption, or even more likely an error
4380 during WAL replay, if we were unlucky enough to crash during
4381 end-of-recovery cleanup after having completed an incomplete GIST
4388 Fix bug in WAL redo cleanup method for GIN indexes (Heikki)
4394 Fix incorrect comparison of scan key in GIN index search (Teodor)
4400 Make <function>substring()</> for <type>bit</> types treat any negative
4401 length as meaning <quote>all the rest of the string</> (Tom)
4405 The previous coding treated only -1 that way, and would produce an
4406 invalid result value for other negative values, possibly leading to
4407 a crash (CVE-2010-0442).
4413 Fix integer-to-bit-string conversions to handle the first fractional
4414 byte correctly when the output bit width is wider than the given
4415 integer by something other than a multiple of 8 bits (Tom)
4421 Fix some cases of pathologically slow regular expression matching (Tom)
4427 Fix bug occurring when trying to inline a SQL function that returns
4428 a set of a composite type that contains dropped columns (Tom)
4434 Fix bug with trying to update a field of an element of a
4435 composite-type array column (Tom)
4441 Avoid failure when <command>EXPLAIN</> has to print a FieldStore or
4442 assignment ArrayRef expression (Tom)
4446 These cases can arise now that <command>EXPLAIN VERBOSE</> tries to
4447 print plan node target lists.
4453 Avoid an unnecessary coercion failure in some cases where an undecorated
4454 literal string appears in a subquery within
4455 <command>UNION</>/<command>INTERSECT</>/<command>EXCEPT</> (Tom)
4459 This fixes a regression for some cases that worked before 8.4.
4465 Avoid undesirable rowtype compatibility check failures in some cases
4466 where a whole-row Var has a rowtype that contains dropped columns (Tom)
4472 Fix the <literal>STOP WAL LOCATION</> entry in backup history files to
4473 report the next WAL segment's name when the end location is exactly at a
4474 segment boundary (Itagaki Takahiro)
4480 Always pass the catalog ID to an option validator function specified in
4481 <command>CREATE FOREIGN DATA WRAPPER</> (Martin Pihlak)
4487 Fix some more cases of temporary-file leakage (Heikki)
4491 This corrects a problem introduced in the previous minor release.
4492 One case that failed is when a plpgsql function returning set is
4493 called within another function's exception handler.
4499 Add support for doing <literal>FULL JOIN ON FALSE</> (Tom)
4503 This prevents a regression from pre-8.4 releases for some queries that
4504 can now be simplified to a constant-false join condition.
4510 Improve constraint exclusion processing of boolean-variable cases,
4511 in particular make it possible to exclude a partition that has a
4512 <quote>bool_column = false</> constraint (Tom)
4518 Prevent treating an <literal>INOUT</> cast as representing binary
4519 compatibility (Heikki)
4525 Include column name in the message when warning about inability to
4526 grant or revoke column-level privileges (Stephen Frost)
4530 This is more useful than before and helps to prevent confusion when
4531 a <command>REVOKE</> generates multiple messages, which formerly
4532 appeared to be duplicates.
4538 When reading <filename>pg_hba.conf</> and related files, do not treat
4539 <literal>@something</> as a file inclusion request if the <literal>@</>
4540 appears inside quote marks; also, never treat <literal>@</> by itself
4541 as a file inclusion request (Tom)
4545 This prevents erratic behavior if a role or database name starts with
4546 <literal>@</>. If you need to include a file whose path name
4547 contains spaces, you can still do so, but you must write
4548 <literal>@"/path to/file"</> rather than putting the quotes around
4549 the whole construct.
4555 Prevent infinite loop on some platforms if a directory is named as
4556 an inclusion target in <filename>pg_hba.conf</> and related files
4563 Fix possible infinite loop if <function>SSL_read</> or
4564 <function>SSL_write</> fails without setting <varname>errno</> (Tom)
4568 This is reportedly possible with some Windows versions of
4569 <application>openssl</>.
4575 Disallow <acronym>GSSAPI</> authentication on local connections,
4576 since it requires a hostname to function correctly (Magnus)
4582 Protect <application>ecpg</> against applications freeing strings
4583 unexpectedly (Michael)
4589 Make <application>ecpg</> report the proper SQLSTATE if the connection
4590 disappears (Michael)
4596 Fix translation of cell contents in <application>psql</> <literal>\d</>
4603 Fix <application>psql</>'s <literal>numericlocale</> option to not
4604 format strings it shouldn't in latex and troff output formats (Heikki)
4610 Fix a small per-query memory leak in <application>psql</> (Tom)
4616 Make <application>psql</> return the correct exit status (3) when
4617 <literal>ON_ERROR_STOP</> and <literal>--single-transaction</> are
4618 both specified and an error occurs during the implied <command>COMMIT</>
4625 Fix <application>pg_dump</>'s output of permissions for foreign servers
4632 Fix possible crash in parallel <application>pg_restore</> due to
4633 out-of-range dependency IDs (Tom)
4639 Fix plpgsql failure in one case where a composite column is set to NULL
4646 Fix possible failure when calling PL/Perl functions from PL/PerlU
4647 or vice versa (Tim Bunce)
4653 Add <literal>volatile</> markings in PL/Python to avoid possible
4654 compiler-specific misbehavior (Zdenek Kotala)
4660 Ensure PL/Tcl initializes the Tcl interpreter fully (Tom)
4664 The only known symptom of this oversight is that the Tcl
4665 <literal>clock</> command misbehaves if using Tcl 8.5 or later.
4671 Prevent <function>ExecutorEnd</> from being run on portals created
4672 within a failed transaction or subtransaction (Tom)
4676 This is known to cause issues when using
4677 <filename>contrib/auto_explain</>.
4683 Prevent crash in <filename>contrib/dblink</> when too many key
4684 columns are specified to a <function>dblink_build_sql_*</> function
4685 (Rushabh Lathia, Joe Conway)
4691 Allow zero-dimensional arrays in <filename>contrib/ltree</> operations
4696 This case was formerly rejected as an error, but it's more convenient to
4697 treat it the same as a zero-element array. In particular this avoids
4698 unnecessary failures when an <type>ltree</> operation is applied to the
4699 result of <literal>ARRAY(SELECT ...)</> and the sub-select returns no
4706 Fix assorted crashes in <filename>contrib/xml2</> caused by sloppy
4707 memory management (Tom)
4713 Make building of <filename>contrib/xml2</> more robust on Windows
4720 Fix race condition in Windows signal handling (Radu Ilie)
4724 One known symptom of this bug is that rows in <structname>pg_listener</>
4725 could be dropped under heavy load.
4731 Make the configure script report failure if the C compiler does
4732 not provide a working 64-bit integer datatype (Tom)
4736 This case has been broken for some time, and no longer seems worth
4737 supporting, so just reject it at configure time instead.
4743 Update time zone data files to <application>tzdata</> release 2010e
4744 for DST law changes in Bangladesh, Chile, Fiji, Mexico, Paraguay, Samoa.
4753 <sect1 id="release-8-4-2">
4754 <title>Release 8.4.2</title>
4757 <title>Release Date</title>
4758 <simpara>2009-12-14</simpara>
4762 This release contains a variety of fixes from 8.4.1.
4763 For information about new features in the 8.4 major release, see
4764 <xref linkend="release-8-4">.
4768 <title>Migration to Version 8.4.2</title>
4771 A dump/restore is not required for those running 8.4.X.
4772 However, if you have any hash indexes,
4773 you should <command>REINDEX</> them after updating to 8.4.2,
4774 to repair possible damage.
4780 <title>Changes</title>
4786 Protect against indirect security threats caused by index functions
4787 changing session-local state (Gurjeet Singh, Tom)
4791 This change prevents allegedly-immutable index functions from possibly
4792 subverting a superuser's session (CVE-2009-4136).
4798 Reject SSL certificates containing an embedded null byte in the common
4799 name (CN) field (Magnus)
4803 This prevents unintended matching of a certificate to a server or client
4804 name during SSL validation (CVE-2009-4034).
4810 Fix hash index corruption (Tom)
4814 The 8.4 change that made hash indexes keep entries sorted by hash value
4815 failed to update the bucket splitting and compaction routines to
4816 preserve the ordering. So application of either of those operations
4817 could lead to permanent corruption of an index, in the sense that
4818 searches might fail to find entries that are present. To deal with
4819 this, it is recommended to <literal>REINDEX</> any hash indexes you may
4820 have after installing this update.
4826 Fix possible crash during backend-startup-time cache initialization (Tom)
4832 Avoid crash on empty thesaurus dictionary (Tom)
4838 Prevent signals from interrupting <literal>VACUUM</> at unsafe times
4843 This fix prevents a PANIC if a <literal>VACUUM FULL</> is canceled
4844 after it's already committed its tuple movements, as well as transient
4845 errors if a plain <literal>VACUUM</> is interrupted after having
4846 truncated the table.
4852 Fix possible crash due to integer overflow in hash table size
4857 This could occur with extremely large planner estimates for the size of
4858 a hashjoin's result.
4864 Fix crash if a <literal>DROP</> is attempted on an internally-dependent
4871 Fix very rare crash in <type>inet</>/<type>cidr</> comparisons (Chris
4878 Ensure that shared tuple-level locks held by prepared transactions are
4879 not ignored (Heikki)
4885 Fix premature drop of temporary files used for a cursor that is accessed
4886 within a subtransaction (Heikki)
4892 Fix memory leak in syslogger process when rotating to a new CSV logfile
4899 Fix memory leak in postmaster when re-parsing <filename>pg_hba.conf</>
4906 Fix Windows permission-downgrade logic (Jesse Morris)
4910 This fixes some cases where the database failed to start on Windows,
4911 often with misleading error messages such as <quote>could not locate
4912 matching postgres executable</quote>.
4918 Make <literal>FOR UPDATE/SHARE</> in the primary query not propagate
4919 into <literal>WITH</> queries (Tom)
4925 WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE
4927 the <literal>FOR UPDATE</> will now affect <literal>bar</> but not
4928 <literal>foo</>. This is more useful and consistent than the original
4929 8.4 behavior, which tried to propagate <literal>FOR UPDATE</> into the
4930 <literal>WITH</> query but always failed due to assorted implementation
4931 restrictions. It also follows the design rule that <literal>WITH</>
4932 queries are executed as if independent of the main query.
4938 Fix bug with a <literal>WITH RECURSIVE</> query immediately inside
4945 Fix concurrency bug in hash indexes (Tom)
4949 Concurrent insertions could cause index scans to transiently report
4956 Fix incorrect logic for GiST index page splits, when the split depends
4957 on a non-first column of the index (Paul Ramsey)
4963 Fix wrong search results for a multi-column GIN index with
4964 <literal>fastupdate</> enabled (Teodor)
4970 Fix bugs in WAL entry creation for GIN indexes (Tom)
4974 These bugs were masked when <varname>full_page_writes</> was on, but
4975 with it off a WAL replay failure was certain if a crash occurred before
4976 the next checkpoint.
4982 Don't error out if recycling or removing an old WAL file fails at the
4983 end of checkpoint (Heikki)
4987 It's better to treat the problem as non-fatal and allow the checkpoint
4988 to complete. Future checkpoints will retry the removal. Such problems
4989 are not expected in normal operation, but have been seen to be
4990 caused by misdesigned Windows anti-virus and backup software.
4996 Ensure WAL files aren't repeatedly archived on Windows (Heikki)
5000 This is another symptom that could happen if some other process
5001 interfered with deletion of a no-longer-needed file.
5007 Fix PAM password processing to be more robust (Tom)
5011 The previous code is known to fail with the combination of the Linux
5012 <literal>pam_krb5</> PAM module with Microsoft Active Directory as the
5013 domain controller. It might have problems elsewhere too, since it was
5014 making unjustified assumptions about what arguments the PAM stack would
5021 Raise the maximum authentication token (Kerberos ticket) size in GSSAPI
5022 and SSPI authentication methods (Ian Turner)
5026 While the old 2000-byte limit was more than enough for Unix Kerberos
5027 implementations, tickets issued by Windows Domain Controllers can be
5034 Ensure that domain constraints are enforced in constructs like
5035 <literal>ARRAY[...]::domain</>, where the domain is over an array type
5042 Fix foreign-key logic for some cases involving composite-type columns
5043 as foreign keys (Tom)
5049 Ensure that a cursor's snapshot is not modified after it is created
5054 This could lead to a cursor delivering wrong results if later operations
5055 in the same transaction modify the data the cursor is supposed to return.
5061 Fix <literal>CREATE TABLE</> to properly merge default expressions
5062 coming from different inheritance parent tables (Tom)
5066 This used to work but was broken in 8.4.
5072 Re-enable collection of access statistics for sequences (Akira Kurosawa)
5076 This used to work but was broken in 8.3.
5082 Fix processing of ownership dependencies during <literal>CREATE OR
5083 REPLACE FUNCTION</> (Tom)
5089 Fix incorrect handling of <literal>WHERE</>
5090 <replaceable>x</>=<replaceable>x</> conditions (Tom)
5094 In some cases these could get ignored as redundant, but they aren't
5095 — they're equivalent to <replaceable>x</> <literal>IS NOT NULL</>.
5101 Fix incorrect plan construction when using hash aggregation to implement
5102 <literal>DISTINCT</> for textually identical volatile expressions (Tom)
5108 Fix Assert failure for a volatile <literal>SELECT DISTINCT ON</>
5115 Fix <function>ts_stat()</> to not fail on an empty <type>tsvector</>
5122 Make text search parser accept underscores in XML attributes (Peter)
5128 Fix encoding handling in <type>xml</> binary input (Heikki)
5132 If the XML header doesn't specify an encoding, we now assume UTF-8 by
5133 default; the previous handling was inconsistent.
5139 Fix bug with calling <literal>plperl</> from <literal>plperlu</> or vice
5144 An error exit from the inner function could result in crashes due to
5145 failure to re-select the correct Perl interpreter for the outer function.
5151 Fix session-lifespan memory leak when a PL/Perl function is redefined
5158 Ensure that Perl arrays are properly converted to
5159 <productname>PostgreSQL</> arrays when returned by a set-returning
5160 PL/Perl function (Andrew Dunstan, Abhijit Menon-Sen)
5164 This worked correctly already for non-set-returning functions.
5170 Fix rare crash in exception processing in PL/Python (Peter)
5176 Fix <application>ecpg</> problem with comments in <literal>DECLARE
5177 CURSOR</> statements (Michael)
5183 Fix <application>ecpg</> to not treat recently-added keywords as
5184 reserved words (Tom)
5188 This affected the keywords <literal>CALLED</>, <literal>CATALOG</>,
5189 <literal>DEFINER</>, <literal>ENUM</>, <literal>FOLLOWING</>,
5190 <literal>INVOKER</>, <literal>OPTIONS</>, <literal>PARTITION</>,
5191 <literal>PRECEDING</>, <literal>RANGE</>, <literal>SECURITY</>,
5192 <literal>SERVER</>, <literal>UNBOUNDED</>, and <literal>WRAPPER</>.
5198 Re-allow regular expression special characters in <application>psql</>'s
5199 <literal>\df</> function name parameter (Tom)
5205 In <filename>contrib/fuzzystrmatch</>, correct the calculation of
5206 <function>levenshtein</> distances with non-default costs (Marcin Mank)
5212 In <filename>contrib/pg_standby</>, disable triggering failover with a
5213 signal on Windows (Fujii Masao)
5217 This never did anything useful, because Windows doesn't have Unix-style
5218 signals, but recent changes made it actually crash.
5224 Put <literal>FREEZE</> and <literal>VERBOSE</> options in the right
5225 order in the <literal>VACUUM</> command that
5226 <filename>contrib/vacuumdb</> produces (Heikki)
5232 Fix possible leak of connections when <filename>contrib/dblink</>
5233 encounters an error (Tatsuhito Kasahara)
5239 Ensure <application>psql</>'s flex module is compiled with the correct
5240 system header definitions (Tom)
5244 This fixes build failures on platforms where
5245 <literal>--enable-largefile</> causes incompatible changes in the
5252 Make the postmaster ignore any <literal>application_name</> parameter in
5253 connection request packets, to improve compatibility with future libpq
5260 Update the timezone abbreviation files to match current reality (Joachim
5265 This includes adding <literal>IDT</> to the default
5266 timezone abbreviation set.
5272 Update time zone data files to <application>tzdata</> release 2009s
5273 for DST law changes in Antarctica, Argentina, Bangladesh, Fiji,
5274 Novokuznetsk, Pakistan, Palestine, Samoa, Syria; also historical
5275 corrections for Hong Kong.
5284 <sect1 id="release-8-4-1">
5285 <title>Release 8.4.1</title>
5288 <title>Release Date</title>
5289 <simpara>2009-09-09</simpara>
5293 This release contains a variety of fixes from 8.4.
5294 For information about new features in the 8.4 major release, see
5295 <xref linkend="release-8-4">.
5299 <title>Migration to Version 8.4.1</title>
5302 A dump/restore is not required for those running 8.4.X.
5308 <title>Changes</title>
5314 Fix WAL page header initialization at the end of archive recovery
5319 This could lead to failure to process the WAL in a subsequent
5326 Fix <quote>cannot make new WAL entries during recovery</> error (Tom)
5332 Fix problem that could make expired rows visible after a crash (Tom)
5336 This bug involved a page status bit potentially not being set
5337 correctly after a server crash.
5343 Disallow <command>RESET ROLE</> and <command>RESET SESSION
5344 AUTHORIZATION</> inside security-definer functions (Tom, Heikki)
5348 This covers a case that was missed in the previous patch that
5349 disallowed <command>SET ROLE</> and <command>SET SESSION
5350 AUTHORIZATION</> inside security-definer functions.
5357 Make <command>LOAD</> of an already-loaded loadable module
5362 Formerly, <command>LOAD</> would attempt to unload and re-load the
5363 module, but this is unsafe and not all that useful.
5369 Make window function <literal>PARTITION BY</> and <literal>ORDER BY</>
5370 items always be interpreted as simple expressions (Tom)
5374 In 8.4.0 these lists were parsed following the rules used for
5375 top-level <literal>GROUP BY</> and <literal>ORDER BY</> lists.
5376 But this was not correct per the SQL standard, and it led to possible
5383 Fix several errors in planning of semi-joins (Tom)
5387 These led to wrong query results in some cases where <literal>IN</>
5388 or <literal>EXISTS</> was used together with another join.
5394 Fix handling of whole-row references to subqueries that are within
5400 <literal>SELECT COUNT(ss.*) FROM ... LEFT JOIN (SELECT ...) ss ON ...</>.
5401 Here, <literal>ss.*</> would be treated as <literal>ROW(NULL,NULL,...)</>
5402 for null-extended join rows, which is not the same as a simple NULL.
5403 Now it is treated as a simple NULL.
5409 Fix Windows shared-memory allocation code (Tsutomu Yamada, Magnus)
5413 This bug led to the often-reported <quote>could not reattach
5414 to shared memory</> error message.
5420 Fix locale handling with plperl (Heikki)
5424 This bug could cause the server's locale setting to change when a
5425 plperl function is called, leading to data corruption.
5431 Fix handling of reloptions to ensure setting one option doesn't
5432 force default values for others (Itagaki Takahiro)
5438 Ensure that a <quote>fast shutdown</> request will forcibly terminate
5439 open sessions, even if a <quote>smart shutdown</> was already in progress
5446 Avoid memory leak for <function>array_agg()</> in <literal>GROUP BY</>
5453 Treat <function>to_char(..., 'TH')</> as an uppercase ordinal
5454 suffix with <literal>'HH'</>/<literal>'HH12'</> (Heikki)
5458 It was previously handled as <literal>'th'</> (lowercase).
5464 Include the fractional part in the result of
5465 <function>EXTRACT(second)</> and
5466 <function>EXTRACT(milliseconds)</> for
5467 <type>time</> and <type>time with time zone</> inputs (Tom)
5471 This has always worked for floating-point datetime configurations,
5472 but was broken in the integer datetime code.
5478 Fix overflow for <literal>INTERVAL '<replaceable>x</> ms'</literal>
5479 when <replaceable>x</> is more than 2 million and integer
5480 datetimes are in use (Alex Hunsaker)
5486 Improve performance when processing toasted values in index scans (Tom)
5490 This is particularly useful for <ulink
5491 url="http://postgis.refractions.net/">PostGIS</ulink>.
5497 Fix a typo that disabled <varname>commit_delay</> (Jeff Janes)
5503 Output early-startup messages to <filename>postmaster.log</> if the
5504 server is started in silent mode (Tom)
5508 Previously such error messages were discarded, leading to
5509 difficulty in debugging.
5515 Remove translated FAQs (Peter)
5519 They are now on the <ulink
5520 url="http://wiki.postgresql.org/wiki/FAQ">wiki</ulink>. The
5521 main FAQ was moved to the wiki some time ago.
5527 Fix <application>pg_ctl</> to not go into an infinite loop if
5528 <filename>postgresql.conf</> is empty (Jeff Davis)
5534 Fix several errors in <application>pg_dump</>'s
5535 <literal>--binary-upgrade</> mode (Bruce, Tom)
5539 <literal>pg_dump --binary-upgrade</> is used by pg_migrator.
5545 Fix <filename>contrib/xml2</>'s <function>xslt_process()</> to
5546 properly handle the maximum number of parameters (twenty) (Tom)
5552 Improve robustness of <application>libpq</>'s code to recover
5553 from errors during <command>COPY FROM STDIN</> (Tom)
5559 Avoid including conflicting readline and editline header files
5560 when both libraries are installed (Zdenek Kotala)
5566 Work around gcc bug that causes <quote>floating-point exception</>
5567 instead of <quote>division by zero</> on some platforms (Tom)
5573 Update time zone data files to <application>tzdata</> release 2009l
5574 for DST law changes in Bangladesh, Egypt, Mauritius.
5583 <sect1 id="release-8-4">
5584 <title>Release 8.4</title>
5587 <title>Release Date</title>
5588 <simpara>2009-07-01</simpara>
5592 <title>Overview</title>
5595 After many years of development, <productname>PostgreSQL</> has
5596 become feature-complete in many areas. This release shows a
5597 targeted approach to adding features (e.g., authentication,
5598 monitoring, space reuse), and adds capabilities defined in the
5599 later SQL standards. The major areas of enhancement are:
5604 <!-- This list duplicates items below, but without authors or details-->
5614 Common Table Expressions and Recursive Queries
5620 Default and variadic parameters for functions
5638 Per-database locale settings
5644 Improved hash indexes
5650 Improved join performance for <literal>EXISTS</> and <literal>NOT EXISTS</> queries
5656 Easier-to-use Warm Standby
5662 Automatic sizing of the Free Space Map
5668 Visibility Map (greatly reduces vacuum overhead for slowly-changing tables)
5674 Version-aware psql (backslash commands work against older servers)
5680 Support SSL certificates for user authentication
5686 Per-function runtime statistics
5692 Easy editing of functions in psql
5698 New contrib modules: pg_stat_statements, auto_explain, citext, btree_gin
5705 The above items are explained in more detail in the sections below.
5711 <title>Migration to Version 8.4</title>
5714 A dump/restore using <application>pg_dump</application> is
5715 required for those wishing to migrate data from any previous
5720 Observe the following incompatibilities:
5724 <title>General</title>
5729 Use 64-bit integer datetimes by default (Neil Conway)
5733 Previously this was selected by <application>configure</>'s
5734 <option>--enable-integer-datetimes</> option. To retain
5735 the old behavior, build with <option>--disable-integer-datetimes</>.
5741 Remove <application>ipcclean</> utility command (Bruce)
5745 The utility only worked on a few platforms. Users should use
5746 their operating system tools instead.
5755 <title>Server Settings</title>
5760 Change default setting for
5761 <literal>log_min_messages</> to <literal>warning</> (previously
5762 it was <literal>notice</>) to reduce log file volume (Tom)
5768 Change default setting for <literal>max_prepared_transactions</> to
5769 zero (previously it was 5) (Tom)
5775 Make <literal>debug_print_parse</>, <literal>debug_print_rewritten</>,
5776 and <literal>debug_print_plan</>
5777 output appear at <literal>LOG</> message level, not
5778 <literal>DEBUG1</> as formerly (Tom)
5784 Make <literal>debug_pretty_print</> default to <literal>on</> (Tom)
5790 Remove <varname>explain_pretty_print</> parameter (no longer needed) (Tom)
5796 Make <varname>log_temp_files</> settable by superusers only, like other
5797 logging options (Simon Riggs)
5803 Remove automatic appending of the epoch timestamp when no <literal>%</>
5804 escapes are present in <literal>log_filename</> (Robert Haas)
5808 This change was made because some users wanted a fixed log filename,
5809 for use with an external log rotation tool.
5815 Remove <varname>log_restartpoints</> from <filename>recovery.conf</>;
5816 instead use <varname>log_checkpoints</> (Simon)
5822 Remove <varname>krb_realm</> and <varname>krb_server_hostname</>;
5823 these are now set in <filename>pg_hba.conf</> instead (Magnus)
5829 There are also significant changes in <link
5830 linkend="release-8-4-pg-hba-conf"><filename>pg_hba.conf</></link>,
5840 <title>Queries</title>
5846 Change <command>TRUNCATE</> and <command>LOCK</> to
5847 apply to child tables of the specified table(s) (Peter)
5851 These commands now accept an <literal>ONLY</> option that prevents
5852 processing child tables; this option must be used if the old
5859 <command>SELECT DISTINCT</> and
5860 <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</>
5861 no longer always produce sorted output (Tom)
5865 Previously, these types of queries always removed duplicate rows
5866 by means of Sort/Unique processing (i.e., sort then remove adjacent
5867 duplicates). Now they can be implemented by hashing, which will not
5868 produce sorted output. If an application relied on the output being
5869 in sorted order, the recommended fix is to add an <literal>ORDER BY</>
5870 clause. As a short-term workaround, the previous behavior can be
5871 restored by disabling <literal>enable_hashagg</>, but that is a very
5872 performance-expensive fix. <literal>SELECT DISTINCT ON</> never uses
5873 hashing, however, so its behavior is unchanged.
5879 Force child tables to inherit <literal>CHECK</> constraints from parents
5880 (Alex Hunsaker, Nikhil Sontakke, Tom)
5884 Formerly it was possible to drop such a constraint from a child
5885 table, allowing rows that violate the constraint to be visible
5886 when scanning the parent table. This was deemed inconsistent,
5887 as well as contrary to SQL standard.
5893 Disallow negative <literal>LIMIT</> or <literal>OFFSET</>
5894 values, rather than treating them as zero (Simon)
5900 Disallow <command>LOCK TABLE</> outside a transaction block
5905 Such an operation is useless because the lock would be released
5912 Sequences now contain an additional <structfield>start_value</> column
5913 (Zoltan Boszormenyi)
5917 This supports <command>ALTER SEQUENCE ... RESTART</>.
5927 <title>Functions and Operators</title>
5933 Make <type>numeric</> zero raised to a fractional power return
5934 <literal>0</>, rather than throwing an error, and make
5935 <type>numeric</> zero raised to the zero power return <literal>1</>,
5936 rather than error (Bruce)
5940 This matches the longstanding <type>float8</> behavior.
5946 Allow unary minus of floating-point values to produce minus zero (Tom)
5950 The changed behavior is more <acronym>IEEE</>-standard
5957 Throw an error if an escape character is the last character in
5958 a <literal>LIKE</> pattern (i.e., it has nothing to escape) (Tom)
5962 Previously, such an escape character was silently ignored,
5963 thus possibly masking application logic errors.
5969 Remove <literal>~=~</> and <literal>~<>~</> operators
5970 formerly used for <literal>LIKE</> index comparisons (Tom)
5974 Pattern indexes now use the regular equality operator.
5980 <function>xpath()</> now passes its arguments to <application>libxml</>
5981 without any changes (Andrew)
5985 This means that the XML argument must be a well-formed XML document.
5986 The previous coding attempted to allow XML fragments, but it did not
5993 Make <function>xmlelement()</> format attribute values just like
5994 content values (Peter)
5998 Previously, attribute values were formatted according to the
5999 normal SQL output behavior, which is sometimes at odds with
6006 Rewrite memory management for <application>libxml</>-using functions
6011 This change should avoid some compatibility problems with use of
6012 <application>libxml</> in PL/Perl and other add-on code.
6018 Adopt a faster algorithm for hash functions (Kenneth Marshall,
6019 based on work of Bob Jenkins)
6023 Many of the built-in hash functions now deliver different results on
6024 little-endian and big-endian platforms.
6031 <title>Temporal Functions and Operators</title>
6037 <varname>DateStyle</> no longer controls <type>interval</> output
6038 formatting; instead there is a new variable <varname>IntervalStyle</>
6045 Improve consistency of handling of fractional seconds in
6046 <type>timestamp</> and <type>interval</> output (Ron Mayer)
6050 This may result in displaying a different number of fractional
6051 digits than before, or rounding instead of truncating.
6057 Make <function>to_char()</>'s localized month/day names depend
6058 on <varname>LC_TIME</>, not <varname>LC_MESSAGES</> (Euler
6059 Taveira de Oliveira)
6065 Cause <function>to_date()</> and <function>to_timestamp()</>
6066 to more consistently report errors for invalid input (Brendan
6071 Previous versions would often ignore or silently misread input
6072 that did not match the format string. Such cases will now
6079 Fix <function>to_timestamp()</> to not require upper/lower case
6080 matching for meridian (<literal>AM</>/<literal>PM</>) and era
6081 (<literal>BC</>/<literal>AD</>) format designations (Brendan
6086 For example, input value <literal>ad</> now matches the format
6087 string <literal>AD</>.
6100 <title>Changes</title>
6103 Below you will find a detailed account of the changes between
6104 <productname>PostgreSQL</productname> 8.4 and the previous major
6109 <title>Performance</title>
6114 Improve optimizer statistics calculations (Jan Urbanski, Tom)
6118 In particular, estimates for full-text-search operators are
6125 Allow <command>SELECT DISTINCT</> and
6126 <literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</> to
6131 This means that these types of queries no longer automatically
6132 produce sorted output.
6138 Create explicit concepts of semi-joins and anti-joins (Tom)
6142 This work formalizes our previous ad-hoc treatment of <literal>IN
6143 (SELECT ...)</> clauses, and extends it to <literal>EXISTS</> and
6144 <literal>NOT EXISTS</> clauses. It should result in significantly
6145 better planning of <literal>EXISTS</> and <literal>NOT EXISTS</>
6146 queries. In general, logically equivalent <literal>IN</> and
6147 <literal>EXISTS</> clauses should now have similar performance,
6148 whereas previously <literal>IN</> often won.
6154 Improve optimization of sub-selects beneath outer joins (Tom)
6158 Formerly, a sub-select or view could not be optimized very well if it
6159 appeared within the nullable side of an outer join and contained
6160 non-strict expressions (for instance, constants) in its result list.
6166 Improve the performance of <function>text_position()</> and
6167 related functions by using Boyer-Moore-Horspool searching (David
6172 This is particularly helpful for long search patterns.
6178 Reduce I/O load of writing the statistics collection file
6179 by writing the file only when requested (Martin Pihlak)
6185 Improve performance for bulk inserts (Robert Haas, Simon)
6191 Increase the default value of <varname>default_statistics_target</>
6192 from <literal>10</> to <literal>100</> (Greg Sabino Mullane,
6197 The maximum value was also increased from <literal>1000</> to
6204 Perform <varname>constraint_exclusion</> checking by default
6205 in queries involving inheritance or <literal>UNION ALL</> (Tom)
6209 A new <varname>constraint_exclusion</> setting,
6210 <literal>partition</>, was added to specify this behavior.
6216 Allow I/O read-ahead for bitmap index scans (Greg Stark)
6220 The amount of read-ahead is controlled by
6221 <varname>effective_io_concurrency</>. This feature is available only
6222 if the kernel has <function>posix_fadvise()</> support.
6228 Inline simple set-returning <acronym>SQL</> functions in
6229 <literal>FROM</> clauses (Richard Rowell)
6235 Improve performance of multi-batch hash joins by providing a special
6236 case for join key values that are especially common in the outer
6237 relation (Bryce Cutt, Ramon Lawrence)
6243 Reduce volume of temporary data in multi-batch hash joins
6244 by suppressing <quote>physical tlist</> optimization (Michael
6245 Henderson, Ramon Lawrence)
6251 Avoid waiting for idle-in-transaction sessions during
6252 <command>CREATE INDEX CONCURRENTLY</> (Simon)
6258 Improve performance of shared cache invalidation (Tom)
6267 <title>Server</title>
6270 <title>Settings</title>
6276 Convert many <filename>postgresql.conf</> settings to enumerated
6277 values so that <literal>pg_settings</> can display the valid
6284 Add <varname>cursor_tuple_fraction</> parameter to control the
6285 fraction of a cursor's rows that the planner assumes will be
6286 fetched (Robert Hell)
6292 Allow underscores in the names of custom variable
6293 classes in <filename>postgresql.conf</> (Tom)
6302 <title>Authentication and security</title>
6307 Remove support for the (insecure) <literal>crypt</> authentication method
6312 This effectively obsoletes pre-<productname>PostgreSQL</> 7.2 client
6313 libraries, as there is no longer any non-plaintext password method that
6320 Support regular expressions in <filename>pg_ident.conf</>
6327 Allow <productname>Kerberos</>/<acronym>GSSAPI</> parameters
6328 to be changed without restarting the postmaster (Magnus)
6334 Support <acronym>SSL</> certificate chains in server certificate
6335 file (Andrew Gierth)
6339 Including the full certificate chain makes the client able
6340 to verify the certificate without having all intermediate CA
6341 certificates present in the local store, which is often the case for
6348 Report appropriate error message for combination of <literal>MD5</>
6349 authentication and <varname>db_user_namespace</> enabled (Bruce)
6356 <sect4 id="release-8-4-pg-hba-conf">
6357 <title><filename>pg_hba.conf</></title>
6362 Change all authentication options to use <literal>name=value</>
6367 This makes incompatible changes to the <literal>ldap</>,
6368 <literal>pam</> and <literal>ident</> authentication methods. All
6369 <filename>pg_hba.conf</> entries with these methods need to be
6370 rewritten using the new format.
6376 Remove the <literal>ident sameuser</> option, instead making that
6377 behavior the default if no usermap is specified (Magnus)
6383 Allow a usermap parameter for all external authentication methods
6388 Previously a usermap was only supported for <literal>ident</>
6395 Add <literal>clientcert</> option to control requesting of a
6396 client certificate (Magnus)
6400 Previously this was controlled by the presence of a root
6401 certificate file in the server's data directory.
6407 Add <literal>cert</> authentication method to allow
6408 <emphasis>user</> authentication via <acronym>SSL</> certificates
6413 Previously <acronym>SSL</> certificates could only verify that
6414 the client had access to a certificate, not authenticate a
6421 Allow <literal>krb5</>, <literal>gssapi</> and <literal>sspi</>
6422 realm and <literal>krb5</> host settings to be specified in
6423 <filename>pg_hba.conf</> (Magnus)
6427 These override the settings in <filename>postgresql.conf</>.
6433 Add <varname>include_realm</> parameter for <literal>krb5</>,
6434 <literal>gssapi</>, and <literal>sspi</> methods (Magnus)
6438 This allows identical usernames from different realms to be
6439 authenticated as different database users using usermaps.
6445 Parse <filename>pg_hba.conf</> fully when it is loaded,
6446 so that errors are reported immediately (Magnus)
6450 Previously, most errors in the file wouldn't be detected until clients
6451 tried to connect, so an erroneous file could render the system
6452 unusable. With the new behavior, if an error is detected during
6453 reload then the bad file is rejected and the postmaster continues
6454 to use its old copy.
6460 Show all parsing errors in <filename>pg_hba.conf</> instead of
6461 aborting after the first one (Selena Deckelmann)
6467 Support <literal>ident</> authentication over Unix-domain sockets
6468 on <productname>Solaris</> (Garick Hamlin)
6477 <title>Continuous Archiving</title>
6482 Provide an option to <function>pg_start_backup()</> to force its
6483 implied checkpoint to finish as quickly as possible (Tom)
6487 The default behavior avoids excess I/O consumption, but that is
6488 pointless if no concurrent query activity is going on.
6494 Make <function>pg_stop_backup()</> wait for modified <acronym>WAL</>
6495 files to be archived (Simon)
6499 This guarantees that the backup is valid at the time
6500 <function>pg_stop_backup()</> completes.
6506 When archiving is enabled, rotate the last WAL segment at shutdown
6507 so that all transactions can be archived immediately
6508 (Guillaume Smet, Heikki)
6514 Delay <quote>smart</> shutdown while a continuous archiving base backup
6515 is in progress (Laurenz Albe)
6521 Cancel a continuous archiving base backup if <quote>fast</> shutdown
6522 is requested (Laurenz Albe)
6528 Allow <filename>recovery.conf</> boolean variables to take the
6529 same range of string values as <filename>postgresql.conf</>
6540 <title>Monitoring</title>
6545 Add <function>pg_conf_load_time()</> to report when
6546 the <productname>PostgreSQL</> configuration files were last loaded
6553 Add <function>pg_terminate_backend()</> to safely terminate a
6554 backend (the <literal>SIGTERM</> signal works also) (Tom, Bruce)
6558 While it's always been possible to <literal>SIGTERM</> a single
6559 backend, this was previously considered unsupported; and testing
6560 of the case found some bugs that are now fixed.
6566 Add ability to track user-defined functions' call counts and
6567 runtimes (Martin Pihlak)
6571 Function statistics appear in a new system view,
6572 <literal>pg_stat_user_functions</>. Tracking is controlled
6573 by the new parameter <varname>track_functions</>.
6579 Allow specification of the maximum query string size in
6580 <literal>pg_stat_activity</> via new
6581 <varname>track_activity_query_size</> parameter (Thomas Lee)
6587 Increase the maximum line length sent to <application>syslog</>, in
6588 hopes of improving performance (Tom)
6594 Add read-only configuration variables <varname>segment_size</>,
6595 <varname>wal_block_size</>, and <varname>wal_segment_size</>
6602 When reporting a deadlock, report the text of all queries involved
6603 in the deadlock to the server log (Itagaki Takahiro)
6609 Add <function>pg_stat_get_activity(pid)</> function to return
6610 information about a specific process id (Magnus)
6616 Allow the location of the server's statistics file to be specified
6617 via <varname>stats_temp_directory</> (Magnus)
6621 This allows the statistics file to be placed in a
6622 <acronym>RAM</>-resident directory to reduce I/O requirements.
6623 On startup/shutdown, the file is copied to its traditional location
6624 (<literal>$PGDATA/global/</>) so it is preserved across restarts.
6635 <title>Queries</title>
6640 Add support for <literal>WINDOW</> functions (Hitoshi Harada)
6646 Add support for <literal>WITH</> clauses (CTEs), including <literal>WITH
6647 RECURSIVE</> (Yoshiyuki Asaba, Tatsuo Ishii, Tom)
6653 Add <command>TABLE</> command (Peter)
6657 <literal>TABLE tablename</> is a SQL standard short-hand for
6658 <literal>SELECT * FROM tablename</>.
6664 Allow <literal>AS</> to be optional when specifying a
6665 <command>SELECT</> (or <literal>RETURNING</>) column output
6666 label (Hiroshi Saito)
6670 This works so long as the column label is not any
6671 <productname>PostgreSQL</> keyword; otherwise <literal>AS</> is still
6678 Support set-returning functions in <command>SELECT</> result lists
6679 even for functions that return their result via a tuplestore (Tom)
6683 In particular, this means that functions written in PL/pgSQL
6684 and other PL languages can now be called this way.
6690 Support set-returning functions in the output of aggregation
6691 and grouping queries (Tom)
6697 Allow <command>SELECT FOR UPDATE</>/<literal>SHARE</> to work
6698 on inheritance trees (Tom)
6704 Add infrastructure for <acronym>SQL/MED</> (Martin Pihlak,
6709 There are no remote or external <acronym>SQL/MED</> capabilities
6710 yet, but this change provides a standardized and future-proof
6711 system for managing connection information for modules like
6712 <filename>dblink</> and <filename>plproxy</>.
6718 Invalidate cached plans when referenced schemas, functions, operators,
6719 or operator classes are modified (Martin Pihlak, Tom)
6723 This improves the system's ability to respond to on-the-fly
6729 Allow comparison of composite types and allow arrays of
6730 anonymous composite types (Tom)
6734 This allows constructs such as
6735 <literal>row(1, 1.1) = any (array[row(7, 7.7), row(1, 1.0)])</>.
6736 This is particularly useful in recursive queries.
6742 Add support for Unicode string literal and identifier specifications
6743 using code points, e.g. <literal>U&'d\0061t\+000061'</>
6750 Reject <literal>\000</> in string literals and <command>COPY</> data
6755 Previously, this was accepted but had the effect of terminating
6756 the string contents.
6762 Improve the parser's ability to report error locations (Tom)
6766 An error location is now reported for many semantic errors,
6767 such as mismatched datatypes, that previously could not be localized.
6774 <title><command>TRUNCATE</></title>
6779 Support statement-level <literal>ON TRUNCATE</> triggers (Simon)
6785 Add <literal>RESTART</>/<literal>CONTINUE IDENTITY</> options
6786 for <command>TRUNCATE TABLE</>
6787 (Zoltan Boszormenyi)
6791 The start value of a sequence can be changed by <command>ALTER
6792 SEQUENCE START WITH</>.
6798 Allow <command>TRUNCATE tab1, tab1</> to succeed (Bruce)
6804 Add a separate <command>TRUNCATE</> permission (Robert Haas)
6813 <title><command>EXPLAIN</></title>
6818 Make <command>EXPLAIN VERBOSE</> show the output columns of each
6823 Previously <command>EXPLAIN VERBOSE</> output an internal
6824 representation of the query plan. (That behavior is now
6825 available via <varname>debug_print_plan</>.)
6831 Make <command>EXPLAIN</> identify subplans and initplans with
6832 individual labels (Tom)
6838 Make <command>EXPLAIN</> honor <varname>debug_print_plan</> (Tom)
6844 Allow <command>EXPLAIN</> on <command>CREATE TABLE AS</> (Peter)
6853 <title><literal>LIMIT</>/<literal>OFFSET</></title>
6858 Allow sub-selects in <literal>LIMIT</> and <literal>OFFSET</> (Tom)
6864 Add <acronym>SQL</>-standard syntax for
6865 <literal>LIMIT</>/<literal>OFFSET</> capabilities (Peter)
6870 <literal>OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS}
6882 <title>Object Manipulation</title>
6887 Add support for column-level privileges (Stephen Frost, KaiGai
6894 Refactor multi-object <command>DROP</> operations to reduce the
6895 need for <literal>CASCADE</> (Alex Hunsaker)
6899 For example, if table <literal>B</> has a dependency on table
6900 <literal>A</>, the command <literal>DROP TABLE A, B</> no longer
6901 requires the <literal>CASCADE</> option.
6907 Fix various problems with concurrent <command>DROP</> commands
6908 by ensuring that locks are taken before we begin to drop dependencies
6915 Improve reporting of dependencies during <command>DROP</>
6922 Add <literal>WITH [NO] DATA</> clause to <command>CREATE TABLE
6923 AS</>, per the <acronym>SQL</> standard (Peter, Tom)
6929 Add support for user-defined I/O conversion casts (Heikki)
6935 Allow <command>CREATE AGGREGATE</> to use an <type>internal</>
6936 transition datatype (Tom)
6942 Add <literal>LIKE</> clause to <command>CREATE TYPE</> (Tom)
6946 This simplifies creation of data types that use the same internal
6947 representation as an existing type.
6953 Allow specification of the type category and <quote>preferred</>
6954 status for user-defined base types (Tom)
6958 This allows more control over the coercion behavior of user-defined
6965 Allow <command>CREATE OR REPLACE VIEW</> to add columns to the
6966 end of a view (Robert Haas)
6973 <title><command>ALTER</></title>
6978 Add <command>ALTER TYPE RENAME</> (Petr Jelinek)
6984 Add <command>ALTER SEQUENCE ... RESTART</> (with no parameter) to
6985 reset a sequence to its initial value (Zoltan Boszormenyi)
6991 Modify the <command>ALTER TABLE</> syntax to allow all reasonable
6992 combinations for tables, indexes, sequences, and views (Tom)
6996 This change allows the following new syntaxes:
7001 <command>ALTER SEQUENCE OWNER TO</>
7006 <command>ALTER VIEW ALTER COLUMN SET/DROP DEFAULT</>
7011 <command>ALTER VIEW OWNER TO</>
7016 <command>ALTER VIEW SET SCHEMA</>
7021 There is no actual new functionality here, but formerly
7022 you had to say <command>ALTER TABLE</> to do these things,
7023 which was confusing.
7029 Add support for the syntax <command>ALTER TABLE ... ALTER COLUMN
7030 ... SET DATA TYPE</> (Peter)
7034 This is <acronym>SQL</>-standard syntax for functionality that
7035 was already supported.
7041 Make <command>ALTER TABLE SET WITHOUT OIDS</> rewrite the table
7042 to physically remove <type>OID</> values (Tom)
7046 Also, add <command>ALTER TABLE SET WITH OIDS</> to rewrite the
7047 table to add <type>OID</>s.
7056 <title>Database Manipulation</title>
7061 Improve reporting of
7062 <command>CREATE</>/<command>DROP</>/<command>RENAME DATABASE</>
7063 failure when uncommitted prepared transactions are the cause
7070 Make <varname>LC_COLLATE</> and <varname>LC_CTYPE</> into
7071 per-database settings (Radek Strnad, Heikki)
7075 This makes collation similar to encoding, which was always
7076 configurable per database.
7082 Improve checks that the database encoding, collation
7083 (<varname>LC_COLLATE</>), and character classes
7084 (<varname>LC_CTYPE</>) match (Heikki, Tom)
7088 Note in particular that a new database's encoding and locale
7089 settings can be changed only when copying from <literal>template0</>.
7090 This prevents possibly copying data that doesn't match the settings.
7096 Add <command>ALTER DATABASE SET TABLESPACE</> to move a database
7097 to a new tablespace (Guillaume Lelarge, Bernd Helmle)
7108 <title>Utility Operations</title>
7114 Add a <literal>VERBOSE</> option to the <command>CLUSTER</> command and
7115 <application>clusterdb</> (Jim Cox)
7121 Decrease memory requirements for recording pending trigger
7129 <title>Indexes</title>
7134 Dramatically improve the speed of building and accessing hash
7135 indexes (Tom Raney, Shreya Bhargava)
7139 This allows hash indexes to be sometimes faster than btree
7140 indexes. However, hash indexes are still not crash-safe.
7146 Make hash indexes store only the hash code, not the full value of
7147 the indexed column (Xiao Meng)
7151 This greatly reduces the size of hash indexes for long indexed
7152 values, improving performance.
7158 Implement fast update option for GIN indexes (Teodor, Oleg)
7162 This option greatly improves update speed at a small penalty in search
7169 <literal>xxx_pattern_ops</> indexes can now be used for simple
7170 equality comparisons, not only for <literal>LIKE</> (Tom)
7179 <title>Full Text Indexes</title>
7184 Remove the requirement to use <literal>@@@</> when doing
7185 <acronym>GIN</> weighted lookups on full text indexes (Tom, Teodor)
7189 The normal <literal>@@</> text search operator can be used
7196 Add an optimizer selectivity function for <literal>@@</> text
7197 search operations (Jan Urbanski)
7203 Allow prefix matching in full text searches (Teodor Sigaev,
7210 Support multi-column <acronym>GIN</> indexes (Teodor Sigaev)
7216 Improve support for Nepali language and Devanagari alphabet (Teodor)
7225 <title><command>VACUUM</></title>
7230 Track free space in separate per-relation <quote>fork</> files (Heikki)
7234 Free space discovered by <command>VACUUM</> is now recorded in
7235 <filename>*_fsm</> files, rather than in a fixed-sized shared memory
7236 area. The <varname>max_fsm_pages</> and <varname>max_fsm_relations</>
7237 settings have been removed, greatly simplifying administration of
7238 free space management.
7244 Add a visibility map to track pages that do not require
7249 This allows <command>VACUUM</> to avoid scanning all of
7250 a table when only a portion of the table needs vacuuming.
7251 The visibility map is stored in per-relation <quote>fork</> files.
7257 Add <varname>vacuum_freeze_table_age</> parameter to control
7258 when <command>VACUUM</> should ignore the visibility map and
7259 do a full table scan to freeze tuples (Heikki)
7265 Track transaction snapshots more carefully (Alvaro)
7269 This improves <command>VACUUM</>'s ability to reclaim space
7270 in the presence of long-running transactions.
7276 Add ability to specify per-relation autovacuum and <acronym>TOAST</>
7277 parameters in <command>CREATE TABLE</> (Alvaro, Euler Taveira de
7282 Autovacuum options used to be stored in a system table.
7288 Add <literal>--freeze</> option to <application>vacuumdb</>
7300 <title>Data Types</title>
7305 Add a <literal>CaseSensitive</> option for text search synonym
7306 dictionaries (Simon)
7312 Improve the precision of <type>NUMERIC</> division (Tom)
7318 Add basic arithmetic operators for <type>int2</> with <type>int8</>
7323 This eliminates the need for explicit casting in some situations.
7329 Allow <type>UUID</> input to accept an optional hyphen after
7330 every fourth digit (Robert Haas)
7336 Allow <literal>on</>/<literal>off</> as input for the boolean data type
7343 Allow spaces around <literal>NaN</> in the input string for
7344 type <type>numeric</> (Sam Mason)
7351 <title>Temporal Data Types</title>
7356 Reject year <literal>0 BC</> and years <literal>000</> and
7357 <literal>0000</> (Tom)
7361 Previously these were interpreted as <literal>1 BC</>.
7362 (Note: years <literal>0</> and <literal>00</> are still assumed to be
7369 Include <literal>SGT</> (Singapore time) in the default list of
7370 known time zone abbreviations (Tom)
7376 Support <literal>infinity</> and <literal>-infinity</> as
7377 values of type <type>date</> (Tom)
7383 Make parsing of <type>interval</> literals more standard-compliant
7388 For example, <literal>INTERVAL '1' YEAR</> now does what it's
7395 Allow <type>interval</> fractional-seconds precision to be specified
7396 after the <literal>second</> keyword, for <acronym>SQL</> standard
7401 Formerly the precision had to be specified after the keyword
7402 <type>interval</>. (For backwards compatibility, this syntax is still
7403 supported, though deprecated.) Data type definitions will now be
7404 output using the standard format.
7410 Support the <acronym>IS0 8601</> <type>interval</> syntax (Ron
7411 Mayer, Kevin Grittner)
7415 For example, <literal>INTERVAL 'P1Y2M3DT4H5M6.7S'</> is now
7422 Add <varname>IntervalStyle</> parameter
7423 which controls how <type>interval</> values are output (Ron Mayer)
7427 Valid values are: <literal>postgres</>, <literal>postgres_verbose</>,
7428 <literal>sql_standard</>, <literal>iso_8601</>. This setting also
7429 controls the handling of negative <type>interval</> input when only
7430 some fields have positive/negative designations.
7436 Improve consistency of handling of fractional seconds in
7437 <type>timestamp</> and <type>interval</> output (Ron Mayer)
7446 <title>Arrays</title>
7451 Improve the handling of casts applied to <literal>ARRAY[]</>
7452 constructs, such as <literal>ARRAY[...]::integer[]</>
7457 Formerly <productname>PostgreSQL</> attempted to determine a data type
7458 for the <literal>ARRAY[]</> construct without reference to the ensuing
7459 cast. This could fail unnecessarily in many cases, in particular when
7460 the <literal>ARRAY[]</> construct was empty or contained only
7461 ambiguous entries such as <literal>NULL</>. Now the cast is consulted
7462 to determine the type that the array elements must be.
7468 Make <acronym>SQL</>-syntax <type>ARRAY</> dimensions optional
7469 to match the <acronym>SQL</> standard (Peter)
7475 Add <function>array_ndims()</> to return the number
7476 of dimensions of an array (Robert Haas)
7482 Add <function>array_length()</> to return the length
7483 of an array for a specified dimension (Jim Nasby, Robert
7484 Haas, Peter Eisentraut)
7490 Add aggregate function <function>array_agg()</>, which
7491 returns all aggregated values as a single array (Robert Haas,
7498 Add <function>unnest()</>, which converts an array to
7499 individual row values (Tom)
7503 This is the opposite of <function>array_agg()</>.
7509 Add <function>array_fill()</> to create arrays initialized with
7510 a value (Pavel Stehule)
7516 Add <function>generate_subscripts()</> to simplify generating
7517 the range of an array's subscripts (Pavel Stehule)
7526 <title>Wide-Value Storage (<acronym>TOAST</>)</title>
7531 Consider <acronym>TOAST</> compression on values as short as
7532 32 bytes (previously 256 bytes) (Greg Stark)
7538 Require 25% minimum space savings before using <acronym>TOAST</>
7539 compression (previously 20% for small values and any-savings-at-all
7540 for large values) (Greg)
7546 Improve <acronym>TOAST</> heuristics for rows that have a mix of large
7547 and small toastable fields, so that we prefer to push large values out
7548 of line and don't compress small values unnecessarily (Greg, Tom)
7559 <title>Functions</title>
7564 Document that <function>setseed()</> allows values from
7565 <literal>-1</> to <literal>1</> (not just <literal>0</> to
7566 <literal>1</>), and enforce the valid range (Kris Jurka)
7572 Add server-side function <function>lo_import(filename, oid)</>
7579 Add <function>quote_nullable()</>, which behaves like
7580 <function>quote_literal()</> but returns the string <literal>NULL</> for
7581 a null argument (Brendan Jurd)
7587 Improve full text search <function>headline()</> function to
7588 allow extracting several fragments of text (Sushant Sinha)
7594 Add <function>suppress_redundant_updates_trigger()</> trigger
7595 function to avoid overhead for non-data-changing updates (Andrew)
7601 Add <function>div(numeric, numeric)</> to perform <type>numeric</>
7602 division without rounding (Tom)
7608 Add <type>timestamp</> and <type>timestamptz</> versions of
7609 <function>generate_series()</> (Hitoshi Harada)
7616 <title>Object Information Functions</title>
7621 Implement <function>current_query()</> for use by functions
7622 that need to know the currently running query (Tomas Doran)
7628 Add <function>pg_get_keywords()</> to return a list of the
7629 parser keywords (Dave Page)
7635 Add <function>pg_get_functiondef()</> to see a function's
7636 definition (Abhijit Menon-Sen)
7642 Allow the second argument of <function>pg_get_expr()</> to be zero
7643 when deparsing an expression that does not contain variables (Tom)
7649 Modify <function>pg_relation_size()</> to use <literal>regclass</>
7654 <function>pg_relation_size(data_type_name)</> no longer works.
7660 Add <literal>boot_val</> and <literal>reset_val</> columns to
7661 <literal>pg_settings</> output (Greg Smith)
7667 Add source file name and line number columns to
7668 <literal>pg_settings</> output for variables set in a configuration
7669 file (Magnus, Alvaro)
7673 For security reasons, these columns are only visible to superusers.
7679 Add support for <varname>CURRENT_CATALOG</>,
7680 <varname>CURRENT_SCHEMA</>, <varname>SET CATALOG</>, <varname>SET
7685 These provide <acronym>SQL</>-standard syntax for existing features.
7691 Add <function>pg_typeof()</> which returns the data type
7692 of any value (Brendan Jurd)
7698 Make <function>version()</> return information about whether
7699 the server is a 32- or 64-bit binary (Bruce)
7705 Fix the behavior of information schema columns
7706 <structfield>is_insertable_into</> and <structfield>is_updatable</> to
7707 be consistent (Peter)
7713 Improve the behavior of information schema
7714 <structfield>datetime_precision</> columns (Peter)
7718 These columns now show zero for <type>date</> columns, and 6
7719 (the default precision) for <type>time</>, <type>timestamp</>, and
7720 <type>interval</> without a declared precision, rather than showing
7727 Convert remaining builtin set-returning functions to use
7728 <literal>OUT</> parameters (Jaime Casanova)
7732 This makes it possible to call these functions without specifying
7733 a column list: <function>pg_show_all_settings()</>,
7734 <function>pg_lock_status()</>, <function>pg_prepared_xact()</>,
7735 <function>pg_prepared_statement()</>, <function>pg_cursor()</>
7741 Make <function>pg_*_is_visible()</> and
7742 <function>has_*_privilege()</> functions return <literal>NULL</>
7743 for invalid OIDs, rather than reporting an error (Tom)
7749 Extend <function>has_*_privilege()</> functions to allow inquiring
7750 about the OR of multiple privileges in one call (Stephen
7757 Add <function>has_column_privilege()</> and
7758 <function>has_any_column_privilege()</> functions (Stephen
7768 <title>Function Creation</title>
7773 Support variadic functions (functions with a variable number
7774 of arguments) (Pavel Stehule)
7778 Only trailing arguments can be optional, and they all must be
7779 of the same data type.
7785 Support default values for function arguments (Pavel Stehule)
7791 Add <command>CREATE FUNCTION ... RETURNS TABLE</> clause (Pavel
7798 Allow <acronym>SQL</>-language functions to return the output
7799 of an <command>INSERT</>/<command>UPDATE</>/<command>DELETE</>
7800 <literal>RETURNING</> clause (Tom)
7809 <title>PL/pgSQL Server-Side Language</title>
7814 Support <literal>EXECUTE USING</> for easier insertion of data
7815 values into a dynamic query string (Pavel Stehule)
7821 Allow looping over the results of a cursor using a <literal>FOR</>
7822 loop (Pavel Stehule)
7828 Support <literal>RETURN QUERY EXECUTE</> (Pavel
7835 Improve the <literal>RAISE</> command (Pavel Stehule)
7840 Support <literal>DETAIL</> and <literal>HINT</> fields
7845 Support specification of the <literal>SQLSTATE</> error code
7850 Support an exception name parameter
7855 Allow <literal>RAISE</> without parameters in an exception
7856 block to re-throw the current error
7865 Allow specification of <varname>SQLSTATE</> codes
7866 in <literal>EXCEPTION</> lists (Pavel Stehule)
7870 This is useful for handling custom <varname>SQLSTATE</> codes.
7876 Support the <literal>CASE</> statement (Pavel Stehule)
7882 Make <command>RETURN QUERY</> set the special <literal>FOUND</> and
7883 <command>GET DIAGNOSTICS</> <literal>ROW_COUNT</> variables
7890 Make <command>FETCH</> and <command>MOVE</> set the
7891 <command>GET DIAGNOSTICS</> <literal>ROW_COUNT</> variable
7898 Make <command>EXIT</> without a label always exit the innermost
7903 Formerly, if there were a <literal>BEGIN</> block more closely nested
7904 than any loop, it would exit that block instead. The new behavior
7905 matches Oracle(TM) and is also what was previously stated by our own
7912 Make processing of string literals and nested block comments
7913 match the main SQL parser's processing (Tom)
7917 In particular, the format string in <command>RAISE</> now works
7918 the same as any other string literal, including being subject
7919 to <varname>standard_conforming_strings</>. This change also
7920 fixes other cases in which valid commands would fail when
7921 <varname>standard_conforming_strings</> is on.
7927 Avoid memory leakage when the same function is called at varying
7928 exception-block nesting depths (Tom)
7939 <title>Client Applications</title>
7945 Fix <literal>pg_ctl restart</> to preserve command-line arguments
7952 Add <literal>-w</>/<literal>--no-password</> option that
7953 prevents password prompting in all utilities that have a
7954 <literal>-W</>/<literal>--password</> option (Peter)
7960 Remove <option>-q</> (quiet) option of <application>createdb</>,
7961 <application>createuser</>, <application>dropdb</>,
7962 <application>dropuser</> (Peter)
7966 These options have had no effect since <productname>PostgreSQL</>
7974 <title><application>psql</></title>
7979 Remove verbose startup banner; now just suggest <literal>help</>
7986 Make <literal>help</> show common backslash commands (Greg
7993 Add <literal>\pset format wrapped</> mode to wrap output to the
7994 screen width, or file/pipe output too if <literal>\pset columns</>
7995 is set (Bryce Nesbitt)
8001 Allow all supported spellings of boolean values in <command>\pset</>,
8002 rather than just <literal>on</> and <literal>off</> (Bruce)
8006 Formerly, any string other than <quote>off</> was silently taken
8007 to mean <literal>true</>. <application>psql</> will now complain
8008 about unrecognized spellings (but still take them as <literal>true</>).
8014 Use the pager for wide output (Bruce)
8020 Require a space between a one-letter backslash command and its first
8021 argument (Bernd Helmle)
8025 This removes a historical source of ambiguity.
8031 Improve tab completion support for schema-qualified and
8032 quoted identifiers (Greg Sabino Mullane)
8038 Add optional <literal>on</>/<literal>off</> argument for
8039 <command>\timing</> (David Fetter)
8045 Display access control rights on multiple lines (Brendan
8046 Jurd, Andreas Scherbaum)
8052 Make <command>\l</> show database access privileges (Andrew Gilligan)
8058 Make <command>\l+</> show database sizes, if permissions
8059 allow (Andrew Gilligan)
8065 Add the <command>\ef</> command to edit function definitions
8075 <title><application>psql</> \d* commands</title>
8081 Make <command>\d*</> commands that do not have a pattern argument
8082 show system objects only if the <literal>S</> modifier is specified
8083 (Greg Sabino Mullane, Bruce)
8087 The former behavior was inconsistent across different variants
8088 of <command>\d</>, and in most cases it provided no easy way to see
8095 Improve <command>\d*</> commands to work with older
8096 <productname>PostgreSQL</> server versions (back to 7.4),
8097 not only the current server version
8104 Make <command>\d</> show foreign-key constraints that reference
8105 the selected table (Kenneth D'Souza)
8111 Make <command>\d</> on a sequence show its column values
8112 (Euler Taveira de Oliveira)
8118 Add column storage type and other relation options to the
8119 <command>\d+</> display (Gregory Stark, Euler Taveira de
8126 Show relation size in <command>\dt+</> output (Dickson S.
8133 Show the possible values of <literal>enum</> types in <command>\dT+</>
8140 Allow <command>\dC</> to accept a wildcard pattern, which matches
8141 either datatype involved in the cast (Tom)
8147 Add a function type column to <command>\df</>'s output, and add
8148 options to list only selected types of functions (David Fetter)
8154 Make <command>\df</> not hide functions that take or return
8155 type <type>cstring</> (Tom)
8159 Previously, such functions were hidden because most of them are
8160 datatype I/O functions, which were deemed uninteresting. The new
8161 policy about hiding system functions by default makes this wart
8171 <title><application>pg_dump</></title>
8176 Add a <literal>--no-tablespaces</> option to
8177 <application>pg_dump</>/<application>pg_dumpall</>/<application>pg_restore</>
8178 so that dumps can be restored to clusters that have non-matching
8179 tablespace layouts (Gavin Roy)
8185 Remove <option>-d</> and <option>-D</> options from
8186 <application>pg_dump</> and <application>pg_dumpall</> (Tom)
8190 These options were too frequently confused with the option to
8191 select a database name in other <productname>PostgreSQL</>
8192 client applications. The functionality is still available,
8193 but you must now spell out the long option name
8194 <option>--inserts</> or <option>--column-inserts</>.
8200 Remove <option>-i</>/<option>--ignore-version</> option from
8201 <application>pg_dump</> and <application>pg_dumpall</> (Tom)
8205 Use of this option does not throw an error, but it has no
8206 effect. This option was removed because the version checks
8207 are necessary for safety.
8213 Disable <varname>statement_timeout</> during dump and restore
8220 Add <application>pg_dump</>/<application>pg_dumpall</> option
8221 <option>--lock-wait-timeout</> (David Gould)
8225 This allows dumps to fail if unable to acquire a shared lock
8226 within the specified amount of time.
8232 Reorder <application>pg_dump</> <literal>--data-only</> output
8233 to dump tables referenced by foreign keys before
8234 the referencing tables (Tom)
8238 This allows data loads when foreign keys are already present.
8239 If circular references make a safe ordering impossible, a
8240 <literal>NOTICE</> is issued.
8246 Allow <application>pg_dump</>, <application>pg_dumpall</>, and
8247 <application>pg_restore</> to use a specified role (Benedek
8248 László)
8254 Allow <application>pg_restore</> to use multiple concurrent
8255 connections to do the restore (Andrew)
8259 The number of concurrent connections is controlled by the option
8260 <literal>--jobs</>. This is supported only for custom-format archives.
8271 <title>Programming Tools</title>
8274 <title><application>libpq</></title>
8279 Allow the <type>OID</> to be specified when importing a large
8280 object, via new function <function>lo_import_with_oid()</> (Tatsuo)
8286 Add <quote>events</> support (Andrew Chernow, Merlin Moncure)
8290 This adds the ability to register callbacks to manage private
8291 data associated with <structname>PGconn</> and <structname>PGresult</>
8298 Improve error handling to allow the return of multiple
8299 error messages as multi-line error reports (Magnus)
8305 Make <function>PQexecParams()</> and related functions return
8306 <varname>PGRES_EMPTY_QUERY</> for an empty query (Tom)
8310 They previously returned <varname>PGRES_COMMAND_OK</>.
8316 Document how to avoid the overhead of <function>WSACleanup()</>
8317 on Windows (Andrew Chernow)
8323 Do not rely on Kerberos tickets to determine the default database
8328 Previously, a Kerberos-capable build of libpq would use the
8329 principal name from any available Kerberos ticket as default
8330 database username, even if the connection wasn't using Kerberos
8331 authentication. This was deemed inconsistent and confusing.
8332 The default username is now determined the same way with or
8333 without Kerberos. Note however that the database username must still
8334 match the ticket when Kerberos authentication is used.
8342 <title><application>libpq</> <acronym>SSL</> (Secure Sockets Layer)
8348 Fix certificate validation for <acronym>SSL</> connections
8353 <application>libpq</> now supports verifying both the certificate
8354 and the name of the server when making <acronym>SSL</>
8355 connections. If a root certificate is not available to use for
8356 verification, <acronym>SSL</> connections will fail. The
8357 <literal>sslmode</> parameter is used to enable certificate
8358 verification and set the level of checking.
8359 The default is still not to do any verification, allowing connections
8360 to SSL-enabled servers without requiring a root certificate on the
8367 Support wildcard server certificates (Magnus)
8371 If a certificate <acronym>CN</> starts with <literal>*</>, it will
8372 be treated as a wildcard when matching the hostname, allowing the
8373 use of the same certificate for multiple servers.
8379 Allow the file locations for client certificates to be specified
8380 (Mark Woodward, Alvaro, Magnus)
8386 Add a <function>PQinitOpenSSL</> function to allow greater control
8387 over OpenSSL/libcrypto initialization (Andrew Chernow)
8393 Make <application>libpq</> unregister its <application>OpenSSL</>
8394 callbacks when no database connections remain open
8395 (Bruce, Magnus, Russell Smith)
8399 This is required for applications that unload the libpq library,
8400 otherwise invalid <application>OpenSSL</> callbacks will remain.
8409 <title><application>ecpg</></title>
8414 Add localization support for messages (Euler Taveira de
8421 ecpg parser is now automatically generated from the server
8426 Previously the ecpg parser was hand-maintained.
8435 <title>Server Programming Interface (<acronym>SPI</>)</title>
8440 Add support for single-use plans with out-of-line
8447 Add new <varname>SPI_OK_REWRITTEN</> return code for
8448 <function>SPI_execute()</> (Heikki)
8452 This is used when a command is rewritten to another type of
8459 Remove unnecessary inclusions from <filename>executor/spi.h</> (Tom)
8463 SPI-using modules might need to add some <literal>#include</>
8464 lines if they were depending on <filename>spi.h</> to include
8476 <title>Build Options</title>
8481 Update build system to use <productname>Autoconf</> 2.61 (Peter)
8487 Require <productname>GNU bison</> for source code builds (Peter)
8491 This has effectively been required for several years, but now there
8492 is no infrastructure claiming to support other parser tools.
8498 Add <application>pg_config</> <literal>--htmldir</> option
8505 Pass <type>float4</> by value inside the server (Zoltan
8510 Add <application>configure</> option
8511 <literal>--disable-float4-byval</> to use the old behavior.
8512 External C functions that use old-style (version 0) call convention
8513 and pass or return <type>float4</> values will be broken by this
8514 change, so you may need the <application>configure</> option if you
8515 have such functions and don't want to update them.
8521 Pass <type>float8</>, <type>int8</>, and related datatypes
8522 by value inside the server on 64-bit platforms (Zoltan Boszormenyi)
8526 Add <application>configure</> option
8527 <literal>--disable-float8-byval</> to use the old behavior.
8528 As above, this change might break old-style external C functions.
8534 Add configure options <literal>--with-segsize</>,
8535 <literal>--with-blocksize</>, <literal>--with-wal-blocksize</>,
8536 <literal>--with-wal-segsize</> (Zdenek Kotala, Tom)
8540 This simplifies build-time control over several constants that
8541 previously could only be changed by editing
8542 <filename>pg_config_manual.h</>.
8548 Allow threaded builds on <productname>Solaris</> 2.5 (Bruce)
8554 Use the system's <function>getopt_long()</> on <productname>Solaris</>
8555 (Zdenek Kotala, Tom)
8559 This makes option processing more consistent with what Solaris users
8566 Add support for the <productname>Sun Studio</> compiler on
8567 <productname>Linux</> (Julius Stroffek)
8573 Append the major version number to the backend <application>gettext</>
8574 domain, and the <literal>soname</> major version number to
8575 libraries' <application>gettext</> domain (Peter)
8579 This simplifies parallel installations of multiple versions.
8585 Add support for code coverage testing with <application>gcov</>
8592 Allow out-of-tree builds on <productname>Mingw</> and
8593 <productname>Cygwin</> (Richard Evans)
8599 Fix the use of <productname>Mingw</> as a cross-compiling source
8609 <title>Source Code</title>
8614 Support 64-bit time zone data files (Heikki)
8618 This adds support for daylight saving time (<acronym>DST</>)
8619 calculations beyond the year 2038.
8625 Deprecate use of platform's <type>time_t</> data type (Tom)
8629 Some platforms have migrated to 64-bit <type>time_t</>, some have
8630 not, and Windows can't make up its mind what it's doing. Define
8631 <type>pg_time_t</> to have the same meaning as <type>time_t</>,
8632 but always be 64 bits (unless the platform has no 64-bit integer type),
8633 and use that type in all module APIs and on-disk data formats.
8639 Fix bug in handling of the time zone database when cross-compiling
8646 Link backend object files in one step, rather than in stages
8653 Improve <application>gettext</> support to allow better translation
8660 Add message translation support to the PL languages (Alvaro, Peter)
8666 Add more <application>DTrace</> probes (Robert Lor)
8672 Enable <application>DTrace</> support on <application>Mac OS X
8673 Leopard</> and other non-Solaris platforms (Robert Lor)
8679 Simplify and standardize conversions between C strings and
8680 <type>text</> datums, by providing common functions for the purpose
8687 Clean up the <filename>include/catalog/</> header files so that
8688 frontend programs can include them without including
8689 <filename>postgres.h</>
8696 Make <type>name</> char-aligned, and suppress zero-padding of
8697 <type>name</> entries in indexes (Tom)
8703 Recover better if dynamically-loaded code executes <function>exit()</>
8710 Add a hook to let plug-ins monitor the executor (Itagaki
8717 Add a hook to allow the planner's statistics lookup behavior to
8718 be overridden (Simon Riggs)
8724 Add <function>shmem_startup_hook()</> for custom shared memory
8731 Replace the index access method <function>amgetmulti</> entry point
8732 with <function>amgetbitmap</>, and extend the API for
8733 <function>amgettuple</> to support run-time determination of
8734 operator lossiness (Heikki, Tom, Teodor)
8738 The API for GIN and GiST opclass <function>consistent</> functions
8739 has been extended as well.
8745 Add support for partial-match searches in <acronym>GIN</> indexes
8746 (Teodor Sigaev, Oleg Bartunov)
8752 Replace <structname>pg_class</> column <structfield>reltriggers</>
8753 with boolean <structfield>relhastriggers</> (Simon)
8757 Also remove unused <structname>pg_class</> columns
8758 <structfield>relukeys</>, <structfield>relfkeys</>, and
8759 <structfield>relrefs</>.
8765 Add a <structfield>relistemp</> column to <structname>pg_class</>
8766 to ease identification of temporary tables (Tom)
8772 Move platform <acronym>FAQ</>s into the main documentation
8779 Prevent parser input files from being built with any conflicts
8786 Add support for the <literal>KOI8U</> (Ukrainian) encoding
8793 Add Japanese message translations (Japan PostgreSQL Users Group)
8797 This used to be maintained as a separate project.
8803 Fix problem when setting <varname>LC_MESSAGES</> on
8804 <application>MSVC</>-built systems (Hiroshi Inoue, Hiroshi
8814 <title>Contrib</title>
8820 Add <filename>contrib/auto_explain</> to automatically run
8821 <command>EXPLAIN</> on queries exceeding a specified duration
8822 (Itagaki Takahiro, Tom)
8828 Add <filename>contrib/btree_gin</> to allow GIN indexes to
8829 handle more datatypes (Oleg, Teodor)
8835 Add <filename>contrib/citext</> to provide a case-insensitive,
8836 multibyte-aware text data type (David Wheeler)
8842 Add <filename>contrib/pg_stat_statements</> for server-wide
8843 tracking of statement execution statistics (Itagaki Takahiro)
8849 Add duration and query mode options to <filename>contrib/pgbench</>
8856 Make <filename>contrib/pgbench</> use table names
8857 <structname>pgbench_accounts</>, <structname>pgbench_branches</>,
8858 <structname>pgbench_history</>, and <structname>pgbench_tellers</>,
8859 rather than just <structname>accounts</>, <structname>branches</>,
8860 <structname>history</>, and <structname>tellers</> (Tom)
8864 This is to reduce the risk of accidentally destroying real data
8865 by running <application>pgbench</>.
8871 Fix <filename>contrib/pgstattuple</> to handle tables and
8872 indexes with over 2 billion pages (Tatsuhito Kasahara)
8878 In <filename>contrib/fuzzystrmatch</>, add a version of the
8879 Levenshtein string-distance function that allows the user to
8880 specify the costs of insertion, deletion, and substitution
8887 Make <filename>contrib/ltree</> support multibyte encodings
8894 Enable <filename>contrib/dblink</> to use connection information
8895 stored in the SQL/MED catalogs (Joe Conway)
8901 Improve <filename>contrib/dblink</>'s reporting of errors from
8902 the remote server (Joe Conway)
8908 Make <filename>contrib/dblink</> set <varname>client_encoding</>
8909 to match the local database's encoding (Joe Conway)
8913 This prevents encoding problems when communicating with a remote
8914 database that uses a different encoding.
8920 Make sure <filename>contrib/dblink</> uses a password supplied
8921 by the user, and not accidentally taken from the server's
8922 <filename>.pgpass</> file (Joe Conway)
8926 This is a minor security enhancement.
8932 Add <function>fsm_page_contents()</>
8933 to <filename>contrib/pageinspect</> (Heikki)
8939 Modify <function>get_raw_page()</> to support free space map
8940 (<filename>*_fsm</>) files. Also update
8941 <filename>contrib/pg_freespacemap</>.
8947 Add support for multibyte encodings to <filename>contrib/pg_trgm</>
8954 Rewrite <filename>contrib/intagg</> to use new
8955 functions <function>array_agg()</> and <function>unnest()</>
8962 Make <filename>contrib/pg_standby</> recover all available WAL before
8963 failover (Fujii Masao, Simon, Heikki)
8967 To make this work safely, you now need to set the new
8968 <literal>recovery_end_command</> option in <filename>recovery.conf</>
8969 to clean up the trigger file after failover. <application>pg_standby</>
8970 will no longer remove the trigger file itself.
8976 <filename>contrib/pg_standby</>'s <option>-l</> option is now a no-op,
8977 because it is unsafe to use a symlink (Simon)