1
1
<!-- doc/src/sgml/release-9.1.sgml -->
2
2
<!-- See header comment in release.sgml about typical markup -->
4
<sect1 id="release-9-1-2">
5
<title>Release 9.1.2</title>
8
<title>Release Date</title>
9
<simpara>2011-12-05</simpara>
13
This release contains a variety of fixes from 9.1.1.
14
For information about new features in the 9.1 major release, see
15
<xref linkend="release-9-1">.
19
<title>Migration to Version 9.1.2</title>
22
A dump/restore is not required for those running 9.1.X.
26
However, a longstanding error was discovered in the definition of the
27
<literal>information_schema.referential_constraints</> view. If you
28
rely on correct results from that view, you should replace its
29
definition as explained in the first changelog item below.
33
Also, if your installation was upgraded from a previous major release
34
by running <application>pg_upgrade</>, and it contains table columns of
35
the <type>citext</> data type, you should run <literal>CREATE EXTENSION
36
citext FROM unpackaged</>. If you've already done that before
37
upgrading to 9.1.2, you will instead need to do manual catalog updates
38
as explained in the second changelog item.
44
<title>Changes</title>
50
Fix bugs in <literal>information_schema.referential_constraints</> view
55
This view was being insufficiently careful about matching the
56
foreign-key constraint to the depended-on primary or unique key
57
constraint. That could result in failure to show a foreign key
58
constraint at all, or showing it multiple times, or claiming that it
59
depends on a different constraint than the one it really does.
63
Since the view definition is installed by <application>initdb</>,
64
merely upgrading will not fix the problem. If you need to fix this
65
in an existing installation, you can (as a superuser) drop the
66
<literal>information_schema</> schema then re-create it by sourcing
67
<filename><replaceable>SHAREDIR</>/information_schema.sql</filename>.
68
(Run <literal>pg_config --sharedir</> if you're uncertain where
69
<replaceable>SHAREDIR</> is.) This must be repeated in each database
76
Make <filename>contrib/citext</>'s upgrade script fix collations of
77
<type>citext</> columns and indexes (Tom Lane)
81
Existing <type>citext</> columns and indexes aren't correctly marked as
82
being of a collatable data type during <application>pg_upgrade</> from
83
a pre-9.1 server. That leads to operations on them failing with errors
84
such as <quote>could not determine which collation to use for string
85
comparison</>. This change allows them to be fixed by the same
86
script that upgrades the <type>citext</> module into a proper 9.1
87
extension during <literal>CREATE EXTENSION citext FROM unpackaged</>.
91
If you have a previously-upgraded database that is suffering from this
92
problem, and you already ran the <command>CREATE EXTENSION</> command,
93
you can manually run (as superuser) the <command>UPDATE</> commands
95
<filename><replaceable>SHAREDIR</>/extension/citext--unpackaged--1.0.sql</filename>.
96
(Run <literal>pg_config --sharedir</> if you're uncertain where
97
<replaceable>SHAREDIR</> is.)
103
Fix possible crash during <command>UPDATE</> or <command>DELETE</> that
104
joins to the output of a scalar-returning function (Tom Lane)
108
A crash could only occur if the target row had been concurrently
109
updated, so this problem surfaced only intermittently.
115
Fix incorrect replay of WAL records for GIN index updates
120
This could result in transiently failing to find index entries after
121
a crash, or on a hot-standby server. The problem would be repaired
122
by the next <command>VACUUM</> of the index, however.
128
Fix TOAST-related data corruption during <literal>CREATE TABLE dest AS
129
SELECT * FROM src</> or <literal>INSERT INTO dest SELECT * FROM src</>
134
If a table has been modified by <command>ALTER TABLE ADD COLUMN</>,
135
attempts to copy its data verbatim to another table could produce
136
corrupt results in certain corner cases.
137
The problem can only manifest in this precise form in 8.4 and later,
138
but we patched earlier versions as well in case there are other code
139
paths that could trigger the same bug.
145
Fix possible failures during hot standby startup (Simon Riggs)
151
Start hot standby faster when initial snapshot is incomplete
158
Fix race condition during toast table access from stale syscache entries
163
The typical symptom was transient errors like <quote>missing chunk
164
number 0 for toast value NNNNN in pg_toast_2619</>, where the cited
165
toast table would always belong to a system catalog.
171
Track dependencies of functions on items used in parameter default
172
expressions (Tom Lane)
176
Previously, a referenced object could be dropped without having dropped
177
or modified the function, leading to misbehavior when the function was
178
used. Note that merely installing this update will not fix the missing
179
dependency entries; to do that, you'd need to <command>CREATE OR
180
REPLACE</> each such function afterwards. If you have functions whose
181
defaults depend on non-built-in objects, doing so is recommended.
187
Fix incorrect management of placeholder variables in nestloop joins
192
This bug is known to lead to <quote>variable not found in subplan target
193
list</> planner errors, and could possibly result in wrong query output
194
when outer joins are involved.
200
Fix window functions that sort by expressions involving aggregates
205
Previously these could fail with <quote>could not find pathkey item to
206
sort</> planner errors.
212
Fix <quote>MergeAppend child's targetlist doesn't match MergeAppend</>
213
planner errors (Tom Lane)
219
Fix index matching for operators with both collatable and noncollatable
224
In 9.1.0, an indexable operator that has a non-collatable left-hand
225
input type and a collatable right-hand input type would not be
226
recognized as matching the left-hand column's index. An example is
227
the <type>hstore</> <literal>?</> <type>text</> operator.
233
Allow inlining of set-returning SQL functions with multiple OUT
234
parameters (Tom Lane)
240
Don't trust deferred-unique indexes for join removal (Tom Lane and Marti
245
A deferred uniqueness constraint might not hold intra-transaction,
246
so assuming that it does could give incorrect query results.
252
Make <function>DatumGetInetP()</> unpack inet datums that have a 1-byte
253
header, and add a new macro, <function>DatumGetInetPP()</>, that does
254
not (Heikki Linnakangas)
258
This change affects no core code, but might prevent crashes in add-on
259
code that expects <function>DatumGetInetP()</> to produce an unpacked
260
datum as per usual convention.
266
Improve locale support in <type>money</> type's input and output
271
Aside from not supporting all standard
272
<link linkend="guc-lc-monetary"><varname>lc_monetary</></link>
273
formatting options, the input and output functions were inconsistent,
274
meaning there were locales in which dumped <type>money</> values could
282
linkend="guc-transform-null-equals"><varname>transform_null_equals</></link>
283
affect <literal>CASE foo WHEN NULL ...</> constructs
288
<varname>transform_null_equals</> is only supposed to affect
289
<literal>foo = NULL</> expressions written directly by the user, not
290
equality checks generated internally by this form of <literal>CASE</>.
296
Change foreign-key trigger creation order to better support
297
self-referential foreign keys (Tom Lane)
301
For a cascading foreign key that references its own table, a row update
302
will fire both the <literal>ON UPDATE</> trigger and the
303
<literal>CHECK</> trigger as one event. The <literal>ON UPDATE</>
304
trigger must execute first, else the <literal>CHECK</> will check a
305
non-final state of the row and possibly throw an inappropriate error.
306
However, the firing order of these triggers is determined by their
307
names, which generally sort in creation order since the triggers have
308
auto-generated names following the convention
309
<quote>RI_ConstraintTrigger_NNNN</>. A proper fix would require
310
modifying that convention, which we will do in 9.2, but it seems risky
311
to change it in existing releases. So this patch just changes the
312
creation order of the triggers. Users encountering this type of error
313
should drop and re-create the foreign key constraint to get its
314
triggers into the right order.
320
Fix <literal>IF EXISTS</> to work correctly in <command>DROP OPERATOR
321
FAMILY</> (Robert Haas)
327
Disallow dropping of an extension from within its own script
332
This prevents odd behavior in case of incorrect management of extension
339
Don't mark auto-generated types as extension members (Robert Haas)
343
Relation rowtypes and automatically-generated array types do not need to
344
have their own extension membership entries in <structname>pg_depend</>,
345
and creating such entries complicates matters for extension upgrades.
351
Cope with invalid pre-existing <varname>search_path</> settings during
352
<command>CREATE EXTENSION</> (Tom Lane)
358
Avoid floating-point underflow while tracking buffer allocation rate
363
While harmless in itself, on certain platforms this would result in
364
annoying kernel log messages.
370
Prevent autovacuum transactions from running in serializable mode
375
Autovacuum formerly used the cluster-wide default transaction isolation
376
level, but there is no need for it to use anything higher than READ
377
COMMITTED, and using SERIALIZABLE could result in unnecessary delays
384
Ensure walsender processes respond promptly to <systemitem>SIGTERM</>
391
Exclude <filename>postmaster.opts</> from base backups
398
Preserve configuration file name and line number values when starting
399
child processes under Windows (Tom Lane)
403
Formerly, these would not be displayed correctly in the
404
<structname>pg_settings</> view.
410
Fix incorrect field alignment in <application>ecpg</>'s SQLDA area
417
Preserve blank lines within commands in <application>psql</>'s command
418
history (Robert Haas)
422
The former behavior could cause problems if an empty line was removed
423
from within a string literal, for example.
429
Avoid platform-specific infinite loop in <application>pg_dump</>
436
Fix compression of plain-text output format in <application>pg_dump</>
437
(Adrian Klaver and Tom Lane)
441
<application>pg_dump</> has historically understood <literal>-Z</> with
442
no <literal>-F</> switch to mean that it should emit a gzip-compressed
443
version of its plain text output. Restore that behavior.
449
Fix <application>pg_dump</> to dump user-defined casts between
450
auto-generated types, such as table rowtypes (Tom Lane)
456
Fix missed quoting of foreign server names in <application>pg_dump</>
463
Assorted fixes for <application>pg_upgrade</> (Bruce Momjian)
467
Handle exclusion constraints correctly, avoid failures on Windows,
468
don't complain about mismatched toast table names in 8.4 databases.
474
In PL/pgSQL, allow foreign tables to define row types
481
Fix up conversions of PL/Perl functions' results
482
(Alex Hunsaker and Tom Lane)
486
Restore the pre-9.1 behavior that PL/Perl functions returning
487
<type>void</> ignore the result value of their last Perl statement;
488
9.1.0 would throw an error if that statement returned a reference.
489
Also, make sure it works to return a string value for a composite type,
490
so long as the string meets the type's input format.
491
In addition, throw errors for attempts to return Perl arrays or hashes
492
when the function's declared result type is not an array or composite
493
type, respectively. (Pre-9.1 versions rather uselessly returned
494
strings like <literal>ARRAY(0x221a9a0)</> or
495
<literal>HASH(0x221aa90)</> in such cases.)
501
Ensure PL/Perl strings are always correctly UTF8-encoded
502
(Amit Khandekar and Alex Hunsaker)
508
Use the preferred version of <application>xsubpp</> to build PL/Perl,
509
not necessarily the operating system's main copy
510
(David Wheeler and Alex Hunsaker)
516
Correctly propagate SQLSTATE in PL/Python exceptions
517
(Mika Eloranta and Jan Urbanski)
523
Do not install PL/Python extension files for Python major versions
524
other than the one built against (Peter Eisentraut)
530
Change all the <filename>contrib</> extension script files to report
531
a useful error message if they are fed to <application>psql</>
532
(Andrew Dunstan and Tom Lane)
536
This should help teach people about the new method of using
537
<command>CREATE EXTENSION</> to load these files. In most cases,
538
sourcing the scripts directly would fail anyway, but with
539
harder-to-interpret messages.
545
Fix incorrect coding in <filename>contrib/dict_int</> and
546
<filename>contrib/dict_xsyn</> (Tom Lane)
550
Some functions incorrectly assumed that memory returned by
551
<function>palloc()</> is guaranteed zeroed.
557
Remove <filename>contrib/sepgsql</> tests from the regular regression
558
test mechanism (Tom Lane)
562
Since these tests require root privileges for setup, they're impractical
563
to run automatically. Switch over to a manual approach instead, and
564
provide a testing script to help with that.
570
Fix assorted errors in <filename>contrib/unaccent</>'s configuration
571
file parsing (Tom Lane)
577
Honor query cancel interrupts promptly in <function>pgstatindex()</>
584
Fix incorrect quoting of log file name in Mac OS X start script
591
Revert unintentional enabling of <literal>WAL_DEBUG</> (Robert Haas)
595
Fortunately, as debugging tools go, this one is pretty cheap;
596
but it's not intended to be enabled by default, so revert.
602
Ensure VPATH builds properly install all server header files
609
Shorten file names reported in verbose error messages (Peter Eisentraut)
613
Regular builds have always reported just the name of the C file
614
containing the error message call, but VPATH builds formerly
615
reported an absolute path name.
621
Fix interpretation of Windows timezone names for Central America
626
Map <quote>Central America Standard Time</> to <literal>CST6</>, not
627
<literal>CST6CDT</>, because DST is generally not observed anywhere in
634
Update time zone data files to <application>tzdata</> release 2011n
635
for DST law changes in Brazil, Cuba, Fiji, Palestine, Russia, and Samoa;
636
also historical corrections for Alaska and British East Africa.
4
645
<sect1 id="release-9-1-1">
5
646
<title>Release 9.1.1</title>