1 <!-- doc/src/sgml/release-9.3.sgml -->
2 <!-- See header comment in release.sgml about typical markup -->
4 <sect1 id="release-9-3-2">
5 <title>Release 9.3.2</title>
8 <title>Release Date</title>
9 <simpara>2013-12-05</simpara>
13 This release contains a variety of fixes from 9.3.1.
14 For information about new features in the 9.3 major release, see
15 <xref linkend="release-9-3">.
19 <title>Migration to Version 9.3.2</title>
22 A dump/restore is not required for those running 9.3.X.
26 However, this release corrects a number of potential data corruption
27 issues. See the first three changelog entries below to find out whether
28 your installation has been affected and what steps you can take if so.
32 Also, if you are upgrading from a version earlier than 9.3.1,
33 see the release notes for 9.3.1.
39 <title>Changes</title>
44 Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
45 Branch: master [82b43f7df] 2013-11-27 13:43:27 +0200
46 Branch: REL9_3_STABLE [08302a397] 2013-11-27 13:22:26 +0200
47 Branch: REL9_2_STABLE [0b132b904] 2013-11-27 13:28:47 +0200
48 Branch: REL9_1_STABLE [bf0d21e61] 2013-11-27 13:44:10 +0200
49 Branch: REL9_0_STABLE [ba6379959] 2013-11-27 13:43:18 +0200
50 Branch: REL8_4_STABLE [8a7f4466a] 2013-11-27 13:40:05 +0200
55 Fix <command>VACUUM</>'s tests to see whether it can
56 update <structfield>relfrozenxid</> (Andres Freund, Sergey Burladyn,
61 In some cases <command>VACUUM</> (either manual or autovacuum) could
62 incorrectly advance a table's <structfield>relfrozenxid</> value,
63 allowing tuples to escape freezing, causing those rows to become
64 invisible once 2^31 transactions have elapsed. The probability of
65 data loss is fairly low since multiple incorrect advancements would
66 need to happen before actual loss occurs, but it's not zero. In 9.2.0
67 and later, the probability of loss is higher, and it's also possible
68 to get <quote>could not access status of transaction</> errors as a
69 consequence of this bug. Users upgrading from releases 9.0.4 or 8.4.8
70 or earlier are not affected, but all later versions contain the bug.
74 The issue can be ameliorated by, after upgrading, vacuuming all tables
75 in all databases while having <link
76 linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</></link>
77 set to zero. This will fix any latent corruption but will not be able
78 to fix all pre-existing data errors. However, an installation can be
79 presumed safe after performing this vacuuming if it has executed fewer
80 than 2^31 update transactions in its lifetime (check this with
81 <literal>SELECT txid_current() < 2^31</>).
86 Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
87 Branch: master [2393c7d10] 2013-11-29 21:47:25 -0300
88 Branch: REL9_3_STABLE [8e53ae025] 2013-11-29 21:48:21 -0300
93 Fix multiple bugs in MultiXactId freezing (Andres Freund,
94 Álvaro Herrera)
98 These bugs could lead to <quote>could not access status of
99 transaction</> errors, or to duplicate or vanishing rows.
100 Users upgrading from releases prior to 9.3.0 are not affected.
104 The issue can be ameliorated by, after upgrading, vacuuming all tables
105 in all databases while having <link
106 linkend="guc-vacuum-freeze-table-age"><varname>vacuum_freeze_table_age</></link>
107 set to zero. This will fix latent corruption but will not be able to
108 fix all pre-existing data errors.
112 As a separate issue, these bugs can also cause standby servers to get
113 out of sync with the primary, thus exhibiting data errors that are not
114 in the primary. Therefore, it's recommended that 9.3.0 and 9.3.1
115 standby servers be re-cloned from the primary (e.g., with a new base
116 backup) after upgrading.
121 Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
122 Branch: master [98f58a30c] 2013-11-22 14:45:41 +0200
123 Branch: REL9_3_STABLE [3e10cc492] 2013-11-22 14:48:05 +0200
124 Branch: REL9_2_STABLE [f22624cea] 2013-11-22 14:48:43 +0200
125 Branch: REL9_1_STABLE [fc8e54f39] 2013-11-22 14:48:55 +0200
126 Branch: REL9_0_STABLE [b4f697f8e] 2013-11-22 14:49:07 +0200
131 Fix initialization of <filename>pg_clog</> and <filename>pg_subtrans</>
132 during hot standby startup (Andres Freund)
136 This bug can cause data loss on standby servers at the moment they
137 start to accept read-only queries, by marking committed transactions
138 as uncommitted. The likelihood of such corruption is small unless, at
139 the time of standby startup, the primary server has executed many
140 updating transactions since its last checkpoint. Symptoms include
141 missing rows, rows that should have been deleted being still visible,
142 and obsolete versions of updated rows being still visible alongside
143 their newer versions.
147 This bug was introduced in versions 9.3.0, 9.2.5, 9.1.10, and 9.0.14.
148 Standby servers that have only been running earlier releases are not
149 at risk. It's recommended that standby servers that have ever run any
150 of the buggy releases be re-cloned from the primary (e.g., with a new
151 base backup) after upgrading.
156 Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
157 Branch: master [83eb54001] 2013-10-23 14:24:37 +0300
158 Branch: REL9_3_STABLE [f90d7426e] 2013-10-23 14:25:43 +0300
159 Branch: REL9_2_STABLE [4da24f12e] 2013-10-23 14:25:50 +0300
164 Fix bugs in setting the visibility-map bit for an empty page (Andres
170 Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
171 Branch: master [1ce150b7b] 2013-11-29 21:47:21 -0300
172 Branch: REL9_3_STABLE [663d2e485] 2013-11-29 21:48:18 -0300
177 Fix multiple bugs in update chain traversal (Andres
178 Freund, Álvaro Herrera)
183 Author: Tom Lane <tgl@sss.pgh.pa.us>
184 Branch: master [7db285afc] 2013-11-27 18:10:00 -0500
185 Branch: REL9_3_STABLE [d32e8387b] 2013-11-27 18:10:03 -0500
186 Branch: REL9_2_STABLE [024edb454] 2013-11-27 18:10:06 -0500
191 Fix dangling-pointer problem in fast-path locking (Tom Lane)
195 This could lead to corruption of the lock data structures in shared
196 memory, causing <quote>lock already held</> and other odd errors.
201 Author: Tom Lane <tgl@sss.pgh.pa.us>
202 Branch: master [16e1b7a1b] 2013-11-29 16:41:00 -0500
203 Branch: REL9_3_STABLE [c357be2cd] 2013-11-29 16:41:03 -0500
208 Fix assorted race conditions in timeout management (Tom Lane)
212 These errors could result in a server process becoming unresponsive
213 because it had blocked SIGALRM and/or SIGINT.
218 Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
219 Branch: master [1df0122da] 2013-11-29 21:47:15 -0300
220 Branch: REL9_3_STABLE [215ac4ad6] 2013-11-29 21:48:15 -0300
221 Branch: REL9_2_STABLE [8f8c66614] 2013-11-29 21:59:15 -0300
222 Branch: REL9_1_STABLE [9f1e051ad] 2013-11-29 22:01:01 -0300
223 Branch: REL9_0_STABLE [6d0b8cd2f] 2013-11-29 22:02:15 -0300
228 Truncate <filename>pg_multixact</> contents during crash recovery
233 This avoids ever-increasing disk space consumption in hot standby
239 Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
240 Branch: master [ac4ab97ec] 2013-11-08 22:21:42 +0200
241 Branch: REL9_3_STABLE [fc545a254] 2013-11-08 22:23:03 +0200
242 Branch: REL9_2_STABLE [9a45a6559] 2013-11-08 22:23:11 +0200
243 Branch: REL9_1_STABLE [3527a5f59] 2013-11-08 22:23:14 +0200
244 Branch: REL9_0_STABLE [4b099e1bf] 2013-11-08 22:23:16 +0200
245 Branch: REL8_4_STABLE [b6f82acef] 2013-11-08 22:23:19 +0200
250 Fix race condition in GIN index posting tree page deletion (Heikki
255 This could lead to transient wrong answers or query failures.
260 Author: Tom Lane <tgl@sss.pgh.pa.us>
261 Branch: master [24ace4053] 2013-11-02 16:45:42 -0400
262 Branch: REL9_3_STABLE [86dab9c8a] 2013-11-02 16:45:52 -0400
263 Branch: REL9_2_STABLE [a1c3d54fb] 2013-11-02 16:45:57 -0400
268 Fix <quote>unexpected spgdoinsert() failure</> error during SP-GiST
269 index creation (Teodor Sigaev)
274 Author: Kevin Grittner <kgrittn@postgresql.org>
275 Branch: master [732758db4] 2013-11-04 14:31:07 -0600
276 Branch: REL9_3_STABLE [5b6ee03a3] 2013-11-04 14:45:18 -0600
281 Fix assorted bugs in materialized views (Kevin Grittner, Andres Freund)
286 Author: Tom Lane <tgl@sss.pgh.pa.us>
287 Branch: master [648bd05b1] 2013-11-11 10:42:57 -0500
288 Branch: REL9_3_STABLE [04e6ee402] 2013-11-11 10:43:00 -0500
293 Re-allow duplicate table aliases if they're within aliased JOINs
298 Historically <productname>PostgreSQL</> has accepted queries like
300 SELECT ... FROM tab1 x CROSS JOIN (tab2 x CROSS JOIN tab3 y) z
302 although a strict reading of the SQL standard would forbid the
303 duplicate usage of table alias <literal>x</>. A misguided change in
304 9.3.0 caused it to reject some such cases that were formerly accepted.
305 Restore the previous behavior.
310 Author: Tom Lane <tgl@sss.pgh.pa.us>
311 Branch: master [b97ee66cc] 2013-11-08 11:36:57 -0500
312 Branch: REL9_3_STABLE [9548bee2b] 2013-11-08 11:37:00 -0500
313 Branch: REL9_2_STABLE [f7171c7e2] 2013-11-08 11:37:04 -0500
314 Branch: REL9_1_STABLE [af38d140c] 2013-11-08 11:37:08 -0500
315 Branch: REL9_0_STABLE [987f05e16] 2013-11-08 11:37:12 -0500
316 Branch: REL8_4_STABLE [90b07dd7b] 2013-11-08 11:37:17 -0500
321 Avoid flattening a subquery whose <literal>SELECT</> list contains a
322 volatile function wrapped inside a sub-<literal>SELECT</> (Tom Lane)
326 This avoids unexpected results due to extra evaluations of the
332 Author: Tom Lane <tgl@sss.pgh.pa.us>
333 Branch: master [f19e92ed0] 2013-11-22 14:37:21 -0500
334 Branch: REL9_3_STABLE [6bc68af1d] 2013-11-22 14:37:25 -0500
335 Branch: REL9_2_STABLE [c0aa210f6] 2013-11-22 14:37:29 -0500
336 Branch: REL9_1_STABLE [92a752151] 2013-11-22 14:37:31 -0500
337 Branch: REL9_0_STABLE [612f953c7] 2013-11-22 14:37:35 -0500
338 Branch: REL8_4_STABLE [122ba5dad] 2013-11-22 14:37:38 -0500
343 Fix planner's processing of non-simple-variable subquery outputs
344 nested within outer joins (Tom Lane)
348 This error could lead to incorrect plans for queries involving
349 multiple levels of subqueries within <literal>JOIN</> syntax.
354 Author: Tom Lane <tgl@sss.pgh.pa.us>
355 Branch: master [f3b3b8d5b] 2013-11-15 16:46:18 -0500
356 Branch: REL9_3_STABLE [1c0dfaa68] 2013-11-15 16:46:21 -0500
357 Branch: REL9_2_STABLE [51b6ae6bb] 2013-11-15 16:46:25 -0500
362 Fix incorrect planning in cases where the same non-strict expression
363 appears in multiple <literal>WHERE</> and outer <literal>JOIN</>
364 equality clauses (Tom Lane)
369 Author: Tom Lane <tgl@sss.pgh.pa.us>
370 Branch: master [ebefbb5fd] 2013-11-11 16:36:27 -0500
371 Branch: REL9_3_STABLE [e243bd79d] 2013-11-11 16:36:41 -0500
372 Branch: REL9_2_STABLE [449d5acd7] 2013-11-11 16:36:44 -0500
377 Fix planner crash with whole-row reference to a subquery (Tom Lane)
382 Author: Tom Lane <tgl@sss.pgh.pa.us>
383 Branch: master [5e900bc00] 2013-11-07 13:14:14 -0500
384 Branch: REL9_3_STABLE [5d0731da5] 2013-11-07 13:13:15 -0500
385 Branch: REL9_2_STABLE [aa8a2c3a6] 2013-11-07 13:13:19 -0500
386 Branch: REL9_1_STABLE [6e2c76248] 2013-11-07 13:13:47 -0500
391 Fix incorrect generation of optimized MIN()/MAX() plans for
392 inheritance trees (Tom Lane)
396 The planner could fail in cases where the MIN()/MAX() argument was an
397 expression rather than a simple variable.
402 Author: Tom Lane <tgl@sss.pgh.pa.us>
403 Branch: master [bffd1ce92] 2013-11-01 16:09:48 -0400
404 Branch: REL9_3_STABLE [14d4548f1] 2013-11-01 16:09:52 -0400
405 Branch: REL9_2_STABLE [2f2507e38] 2013-11-01 16:09:57 -0400
406 Branch: REL9_1_STABLE [8c0116a4c] 2013-11-01 16:10:00 -0400
407 Branch: REL9_0_STABLE [0c8462fd5] 2013-11-01 16:10:03 -0400
408 Branch: REL8_4_STABLE [d74eaf374] 2013-11-01 16:10:08 -0400
413 Fix premature deletion of temporary files (Andres Freund)
418 Author: Tom Lane <tgl@sss.pgh.pa.us>
419 Branch: master [b006f4ddb] 2013-11-03 11:33:05 -0500
420 Branch: REL9_3_STABLE [da2c6a919] 2013-11-03 11:33:09 -0500
421 Branch: REL9_2_STABLE [85de12624] 2013-11-03 11:33:13 -0500
426 Prevent intra-transaction memory leak when printing range values
431 This fix actually cures transient memory leaks in any datatype output
432 function, but range types are the only ones known to have had a
438 Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
439 Branch: master [138184adc] 2013-10-24 15:27:40 +0300
440 Branch: REL9_3_STABLE [bb604d03a] 2013-10-24 15:28:15 +0300
445 Fix memory leaks when reloading configuration files (Heikki
446 Linnakangas, Hari Babu)
451 Author: Tom Lane <tgl@sss.pgh.pa.us>
452 Branch: master [c28b289bf] 2013-11-07 14:41:36 -0500
453 Branch: REL9_3_STABLE [df5d5f1dc] 2013-11-07 14:41:39 -0500
454 Branch: REL9_2_STABLE [8bd5a6af6] 2013-11-07 14:41:43 -0500
459 Prevent incorrect display of dropped columns in NOT NULL and CHECK
460 constraint violation messages (Michael Paquier and Tom Lane)
465 Author: Tom Lane <tgl@sss.pgh.pa.us>
466 Branch: master [bb45c6404] 2013-11-06 13:33:09 -0500
467 Branch: REL9_3_STABLE [66e6daa3e] 2013-11-06 13:33:18 -0500
468 Branch: REL9_2_STABLE [74aea2af9] 2013-11-06 13:26:38 -0500
473 Allow default arguments and named-argument notation for window
478 Previously, these cases were likely to crash.
483 Author: Tom Lane <tgl@sss.pgh.pa.us>
484 Branch: master [0b7e660d6] 2013-11-11 13:36:38 -0500
485 Branch: REL9_3_STABLE [fbbd150a2] 2013-11-11 13:36:42 -0500
490 Suppress trailing whitespace on each line when pretty-printing rules
495 9.3.0 generated such whitespace in many more cases than previous
496 versions did. To reduce unexpected behavioral changes, suppress
497 unnecessary whitespace in all cases.
502 Author: Peter Eisentraut <peter_e@gmx.net>
503 Branch: master [4053189d5] 2013-11-23 07:25:37 -0500
504 Branch: REL9_3_STABLE [0f8ff3e46] 2013-11-23 07:30:16 -0500
505 Branch: REL9_2_STABLE [654e006bb] 2013-11-23 07:30:45 -0500
506 Branch: REL9_1_STABLE [e1f7173ea] 2013-11-23 07:31:07 -0500
507 Branch: REL9_0_STABLE [44032290d] 2013-11-23 07:31:32 -0500
508 Branch: REL8_4_STABLE [240766a6e] 2013-11-23 07:31:53 -0500
513 Fix possible read past end of memory in rule printing (Peter Eisentraut)
518 Author: Tom Lane <tgl@sss.pgh.pa.us>
519 Branch: master [45e02e323] 2013-11-23 20:03:56 -0500
520 Branch: REL9_3_STABLE [c4d3cd3dc] 2013-11-23 20:04:00 -0500
521 Branch: REL9_2_STABLE [96ac8b518] 2013-11-23 20:04:03 -0500
522 Branch: REL9_1_STABLE [7b6352875] 2013-11-23 20:04:06 -0500
523 Branch: REL9_0_STABLE [747dd9724] 2013-11-23 20:04:10 -0500
524 Branch: REL8_4_STABLE [d0378c8a8] 2013-11-23 20:04:13 -0500
529 Fix array slicing of <type>int2vector</> and <type>oidvector</> values
534 Expressions of this kind are now implicitly promoted to
535 regular <type>int2</> or <type>oid</> arrays.
540 Author: Andrew Dunstan <andrew@dunslane.net>
541 Branch: master [bbe4deac1] 2013-10-17 11:12:48 -0400
542 Branch: REL9_3_STABLE [bfb327ac1] 2013-10-17 11:09:55 -0400
547 Return a valid JSON value when converting an empty <type>hstore</> value
554 Author: Tom Lane <tgl@sss.pgh.pa.us>
555 Branch: master [631dc390f] 2013-11-01 12:13:18 -0400
556 Branch: REL9_3_STABLE [2650c5cf4] 2013-11-01 12:13:23 -0400
557 Branch: REL9_2_STABLE [2e2134954] 2013-11-01 12:13:26 -0400
558 Branch: REL9_1_STABLE [172ba4578] 2013-11-01 12:13:29 -0400
559 Branch: REL9_0_STABLE [d81cd0430] 2013-11-01 12:13:33 -0400
560 Branch: REL8_4_STABLE [01499ea33] 2013-11-01 12:13:38 -0400
565 Fix incorrect behaviors when using a SQL-standard, simple GMT offset
570 In some cases, the system would use the simple GMT offset value when
571 it should have used the regular timezone setting that had prevailed
572 before the simple offset was selected. This change also causes
573 the <function>timeofday</> function to honor the simple GMT offset
579 Author: Tom Lane <tgl@sss.pgh.pa.us>
580 Branch: master [f145454d5] 2013-11-23 18:24:26 -0500
581 Branch: REL9_3_STABLE [69eb86169] 2013-11-23 18:24:42 -0500
582 Branch: REL9_2_STABLE [e86f2a052] 2013-11-23 18:24:46 -0500
583 Branch: REL9_1_STABLE [b2502ecef] 2013-11-23 18:24:50 -0500
584 Branch: REL9_0_STABLE [ec6a6a268] 2013-11-23 18:24:54 -0500
585 Branch: REL8_4_STABLE [3482f2986] 2013-11-23 18:25:00 -0500
590 Prevent possible misbehavior when logging translations of Windows
591 error codes (Tom Lane)
596 Author: Tom Lane <tgl@sss.pgh.pa.us>
597 Branch: master [79193c75f] 2013-11-29 18:34:07 -0500
598 Branch: REL9_3_STABLE [a9380b5c3] 2013-11-29 18:34:11 -0500
599 Branch: REL9_2_STABLE [19af7d4f0] 2013-11-29 18:34:14 -0500
600 Branch: REL9_1_STABLE [8c72b20e3] 2013-11-29 18:34:18 -0500
601 Branch: REL9_0_STABLE [4ab4e5c6b] 2013-11-29 18:34:22 -0500
602 Branch: REL8_4_STABLE [6cb109a81] 2013-11-29 18:34:25 -0500
607 Properly quote generated command lines in <application>pg_ctl</>
608 (Naoya Anzai and Tom Lane)
612 This fix applies only to Windows.
617 Author: Kevin Grittner <kgrittn@postgresql.org>
618 Branch: master [4bd371f6f] 2013-11-30 11:24:56 -0600
619 Branch: REL9_3_STABLE [53b0f2134] 2013-11-30 11:33:04 -0600
620 Branch: REL9_2_STABLE [27b33245a] 2013-11-30 11:33:54 -0600
621 Branch: REL9_1_STABLE [4bdccd842] 2013-11-30 12:06:48 -0600
622 Branch: REL9_0_STABLE [52898e005] 2013-11-30 12:07:05 -0600
623 Branch: REL8_4_STABLE [ac7113bb3] 2013-11-30 12:07:18 -0600
628 Fix <application>pg_dumpall</> to work when a source database
630 linkend="guc-default-transaction-read-only"><varname>default_transaction_read_only</></link>
631 via <command>ALTER DATABASE SET</> (Kevin Grittner)
635 Previously, the generated script would fail during restore.
640 Author: Fujii Masao <fujii@postgresql.org>
641 Branch: master [38f432898] 2013-11-21 21:52:03 +0900
642 Branch: REL9_3_STABLE [844534dd4] 2013-11-21 21:54:19 +0900
647 Fix <application>pg_isready</> to handle its <option>-d</> option
648 properly (Fabrízio de Royes Mello and Fujii Masao)
653 Author: Peter Eisentraut <peter_e@gmx.net>
654 Branch: master [bd5a9a50e] 2013-11-18 22:01:59 -0500
655 Branch: REL9_3_STABLE [8ca75671b] 2013-11-18 22:02:36 -0500
660 Report out-of-disk-space failures properly
661 in <application>pg_upgrade</> (Peter Eisentraut)
666 Author: Michael Meskes <meskes@postgresql.org>
667 Branch: master [51867a0f9] 2013-11-27 11:02:13 +0100
668 Branch: REL9_3_STABLE [dcb05900b] 2013-11-27 11:14:52 +0100
669 Branch: REL9_2_STABLE [0cedfa766] 2013-11-27 11:15:13 +0100
670 Branch: REL9_1_STABLE [9a1c6dd43] 2013-11-27 11:15:34 +0100
675 Make <application>ecpg</> search for quoted cursor names
676 case-sensitively (Zoltán Böszörményi)
681 Author: Michael Meskes <meskes@postgresql.org>
682 Branch: master [b46fa3210] 2013-11-26 17:42:32 +0100
683 Branch: REL9_3_STABLE [b3866bc2b] 2013-11-26 17:32:40 +0100
684 Branch: REL9_2_STABLE [b05c415c8] 2013-11-26 17:32:26 +0100
685 Branch: REL9_1_STABLE [5bffd42a3] 2013-11-26 17:32:06 +0100
686 Branch: REL9_0_STABLE [7bee2e3e5] 2013-11-26 17:31:39 +0100
687 Branch: REL8_4_STABLE [3b41a7c74] 2013-11-26 17:30:24 +0100
692 Fix <application>ecpg</>'s processing of lists of variables
693 declared <type>varchar</> (Zoltán Böszörményi)
698 Author: Tom Lane <tgl@sss.pgh.pa.us>
699 Branch: master [64d15e424] 2013-11-23 22:46:43 -0500
700 Branch: REL9_3_STABLE [af1288e68] 2013-11-23 22:46:03 -0500
701 Branch: REL9_2_STABLE [b6da09fcb] 2013-11-23 22:46:08 -0500
702 Branch: REL9_1_STABLE [8bf45ea8b] 2013-11-23 22:46:11 -0500
703 Branch: REL9_0_STABLE [cd5316f67] 2013-11-23 22:46:15 -0500
704 Branch: REL8_4_STABLE [2c3b7d224] 2013-11-23 22:46:21 -0500
709 Make <filename>contrib/lo</> defend against incorrect trigger definitions
715 Author: Tom Lane <tgl@sss.pgh.pa.us>
716 Branch: master [335470251] 2013-12-01 14:11:44 -0500
717 Branch: REL9_3_STABLE [4e213be86] 2013-12-01 14:12:01 -0500
718 Branch: REL9_2_STABLE [c89acb41f] 2013-12-01 14:12:05 -0500
719 Branch: REL9_1_STABLE [99e7d2ad1] 2013-12-01 14:12:08 -0500
720 Branch: REL9_0_STABLE [47430452a] 2013-12-01 14:12:12 -0500
721 Branch: REL8_4_STABLE [0526889a6] 2013-12-01 14:12:17 -0500
726 Update time zone data files to <application>tzdata</> release 2013h
727 for DST law changes in Argentina, Brazil, Jordan, Libya,
728 Liechtenstein, Morocco, and Palestine. Also, new timezone
729 abbreviations WIB, WIT, WITA for Indonesia.
738 <sect1 id="release-9-3-1">
739 <title>Release 9.3.1</title>
742 <title>Release Date</title>
743 <simpara>2013-10-10</simpara>
747 This release contains a variety of fixes from 9.3.0.
748 For information about new features in the 9.3 major release, see
749 <xref linkend="release-9-3">.
753 <title>Migration to Version 9.3.1</title>
756 A dump/restore is not required for those running 9.3.X.
760 However, if you use the <literal>hstore</> extension, see the
761 first changelog entry.
767 <title>Changes</title>
773 Ensure new-in-9.3 JSON functionality is added to the <literal>hstore</>
774 extension during an update (Andrew Dunstan)
778 Users who upgraded a pre-9.3 database containing <literal>hstore</>
781 ALTER EXTENSION hstore UPDATE;
783 after installing 9.3.1, to add two new JSON functions and a cast.
784 (If <literal>hstore</> is already up to date, this command does
791 Fix memory leak when creating B-tree indexes on range columns
798 Fix memory leak caused by <function>lo_open()</function> failure
805 Serializable snapshot fixes (Kevin Grittner, Heikki Linnakangas)
811 Fix deadlock bug in libpq when using SSL (Stephen Frost)
817 Fix timeline handling bugs in <application>pg_receivexlog</>
818 (Heikki Linnakangas, Andrew Gierth)
824 Prevent <command>CREATE FUNCTION</> from checking <command>SET</>
825 variables unless function body checking is enabled (Tom Lane)
831 Remove rare inaccurate warning during vacuum of index-less tables
841 <sect1 id="release-9-3">
842 <title>Release 9.3</title>
845 <title>Release Date</title>
846 <simpara>2013-09-09</simpara>
850 <title>Overview</title>
853 Major enhancements in <productname>PostgreSQL</> 9.3 include:
856 <!-- This list duplicates items below, but without authors or details-->
862 Add <link linkend="SQL-CREATEMATERIALIZEDVIEW">materialized
869 Make simple views <link
870 linkend="SQL-CREATEVIEW-updatable-views">auto-updatable</link>
876 Add many features for the <type>JSON</> data type,
877 including <link linkend="functions-json">operators and functions</link>
878 to extract elements from <type>JSON</> values
884 Implement <acronym>SQL</>-standard <link
885 linkend="queries-lateral"><literal>LATERAL</></link> option for
886 <literal>FROM</>-clause subqueries and function calls
892 Allow <link linkend="SQL-CREATEFOREIGNDATAWRAPPER">foreign data
893 wrappers</link> to support writes (inserts/updates/deletes) on foreign
900 Add a <link linkend="postgres-fdw"><productname>Postgres</> foreign
901 data wrapper</link> to allow access to
902 other <productname>Postgres</> servers
908 Add support for <link linkend="event-triggers">event triggers</link>
914 Add optional ability to <link
915 linkend="app-initdb-data-checksums">checksum</link> data pages and
922 Prevent non-key-field row updates from blocking foreign key checks
928 Greatly reduce System V <link linkend="sysvipc">shared
929 memory</link> requirements
936 The above items are explained in more detail in the sections below.
943 <title>Migration to Version 9.3</title>
946 A dump/restore using <link
947 linkend="APP-PG-DUMPALL"><application>pg_dumpall</></link>, or use
948 of <link linkend="pgupgrade"><application>pg_upgrade</></link>, is
949 required for those wishing to migrate data from any previous release.
953 Version 9.3 contains a number of changes that may affect compatibility
954 with previous releases. Observe the following incompatibilities:
958 <title>Server Settings</title>
964 Rename <varname>replication_timeout</> to <link
965 linkend="guc-wal-sender-timeout"><varname>wal_sender_timeout</></link>
970 This setting controls the <link
971 linkend="wal"><acronym>WAL</></link> sender timeout.
977 Require superuser privileges to set <link
978 linkend="guc-commit-delay"><varname>commit_delay</></link>
979 because it can now potentially delay other sessions (Simon Riggs)
985 Allow in-memory sorts to use their full memory allocation (Jeff Janes)
989 Users who have set <link
990 linkend="guc-work-mem"><varname>work_mem</></link> based on the
991 previous behavior may need to revisit that setting.
1000 <title>Other</title>
1006 Throw an error if a tuple to be updated or deleted has already been
1007 updated or deleted by a <literal>BEFORE</> trigger (Kevin Grittner)
1011 Formerly, the originally-intended update was silently skipped,
1012 resulting in logical inconsistency since the trigger might have
1013 propagated data to other places based on the intended update.
1014 Now an error is thrown to prevent the inconsistent results from being
1015 committed. If this change affects your application, the best solution
1016 is usually to move the data-propagation actions to
1017 an <literal>AFTER</> trigger.
1021 This error will also be thrown if a query invokes a volatile function
1022 that modifies rows that are later modified by the query itself.
1023 Such cases likewise previously resulted in silently skipping updates.
1029 Change multicolumn <link linkend="SQL-CREATETABLE"><literal>ON UPDATE
1030 SET NULL/SET DEFAULT</></link> foreign key actions to affect
1031 all columns of the constraint, not just those changed in the
1032 <command>UPDATE</> (Tom Lane)
1036 Previously, we would set only those referencing columns that
1037 correspond to referenced columns that were changed by
1038 the <command>UPDATE</>. This was what was required by SQL-92,
1039 but more recent editions of the SQL standard specify the new behavior.
1045 Force cached plans to be replanned if the <link
1046 linkend="guc-search-path"><varname>search_path</></link> changes
1051 Previously, cached plans already generated in the current session were
1052 not redone if the query was re-executed with a
1053 new <varname>search_path</> setting, resulting in surprising behavior.
1060 linkend="functions-formatting-table"><function>to_number()</></link>
1061 to properly handle a period used as a thousands separator (Tom Lane)
1065 Previously, a period was considered to be a decimal point even when
1066 the locale says it isn't and the <literal>D</> format code is used to
1067 specify use of the locale-specific decimal point. This resulted in
1068 wrong answers if <literal>FM</> format was also used.
1074 Fix <literal>STRICT</> non-set-returning functions that have
1075 set-returning functions in their arguments to properly return null
1080 A null value passed to the strict function should result in a null
1081 output, but instead, that output row was suppressed entirely.
1087 Store <link linkend="wal"><acronym>WAL</></link> in a continuous
1088 stream, rather than skipping the last 16MB segment every 4GB
1089 (Heikki Linnakangas)
1093 Previously, <acronym>WAL</> files with names ending in <literal>FF</>
1094 were not used because of this skipping. If you have <acronym>WAL</>
1095 backup or restore scripts that took this behavior into account, they
1096 will need to be adjusted.
1103 linkend="catalog-pg-constraint"><structname>pg_constraint.confmatchtype</></link>,
1104 store the default foreign key match type (non-<literal>FULL</>,
1105 non-<literal>PARTIAL</>) as <literal>s</> for <quote>simple</>
1110 Previously this case was represented by <literal>u</>
1111 for <quote>unspecified</>.
1122 <title>Changes</title>
1125 Below you will find a detailed account of the changes between
1126 <productname>PostgreSQL</productname> 9.3 and the previous major
1131 <title>Server</title>
1134 <title>Locking</title>
1140 Prevent non-key-field row updates from blocking foreign key checks
1141 (Álvaro Herrera, Noah Misch, Andres Freund, Alexander
1142 Shulgin, Marti Raudsepp, Alexander Shulgin)
1146 This change improves concurrency and reduces the probability of
1147 deadlocks when updating tables involved in a foreign-key constraint.
1148 <command>UPDATE</>s that do not change any columns referenced in a
1149 foreign key now take the new <literal>NO KEY UPDATE</> lock mode on
1150 the row, while foreign key checks use the new <literal>KEY SHARE</>
1151 lock mode, which does not conflict with <literal>NO KEY UPDATE</>.
1152 So there is no blocking unless a foreign-key column is changed.
1158 Add configuration variable <link
1159 linkend="guc-lock-timeout"><varname>lock_timeout</></link> to
1160 allow limiting how long a session will wait to acquire any one lock
1161 (Zoltán Böszörményi)
1170 <title>Indexes</title>
1176 Add <link linkend="rangetypes-indexing"><acronym>SP-GiST</></link>
1177 support for range data types (Alexander Korotkov)
1183 Allow <link linkend="GiST"><acronym>GiST</></link> indexes to be
1184 unlogged (Jeevan Chalke)
1190 Improve performance of <acronym>GiST</> index insertion by randomizing
1191 the choice of which page to descend to when there are multiple equally
1192 good alternatives (Heikki Linnakangas)
1198 Improve concurrency of hash index operations (Robert Haas)
1207 <title>Optimizer</title>
1213 Collect and use histograms of upper and lower bounds, as well as range
1214 lengths, for <link linkend="rangetypes">range types</link>
1215 (Alexander Korotkov)
1221 Improve optimizer's cost estimation for index access (Tom Lane)
1227 Improve optimizer's hash table size estimate for
1228 doing <literal>DISTINCT</> via hash aggregation (Tom Lane)
1234 Suppress no-op Result and Limit plan nodes
1235 (Kyotaro Horiguchi, Amit Kapila, Tom Lane)
1241 Reduce optimizer overhead by not keeping plans on the basis of cheap
1242 startup cost when the optimizer only cares about total cost overall
1252 <title>General Performance</title>
1258 Add <link linkend="SQL-COPY"><command>COPY FREEZE</></link>
1259 option to avoid the overhead of marking tuples as frozen later
1260 (Simon Riggs, Jeff Davis)
1266 Improve performance of <link
1267 linkend="datatype-numeric"><type>NUMERIC</></link> calculations
1274 Improve synchronization of sessions waiting for <link
1275 linkend="guc-commit-delay"><varname>commit_delay</></link>
1280 This greatly improves the usefulness of <varname>commit_delay</>.
1286 Improve performance of the <link
1287 linkend="SQL-CREATETABLE"><command>CREATE TEMPORARY TABLE ... ON
1288 COMMIT DELETE ROWS</></link> option by not truncating such temporary
1289 tables in transactions that haven't touched any temporary tables
1290 (Heikki Linnakangas)
1296 Make vacuum recheck visibility after it has removed expired tuples
1301 This increases the chance of a page being marked as all-visible.
1307 Add per-resource-owner lock caches (Jeff Janes)
1311 This speeds up lock bookkeeping at statement completion in
1312 multi-statement transactions that hold many locks; it is particularly
1313 useful for <application>pg_dump</>.
1319 Avoid scanning the entire relation cache at commit of a transaction
1320 that creates a new relation (Jeff Janes)
1324 This speeds up sessions that create many tables in successive
1325 small transactions, such as a <application>pg_restore</> run.
1331 Improve performance of transactions that drop many relations
1341 <title>Monitoring</title>
1347 Add optional ability to <link
1348 linkend="app-initdb-data-checksums">checksum</link> data pages and
1349 report corruption (Simon Riggs, Jeff Davis, Greg Smith, Ants Aasma)
1353 The checksum option can be set during <link
1354 linkend="APP-INITDB">initdb</link>.
1360 Split the <link linkend="monitoring-stats">statistics collector's</link>
1361 data file into separate global and per-database files (Tomas Vondra)
1365 This reduces the I/O required for statistics tracking.
1371 Fix the statistics collector to operate properly in cases where the
1372 system clock goes backwards (Tom Lane)
1376 Previously, statistics collection would stop until the time again
1377 reached the latest time previously recorded.
1383 Emit an informative message to postmaster standard error when we
1384 are about to stop logging there
1389 This should help reduce user confusion about where to look for log
1390 output in common configurations that log to standard error only during
1400 <title>Authentication</title>
1406 When an authentication failure occurs, log the relevant
1407 <link linkend="auth-pg-hba-conf"><filename>pg_hba.conf</></link>
1408 line, to ease debugging of unintended failures
1415 Improve <link linkend="auth-ldap"><acronym>LDAP</></link> error
1416 reporting and documentation (Peter Eisentraut)
1422 Add support for specifying <acronym>LDAP</> authentication parameters
1423 in <acronym>URL</> format, per RFC 4516 (Peter Eisentraut)
1430 linkend="guc-ssl-ciphers"><varname>ssl_ciphers</></link> parameter
1431 to start with <literal>DEFAULT</>, rather than <literal>ALL</>,
1432 then remove insecure ciphers (Magnus Hagander)
1436 This should yield a more appropriate SSL cipher set.
1442 Parse and load <link
1443 linkend="auth-username-maps"><filename>pg_ident.conf</></link>
1444 once, not during each connection (Amit Kapila)
1448 This is similar to how <filename>pg_hba.conf</> is processed.
1457 <title>Server Settings</title>
1463 Greatly reduce System V <link linkend="sysvipc">shared
1464 memory</link> requirements (Robert Haas)
1468 On Unix-like systems, <function>mmap()</> is now used for most
1469 of <productname>PostgreSQL</>'s shared memory. For most users, this
1470 will eliminate any need to adjust kernel parameters for shared memory.
1476 Allow the postmaster to listen on multiple Unix-domain sockets
1477 (Honza Horák)
1481 The configuration parameter
1482 <varname>unix_socket_directory</> is replaced by <link
1483 linkend="guc-unix-socket-directories"><varname>unix_socket_directories</></link>,
1484 which accepts a list of directories.
1490 Allow a directory of configuration files to be processed (Magnus
1491 Hagander, Greg Smith, Selena Deckelmann)
1495 Such a directory is specified with <link
1496 linkend="config-includes"><varname>include_dir</></link> in the server
1503 Increase the maximum <link
1504 linkend="APP-INITDB">initdb</link>-configured value for <link
1505 linkend="guc-shared-buffers"><varname>shared_buffers</></link>
1506 to 128MB (Robert Haas)
1510 This is the maximum value that initdb will attempt to set in <link
1511 linkend="config-setting-configuration-file"><filename>postgresql.conf</></link>;
1512 the previous maximum was 32MB.
1518 Remove the <link linkend="guc-external-pid-file">external
1519 <acronym>PID</> file</link>, if any, on postmaster exit
1531 <title>Replication and Recovery</title>
1537 Allow a streaming replication standby to <link
1538 linkend="protocol-replication">follow a timeline switch</link>
1539 (Heikki Linnakangas)
1543 This allows streaming standby servers to receive WAL data from a slave
1544 newly promoted to master status. Previously, other standbys would
1545 require a resync to begin following the new master.
1551 Add <acronym>SQL</> functions <link
1552 linkend="functions-admin-backup"><function>pg_is_in_backup()</></link>
1554 linkend="functions-admin-backup"><function>pg_backup_start_time()</></link>
1559 These functions report the status of base backups.
1565 Improve performance of streaming log shipping with <link
1566 linkend="guc-synchronous-commit"><varname>synchronous_commit</></link>
1567 disabled (Andres Freund)
1573 Allow much faster promotion of a streaming standby to primary (Simon
1574 Riggs, Kyotaro Horiguchi)
1580 Add the last checkpoint's redo location to <link
1581 linkend="APP-PGCONTROLDATA"><application>pg_controldata</></link>'s
1582 output (Fujii Masao)
1586 This information is useful for determining which <acronym>WAL</>
1587 files are needed for restore.
1593 Allow tools like <link
1594 linkend="app-pgreceivexlog"><application>pg_receivexlog</></link>
1595 to run on computers with different architectures (Heikki
1600 WAL files can still only be replayed on servers with the same
1601 architecture as the primary; but they can now be transmitted to and
1602 stored on machines of any architecture, since the
1603 streaming replication protocol is now machine-independent.
1610 linkend="app-pgbasebackup"><application>pg_basebackup</></link>
1611 <option>--write-recovery-conf</> output a
1612 minimal <filename>recovery.conf</> file (Zoltán
1613 Böszörményi, Magnus Hagander)
1617 This simplifies setting up a standby server.
1624 linkend="app-pgreceivexlog"><application>pg_receivexlog</></link>
1626 linkend="app-pgbasebackup"><application>pg_basebackup</></link>
1627 <option>--xlog-method</> to handle streaming timeline switches
1628 (Heikki Linnakangas)
1635 linkend="guc-wal-receiver-timeout"><varname>wal_receiver_timeout</></link>
1636 parameter to control the <acronym>WAL</> receiver's timeout
1641 This allows more rapid detection of connection failure.
1647 Change the <link linkend="wal"><acronym>WAL</></link> record format to
1648 allow splitting the record header across pages (Heikki Linnakangas)
1652 The new format is slightly more compact, and is more efficient to
1662 <title>Queries</title>
1668 Implement <acronym>SQL</>-standard <link
1669 linkend="queries-lateral"><literal>LATERAL</></link> option for
1670 <literal>FROM</>-clause subqueries and function calls (Tom Lane)
1674 This feature allows subqueries and functions in <literal>FROM</> to
1675 reference columns from other tables in the <literal>FROM</>
1676 clause. The <literal>LATERAL</> keyword is optional for functions.
1682 Add support for piping <link
1683 linkend="SQL-COPY"><command>COPY</></link> and <link
1684 linkend="APP-PSQL"><application>psql</></link> <command>\copy</>
1685 data to/from an external program (Etsuro Fujita)
1691 Allow a multirow <link
1692 linkend="SQL-VALUES"><literal>VALUES</></link> clause in a rule
1693 to reference <literal>OLD</>/<literal>NEW</> (Tom Lane)
1702 <title>Object Manipulation</title>
1708 Add support for <link linkend="event-triggers">event triggers</link>
1709 (Dimitri Fontaine, Robert Haas, Álvaro Herrera)
1713 This allows server-side functions written in event-enabled
1714 languages to be called when DDL commands are run.
1720 Allow <link linkend="SQL-CREATEFOREIGNDATAWRAPPER">foreign data
1721 wrappers</link> to support writes (inserts/updates/deletes) on foreign
1722 tables (KaiGai Kohei)
1728 Add <link linkend="SQL-CREATESCHEMA"><command>CREATE SCHEMA ... IF
1729 NOT EXISTS</></link> clause (Fabrízio de Royes Mello)
1735 Make <link linkend="SQL-REASSIGN-OWNED"><command>REASSIGN
1736 OWNED</></link> also change ownership of shared objects
1737 (Álvaro Herrera)
1743 Make <link linkend="sql-createaggregate"><command>CREATE
1744 AGGREGATE</></link> complain if the given initial value string is not
1745 valid input for the transition datatype (Tom Lane)
1751 Suppress <link linkend="SQL-CREATETABLE"><command>CREATE
1752 TABLE</></link>'s messages about implicit index and sequence creation
1757 These messages now appear at <literal>DEBUG1</> verbosity, so that
1758 they will not be shown by default.
1764 Allow <link linkend="SQL-DROPTABLE"><command>DROP TABLE IF
1765 EXISTS</></link> to succeed when a non-existent schema is specified
1766 in the table name (Bruce Momjian)
1770 Previously, it threw an error if the schema did not exist.
1776 Provide clients with <link
1777 linkend="libpq-pqresulterrorfield">constraint violation details</link>
1778 as separate fields (Pavel Stehule)
1782 This allows clients to retrieve table, column, data type, or
1783 constraint name error details. Previously such information had to be
1784 extracted from error strings. Client library support is required to
1785 access these fields.
1792 <title><command>ALTER</></title>
1798 Support <literal>IF NOT EXISTS</> option in <link
1799 linkend="SQL-ALTERTYPE"><command>ALTER TYPE ... ADD VALUE</></link>
1804 This is useful for conditionally adding values to enumerated types.
1810 Add <link linkend="SQL-ALTERROLE"><command>ALTER ROLE ALL
1811 SET</></link> to establish settings for all users (Peter Eisentraut)
1815 This allows settings to apply to all users in all databases. <link
1816 linkend="SQL-ALTERDATABASE"><command>ALTER DATABASE SET</></link>
1817 already allowed addition of settings for all users in a single
1818 database. <filename>postgresql.conf</> has a similar effect.
1824 Add support for <link linkend="SQL-ALTERRULE"><command>ALTER RULE
1825 ... RENAME</></link> (Ali Dar)
1834 <title><link linkend="rules-views"><command>VIEWs</></link></title>
1840 Add <link linkend="SQL-CREATEMATERIALIZEDVIEW">materialized
1841 views</link> (Kevin Grittner)
1845 Unlike ordinary views, where the base tables are read on every access,
1846 materialized views create physical tables at creation or refresh time.
1847 Access to the materialized view then reads from its physical
1848 table. There is not yet any facility for incrementally refreshing
1849 materialized views or auto-accessing them via base table access.
1855 Make simple views <link
1856 linkend="SQL-CREATEVIEW-updatable-views">auto-updatable</link>
1861 Simple views that reference some or all columns from a
1862 single base table are now updatable by default. More
1863 complex views can be made updatable using <link
1864 linkend="SQL-CREATETRIGGER"><literal>INSTEAD OF</></link> triggers
1865 or <link linkend="SQL-CREATERULE"><literal>INSTEAD</></link> rules.
1871 Add <link linkend="SQL-CREATEVIEW"><command>CREATE RECURSIVE
1872 VIEW</></link> syntax (Peter Eisentraut)
1876 Internally this is translated into <command>CREATE VIEW ... WITH
1883 Improve view/rule printing code to handle cases where referenced
1884 tables are renamed, or columns are renamed, added, or dropped
1889 Table and column renamings can produce cases where, if we merely
1890 substitute the new name into the original text of a rule or view, the
1891 result is ambiguous. This change fixes the rule-dumping code to insert
1892 manufactured table and column aliases when needed to preserve the
1904 <title>Data Types</title>
1910 Increase the maximum size of <link linkend="largeObjects">large
1911 objects</link> from 2GB to 4TB (Nozomi Anzai, Yugo Nagata)
1915 This change includes adding 64-bit-capable large object access
1916 functions, both in the server and in libpq.
1922 Allow text <link linkend="datatype-timezones">timezone
1923 designations</link>, e.g. <quote>America/Chicago</>, in the
1924 <quote>T</> field of <acronym>ISO</>-format <type>timestamptz</type>
1925 input (Bruce Momjian)
1932 <title><link linkend="datatype-json"><type>JSON</></link></title>
1938 Add <link linkend="functions-json">operators and functions</link>
1939 to extract elements from <type>JSON</> values (Andrew Dunstan)
1945 Allow <type>JSON</> values to be <link
1946 linkend="functions-json-table">converted into records</link>
1953 Add <link linkend="functions-json-table">functions</link> to convert
1954 scalars, records, and <type>hstore</> values to <type>JSON</> (Andrew
1967 <title>Functions</title>
1974 linkend="array-functions-table"><function>array_remove()</></link>
1976 linkend="array-functions-table"><function>array_replace()</></link>
1977 functions (Marco Nenciarini, Gabriele Bartolini)
1984 linkend="functions-string-other"><function>concat()</></link>
1986 linkend="functions-string-format"><function>format()</></link>
1987 to properly expand <literal>VARIADIC</>-labeled arguments
1995 linkend="functions-string-format"><function>format()</></link>
1996 to provide field width and left/right alignment options (Pavel Stehule)
2003 linkend="functions-formatting-table"><function>to_char()</></link>,
2005 linkend="functions-formatting-table"><function>to_date()</></link>,
2007 linkend="functions-formatting-table"><function>to_timestamp()</></link>
2008 handle negative (BC) century values properly
2013 Previously the behavior was either wrong or inconsistent
2014 with positive/<acronym>AD</> handling, e.g. with the format mask
2015 <quote>IYYY-IW-DY</>.
2022 linkend="functions-formatting-table"><function>to_date()</></link>
2024 linkend="functions-formatting-table"><function>to_timestamp()</></link>
2025 return proper results when mixing <acronym>ISO</> and Gregorian
2026 week/day designations (Bruce Momjian)
2033 linkend="functions-info-catalog-table"><function>pg_get_viewdef()</></link>
2034 to start a new line by default after each <literal>SELECT</> target
2035 list entry and <literal>FROM</> entry (Marko Tiikkaja)
2039 This reduces line length in view printing, for instance in <link
2040 linkend="APP-PGDUMP"><application>pg_dump</></link> output.
2046 Fix <function>map_sql_value_to_xml_value()</> to print values of
2047 domain types the same way their base type would be printed
2052 There are special formatting rules for certain built-in types such as
2053 <type>boolean</>; these rules now also apply to domains over these
2063 <title>Server-Side Languages</title>
2066 <title><link linkend="plpgsql">PL/pgSQL</link> Server-Side Language</title>
2072 Allow PL/pgSQL to use <literal>RETURN</> with a composite-type
2073 expression (Asif Rehman)
2077 Previously, in a function returning a composite type,
2078 <literal>RETURN</> could only reference a variable of that type.
2084 Allow PL/pgSQL to access <link
2085 linkend="plpgsql-exception-diagnostics">constraint violation
2086 details</link> as separate fields (Pavel Stehule)
2092 Allow PL/pgSQL to access the number of rows processed by
2093 <link linkend="SQL-COPY"><command>COPY</></link> (Pavel Stehule)
2097 A <command>COPY</> executed in a PL/pgSQL function now updates the
2098 value retrieved by <link
2099 linkend="plpgsql-statements-diagnostics"><command>GET DIAGNOSTICS
2100 x = ROW_COUNT</></link>.
2106 Allow unreserved keywords to be used as identifiers everywhere in
2111 In certain places in the PL/pgSQL grammar, keywords had to be quoted
2112 to be used as identifiers, even if they were nominally unreserved.
2121 <title><link linkend="plpython">PL/Python</link> Server-Side Language</title>
2127 Add PL/Python result object string handler (Peter Eisentraut)
2131 This allows <literal>plpy.debug(rv)</literal> to output something reasonable.
2137 Make PL/Python convert OID values to a proper Python numeric type
2144 Handle <link linkend="spi"><acronym>SPI</></link> errors raised
2145 explicitly (with PL/Python's <literal>RAISE</>) the same as
2146 internal <acronym>SPI</> errors (Oskari Saarenmaa and Jan Urbanski)
2157 <title>Server Programming Interface (<link linkend="spi">SPI</link>)</title>
2163 Prevent leakage of <acronym>SPI</> tuple tables during subtransaction
2168 At the end of any failed subtransaction, the core SPI code now
2169 releases any SPI tuple tables that were created during that
2170 subtransaction. This avoids the need for SPI-using code to keep track
2171 of such tuple tables and release them manually in error-recovery code.
2172 Failure to do so caused a number of transaction-lifespan memory leakage
2173 issues in PL/pgSQL and perhaps other SPI clients. <link
2174 linkend="spi-spi-freetupletable"><function>SPI_freetuptable()</></link>
2175 now protects itself against multiple freeing requests, so any existing
2176 code that did take care to clean up shouldn't be broken by this change.
2182 Allow <acronym>SPI</> functions to access the number of rows processed
2183 by <link linkend="SQL-COPY"><command>COPY</></link> (Pavel Stehule)
2192 <title>Client Applications</title>
2198 Add command-line utility <link
2199 linkend="app-pg-isready"><application>pg_isready</></link> to
2200 check if the server is ready to accept connections (Phil Sorber)
2206 Support multiple <option>--table</> arguments for <link
2207 linkend="APP-PGRESTORE"><application>pg_restore</></link>,
2208 <link linkend="APP-CLUSTERDB"><application>clusterdb</></link>,
2209 <link linkend="APP-REINDEXDB"><application>reindexdb</></link>,
2210 and <link linkend="APP-VACUUMDB"><application>vacuumdb</></link>
2215 This is similar to the way <link
2216 linkend="APP-PGDUMP"><application>pg_dump</></link>'s
2217 <option>--table</> option works.
2223 Add <option>--dbname</> option to <link
2224 linkend="APP-PG-DUMPALL"><application>pg_dumpall</></link>, <link
2225 linkend="app-pgbasebackup"><application>pg_basebackup</></link>, and
2227 linkend="app-pgreceivexlog"><application>pg_receivexlog</></link>
2228 to allow specifying a connection string (Amit Kapila)
2234 Add libpq function <link
2235 linkend="libpq-pqconninfo"><function>PQconninfo()</></link>
2236 to return connection information (Zoltán
2237 Böszörményi, Magnus Hagander)
2244 <title><link linkend="APP-PSQL"><application>psql</></link></title>
2250 Adjust function cost settings so <application>psql</> tab
2251 completion and pattern searching are more efficient (Tom Lane)
2257 Improve <application>psql</>'s tab completion coverage (Jeff Janes,
2258 Dean Rasheed, Peter Eisentraut, Magnus Hagander)
2264 Allow the <application>psql</> <option>--single-transaction</>
2265 mode to work when reading from standard input (Fabien Coelho,
2270 Previously this option only worked when reading from a file.
2276 Remove <application>psql</> warning when connecting to an older
2277 server (Peter Eisentraut)
2281 A warning is still issued when connecting to a server of a newer major
2282 version than <application>psql</>'s.
2289 <title><link linkend="APP-PSQL-meta-commands">Backslash Commands</link></title>
2295 Add <application>psql</> command <command>\watch</> to repeatedly
2296 execute a SQL command (Will Leinweber)
2302 Add <application>psql</> command <command>\gset</> to store query
2303 results in <application>psql</> variables (Pavel Stehule)
2309 Add <acronym>SSL</> information to <application>psql</>'s
2310 <command>\conninfo</> command (Alastair Turner)
2316 Add <quote>Security</> column to <application>psql</>'s
2317 <command>\df+</> output (Jon Erdman)
2323 Allow <application>psql</> command <command>\l</> to accept a database
2324 name pattern (Peter Eisentraut)
2330 In <application>psql</>, do not allow <command>\connect</> to
2331 use defaults if there is no active connection (Bruce Momjian)
2335 This might be the case if the server had crashed.
2341 Properly reset state after failure of a SQL command executed with
2342 <application>psql</>'s <literal>\g</> <replaceable>file</>
2347 Previously, the output from subsequent SQL commands would unexpectedly
2348 continue to go to the same file.
2357 <title>Output</title>
2363 Add a <literal>latex-longtable</> output format to
2364 <application>psql</> (Bruce Momjian)
2368 This format allows tables to span multiple pages.
2374 Add a <literal>border=3</> output mode to the <application>psql</>
2375 <literal>latex</> format (Bruce Momjian)
2381 In <application>psql</>'s tuples-only and expanded output modes, no
2382 longer emit <quote>(No rows)</> for zero rows (Peter Eisentraut)
2388 In <application>psql</>'s unaligned, expanded output mode, no longer
2389 print an empty line for zero rows (Peter Eisentraut)
2400 <title><link linkend="APP-PGDUMP"><application>pg_dump</></link></title>
2406 Add <application>pg_dump</> <option>--jobs</> option to dump tables in
2407 parallel (Joachim Wieland)
2413 Make <application>pg_dump</> output functions in a more predictable
2414 order (Joel Jacobson)
2420 Fix tar files emitted by <application>pg_dump</>
2421 to be <acronym>POSIX</> conformant (Brian Weaver, Tom Lane)
2427 Add <option>--dbname</> option to <application>pg_dump</>, for
2428 consistency with other client commands (Heikki Linnakangas)
2432 The database name could already be supplied last without a flag.
2441 <title><link linkend="APP-INITDB"><application>initdb</></link></title>
2447 Make initdb fsync the newly created data directory (Jeff Davis)
2451 This insures data integrity in event of a system crash shortly after
2452 initdb. This can be disabled by using <option>--nosync</>.
2458 Add initdb <option>--sync-only</> option to sync the data directory to durable
2459 storage (Bruce Momjian)
2463 This is used by <link
2464 linkend="pgupgrade"><application>pg_upgrade</></link>.
2470 Make initdb issue a warning about placing the data directory at the
2471 top of a file system mount point (Bruce Momjian)
2482 <title>Source Code</title>
2488 Add infrastructure to allow plug-in <link
2489 linkend="bgworker">background worker processes</link>
2490 (Álvaro Herrera)
2496 Create a centralized timeout <acronym>API</> (Zoltán
2497 Böszörményi)
2503 Create libpgcommon and move <function>pg_malloc()</> and other
2504 functions there (Álvaro Herrera, Andres Freund)
2508 This allows libpgport to be used solely for portability-related code.
2514 Add support for list links embedded in larger structs (Andres Freund)
2520 Use <literal>SA_RESTART</> for all signals,
2521 including <literal>SIGALRM</> (Tom Lane)
2527 Ensure that the correct text domain is used when
2528 translating <function>errcontext()</> messages
2529 (Heikki Linnakangas)
2535 Standardize naming of client-side memory allocation functions (Tom Lane)
2541 Provide support for <quote>static assertions</> that will fail at
2542 compile time if some compile-time-constant condition is not met
2543 (Andres Freund, Tom Lane)
2549 Support <function>Assert()</> in client-side code (Andrew Dunstan)
2555 Add decoration to inform the C compiler that some <function>ereport()</>
2556 and <function>elog()</> calls do not return (Peter Eisentraut,
2557 Andres Freund, Tom Lane, Heikki Linnakangas)
2563 Allow options to be passed to the regression
2564 test output comparison utility via <link
2565 linkend="regress-evaluation"><envar>PG_REGRESS_DIFF_OPTS</></link>
2572 Add isolation tests for <link
2573 linkend="SQL-CREATEINDEX"><command>CREATE INDEX
2574 CONCURRENTLY</></link> (Abhijit Menon-Sen)
2580 Remove typedefs for <type>int2</>/<type>int4</> as they are better
2581 represented as <type>int16</>/<type>int32</> (Peter Eisentraut)
2587 Fix <link linkend="install">install-strip</link> on Mac <productname>OS
2588 X</> (Peter Eisentraut)
2594 Remove <link linkend="configure">configure</link> flag
2595 <option>--disable-shared</>, as it is no longer supported
2602 Rewrite pgindent in <application>Perl</> (Andrew Dunstan)
2608 Provide Emacs macro to set Perl formatting to
2609 match <productname>PostgreSQL</>'s perltidy settings (Peter Eisentraut)
2615 Run tool to check the keyword list whenever the backend grammar is
2622 Change the way <literal>UESCAPE</> is lexed, to significantly reduce
2623 the size of the lexer tables (Heikki Linnakangas)
2629 Centralize <application>flex</> and <application>bison</>
2630 <application>make</> rules (Peter Eisentraut)
2634 This is useful for <application>pgxs</> authors.
2640 Change many internal backend functions to return object <type>OID</>s
2641 rather than void (Dimitri Fontaine)
2645 This is useful for event triggers.
2651 Invent pre-commit/pre-prepare/pre-subcommit events for transaction
2652 callbacks (Tom Lane)
2656 Loadable modules that use transaction callbacks might need modification
2657 to handle these new event types.
2664 linkend="functions-info-catalog-table"><function>pg_identify_object()</></link>
2665 to produce a machine-readable description of a database object
2666 (Álvaro Herrera)
2672 Add post-<command>ALTER</>-object server hooks (KaiGai Kohei)
2678 Implement a generic binary heap and use it for Merge-Append
2679 operations (Abhijit Menon-Sen)
2685 Provide a tool to help detect timezone abbreviation changes when
2686 updating the <filename>src/timezone/data</> files
2693 Add <application>pkg-config</> support for <application>libpq</>
2694 and <application>ecpg</> libraries (Peter Eisentraut)
2700 Remove <filename>src/tool/backend</>, now that the content is on
2701 the <productname>PostgreSQL</> wiki (Bruce Momjian)
2707 Split out <link linkend="wal"><acronym>WAL</></link> reading as
2708 an independent facility (Heikki Linnakangas, Andres Freund)
2714 Use a 64-bit integer to represent <link
2715 linkend="wal"><acronym>WAL</></link> positions
2716 (<structname>XLogRecPtr</>) instead of two 32-bit integers
2717 (Heikki Linnakangas)
2721 Generally, tools that need to read the <acronym>WAL</> format
2722 will need to be adjusted.
2728 Allow <link linkend="plpython">PL/Python</link> to support
2729 platform-specific include directories (Peter Eisentraut)
2735 Allow <link linkend="plpython">PL/Python</link> on <productname>OS
2736 X</> to build against custom versions of <application>Python</>
2746 <title>Additional Modules</title>
2752 Add a <link linkend="postgres-fdw"><productname>Postgres</> foreign
2753 data wrapper</link> contrib module to allow access to
2754 other <productname>Postgres</> servers (Shigeru Hanada)
2758 This foreign data wrapper supports writes.
2764 Add <link linkend="pgxlogdump"><application>pg_xlogdump</></link>
2765 contrib program (Andres Freund)
2771 Add support for indexing of regular-expression searches in
2772 <link linkend="pgtrgm"><productname>pg_trgm</></link>
2773 (Alexander Korotkov)
2779 Improve <link linkend="pgtrgm"><productname>pg_trgm</></link>'s
2780 handling of multibyte characters (Tom Lane)
2784 On a platform that does not have the wcstombs() or towlower() library
2785 functions, this could result in an incompatible change in the contents
2786 of <productname>pg_trgm</> indexes for non-ASCII data. In such cases,
2787 <command>REINDEX</> those indexes to ensure correct search results.
2793 Add a <link linkend="pgstattuple">pgstattuple</link> function to report
2794 the size of the pending-insertions list of a <acronym>GIN</> index
2801 Make <link linkend="oid2name"><application>oid2name</></link>,
2802 <link linkend="pgbench"><application>pgbench</></link>, and
2803 <link linkend="vacuumlo"><application>vacuumlo</></link> set
2804 <varname>fallback_application_name</> (Amit Kapila)
2810 Improve output of <link
2811 linkend="pgtesttiming"><application>pg_test_timing</></link>
2818 Improve output of <link
2819 linkend="pgtestfsync"><application>pg_test_fsync</></link>
2826 Create a dedicated foreign data wrapper, with its own option validator
2827 function, for <link linkend="dblink">dblink</link> (Shigeru Hanada)
2831 When using this FDW to define the target of a <application>dblink</>
2832 connection, instead of using a hard-wired list of connection options,
2833 the underlying <application>libpq</> library is consulted to see what
2834 connection options it supports.
2841 <title><link linkend="pgupgrade"><application>pg_upgrade</></link></title>
2847 Allow <application>pg_upgrade</> to do dumps and restores in
2848 parallel (Bruce Momjian, Andrew Dunstan)
2852 This allows parallel schema dump/restore of databases, as well as
2853 parallel copy/link of data files per tablespace. Use the
2854 <option>--jobs</> option to specify the level of parallelism.
2860 Make <application>pg_upgrade</> create Unix-domain sockets in
2861 the current directory (Bruce Momjian, Tom Lane)
2865 This reduces the possibility that someone will accidentally connect
2872 Make <application>pg_upgrade</> <option>--check</> mode properly
2873 detect the location of non-default socket directories (Bruce
2880 Improve performance of <application>pg_upgrade</> for databases
2881 with many tables (Bruce Momjian)
2887 Improve <application>pg_upgrade</>'s logs by showing
2888 executed commands (Álvaro Herrera)
2894 Improve <application>pg_upgrade</>'s status display during
2895 copy/link (Bruce Momjian)
2904 <title><link linkend="pgbench"><application>pgbench</></link></title>
2910 Add <option>--foreign-keys</> option to <application>pgbench</>
2915 This adds foreign key constraints to the standard tables created by
2916 <application>pgbench</>, for use in foreign key performance testing.
2922 Allow <application>pgbench</> to aggregate performance statistics
2923 and produce output every <option>--aggregate-interval</>
2924 seconds (Tomas Vondra)
2930 Add <application>pgbench</> <option>--sampling-rate</> option
2931 to control the percentage of transactions logged (Tomas Vondra)
2937 Reduce and improve the status message output of
2938 <application>pgbench</>'s initialization mode (Robert Haas,
2945 Add <application>pgbench</> <option>-q</> mode to print one output
2946 line every five seconds (Tomas Vondra)
2952 Output <application>pgbench</> elapsed and estimated remaining
2953 time during initialization (Tomas Vondra)
2959 Allow <application>pgbench</> to use much larger scale factors,
2960 by changing relevant columns from <type>integer</> to <type>bigint</>
2961 when the requested scale factor exceeds 20000
2973 <title>Documentation</title>
2979 Allow <productname>EPUB</>-format documentation to be created
2986 Update <productname>FreeBSD</> kernel configuration documentation
2993 Improve <link linkend="tutorial-window"><literal>WINDOW</>
2994 function</link> documentation (Bruce Momjian, Florian Pflug)
3000 Add <link linkend="docguide-toolsets">instructions</link> for setting
3001 up the documentation tool chain on Mac <productname>OS X</>
3009 linkend="guc-commit-delay"><varname>commit_delay</></link>
3010 documentation (Peter Geoghegan)