1
<!-- doc/src/sgml/release-8.1.sgml -->
2
<!-- See header comment in release.sgml about typical markup -->
4
<sect1 id="release-8-1-23">
5
<title>Release 8.1.23</title>
8
<title>Release Date</title>
9
<simpara>2010-12-16</simpara>
13
This release contains a variety of fixes from 8.1.22.
14
For information about new features in the 8.1 major release, see
15
<xref linkend="release-8-1">.
19
This is expected to be the last <productname>PostgreSQL</> release
20
in the 8.1.X series. Users are encouraged to update to a newer
25
<title>Migration to Version 8.1.23</title>
28
A dump/restore is not required for those running 8.1.X.
29
However, if you are upgrading from a version earlier than 8.1.18,
30
see the release notes for 8.1.18.
36
<title>Changes</title>
43
<link linkend="guc-wal-sync-method"><varname>wal_sync_method</></link>
44
to be <literal>fdatasync</> on Linux (Tom Lane, Marti Raudsepp)
48
The default on Linux has actually been <literal>fdatasync</> for many
49
years, but recent kernel changes caused <productname>PostgreSQL</> to
50
choose <literal>open_datasync</> instead. This choice did not result
51
in any performance improvement, and caused outright failures on
52
certain filesystems, notably <literal>ext4</> with the
53
<literal>data=journal</> mount option.
59
Fix recovery from base backup when the starting checkpoint WAL record
60
is not in the same WAL segment as its redo point (Jeff Davis)
66
Add support for detecting register-stack overrun on <literal>IA64</>
71
The <literal>IA64</> architecture has two hardware stacks. Full
72
prevention of stack-overrun failures requires checking both.
78
Add a check for stack overflow in <function>copyObject()</> (Tom Lane)
82
Certain code paths could crash due to stack overflow given a
83
sufficiently complex query.
89
Fix detection of page splits in temporary GiST indexes (Heikki
94
It is possible to have a <quote>concurrent</> page split in a
95
temporary index, if for example there is an open cursor scanning the
96
index when an insertion is done. GiST failed to detect this case and
97
hence could deliver wrong results when execution of the cursor
104
Avoid memory leakage while <command>ANALYZE</>'ing complex index
105
expressions (Tom Lane)
111
Ensure an index that uses a whole-row Var still depends on its table
116
An index declared like <literal>create index i on t (foo(t.*))</>
117
would not automatically get dropped when its table was dropped.
123
Do not <quote>inline</> a SQL function with multiple <literal>OUT</>
124
parameters (Tom Lane)
128
This avoids a possible crash due to loss of information about the
129
expected result rowtype.
135
Fix constant-folding of <literal>COALESCE()</> expressions (Tom Lane)
139
The planner would sometimes attempt to evaluate sub-expressions that
140
in fact could never be reached, possibly leading to unexpected errors.
146
Add print functionality for <structname>InhRelation</> nodes (Tom Lane)
150
This avoids a failure when <varname>debug_print_parse</> is enabled
151
and certain types of query are executed.
157
Fix incorrect calculation of distance from a point to a horizontal
158
line segment (Tom Lane)
162
This bug affected several different geometric distance-measurement
169
Fix <application>PL/pgSQL</>'s handling of <quote>simple</>
170
expressions to not fail in recursion or error-recovery cases (Tom Lane)
176
Fix bug in <filename>contrib/cube</>'s GiST picksplit algorithm
181
This could result in considerable inefficiency, though not actually
182
incorrect answers, in a GiST index on a <type>cube</> column.
183
If you have such an index, consider <command>REINDEX</>ing it after
184
installing this update.
190
Don't emit <quote>identifier will be truncated</> notices in
191
<filename>contrib/dblink</> except when creating new connections
198
Fix potential coredump on missing public key in
199
<filename>contrib/pgcrypto</> (Marti Raudsepp)
205
Fix memory leak in <filename>contrib/xml2</>'s XPath query functions
212
Update time zone data files to <application>tzdata</> release 2010o
213
for DST law changes in Fiji and Samoa;
214
also historical corrections for Hong Kong.
223
<sect1 id="release-8-1-22">
224
<title>Release 8.1.22</title>
227
<title>Release Date</title>
228
<simpara>2010-10-04</simpara>
232
This release contains a variety of fixes from 8.1.21.
233
For information about new features in the 8.1 major release, see
234
<xref linkend="release-8-1">.
238
The <productname>PostgreSQL</> community will stop releasing updates
239
for the 8.1.X release series in November 2010.
240
Users are encouraged to update to a newer release branch soon.
244
<title>Migration to Version 8.1.22</title>
247
A dump/restore is not required for those running 8.1.X.
248
However, if you are upgrading from a version earlier than 8.1.18,
249
see the release notes for 8.1.18.
255
<title>Changes</title>
261
Use a separate interpreter for each calling SQL userid in PL/Perl and
266
This change prevents security problems that can be caused by subverting
267
Perl or Tcl code that will be executed later in the same session under
268
another SQL user identity (for example, within a <literal>SECURITY
269
DEFINER</> function). Most scripting languages offer numerous ways that
270
that might be done, such as redefining standard functions or operators
271
called by the target function. Without this change, any SQL user with
272
Perl or Tcl language usage rights can do essentially anything with the
273
SQL privileges of the target function's owner.
277
The cost of this change is that intentional communication among Perl
278
and Tcl functions becomes more difficult. To provide an escape hatch,
279
PL/PerlU and PL/TclU functions continue to use only one interpreter
280
per session. This is not considered a security issue since all such
281
functions execute at the trust level of a database superuser already.
285
It is likely that third-party procedural languages that claim to offer
286
trusted execution have similar security issues. We advise contacting
287
the authors of any PL you are depending on for security-critical
292
Our thanks to Tim Bunce for pointing out this issue (CVE-2010-3433).
298
Prevent possible crashes in <function>pg_get_expr()</> by disallowing
299
it from being called with an argument that is not one of the system
300
catalog columns it's intended to be used with
301
(Heikki Linnakangas, Tom Lane)
307
Fix <quote>cannot handle unplanned sub-select</quote> error (Tom Lane)
311
This occurred when a sub-select contains a join alias reference that
312
expands into an expression containing another sub-select.
318
Prevent show_session_authorization() from crashing within autovacuum
325
Defend against functions returning setof record where not all the
326
returned rows are actually of the same rowtype (Tom Lane)
332
Fix possible failure when hashing a pass-by-reference function result
339
Take care to fsync the contents of lockfiles (both
340
<filename>postmaster.pid</> and the socket lockfile) while writing them
345
This omission could result in corrupted lockfile contents if the
346
machine crashes shortly after postmaster start. That could in turn
347
prevent subsequent attempts to start the postmaster from succeeding,
348
until the lockfile is manually removed.
354
Avoid recursion while assigning XIDs to heavily-nested
355
subtransactions (Andres Freund, Robert Haas)
359
The original coding could result in a crash if there was limited
366
Fix <varname>log_line_prefix</>'s <literal>%i</> escape,
367
which could produce junk early in backend startup (Tom Lane)
373
Fix possible data corruption in <command>ALTER TABLE ... SET
374
TABLESPACE</> when archiving is enabled (Jeff Davis)
380
Allow <command>CREATE DATABASE</> and <command>ALTER DATABASE ... SET
381
TABLESPACE</> to be interrupted by query-cancel (Guillaume Lelarge)
387
In PL/Python, defend against null pointer results from
388
<function>PyCObject_AsVoidPtr</> and <function>PyCObject_FromVoidPtr</>
395
Improve <filename>contrib/dblink</>'s handling of tables containing
396
dropped columns (Tom Lane)
402
Fix connection leak after <quote>duplicate connection name</quote>
403
errors in <filename>contrib/dblink</> (Itagaki Takahiro)
409
Fix <filename>contrib/dblink</> to handle connection names longer than
410
62 bytes correctly (Itagaki Takahiro)
416
Update build infrastructure and documentation to reflect the source code
417
repository's move from CVS to Git (Magnus Hagander and others)
423
Update time zone data files to <application>tzdata</> release 2010l
424
for DST law changes in Egypt and Palestine; also historical corrections
429
This change also adds new names for two Micronesian timezones:
430
Pacific/Chuuk is now preferred over Pacific/Truk (and the preferred
431
abbreviation is CHUT not TRUT) and Pacific/Pohnpei is preferred over
441
<sect1 id="release-8-1-21">
442
<title>Release 8.1.21</title>
445
<title>Release Date</title>
446
<simpara>2010-05-17</simpara>
450
This release contains a variety of fixes from 8.1.20.
451
For information about new features in the 8.1 major release, see
452
<xref linkend="release-8-1">.
456
<title>Migration to Version 8.1.21</title>
459
A dump/restore is not required for those running 8.1.X.
460
However, if you are upgrading from a version earlier than 8.1.18,
461
see the release notes for 8.1.18.
467
<title>Changes</title>
473
Enforce restrictions in <literal>plperl</> using an opmask applied to
474
the whole interpreter, instead of using <filename>Safe.pm</>
475
(Tim Bunce, Andrew Dunstan)
479
Recent developments have convinced us that <filename>Safe.pm</> is too
480
insecure to rely on for making <literal>plperl</> trustable. This
481
change removes use of <filename>Safe.pm</> altogether, in favor of using
482
a separate interpreter with an opcode mask that is always applied.
483
Pleasant side effects of the change include that it is now possible to
484
use Perl's <literal>strict</> pragma in a natural way in
485
<literal>plperl</>, and that Perl's <literal>$a</> and <literal>$b</>
486
variables work as expected in sort routines, and that function
487
compilation is significantly faster. (CVE-2010-1169)
493
Prevent PL/Tcl from executing untrustworthy code from
494
<structname>pltcl_modules</> (Tom)
498
PL/Tcl's feature for autoloading Tcl code from a database table
499
could be exploited for trojan-horse attacks, because there was no
500
restriction on who could create or insert into that table. This change
501
disables the feature unless <structname>pltcl_modules</> is owned by a
502
superuser. (However, the permissions on the table are not checked, so
503
installations that really need a less-than-secure modules table can
504
still grant suitable privileges to trusted non-superusers.) Also,
505
prevent loading code into the unrestricted <quote>normal</> Tcl
506
interpreter unless we are really going to execute a <literal>pltclu</>
507
function. (CVE-2010-1170)
513
Do not allow an unprivileged user to reset superuser-only parameter
518
Previously, if an unprivileged user ran <literal>ALTER USER ... RESET
519
ALL</> for himself, or <literal>ALTER DATABASE ... RESET ALL</> for
520
a database he owns, this would remove all special parameter settings
521
for the user or database, even ones that are only supposed to be
522
changeable by a superuser. Now, the <command>ALTER</> will only
523
remove the parameters that the user has permission to change.
529
Avoid possible crash during backend shutdown if shutdown occurs
530
when a <literal>CONTEXT</> addition would be made to log entries (Tom)
534
In some cases the context-printing function would fail because the
535
current transaction had already been rolled back when it came time
536
to print a log message.
542
Update pl/perl's <filename>ppport.h</> for modern Perl versions
549
Fix assorted memory leaks in pl/python (Andreas Freund, Tom)
555
Prevent infinite recursion in <application>psql</> when expanding
556
a variable that refers to itself (Tom)
562
Ensure that <filename>contrib/pgstattuple</> functions respond to cancel
563
interrupts promptly (Tatsuhito Kasahara)
569
Make server startup deal properly with the case that
570
<function>shmget()</> returns <literal>EINVAL</> for an existing
571
shared memory segment (Tom)
575
This behavior has been observed on BSD-derived kernels including OS X.
576
It resulted in an entirely-misleading startup failure complaining that
577
the shared memory request size was too large.
583
Update time zone data files to <application>tzdata</> release 2010j
584
for DST law changes in Argentina, Australian Antarctic, Bangladesh,
585
Mexico, Morocco, Pakistan, Palestine, Russia, Syria, Tunisia;
586
also historical corrections for Taiwan.
595
<sect1 id="release-8-1-20">
596
<title>Release 8.1.20</title>
599
<title>Release Date</title>
600
<simpara>2010-03-15</simpara>
604
This release contains a variety of fixes from 8.1.19.
605
For information about new features in the 8.1 major release, see
606
<xref linkend="release-8-1">.
610
<title>Migration to Version 8.1.20</title>
613
A dump/restore is not required for those running 8.1.X.
614
However, if you are upgrading from a version earlier than 8.1.18,
615
see the release notes for 8.1.18.
621
<title>Changes</title>
627
Add new configuration parameter <varname>ssl_renegotiation_limit</> to
628
control how often we do session key renegotiation for an SSL connection
633
This can be set to zero to disable renegotiation completely, which may
634
be required if a broken SSL library is used. In particular, some
635
vendors are shipping stopgap patches for CVE-2009-3555 that cause
636
renegotiation attempts to fail.
642
Fix possible crashes when trying to recover from a failure in
643
subtransaction start (Tom)
649
Fix server memory leak associated with use of savepoints and a client
650
encoding different from server's encoding (Tom)
656
Make <function>substring()</> for <type>bit</> types treat any negative
657
length as meaning <quote>all the rest of the string</> (Tom)
661
The previous coding treated only -1 that way, and would produce an
662
invalid result value for other negative values, possibly leading to
663
a crash (CVE-2010-0442).
669
Fix integer-to-bit-string conversions to handle the first fractional
670
byte correctly when the output bit width is wider than the given
671
integer by something other than a multiple of 8 bits (Tom)
677
Fix some cases of pathologically slow regular expression matching (Tom)
683
Fix the <literal>STOP WAL LOCATION</> entry in backup history files to
684
report the next WAL segment's name when the end location is exactly at a
685
segment boundary (Itagaki Takahiro)
691
Fix some more cases of temporary-file leakage (Heikki)
695
This corrects a problem introduced in the previous minor release.
696
One case that failed is when a plpgsql function returning set is
697
called within another function's exception handler.
703
When reading <filename>pg_hba.conf</> and related files, do not treat
704
<literal>@something</> as a file inclusion request if the <literal>@</>
705
appears inside quote marks; also, never treat <literal>@</> by itself
706
as a file inclusion request (Tom)
710
This prevents erratic behavior if a role or database name starts with
711
<literal>@</>. If you need to include a file whose path name
712
contains spaces, you can still do so, but you must write
713
<literal>@"/path to/file"</> rather than putting the quotes around
720
Prevent infinite loop on some platforms if a directory is named as
721
an inclusion target in <filename>pg_hba.conf</> and related files
728
Fix <application>psql</>'s <literal>numericlocale</> option to not
729
format strings it shouldn't in latex and troff output formats (Heikki)
735
Fix plpgsql failure in one case where a composite column is set to NULL
742
Add <literal>volatile</> markings in PL/Python to avoid possible
743
compiler-specific misbehavior (Zdenek Kotala)
749
Ensure PL/Tcl initializes the Tcl interpreter fully (Tom)
753
The only known symptom of this oversight is that the Tcl
754
<literal>clock</> command misbehaves if using Tcl 8.5 or later.
760
Prevent crash in <filename>contrib/dblink</> when too many key
761
columns are specified to a <function>dblink_build_sql_*</> function
762
(Rushabh Lathia, Joe Conway)
768
Fix assorted crashes in <filename>contrib/xml2</> caused by sloppy
769
memory management (Tom)
775
Update time zone data files to <application>tzdata</> release 2010e
776
for DST law changes in Bangladesh, Chile, Fiji, Mexico, Paraguay, Samoa.
785
<sect1 id="release-8-1-19">
786
<title>Release 8.1.19</title>
789
<title>Release Date</title>
790
<simpara>2009-12-14</simpara>
794
This release contains a variety of fixes from 8.1.18.
795
For information about new features in the 8.1 major release, see
796
<xref linkend="release-8-1">.
800
<title>Migration to Version 8.1.19</title>
803
A dump/restore is not required for those running 8.1.X.
804
However, if you are upgrading from a version earlier than 8.1.18,
805
see the release notes for 8.1.18.
811
<title>Changes</title>
817
Protect against indirect security threats caused by index functions
818
changing session-local state (Gurjeet Singh, Tom)
822
This change prevents allegedly-immutable index functions from possibly
823
subverting a superuser's session (CVE-2009-4136).
829
Reject SSL certificates containing an embedded null byte in the common
830
name (CN) field (Magnus)
834
This prevents unintended matching of a certificate to a server or client
835
name during SSL validation (CVE-2009-4034).
841
Fix possible crash during backend-startup-time cache initialization (Tom)
847
Prevent signals from interrupting <literal>VACUUM</> at unsafe times
852
This fix prevents a PANIC if a <literal>VACUUM FULL</> is cancelled
853
after it's already committed its tuple movements, as well as transient
854
errors if a plain <literal>VACUUM</> is interrupted after having
861
Fix possible crash due to integer overflow in hash table size
866
This could occur with extremely large planner estimates for the size of
873
Fix very rare crash in <type>inet</>/<type>cidr</> comparisons (Chris
880
Ensure that shared tuple-level locks held by prepared transactions are
887
Fix premature drop of temporary files used for a cursor that is accessed
888
within a subtransaction (Heikki)
894
Fix PAM password processing to be more robust (Tom)
898
The previous code is known to fail with the combination of the Linux
899
<literal>pam_krb5</> PAM module with Microsoft Active Directory as the
900
domain controller. It might have problems elsewhere too, since it was
901
making unjustified assumptions about what arguments the PAM stack would
908
Fix processing of ownership dependencies during <literal>CREATE OR
909
REPLACE FUNCTION</> (Tom)
915
Ensure that Perl arrays are properly converted to
916
<productname>PostgreSQL</> arrays when returned by a set-returning
917
PL/Perl function (Andrew Dunstan, Abhijit Menon-Sen)
921
This worked correctly already for non-set-returning functions.
927
Fix rare crash in exception processing in PL/Python (Peter)
933
Ensure <application>psql</>'s flex module is compiled with the correct
934
system header definitions (Tom)
938
This fixes build failures on platforms where
939
<literal>--enable-largefile</> causes incompatible changes in the
946
Make the postmaster ignore any <literal>application_name</> parameter in
947
connection request packets, to improve compatibility with future libpq
954
Update time zone data files to <application>tzdata</> release 2009s
955
for DST law changes in Antarctica, Argentina, Bangladesh, Fiji,
956
Novokuznetsk, Pakistan, Palestine, Samoa, Syria; also historical
957
corrections for Hong Kong.
966
<sect1 id="release-8-1-18">
967
<title>Release 8.1.18</title>
970
<title>Release Date</title>
971
<simpara>2009-09-09</simpara>
975
This release contains a variety of fixes from 8.1.17.
976
For information about new features in the 8.1 major release, see
977
<xref linkend="release-8-1">.
981
<title>Migration to Version 8.1.18</title>
984
A dump/restore is not required for those running 8.1.X.
985
However, if you have any hash indexes on <type>interval</> columns,
986
you must <command>REINDEX</> them after updating to 8.1.18.
987
Also, if you are upgrading from a version earlier than 8.1.15,
988
see the release notes for 8.1.15.
994
<title>Changes</title>
1000
Disallow <command>RESET ROLE</> and <command>RESET SESSION
1001
AUTHORIZATION</> inside security-definer functions (Tom, Heikki)
1005
This covers a case that was missed in the previous patch that
1006
disallowed <command>SET ROLE</> and <command>SET SESSION
1007
AUTHORIZATION</> inside security-definer functions.
1014
Fix handling of sub-SELECTs appearing in the arguments of
1015
an outer-level aggregate function (Tom)
1021
Fix hash calculation for data type <type>interval</> (Tom)
1025
This corrects wrong results for hash joins on interval values.
1026
It also changes the contents of hash indexes on interval columns.
1027
If you have any such indexes, you must <command>REINDEX</> them
1034
Treat <function>to_char(..., 'TH')</> as an uppercase ordinal
1035
suffix with <literal>'HH'</>/<literal>'HH12'</> (Heikki)
1039
It was previously handled as <literal>'th'</> (lowercase).
1045
Fix overflow for <literal>INTERVAL '<replaceable>x</> ms'</literal>
1046
when <replaceable>x</> is more than 2 million and integer
1047
datetimes are in use (Alex Hunsaker)
1053
Fix calculation of distance between a point and a line segment (Tom)
1057
This led to incorrect results from a number of geometric operators.
1063
Fix <type>money</> data type to work in locales where currency
1064
amounts have no fractional digits, e.g. Japan (Itagaki Takahiro)
1070
Properly round datetime input like
1071
<literal>00:12:57.9999999999999999999999999999</> (Tom)
1077
Fix poor choice of page split point in GiST R-tree operator classes
1084
Fix portability issues in plperl initialization (Andrew Dunstan)
1090
Fix <application>pg_ctl</> to not go into an infinite loop if
1091
<filename>postgresql.conf</> is empty (Jeff Davis)
1097
Fix <filename>contrib/xml2</>'s <function>xslt_process()</> to
1098
properly handle the maximum number of parameters (twenty) (Tom)
1104
Improve robustness of <application>libpq</>'s code to recover
1105
from errors during <command>COPY FROM STDIN</> (Tom)
1111
Avoid including conflicting readline and editline header files
1112
when both libraries are installed (Zdenek Kotala)
1118
Update time zone data files to <application>tzdata</> release 2009l
1119
for DST law changes in Bangladesh, Egypt, Jordan, Pakistan,
1120
Argentina/San_Luis, Cuba, Jordan (historical correction only),
1121
Mauritius, Morocco, Palestine, Syria, Tunisia.
1130
<sect1 id="release-8-1-17">
1131
<title>Release 8.1.17</title>
1134
<title>Release Date</title>
1135
<simpara>2009-03-16</simpara>
1139
This release contains a variety of fixes from 8.1.16.
1140
For information about new features in the 8.1 major release, see
1141
<xref linkend="release-8-1">.
1145
<title>Migration to Version 8.1.17</title>
1148
A dump/restore is not required for those running 8.1.X.
1149
However, if you are upgrading from a version earlier than 8.1.15,
1150
see the release notes for 8.1.15.
1156
<title>Changes</title>
1162
Prevent error recursion crashes when encoding conversion fails (Tom)
1166
This change extends fixes made in the last two minor releases for
1167
related failure scenarios. The previous fixes were narrowly tailored
1168
for the original problem reports, but we have now recognized that
1169
<emphasis>any</> error thrown by an encoding conversion function could
1170
potentially lead to infinite recursion while trying to report the
1171
error. The solution therefore is to disable translation and encoding
1172
conversion and report the plain-ASCII form of any error message,
1173
if we find we have gotten into a recursive error reporting situation.
1180
Disallow <command>CREATE CONVERSION</> with the wrong encodings
1181
for the specified conversion function (Heikki)
1185
This prevents one possible scenario for encoding conversion failure.
1186
The previous change is a backstop to guard against other kinds of
1187
failures in the same area.
1193
Fix core dump when <function>to_char()</> is given format codes that
1194
are inappropriate for the type of the data argument (Tom)
1200
Fix decompilation of <literal>CASE WHEN</> with an implicit coercion
1205
This mistake could lead to Assert failures in an Assert-enabled build,
1206
or an <quote>unexpected CASE WHEN clause</> error message in other
1207
cases, when trying to examine or dump a view.
1213
Fix possible misassignment of the owner of a TOAST table's rowtype (Tom)
1217
If <command>CLUSTER</> or a rewriting variant of <command>ALTER TABLE</>
1218
were executed by someone other than the table owner, the
1219
<structname>pg_type</> entry for the table's TOAST table would end up
1220
marked as owned by that someone. This caused no immediate problems,
1221
since the permissions on the TOAST rowtype aren't examined by any
1222
ordinary database operation. However, it could lead to unexpected
1223
failures if one later tried to drop the role that issued the command
1224
(in 8.1 or 8.2), or <quote>owner of data type appears to be invalid</>
1225
warnings from <application>pg_dump</> after having done so (in 8.3).
1231
Clean up PL/pgSQL error status variables fully at block exit
1232
(Ashesh Vashi and Dave Page)
1236
This is not a problem for PL/pgSQL itself, but the omission could cause
1237
the PL/pgSQL Debugger to crash while examining the state of a function.
1243
Add <literal>MUST</> (Mauritius Island Summer Time) to the default list
1244
of known timezone abbreviations (Xavier Bugaud)
1253
<sect1 id="release-8-1-16">
1254
<title>Release 8.1.16</title>
1257
<title>Release Date</title>
1258
<simpara>2009-02-02</simpara>
1262
This release contains a variety of fixes from 8.1.15.
1263
For information about new features in the 8.1 major release, see
1264
<xref linkend="release-8-1">.
1268
<title>Migration to Version 8.1.16</title>
1271
A dump/restore is not required for those running 8.1.X.
1272
However, if you are upgrading from a version earlier than 8.1.15,
1273
see the release notes for 8.1.15.
1279
<title>Changes</title>
1285
Fix crash in autovacuum (Alvaro)
1289
The crash occurs only after vacuuming a whole database for
1290
anti-transaction-wraparound purposes, which means that it occurs
1291
infrequently and is hard to track down.
1297
Improve handling of URLs in <function>headline()</> function (Teodor)
1303
Improve handling of overlength headlines in <function>headline()</>
1310
Prevent possible Assert failure or misconversion if an encoding
1311
conversion is created with the wrong conversion function for the
1312
specified pair of encodings (Tom, Heikki)
1318
Avoid unnecessary locking of small tables in <command>VACUUM</>
1325
Ensure that the contents of a holdable cursor don't depend on the
1326
contents of TOAST tables (Tom)
1330
Previously, large field values in a cursor result might be represented
1331
as TOAST pointers, which would fail if the referenced table got dropped
1332
before the cursor is read, or if the large value is deleted and then
1333
vacuumed away. This cannot happen with an ordinary cursor,
1334
but it could with a cursor that is held past its creating transaction.
1340
Fix uninitialized variables in <filename>contrib/tsearch2</>'s
1341
<function>get_covers()</> function (Teodor)
1347
Fix <application>configure</> script to properly report failure when
1348
unable to obtain linkage information for PL/Perl (Andrew)
1354
Make all documentation reference <literal>pgsql-bugs</> and/or
1355
<literal>pgsql-hackers</> as appropriate, instead of the
1356
now-decommissioned <literal>pgsql-ports</> and <literal>pgsql-patches</>
1363
Update time zone data files to <application>tzdata</> release 2009a (for
1364
Kathmandu and historical DST corrections in Switzerland, Cuba)
1373
<sect1 id="release-8-1-15">
1374
<title>Release 8.1.15</title>
1377
<title>Release Date</title>
1378
<simpara>2008-11-03</simpara>
1382
This release contains a variety of fixes from 8.1.14.
1383
For information about new features in the 8.1 major release, see
1384
<xref linkend="release-8-1">.
1388
<title>Migration to Version 8.1.15</title>
1391
A dump/restore is not required for those running 8.1.X.
1392
However, if you are upgrading from a version earlier than 8.1.2,
1393
see the release notes for 8.1.2. Also, if you were running a previous
1394
8.1.X release, it is recommended to <command>REINDEX</> all GiST
1395
indexes after the upgrade.
1401
<title>Changes</title>
1407
Fix GiST index corruption due to marking the wrong index entry
1408
<quote>dead</> after a deletion (Teodor)
1412
This would result in index searches failing to find rows they
1413
should have found. Corrupted indexes can be fixed with
1414
<command>REINDEX</>.
1420
Fix backend crash when the client encoding cannot represent a localized
1425
We have addressed similar issues before, but it would still fail if
1426
the <quote>character has no equivalent</> message itself couldn't
1427
be converted. The fix is to disable localization and send the plain
1428
ASCII error message when we detect such a situation.
1434
Fix possible crash when deeply nested functions are invoked from
1441
Fix mis-expansion of rule queries when a sub-<literal>SELECT</> appears
1442
in a function call in <literal>FROM</>, a multi-row <literal>VALUES</>
1443
list, or a <literal>RETURNING</> list (Tom)
1447
The usual symptom of this problem is an <quote>unrecognized node type</>
1454
Ensure an error is reported when a newly-defined PL/pgSQL trigger
1455
function is invoked as a normal function (Tom)
1461
Prevent possible collision of <structfield>relfilenode</> numbers
1462
when moving a table to another tablespace with <command>ALTER SET
1463
TABLESPACE</> (Heikki)
1467
The command tried to re-use the existing filename, instead of
1468
picking one that is known unused in the destination directory.
1474
Fix incorrect tsearch2 headline generation when single query
1475
item matches first word of text (Sushant Sinha)
1481
Fix improper display of fractional seconds in interval values when
1482
using a non-ISO datestyle in an <option>--enable-integer-datetimes</>
1489
Ensure <function>SPI_getvalue</> and <function>SPI_getbinval</>
1490
behave correctly when the passed tuple and tuple descriptor have
1491
different numbers of columns (Tom)
1495
This situation is normal when a table has had columns added or removed,
1496
but these two functions didn't handle it properly.
1497
The only likely consequence is an incorrect error indication.
1503
Fix <application>ecpg</>'s parsing of <command>CREATE ROLE</> (Michael)
1509
Fix recent breakage of <literal>pg_ctl restart</> (Tom)
1515
Update time zone data files to <application>tzdata</> release 2008i (for
1516
DST law changes in Argentina, Brazil, Mauritius, Syria)
1525
<sect1 id="release-8-1-14">
1526
<title>Release 8.1.14</title>
1529
<title>Release Date</title>
1530
<simpara>2008-09-22</simpara>
1534
This release contains a variety of fixes from 8.1.13.
1535
For information about new features in the 8.1 major release, see
1536
<xref linkend="release-8-1">.
1540
<title>Migration to Version 8.1.14</title>
1543
A dump/restore is not required for those running 8.1.X.
1544
However, if you are upgrading from a version earlier than 8.1.2,
1545
see the release notes for 8.1.2.
1551
<title>Changes</title>
1557
Widen local lock counters from 32 to 64 bits (Tom)
1561
This responds to reports that the counters could overflow in
1562
sufficiently long transactions, leading to unexpected <quote>lock is
1563
already held</> errors.
1569
Fix possible duplicate output of tuples during a GiST index scan (Teodor)
1575
Add checks in executor startup to ensure that the tuples produced by an
1576
<command>INSERT</> or <command>UPDATE</> will match the target table's
1577
current rowtype (Tom)
1581
<command>ALTER COLUMN TYPE</>, followed by re-use of a previously
1582
cached plan, could produce this type of situation. The check protects
1583
against data corruption and/or crashes that could ensue.
1589
Fix <literal>AT TIME ZONE</> to first try to interpret its timezone
1590
argument as a timezone abbreviation, and only try it as a full timezone
1591
name if that fails, rather than the other way around as formerly (Tom)
1595
The timestamp input functions have always resolved ambiguous zone names
1596
in this order. Making <literal>AT TIME ZONE</> do so as well improves
1597
consistency, and fixes a compatibility bug introduced in 8.1:
1598
in ambiguous cases we now behave the same as 8.0 and before did,
1599
since in the older versions <literal>AT TIME ZONE</> accepted
1600
<emphasis>only</> abbreviations.
1606
Fix datetime input functions to correctly detect integer overflow when
1607
running on a 64-bit platform (Tom)
1613
Improve performance of writing very long log messages to syslog (Tom)
1619
Fix bug in backwards scanning of a cursor on a <literal>SELECT DISTINCT
1626
Fix planner bug with nested sub-select expressions (Tom)
1630
If the outer sub-select has no direct dependency on the parent query,
1631
but the inner one does, the outer value might not get recalculated
1632
for new parent query rows.
1638
Fix planner to estimate that <literal>GROUP BY</> expressions yielding
1639
boolean results always result in two groups, regardless of the
1640
expressions' contents (Tom)
1644
This is very substantially more accurate than the regular <literal>GROUP
1645
BY</> estimate for certain boolean tests like <replaceable>col</>
1646
<literal>IS NULL</>.
1652
Fix PL/pgSQL to not fail when a <literal>FOR</> loop's target variable
1653
is a record containing composite-type fields (Tom)
1659
Fix PL/Tcl to behave correctly with Tcl 8.5, and to be more careful
1660
about the encoding of data sent to or from Tcl (Tom)
1666
Fix PL/Python to work with Python 2.5
1670
This is a back-port of fixes made during the 8.2 development cycle.
1676
Improve <application>pg_dump</> and <application>pg_restore</>'s
1677
error reporting after failure to send a SQL command (Tom)
1683
Fix <application>pg_ctl</> to properly preserve postmaster
1684
command-line arguments across a <literal>restart</> (Bruce)
1690
Update time zone data files to <application>tzdata</> release 2008f (for
1691
DST law changes in Argentina, Bahamas, Brazil, Mauritius, Morocco,
1692
Pakistan, Palestine, and Paraguay)
1701
<sect1 id="release-8-1-13">
1702
<title>Release 8.1.13</title>
1705
<title>Release Date</title>
1706
<simpara>2008-06-12</simpara>
1710
This release contains one serious and one minor bug fix over 8.1.12.
1711
For information about new features in the 8.1 major release, see
1712
<xref linkend="release-8-1">.
1716
<title>Migration to Version 8.1.13</title>
1719
A dump/restore is not required for those running 8.1.X.
1720
However, if you are upgrading from a version earlier than 8.1.2,
1721
see the release notes for 8.1.2.
1727
<title>Changes</title>
1733
Make <function>pg_get_ruledef()</> parenthesize negative constants (Tom)
1737
Before this fix, a negative constant in a view or rule might be dumped
1738
as, say, <literal>-42::integer</>, which is subtly incorrect: it should
1739
be <literal>(-42)::integer</> due to operator precedence rules.
1740
Usually this would make little difference, but it could interact with
1741
another recent patch to cause
1742
<productname>PostgreSQL</> to reject what had been a valid
1743
<command>SELECT DISTINCT</> view query. Since this could result in
1744
<application>pg_dump</> output failing to reload, it is being treated
1745
as a high-priority fix. The only released versions in which dump
1746
output is actually incorrect are 8.3.1 and 8.2.7.
1752
Make <command>ALTER AGGREGATE ... OWNER TO</> update
1753
<structname>pg_shdepend</> (Tom)
1757
This oversight could lead to problems if the aggregate was later
1758
involved in a <command>DROP OWNED</> or <command>REASSIGN OWNED</>
1768
<sect1 id="release-8-1-12">
1769
<title>Release 8.1.12</title>
1772
<title>Release Date</title>
1773
<simpara>never released</simpara>
1777
This release contains a variety of fixes from 8.1.11.
1778
For information about new features in the 8.1 major release, see
1779
<xref linkend="release-8-1">.
1783
<title>Migration to Version 8.1.12</title>
1786
A dump/restore is not required for those running 8.1.X.
1787
However, if you are upgrading from a version earlier than 8.1.2,
1788
see the release notes for 8.1.2.
1794
<title>Changes</title>
1800
Fix <command>ALTER TABLE ADD COLUMN ... PRIMARY KEY</> so that the new
1801
column is correctly checked to see if it's been initialized to all
1802
non-nulls (Brendan Jurd)
1806
Previous versions neglected to check this requirement at all.
1812
Fix possible <command>CREATE TABLE</> failure when inheriting the
1813
<quote>same</> constraint from multiple parent relations that
1814
inherited that constraint from a common ancestor (Tom)
1820
Fix conversions between ISO-8859-5 and other encodings to handle
1821
Cyrillic <quote>Yo</> characters (<literal>e</> and <literal>E</> with
1822
two dots) (Sergey Burladyan)
1828
Fix a few datatype input functions
1829
that were allowing unused bytes in their results to contain
1830
uninitialized, unpredictable values (Tom)
1834
This could lead to failures in which two apparently identical literal
1835
values were not seen as equal, resulting in the parser complaining
1836
about unmatched <literal>ORDER BY</> and <literal>DISTINCT</>
1843
Fix a corner case in regular-expression substring matching
1844
(<literal>substring(<replaceable>string</> from
1845
<replaceable>pattern</>)</literal>) (Tom)
1849
The problem occurs when there is a match to the pattern overall but
1850
the user has specified a parenthesized subexpression and that
1851
subexpression hasn't got a match. An example is
1852
<literal>substring('foo' from 'foo(bar)?')</>.
1853
This should return NULL, since <literal>(bar)</> isn't matched, but
1854
it was mistakenly returning the whole-pattern match instead (ie,
1861
Update time zone data files to <application>tzdata</> release 2008c (for
1862
DST law changes in Morocco, Iraq, Choibalsan, Pakistan, Syria, Cuba,
1863
Argentina/San_Luis, and Chile)
1869
Fix incorrect result from <application>ecpg</>'s
1870
<function>PGTYPEStimestamp_sub()</> function (Michael)
1876
Fix core dump in <filename>contrib/xml2</>'s
1877
<function>xpath_table()</> function when the input query returns a
1884
Fix <filename>contrib/xml2</>'s makefile to not override
1885
<literal>CFLAGS</> (Tom)
1891
Fix <literal>DatumGetBool</> macro to not fail with <application>gcc</>
1896
This problem affects <quote>old style</> (V0) C functions that
1897
return boolean. The fix is already in 8.3, but the need to
1898
back-patch it was not realized at the time.
1904
Fix longstanding <command>LISTEN</>/<command>NOTIFY</>
1905
race condition (Tom)
1909
In rare cases a session that had just executed a
1910
<command>LISTEN</> might not get a notification, even though
1911
one would be expected because the concurrent transaction executing
1912
<command>NOTIFY</> was observed to commit later.
1916
A side effect of the fix is that a transaction that has executed
1917
a not-yet-committed <command>LISTEN</> command will not see any
1918
row in <structname>pg_listener</> for the <command>LISTEN</>,
1919
should it choose to look; formerly it would have. This behavior
1920
was never documented one way or the other, but it is possible that
1921
some applications depend on the old behavior.
1927
Disallow <command>LISTEN</> and <command>UNLISTEN</> within a
1928
prepared transaction (Tom)
1932
This was formerly allowed but trying to do it had various unpleasant
1933
consequences, notably that the originating backend could not exit
1934
as long as an <command>UNLISTEN</> remained uncommitted.
1940
Fix rare crash when an error occurs during a query using a hash index
1947
Fix input of datetime values for February 29 in years BC (Tom)
1951
The former coding was mistaken about which years were leap years.
1957
Fix <quote>unrecognized node type</> error in some variants of
1958
<command>ALTER OWNER</> (Tom)
1964
Fix <application>pg_ctl</> to correctly extract the postmaster's port
1965
number from command-line options (Itagaki Takahiro, Tom)
1969
Previously, <literal>pg_ctl start -w</> could try to contact the
1970
postmaster on the wrong port, leading to bogus reports of startup
1977
Use <option>-fwrapv</> to defend against possible misoptimization
1978
in recent <application>gcc</> versions (Tom)
1982
This is known to be necessary when building <productname>PostgreSQL</>
1983
with <application>gcc</> 4.3 or later.
1989
Fix display of constant expressions in <literal>ORDER BY</>
1990
and <literal>GROUP BY</> (Tom)
1994
An explictly casted constant would be shown incorrectly. This could
1995
for example lead to corruption of a view definition during
2002
Fix <application>libpq</> to handle NOTICE messages correctly
2003
during COPY OUT (Tom)
2007
This failure has only been observed to occur when a user-defined
2008
datatype's output routine issues a NOTICE, but there is no
2009
guarantee it couldn't happen due to other causes.
2018
<sect1 id="release-8-1-11">
2019
<title>Release 8.1.11</title>
2022
<title>Release Date</title>
2023
<simpara>2008-01-07</simpara>
2027
This release contains a variety of fixes from 8.1.10,
2028
including fixes for significant security issues.
2029
For information about new features in the 8.1 major release, see
2030
<xref linkend="release-8-1">.
2034
This is the last 8.1.X release for which the <productname>PostgreSQL</>
2035
community will produce binary packages for <productname>Windows</>.
2036
Windows users are encouraged to move to 8.2.X or later,
2037
since there are Windows-specific fixes in 8.2.X that
2038
are impractical to back-port. 8.1.X will continue to
2039
be supported on other platforms.
2043
<title>Migration to Version 8.1.11</title>
2046
A dump/restore is not required for those running 8.1.X.
2047
However, if you are upgrading from a version earlier than 8.1.2,
2048
see the release notes for 8.1.2.
2054
<title>Changes</title>
2060
Prevent functions in indexes from executing with the privileges of
2061
the user running <command>VACUUM</>, <command>ANALYZE</>, etc (Tom)
2065
Functions used in index expressions and partial-index
2066
predicates are evaluated whenever a new table entry is made. It has
2067
long been understood that this poses a risk of trojan-horse code
2068
execution if one modifies a table owned by an untrustworthy user.
2069
(Note that triggers, defaults, check constraints, etc. pose the
2070
same type of risk.) But functions in indexes pose extra danger
2071
because they will be executed by routine maintenance operations
2072
such as <command>VACUUM FULL</>, which are commonly performed
2073
automatically under a superuser account. For example, a nefarious user
2074
can execute code with superuser privileges by setting up a
2075
trojan-horse index definition and waiting for the next routine vacuum.
2076
The fix arranges for standard maintenance operations
2077
(including <command>VACUUM</>, <command>ANALYZE</>, <command>REINDEX</>,
2078
and <command>CLUSTER</>) to execute as the table owner rather than
2079
the calling user, using the same privilege-switching mechanism already
2080
used for <literal>SECURITY DEFINER</> functions. To prevent bypassing
2081
this security measure, execution of <command>SET SESSION
2082
AUTHORIZATION</> and <command>SET ROLE</> is now forbidden within a
2083
<literal>SECURITY DEFINER</> context. (CVE-2007-6600)
2089
Repair assorted bugs in the regular-expression package (Tom, Will Drewry)
2093
Suitably crafted regular-expression patterns could cause crashes,
2094
infinite or near-infinite looping, and/or massive memory consumption,
2095
all of which pose denial-of-service hazards for applications that
2096
accept regex search patterns from untrustworthy sources.
2097
(CVE-2007-4769, CVE-2007-4772, CVE-2007-6067)
2103
Require non-superusers who use <filename>/contrib/dblink</> to use only
2104
password authentication, as a security measure (Joe)
2108
The fix that appeared for this in 8.1.10 was incomplete, as it plugged
2109
the hole for only some <filename>dblink</> functions. (CVE-2007-6601,
2116
Update time zone data files to <application>tzdata</> release 2007k
2117
(in particular, recent Argentina changes) (Tom)
2123
Improve planner's handling of LIKE/regex estimation in non-C locales
2130
Fix planner failure in some cases of <literal>WHERE false AND var IN
2131
(SELECT ...)</> (Tom)
2137
Preserve the tablespace of indexes that are
2138
rebuilt by <command>ALTER TABLE ... ALTER COLUMN TYPE</> (Tom)
2144
Make archive recovery always start a new WAL timeline, rather than only
2145
when a recovery stop time was used (Simon)
2149
This avoids a corner-case risk of trying to overwrite an existing
2150
archived copy of the last WAL segment, and seems simpler and cleaner
2151
than the original definition.
2157
Make <command>VACUUM</> not use all of <varname>maintenance_work_mem</>
2158
when the table is too small for it to be useful (Alvaro)
2164
Fix potential crash in <function>translate()</> when using a multibyte
2165
database encoding (Tom)
2171
Fix overflow in <literal>extract(epoch from interval)</> for intervals
2172
exceeding 68 years (Tom)
2178
Fix PL/Perl to not fail when a UTF-8 regular expression is used
2179
in a trusted function (Andrew)
2185
Fix PL/Perl to cope when platform's Perl defines type <literal>bool</>
2186
as <literal>int</> rather than <literal>char</> (Tom)
2190
While this could theoretically happen anywhere, no standard build of
2191
Perl did things this way ... until <productname>Mac OS X</> 10.5.
2197
Fix PL/Python to not crash on long exception messages (Alvaro)
2203
Fix <application>pg_dump</> to correctly handle inheritance child tables
2204
that have default expressions different from their parent's (Tom)
2210
Fix <application>libpq</> crash when <varname>PGPASSFILE</> refers
2211
to a file that is not a plain file (Martin Pitt)
2217
<application>ecpg</> parser fixes (Michael)
2223
Make <filename>contrib/pgcrypto</> defend against
2224
<application>OpenSSL</> libraries that fail on keys longer than 128
2225
bits; which is the case at least on some Solaris versions (Marko Kreen)
2231
Make <filename>contrib/tablefunc</>'s <function>crosstab()</> handle
2232
NULL rowid as a category in its own right, rather than crashing (Joe)
2238
Fix <type>tsvector</> and <type>tsquery</> output routines to
2239
escape backslashes correctly (Teodor, Bruce)
2245
Fix crash of <function>to_tsvector()</> on huge input strings (Teodor)
2251
Require a specific version of <productname>Autoconf</> to be used
2252
when re-generating the <command>configure</> script (Peter)
2256
This affects developers and packagers only. The change was made
2257
to prevent accidental use of untested combinations of
2258
<productname>Autoconf</> and <productname>PostgreSQL</> versions.
2259
You can remove the version check if you really want to use a
2260
different <productname>Autoconf</> version, but it's
2261
your responsibility whether the result works or not.
2270
<sect1 id="release-8-1-10">
2271
<title>Release 8.1.10</title>
2274
<title>Release Date</title>
2275
<simpara>2007-09-17</simpara>
2279
This release contains a variety of fixes from 8.1.9.
2280
For information about new features in the 8.1 major release, see
2281
<xref linkend="release-8-1">.
2285
<title>Migration to Version 8.1.10</title>
2288
A dump/restore is not required for those running 8.1.X.
2289
However, if you are upgrading from a version earlier than 8.1.2,
2290
see the release notes for 8.1.2.
2296
<title>Changes</title>
2302
Prevent index corruption when a transaction inserts rows and
2303
then aborts close to the end of a concurrent <command>VACUUM</>
2304
on the same table (Tom)
2310
Make <command>CREATE DOMAIN ... DEFAULT NULL</> work properly (Tom)
2316
Allow the <type>interval</> data type to accept input consisting only of
2317
milliseconds or microseconds (Neil)
2323
Speed up rtree index insertion (Teodor)
2329
Fix excessive logging of <acronym>SSL</> error messages (Tom)
2335
Fix logging so that log messages are never interleaved when using
2336
the syslogger process (Andrew)
2342
Fix crash when <varname>log_min_error_statement</> logging runs out
2349
Fix incorrect handling of some foreign-key corner cases (Tom)
2355
Prevent <command>REINDEX</> and <command>CLUSTER</> from failing
2356
due to attempting to process temporary tables of other sessions (Alvaro)
2362
Update the time zone database rules, particularly New Zealand's upcoming changes (Tom)
2368
Windows socket improvements (Magnus)
2374
Suppress timezone name (<literal>%Z</>) in log timestamps on Windows
2375
because of possible encoding mismatches (Tom)
2381
Require non-superusers who use <filename>/contrib/dblink</> to use only
2382
password authentication, as a security measure (Joe)
2391
<sect1 id="release-8-1-9">
2392
<title>Release 8.1.9</title>
2395
<title>Release Date</title>
2396
<simpara>2007-04-23</simpara>
2400
This release contains a variety of fixes from 8.1.8,
2401
including a security fix.
2402
For information about new features in the 8.1 major release, see
2403
<xref linkend="release-8-1">.
2407
<title>Migration to Version 8.1.9</title>
2410
A dump/restore is not required for those running 8.1.X.
2411
However, if you are upgrading from a version earlier than 8.1.2,
2412
see the release notes for 8.1.2.
2418
<title>Changes</title>
2424
Support explicit placement of the temporary-table schema within
2425
<varname>search_path</>, and disable searching it for functions
2429
This is needed to allow a security-definer function to set a
2430
truly secure value of <varname>search_path</>. Without it,
2431
an unprivileged SQL user can use temporary objects to execute code
2432
with the privileges of the security-definer function (CVE-2007-2138).
2433
See <command>CREATE FUNCTION</> for more information.
2439
<filename>/contrib/tsearch2</> crash fixes (Teodor)
2445
Require <command>COMMIT PREPARED</> to be executed in the same
2446
database as the transaction was prepared in (Heikki)
2452
Fix potential-data-corruption bug in how <command>VACUUM FULL</> handles
2453
<command>UPDATE</> chains (Tom, Pavan Deolasee)
2459
Planner fixes, including improving outer join and bitmap scan
2460
selection logic (Tom)
2466
Fix PANIC during enlargement of a hash index (bug introduced in 8.1.6)
2473
Fix POSIX-style timezone specs to follow new USA DST rules (Tom)
2482
<sect1 id="release-8-1-8">
2483
<title>Release 8.1.8</title>
2486
<title>Release Date</title>
2487
<simpara>2007-02-07</simpara>
2491
This release contains one fix from 8.1.7.
2492
For information about new features in the 8.1 major release, see
2493
<xref linkend="release-8-1">.
2497
<title>Migration to Version 8.1.8</title>
2500
A dump/restore is not required for those running 8.1.X.
2501
However, if you are upgrading from a version earlier than 8.1.2,
2502
see the release notes for 8.1.2.
2508
<title>Changes</title>
2514
Remove overly-restrictive check for type length in constraints and
2515
functional indexes(Tom)
2524
<sect1 id="release-8-1-7">
2525
<title>Release 8.1.7</title>
2528
<title>Release Date</title>
2529
<simpara>2007-02-05</simpara>
2533
This release contains a variety of fixes from 8.1.6, including
2535
For information about new features in the 8.1 major release, see
2536
<xref linkend="release-8-1">.
2540
<title>Migration to Version 8.1.7</title>
2543
A dump/restore is not required for those running 8.1.X.
2544
However, if you are upgrading from a version earlier than 8.1.2,
2545
see the release notes for 8.1.2.
2551
<title>Changes</title>
2557
Remove security vulnerabilities that allowed connected users
2558
to read backend memory (Tom)
2561
The vulnerabilities involve suppressing the normal check that a SQL
2562
function returns the data type it's declared to, and changing the
2563
data type of a table column (CVE-2007-0555, CVE-2007-0556). These
2564
errors can easily be exploited to cause a backend crash, and in
2565
principle might be used to read database content that the user
2566
should not be able to access.
2572
Fix rare bug wherein btree index page splits could fail
2573
due to choosing an infeasible split point (Heikki Linnakangas)
2579
Improve <command>VACUUM</> performance for databases with many tables (Tom)
2585
Fix autovacuum to avoid leaving non-permanent transaction IDs in
2586
non-connectable databases (Alvaro)
2590
This bug affects the 8.1 branch only.
2596
Fix for rare Assert() crash triggered by <literal>UNION</> (Tom)
2602
Tighten security of multi-byte character processing for UTF8 sequences
2603
over three bytes long (Tom)
2609
Fix bogus <quote>permission denied</> failures occurring on Windows
2610
due to attempts to fsync already-deleted files (Magnus, Tom)
2616
Fix possible crashes when an already-in-use PL/pgSQL function is
2626
<sect1 id="release-8-1-6">
2627
<title>Release 8.1.6</title>
2630
<title>Release Date</title>
2631
<simpara>2007-01-08</simpara>
2635
This release contains a variety of fixes from 8.1.5.
2636
For information about new features in the 8.1 major release, see
2637
<xref linkend="release-8-1">.
2641
<title>Migration to Version 8.1.6</title>
2644
A dump/restore is not required for those running 8.1.X.
2645
However, if you are upgrading from a version earlier than 8.1.2,
2646
see the release notes for 8.1.2.
2652
<title>Changes</title>
2658
Improve handling of <function>getaddrinfo()</> on AIX (Tom)
2662
This fixes a problem with starting the statistics collector,
2669
Fix <application>pg_restore</> to handle a tar-format backup
2670
that contains large objects (blobs) with comments (Tom)
2676
Fix <quote>failed to re-find parent key</> errors in
2677
<command>VACUUM</> (Tom)
2683
Clean out <filename>pg_internal.init</> cache files during server
2688
This avoids a hazard that the cache files might contain stale
2689
data after PITR recovery.
2695
Fix race condition for truncation of a large relation across a
2696
gigabyte boundary by <command>VACUUM</> (Tom)
2702
Fix bug causing needless deadlock errors on row-level locks (Tom)
2708
Fix bugs affecting multi-gigabyte hash indexes (Tom)
2714
Fix possible deadlock in Windows signal handling (Teodor)
2720
Fix error when constructing an <literal>ARRAY[]</> made up of multiple
2721
empty elements (Tom)
2727
Fix ecpg memory leak during connection (Michael)
2733
Fix for Darwin (OS X) compilation (Tom)
2739
<function>to_number()</> and <function>to_char(numeric)</>
2740
are now <literal>STABLE</>, not <literal>IMMUTABLE</>, for
2741
new <application>initdb</> installs (Tom)
2745
This is because <varname>lc_numeric</> can potentially
2746
change the output of these functions.
2752
Improve index usage of regular expressions that use parentheses (Tom)
2756
This improves <application>psql</> <literal>\d</> performance also.
2762
Update timezone database
2766
This affects Australian and Canadian daylight-savings rules in
2776
<sect1 id="release-8-1-5">
2777
<title>Release 8.1.5</title>
2780
<title>Release Date</title>
2781
<simpara>2006-10-16</simpara>
2785
This release contains a variety of fixes from 8.1.4.
2786
For information about new features in the 8.1 major release, see
2787
<xref linkend="release-8-1">.
2791
<title>Migration to Version 8.1.5</title>
2794
A dump/restore is not required for those running 8.1.X.
2795
However, if you are upgrading from a version earlier than 8.1.2,
2796
see the release notes for 8.1.2.
2802
<title>Changes</title>
2805
<listitem><para>Disallow aggregate functions in <command>UPDATE</>
2806
commands, except within sub-SELECTs (Tom)</para>
2807
<para>The behavior of such an aggregate was unpredictable, and in 8.1.X
2808
could cause a crash, so it has been disabled. The SQL standard does not allow
2809
this either.</para></listitem>
2810
<listitem><para>Fix core dump when an untyped literal is taken as
2811
ANYARRAY</para></listitem>
2812
<listitem><para>Fix core dump in duration logging for extended query protocol
2813
when a <command>COMMIT</> or <command>ROLLBACK</> is
2814
executed</para></listitem>
2815
<listitem><para>Fix mishandling of AFTER triggers when query contains a SQL
2816
function returning multiple rows (Tom)</para></listitem>
2817
<listitem><para>Fix <command>ALTER TABLE ... TYPE</> to recheck
2818
<literal>NOT NULL</> for <literal>USING</> clause (Tom)</para></listitem>
2819
<listitem><para>Fix <function>string_to_array()</> to handle overlapping
2820
matches for the separator string</para>
2821
<para>For example, <literal>string_to_array('123xx456xxx789', 'xx')</>.
2823
<listitem><para>Fix <function>to_timestamp()</> for
2824
<literal>AM</>/<literal>PM</> formats (Bruce)</para></listitem>
2825
<listitem><para>Fix autovacuum's calculation that decides whether
2826
<command>ANALYZE</> is needed (Alvaro)</para></listitem>
2827
<listitem><para>Fix corner cases in pattern matching for
2828
<application>psql</>'s <literal>\d</> commands</para></listitem>
2829
<listitem><para>Fix index-corrupting bugs in /contrib/ltree
2830
(Teodor)</para></listitem>
2831
<listitem><para>Numerous robustness fixes in <application>ecpg</> (Joachim
2832
Wieland)</para></listitem>
2833
<listitem><para>Fix backslash escaping in /contrib/dbmirror</para></listitem>
2834
<listitem><para>Minor fixes in /contrib/dblink and /contrib/tsearch2</para>
2836
<listitem><para>Efficiency improvements in hash tables and bitmap index scans
2837
(Tom)</para></listitem>
2838
<listitem><para>Fix instability of statistics collection on Windows (Tom, Andrew)</para></listitem>
2839
<listitem><para>Fix <varname>statement_timeout</> to use the proper
2840
units on Win32 (Bruce)</para>
2841
<para>In previous Win32 8.1.X versions, the delay was off by a factor of
2842
100.</para></listitem>
2843
<listitem><para>Fixes for <acronym>MSVC</> and <productname>Borland C++</>
2844
compilers (Hiroshi Saito)</para></listitem>
2845
<listitem><para>Fixes for <systemitem class="osname">AIX</> and
2846
<productname>Intel</> compilers (Tom)</para></listitem>
2847
<listitem><para>Fix rare bug in continuous archiving (Tom)</para></listitem>
2853
<sect1 id="release-8-1-4">
2854
<title>Release 8.1.4</title>
2857
<title>Release Date</title>
2858
<simpara>2006-05-23</simpara>
2862
This release contains a variety of fixes from 8.1.3,
2863
including patches for extremely serious security issues.
2864
For information about new features in the 8.1 major release, see
2865
<xref linkend="release-8-1">.
2869
<title>Migration to Version 8.1.4</title>
2872
A dump/restore is not required for those running 8.1.X.
2873
However, if you are upgrading from a version earlier than 8.1.2,
2874
see the release notes for 8.1.2.
2878
Full security against the SQL-injection attacks described in
2879
CVE-2006-2313 and CVE-2006-2314 might require changes in application
2880
code. If you have applications that embed untrustworthy strings
2881
into SQL commands, you should examine them as soon as possible to
2882
ensure that they are using recommended escaping techniques. In
2883
most cases, applications should be using subroutines provided by
2884
libraries or drivers (such as <application>libpq</>'s
2885
<function>PQescapeStringConn()</>) to perform string escaping,
2886
rather than relying on <foreignphrase>ad hoc</> code to do it.
2891
<title>Changes</title>
2894
<listitem><para>Change the server to reject invalidly-encoded multibyte
2895
characters in all cases (Tatsuo, Tom)</para>
2896
<para>While <productname>PostgreSQL</> has been moving in this direction for
2897
some time, the checks are now applied uniformly to all encodings and all
2898
textual input, and are now always errors not merely warnings. This change
2899
defends against SQL-injection attacks of the type described in CVE-2006-2313.
2902
<listitem><para>Reject unsafe uses of <literal>\'</> in string literals</para>
2903
<para>As a server-side defense against SQL-injection attacks of the type
2904
described in CVE-2006-2314, the server now only accepts <literal>''</> and not
2905
<literal>\'</> as a representation of ASCII single quote in SQL string
2906
literals. By default, <literal>\'</> is rejected only when
2907
<varname>client_encoding</> is set to a client-only encoding (SJIS, BIG5, GBK,
2908
GB18030, or UHC), which is the scenario in which SQL injection is possible.
2909
A new configuration parameter <varname>backslash_quote</> is available to
2910
adjust this behavior when needed. Note that full security against
2911
CVE-2006-2314 might require client-side changes; the purpose of
2912
<varname>backslash_quote</> is in part to make it obvious that insecure
2913
clients are insecure.
2916
<listitem><para>Modify <application>libpq</>'s string-escaping routines to be
2917
aware of encoding considerations and
2918
<varname>standard_conforming_strings</></para>
2919
<para>This fixes <application>libpq</>-using applications for the security
2920
issues described in CVE-2006-2313 and CVE-2006-2314, and also future-proofs
2921
them against the planned changeover to SQL-standard string literal syntax.
2922
Applications that use multiple <productname>PostgreSQL</> connections
2923
concurrently should migrate to <function>PQescapeStringConn()</> and
2924
<function>PQescapeByteaConn()</> to ensure that escaping is done correctly
2925
for the settings in use in each database connection. Applications that
2926
do string escaping <quote>by hand</> should be modified to rely on library
2930
<listitem><para>Fix weak key selection in pgcrypto (Marko Kreen)</para>
2931
<para>Errors in fortuna PRNG reseeding logic could cause a predictable
2932
session key to be selected by <function>pgp_sym_encrypt()</> in some cases.
2933
This only affects non-OpenSSL-using builds.
2936
<listitem><para>Fix some incorrect encoding conversion functions</para>
2937
<para><function>win1251_to_iso</>, <function>win866_to_iso</>,
2938
<function>euc_tw_to_big5</>, <function>euc_tw_to_mic</>,
2939
<function>mic_to_euc_tw</> were all broken to varying
2943
<listitem><para>Clean up stray remaining uses of <literal>\'</> in strings
2944
(Bruce, Jan)</para></listitem>
2946
<listitem><para>Make autovacuum visible in <structname>pg_stat_activity</>
2947
(Alvaro)</para></listitem>
2949
<listitem><para>Disable <literal>full_page_writes</> (Tom)</para>
2950
<para>In certain cases, having <literal>full_page_writes</> off would cause
2951
crash recovery to fail. A proper fix will appear in 8.2; for now it's just
2955
<listitem><para>Various planner fixes, particularly for bitmap index scans and
2956
MIN/MAX optimization (Tom)</para></listitem>
2958
<listitem><para>Fix incorrect optimization in merge join (Tom)</para>
2959
<para>Outer joins could sometimes emit multiple copies of unmatched rows.
2962
<listitem><para>Fix crash from using and modifying a plpgsql function in the
2963
same transaction</para></listitem>
2965
<listitem><para>Fix WAL replay for case where a B-Tree index has been
2966
truncated</para></listitem>
2968
<listitem><para>Fix <literal>SIMILAR TO</> for patterns involving
2969
<literal>|</> (Tom)</para></listitem>
2971
<listitem><para>Fix <command>SELECT INTO</> and <command>CREATE TABLE AS</> to
2972
create tables in the default tablespace, not the base directory (Kris
2973
Jurka)</para></listitem>
2975
<listitem><para>Fix server to use custom DH SSL parameters correctly (Michael
2976
Fuhr)</para></listitem>
2978
<listitem><para>Improve qsort performance (Dann Corbit)</para>
2979
<para>Currently this code is only used on Solaris.
2982
<listitem><para>Fix for OS/X Bonjour on x86 systems (Ashley Clark)</para></listitem>
2984
<listitem><para>Fix various minor memory leaks</para></listitem>
2986
<listitem><para>Fix problem with password prompting on some Win32 systems
2987
(Robert Kinberg)</para></listitem>
2989
<listitem><para>Improve <application>pg_dump</>'s handling of default values
2990
for domains</para></listitem>
2992
<listitem><para>Fix <application>pg_dumpall</> to handle identically-named
2993
users and groups reasonably (only possible when dumping from a pre-8.1 server)
2995
<para>The user and group will be merged into a single role with
2996
<literal>LOGIN</> permission. Formerly the merged role wouldn't have
2997
<literal>LOGIN</> permission, making it unusable as a user.
3000
<listitem><para>Fix <application>pg_restore</> <literal>-n</> to work as
3001
documented (Tom)</para></listitem>
3007
<sect1 id="release-8-1-3">
3008
<title>Release 8.1.3</title>
3011
<title>Release Date</title>
3012
<simpara>2006-02-14</simpara>
3016
This release contains a variety of fixes from 8.1.2,
3017
including one very serious security issue.
3018
For information about new features in the 8.1 major release, see
3019
<xref linkend="release-8-1">.
3023
<title>Migration to Version 8.1.3</title>
3026
A dump/restore is not required for those running 8.1.X.
3027
However, if you are upgrading from a version earlier than 8.1.2,
3028
see the release notes for 8.1.2.
3033
<title>Changes</title>
3037
<listitem><para>Fix bug that allowed any logged-in user to <command>SET
3038
ROLE</> to any other database user id (CVE-2006-0553)</para>
3039
<para>Due to inadequate validity checking, a user could exploit the special
3040
case that <command>SET ROLE</> normally uses to restore the previous role
3041
setting after an error. This allowed ordinary users to acquire superuser
3042
status, for example.
3043
The escalation-of-privilege risk exists only in 8.1.0-8.1.2.
3044
However, in all releases back to 7.3 there is a related bug in <command>SET
3045
SESSION AUTHORIZATION</> that allows unprivileged users to crash the server,
3046
if it has been compiled with Asserts enabled (which is not the default).
3047
Thanks to Akio Ishida for reporting this problem.
3050
<listitem><para>Fix bug with row visibility logic in self-inserted
3052
<para>Under rare circumstances a row inserted by the current command
3053
could be seen as already valid, when it should not be. Repairs bug
3054
created in 8.0.4, 7.4.9, and 7.3.11 releases.
3057
<listitem><para>Fix race condition that could lead to <quote>file already
3058
exists</> errors during pg_clog and pg_subtrans file creation
3059
(Tom)</para></listitem>
3061
<listitem><para>Fix cases that could lead to crashes if a cache-invalidation
3062
message arrives at just the wrong time (Tom)</para></listitem>
3064
<listitem><para>Properly check <literal>DOMAIN</> constraints for
3065
<literal>UNKNOWN</> parameters in prepared statements
3066
(Neil)</para></listitem>
3068
<listitem><para>Ensure <command>ALTER COLUMN TYPE</> will process
3069
<literal>FOREIGN KEY</>, <literal>UNIQUE</>, and <literal>PRIMARY KEY</>
3070
constraints in the proper order (Nakano Yoshihisa)</para></listitem>
3072
<listitem><para>Fixes to allow restoring dumps that have cross-schema
3073
references to custom operators or operator classes (Tom)</para></listitem>
3075
<listitem><para>Allow <application>pg_restore</> to continue properly after a
3076
<command>COPY</> failure; formerly it tried to treat the remaining
3077
<command>COPY</> data as SQL commands (Stephen Frost)</para></listitem>
3079
<listitem><para>Fix <application>pg_ctl</> <literal>unregister</> crash
3080
when the data directory is not specified (Magnus)</para></listitem>
3082
<listitem><para>Fix <application>libpq</> <function>PQprint</> HTML tags
3083
(Christoph Zwerschke)</para></listitem>
3085
<listitem><para>Fix <application>ecpg</> crash on AMD64 and PPC
3086
(Neil)</para></listitem>
3088
<listitem><para>Allow <literal>SETOF</> and <literal>%TYPE</> to be used
3089
together in function result type declarations</para></listitem>
3091
<listitem><para>Recover properly if error occurs during argument passing
3092
in <application>PL/python</> (Neil)</para></listitem>
3094
<listitem><para>Fix memory leak in <function>plperl_return_next</>
3095
(Neil)</para></listitem>
3097
<listitem><para>Fix <application>PL/perl</>'s handling of locales on
3098
Win32 to match the backend (Andrew)</para></listitem>
3100
<listitem><para>Various optimizer fixes (Tom)</para></listitem>
3102
<listitem><para>Fix crash when <literal>log_min_messages</> is set to
3103
<literal>DEBUG3</> or above in <filename>postgresql.conf</> on Win32
3104
(Bruce)</para></listitem>
3106
<listitem><para>Fix <application>pgxs</> <literal>-L</> library path
3107
specification for Win32, Cygwin, OS X, AIX (Bruce)</para></listitem>
3109
<listitem><para>Check that SID is enabled while checking for Win32 admin
3110
privileges (Magnus)</para></listitem>
3112
<listitem><para>Properly reject out-of-range date inputs (Kris
3113
Jurka)</para></listitem>
3115
<listitem><para>Portability fix for testing presence of <function>finite</>
3116
and <function>isinf</> during configure (Tom)</para></listitem>
3118
<listitem><para>Improve speed of <command>COPY IN</> via libpq, by
3119
avoiding a kernel call per data line (Alon Goldshuv)</para></listitem>
3121
<listitem><para>Improve speed of <filename>/contrib/tsearch2</> index
3122
creation (Tom)</para></listitem>
3129
<sect1 id="release-8-1-2">
3130
<title>Release 8.1.2</title>
3133
<title>Release Date</title>
3134
<simpara>2006-01-09</simpara>
3138
This release contains a variety of fixes from 8.1.1.
3139
For information about new features in the 8.1 major release, see
3140
<xref linkend="release-8-1">.
3144
<title>Migration to Version 8.1.2</title>
3147
A dump/restore is not required for those running 8.1.X.
3148
However, you might need to <command>REINDEX</> indexes on textual
3149
columns after updating, if you are affected by the locale or
3150
<application>plperl</> issues described below.
3155
<title>Changes</title>
3159
<listitem><para>Fix Windows code so that postmaster will continue rather
3160
than exit if there is no more room in ShmemBackendArray (Magnus)</para>
3161
<para>The previous behavior could lead to a denial-of-service situation if too
3162
many connection requests arrive close together. This applies
3163
<emphasis>only</> to the Windows port.</para></listitem>
3165
<listitem><para>Fix bug introduced in 8.0 that could allow ReadBuffer
3166
to return an already-used page as new, potentially causing loss of
3167
recently-committed data (Tom)</para></listitem>
3169
<listitem><para>Fix for protocol-level Describe messages issued
3170
outside a transaction or in a failed transaction (Tom)</para></listitem>
3172
<listitem><para>Fix character string comparison for locales that consider
3173
different character combinations as equal, such as Hungarian (Tom)</para>
3174
<para>This might require <command>REINDEX</> to fix existing indexes on
3175
textual columns.</para></listitem>
3177
<listitem><para>Set locale environment variables during postmaster startup
3178
to ensure that <application>plperl</> won't change the locale later</para>
3179
<para>This fixes a problem that occurred if the <application>postmaster</> was
3180
started with environment variables specifying a different locale than what
3181
<application>initdb</> had been told. Under these conditions, any use of
3182
<application>plperl</> was likely to lead to corrupt indexes. You might need
3183
<command>REINDEX</> to fix existing indexes on
3184
textual columns if this has happened to you.</para></listitem>
3186
<listitem><para>Allow more flexible relocation of installation
3187
directories (Tom)</para>
3188
<para>Previous releases supported relocation only if all installation
3189
directory paths were the same except for the last component.</para></listitem>
3191
<listitem><para>Prevent crashes caused by the use of
3192
<literal>ISO-8859-5</> and <literal>ISO-8859-9</> encodings
3193
(Tatsuo)</para></listitem>
3195
<listitem><para>Fix longstanding bug in strpos() and regular expression
3196
handling in certain rarely used Asian multi-byte character sets (Tatsuo)
3199
<listitem><para>Fix bug where COPY CSV mode considered any
3200
<literal>\.</> to terminate the copy data</para> <para>The new code
3201
requires <literal>\.</> to appear alone on a line, as per
3202
documentation.</para></listitem>
3204
<listitem><para>Make COPY CSV mode quote a literal data value of
3205
<literal>\.</> to ensure it cannot be interpreted as the
3206
end-of-data marker (Bruce)</para></listitem>
3208
<listitem><para>Various fixes for functions returning <literal>RECORD</>s
3209
(Tom) </para></listitem>
3211
<listitem><para>Fix processing of <filename>postgresql.conf</> so a
3212
final line with no newline is processed properly (Tom)
3215
<listitem><para>Fix bug in <filename>/contrib/pgcrypto</> gen_salt,
3216
which caused it not to use all available salt space for MD5 and
3217
XDES algorithms (Marko Kreen, Solar Designer)</para>
3218
<para>Salts for Blowfish and standard DES are unaffected.</para></listitem>
3220
<listitem><para>Fix autovacuum crash when processing expression indexes
3223
<listitem><para>Fix <filename>/contrib/dblink</> to throw an error,
3224
rather than crashing, when the number of columns specified is different from
3225
what's actually returned by the query (Joe)</para></listitem>
3232
<sect1 id="release-8-1-1">
3233
<title>Release 8.1.1</title>
3236
<title>Release Date</title>
3237
<simpara>2005-12-12</simpara>
3241
This release contains a variety of fixes from 8.1.0.
3242
For information about new features in the 8.1 major release, see
3243
<xref linkend="release-8-1">.
3247
<title>Migration to Version 8.1.1</title>
3250
A dump/restore is not required for those running 8.1.X.
3255
<title>Changes</title>
3258
<listitem><para>Fix incorrect optimizations of outer-join conditions
3259
(Tom)</para></listitem>
3261
<listitem><para>Fix problems with wrong reported column names in cases
3262
involving sub-selects flattened by the optimizer (Tom)</para></listitem>
3264
<listitem><para>Fix update failures in scenarios involving CHECK constraints,
3265
toasted columns, <emphasis>and</> indexes (Tom)</para></listitem>
3267
<listitem><para>Fix bgwriter problems after recovering from errors
3270
The background writer was found to leak buffer pins after write errors.
3271
While not fatal in itself, this might lead to mysterious blockages of
3272
later VACUUM commands.
3276
<listitem><para>Prevent failure if client sends Bind protocol message
3277
when current transaction is already aborted</para></listitem>
3279
<listitem><para><filename>/contrib/tsearch2</> and <filename>/contrib/ltree</>
3280
fixes (Teodor)</para></listitem>
3282
<listitem><para>Fix problems with translated error messages in
3283
languages that require word reordering, such as Turkish; also problems with
3284
unexpected truncation of output strings and wrong display of the smallest
3285
possible bigint value (Andrew, Tom)</para>
3287
These problems only appeared on platforms that were using our
3288
<filename>port/snprintf.c</> code, which includes BSD variants if
3289
<literal>--enable-nls</> was given, and perhaps others. In addition,
3290
a different form of the translated-error-message problem could appear
3291
on Windows depending on which version of <filename>libintl</> was used.
3294
<listitem><para>Re-allow <literal>AM</>/<literal>PM</>, <literal>HH</>,
3295
<literal>HH12</>, and <literal>D</> format specifiers for
3296
<function>to_char(time)</> and <function>to_char(interval)</>.
3297
(<function>to_char(interval)</> should probably use
3298
<literal>HH24</>.) (Bruce)</para></listitem>
3300
<listitem><para>AIX, HPUX, and MSVC compile fixes (Tom, Hiroshi
3301
Saito)</para></listitem>
3303
<listitem><para>Optimizer improvements (Tom)</para></listitem>
3305
<listitem><para>Retry file reads and writes after Windows
3306
NO_SYSTEM_RESOURCES error (Qingqing Zhou)</para></listitem>
3308
<listitem><para>Prevent <application>autovacuum</> from crashing during
3309
ANALYZE of expression index (Alvaro)</para></listitem>
3311
<listitem><para>Fix problems with ON COMMIT DELETE ROWS temp
3312
tables</para></listitem>
3314
<listitem><para>Fix problems when a trigger alters the output of a SELECT
3315
DISTINCT query</para></listitem>
3317
<listitem><para>Add 8.1.0 release note item on how to migrate invalid
3318
<literal>UTF-8</> byte sequences (Paul Lindner)</para></listitem>
3324
<sect1 id="release-8-1">
3325
<title>Release 8.1</title>
3328
<title>Release Date</title>
3329
<simpara>2005-11-08</simpara>
3333
<title>Overview</title>
3336
Major changes in this release:
3343
Improve concurrent access to the shared buffer cache (Tom)
3348
Access to the shared buffer cache was identified as a
3349
significant scalability problem, particularly on multi-CPU
3350
systems. In this release, the way that locking is done in the
3351
buffer manager has been overhauled to reduce lock contention
3352
and improve scalability. The buffer manager has also been
3353
changed to use a <quote>clock sweep</quote> replacement
3361
Allow index scans to use an intermediate in-memory bitmap (Tom)
3366
In previous releases, only a single index could be used to do
3367
lookups on a table. With this feature, if a query has
3368
<command>WHERE tab.col1 = 4 and tab.col2 = 9</>, and there is
3369
no multicolumn index on <literal>col1</> and <literal>col2</>,
3370
but there is an index on <literal>col1</> and another on
3371
<literal>col2</>, it is possible to search both indexes and
3372
combine the results in memory, then do heap fetches for only
3373
the rows matching both the <literal>col1</> and
3374
<literal>col2</> restrictions. This is very useful in
3375
environments that have a lot of unstructured queries where it
3376
is impossible to create indexes that match all possible access
3377
conditions. Bitmap scans are useful even with a single index,
3378
as they reduce the amount of random access needed; a bitmap
3379
index scan is efficient for retrieving fairly large fractions
3380
of the complete table, whereas plain index scans are not.
3387
Add two-phase commit (Heikki Linnakangas, Alvaro, Tom)
3392
Two-phase commit allows transactions to be "prepared" on several
3393
computers, and once all computers have successfully prepared
3394
their transactions (none failed), all transactions can be
3395
committed. Even if a machine crashes after a prepare, the
3396
prepared transaction can be committed after the machine is
3397
restarted. New syntax includes <command>PREPARE TRANSACTION</> and
3398
<command>COMMIT/ROLLBACK PREPARED</>. A new system view
3399
<literal>pg_prepared_xacts</> has also been added.
3406
Create a new role system that replaces users and groups
3412
Roles are a combination of users and groups. Like users, they
3413
can have login capability, and like groups, a role can have
3414
other roles as members. Roles basically remove the distinction
3415
between users and groups. For example, a role can:
3422
Have login capability (optionally)
3434
Hold access permissions for database objects
3440
Inherit permissions from other roles it is a member of
3446
Once a user logs into a role, she obtains capabilities of
3447
the login role plus any inherited roles, and can use
3448
<command>SET ROLE</> to switch to other roles she is a member of.
3449
This feature is a generalization of the SQL standard's concept of
3451
This change also replaces <structname>pg_shadow</> and
3452
<structname>pg_group</> by new role-capable catalogs
3453
<structname>pg_authid</> and <structname>pg_auth_members</>. The old
3454
tables are redefined as read-only views on the new role tables.
3461
Automatically use indexes for <function>MIN()</> and
3462
<function>MAX()</> (Tom)
3467
In previous releases, the only way to use an index for
3468
<function>MIN()</> or <function>MAX()</> was to rewrite the
3469
query as <command>SELECT col FROM tab ORDER BY col LIMIT 1</>.
3470
Index usage now happens automatically.
3477
Move <filename>/contrib/pg_autovacuum</> into the main server
3483
Integrating autovacuum into the server allows it to be
3484
automatically started and stopped in sync with the database
3485
server, and allows autovacuum to be configured from
3486
<filename>postgresql.conf</>.
3493
Add shared row level locks using <command>SELECT ... FOR SHARE</>
3499
While <productname>PostgreSQL</productname>'s MVCC locking
3500
allows <command>SELECT</> to never be blocked by writers and
3501
therefore does not need shared row locks for typical operations,
3502
shared locks are useful for applications that require shared row
3503
locking. In particular this reduces the locking requirements
3504
imposed by referential integrity checks.
3511
Add dependencies on shared objects, specifically roles
3517
This extension of the dependency mechanism prevents roles from
3518
being dropped while there are still database objects they own.
3519
Formerly it was possible to accidentally <quote>orphan</> objects by
3520
deleting their owner. While this could be recovered from, it
3521
was messy and unpleasant.
3528
Improve performance for partitioned tables (Simon)
3533
The new <varname>constraint_exclusion</varname> configuration
3534
parameter avoids lookups on child tables where constraints indicate
3535
that no matching rows exist in the child table.
3538
This allows for a basic type of table partitioning. If child tables
3539
store separate key ranges and this is enforced using appropriate
3540
<command>CHECK</> constraints, the optimizer will skip child
3541
table accesses when the constraint guarantees no matching rows
3542
exist in the child table.
3551
<title>Migration to Version 8.1</title>
3554
A dump/restore using <application>pg_dump</application> is required
3555
for those wishing to migrate data from any previous release.
3559
The 8.0 release announced that the <function>to_char()</> function
3560
for intervals would be removed in 8.1. However, since no better API
3561
has been suggested, <function>to_char(interval)</> has been enhanced in
3562
8.1 and will remain in the server.
3566
Observe the following incompatibilities:
3573
<varname>add_missing_from</> is now false by default (Neil)
3576
By default, we now generate an error if a table is used in a query
3577
without a <literal>FROM</> reference. The old behavior is still
3578
available, but the parameter must be set to 'true' to obtain it.
3582
It might be necessary to set <varname>add_missing_from</> to true
3583
in order to load an existing dump file, if the dump contains any
3584
views or rules created using the implicit-<literal>FROM</> syntax.
3585
This should be a one-time annoyance, because
3586
<productname>PostgreSQL</productname> 8.1 will convert
3587
such views and rules to standard explicit-<literal>FROM</> syntax.
3588
Subsequent dumps will therefore not have the problem.
3594
Cause input of a zero-length string (<literal>''</literal>) for
3595
<type>float4</type>/<type>float8</type>/<type>oid</type>
3596
to throw an error, rather than treating it as a zero (Neil)
3599
This change is consistent with the current handling of
3600
zero-length strings for integers. The schedule for this change
3601
was announced in 8.0.
3607
<varname>default_with_oids</> is now false by default (Neil)
3610
With this option set to false, user-created tables no longer
3611
have an OID column unless <command>WITH OIDS</> is specified in
3612
<command>CREATE TABLE</>. Though OIDs have existed in all
3613
releases of <productname>PostgreSQL</>, their use is limited
3614
because they are only four bytes long and the counter is shared
3615
across all installed databases. The preferred way of uniquely
3616
identifying rows is via sequences and the <type>SERIAL</> type,
3617
which have been supported since <productname>PostgreSQL</> 6.4.
3623
Add <literal>E''</> syntax so eventually ordinary strings can
3624
treat backslashes literally (Bruce)
3627
Currently <productname>PostgreSQL</productname> processes a
3628
backslash in a string literal as introducing a special escape sequence,
3629
e.g. <literal>\n</> or <literal>\010</>.
3630
While this allows easy entry of special values, it is
3631
nonstandard and makes porting of applications from other
3632
databases more difficult. For this reason, the
3633
<productname>PostgreSQL</productname> project is planning to
3634
remove the special meaning of backslashes in strings. For
3635
backward compatibility and for users who want special backslash
3636
processing, a new string syntax has been created. This new string
3637
syntax is formed by writing an <literal>E</> immediately preceding the
3638
single quote that starts the string, e.g. <literal>E'hi\n'</>. While
3639
this release does not change the handling of backslashes in strings, it
3640
does add new configuration parameters to help users migrate applications
3641
for future releases:
3647
<varname>standard_conforming_strings</> — does this release
3648
treat backslashes literally in ordinary strings?
3654
<varname>escape_string_warning</> — warn about backslashes in
3655
ordinary (non-E) strings
3662
The <varname>standard_conforming_strings</> value is read-only.
3663
Applications can retrieve the value to know how backslashes are
3664
processed. (Presence of the parameter can also be taken as an
3665
indication that <literal>E''</> string syntax is supported.)
3666
In a future release, <varname>standard_conforming_strings</>
3667
will be true, meaning backslashes will be treated literally in
3668
non-E strings. To prepare for this change, use <literal>E''</>
3669
strings in places that need special backslash processing, and
3670
turn on <varname>escape_string_warning</> to find additional
3671
strings that need to be converted to use <literal>E''</>.
3672
Also, use two single-quotes (<literal>''</>) to embed a literal
3673
single-quote in a string, rather than the
3674
<productname>PostgreSQL</productname>-supported syntax of
3675
backslash single-quote (<literal>\'</>). The former is
3676
standards-conforming and does not require the use of the
3677
<literal>E''</> string syntax. You can also use the
3678
<literal>$$</> string syntax, which does not treat backslashes
3685
Make <command>REINDEX DATABASE</> reindex all indexes in the
3689
Formerly, <command>REINDEX DATABASE</> reindexed only
3690
system tables. This new behavior seems more intuitive. A new
3691
command <command>REINDEX SYSTEM</> provides the old functionality
3692
of reindexing just the system tables.
3698
Read-only large object descriptors now obey MVCC snapshot semantics
3701
When a large object is opened with <literal>INV_READ</> (and not
3702
<literal>INV_WRITE</>), the data read from the descriptor will now
3703
reflect a <quote>snapshot</> of the large object's state at the
3704
time of the transaction snapshot in use by the query that called
3705
<function>lo_open()</>. To obtain the old behavior of always
3706
returning the latest committed data, include <literal>INV_WRITE</>
3707
in the mode flags for <function>lo_open()</>.
3713
Add proper dependencies for arguments of sequence functions (Tom)
3716
In previous releases, sequence names passed to <function>nextval()</>,
3717
<function>currval()</>, and <function>setval()</> were stored as
3718
simple text strings, meaning that renaming or dropping a
3719
sequence used in a <literal>DEFAULT</> clause made the clause
3720
invalid. This release stores all newly-created sequence function
3721
arguments as internal OIDs, allowing them to track sequence
3722
renaming, and adding dependency information that prevents
3723
improper sequence removal. It also makes such <literal>DEFAULT</>
3724
clauses immune to schema renaming and search path changes.
3727
Some applications might rely on the old behavior of
3728
run-time lookup for sequence names. This can still be done by
3729
explicitly casting the argument to <type>text</>, for example
3730
<literal>nextval('myseq'::text)</>.
3733
Pre-8.1 database dumps loaded into 8.1 will use the old text-based
3734
representation and therefore will not have the features of
3735
OID-stored arguments. However, it is possible to update a
3736
database containing text-based <literal>DEFAULT</> clauses.
3737
First, save this query into a file, such as <filename>fixseq.sql</>:
3739
SELECT 'ALTER TABLE ' ||
3740
pg_catalog.quote_ident(n.nspname) || '.' ||
3741
pg_catalog.quote_ident(c.relname) ||
3742
' ALTER COLUMN ' || pg_catalog.quote_ident(a.attname) ||
3744
regexp_replace(d.adsrc,
3745
$$val\(\(('[^']*')::text\)::regclass$$,
3749
FROM pg_namespace n, pg_class c, pg_attribute a, pg_attrdef d
3750
WHERE n.oid = c.relnamespace AND
3751
c.oid = a.attrelid AND
3752
a.attrelid = d.adrelid AND
3753
a.attnum = d.adnum AND
3754
d.adsrc ~ $$val\(\('[^']*'::text\)::regclass$$;
3756
Next, run the query against a database to find what
3757
adjustments are required, like this for database <literal>db1</>:
3759
psql -t -f fixseq.sql db1
3761
This will show the <command>ALTER TABLE</> commands needed to
3762
convert the database to the newer OID-based representation.
3763
If the commands look reasonable, run this to update the database:
3765
psql -t -f fixseq.sql db1 | psql -e db1
3767
This process must be repeated in each database to be updated.
3773
In <application>psql</application>, treat unquoted
3774
<literal>\{digit}+</> sequences as octal (Bruce)
3777
In previous releases, <literal>\{digit}+</> sequences were
3778
treated as decimal, and only <literal>\0{digit}+</> were treated
3779
as octal. This change was made for consistency.
3785
Remove grammar productions for prefix and postfix <literal>%</>
3786
and <literal>^</> operators
3790
These have never been documented and complicated the use of the
3791
modulus operator (<literal>%</>) with negative numbers.
3797
Make <literal>&<</> and <literal>&></> for polygons
3798
consistent with the box "over" operators (Tom)
3804
<command>CREATE LANGUAGE</> can ignore the provided arguments
3805
in favor of information from <structname>pg_pltemplate</>
3809
A new system catalog <structname>pg_pltemplate</> has been defined
3810
to carry information about the preferred definitions of procedural
3811
languages (such as whether they have validator functions). When
3812
an entry exists in this catalog for the language being created,
3813
<command>CREATE LANGUAGE</> will ignore all its parameters except the
3814
language name and instead use the catalog information. This measure
3815
was taken because of increasing problems with obsolete language
3816
definitions being loaded by old dump files. As of 8.1,
3817
<application>pg_dump</> will dump procedural language definitions as
3818
just <command>CREATE LANGUAGE <replaceable>name</></command>, relying
3819
on a template entry to exist at load time. We expect this will be a
3820
more future-proof representation.
3826
Make <function>pg_cancel_backend(int)</function> return a
3827
<type>boolean</type> rather than an <type>integer</type> (Neil)
3833
Some users are having problems loading UTF-8 data into 8.1.X.
3834
This is because previous versions allowed invalid UTF-8 byte
3835
sequences to be entered into the database, and this release
3836
properly accepts only valid UTF-8 sequences. One way to correct a
3837
dumpfile is to run the command <command>iconv -c -f UTF-8 -t
3838
UTF-8 -o cleanfile.sql dumpfile.sql</>. The <literal>-c</> option
3839
removes invalid character sequences. A diff of the two files will
3840
show the sequences that are invalid. <command>iconv</> reads the
3841
entire input file into memory so it might be necessary to use
3842
<application>split</> to break up the dump into multiple smaller
3843
files for processing.
3851
<title>Additional Changes</title>
3854
Below you will find a detailed account of the additional changes
3855
between <productname>PostgreSQL</productname> 8.1 and the
3856
previous major release.
3860
<title>Performance Improvements</title>
3865
Improve GiST and R-tree index performance (Neil)
3871
Improve the optimizer, including auto-resizing of hash joins
3878
Overhaul internal API in several areas
3884
Change WAL record CRCs from 64-bit to 32-bit (Tom)
3887
We determined that the extra cost of computing 64-bit CRCs was
3888
significant, and the gain in reliability too marginal to justify it.
3894
Prevent writing large empty gaps in WAL pages (Tom)
3900
Improve spinlock behavior on SMP machines, particularly Opterons (Tom)
3906
Allow nonconsecutive index columns to be used in a multicolumn
3910
For example, this allows an index on columns a,b,c to be used in
3911
a query with <command>WHERE a = 4 and c = 10</>.
3917
Skip WAL logging for <command>CREATE TABLE AS</> /
3918
<command>SELECT INTO</> (Simon)
3921
Since a crash during <command>CREATE TABLE AS</> would cause the
3922
table to be dropped during recovery, there is no reason to WAL
3923
log as the table is loaded. (Logging still happens if WAL
3924
archiving is enabled, however.)
3930
Allow concurrent GiST index access (Teodor, Oleg)
3936
Add configuration parameter <varname>full_page_writes</> to
3937
control writing full pages to WAL (Bruce)
3940
To prevent partial disk writes from corrupting the database,
3941
<productname>PostgreSQL</productname> writes a complete copy of
3942
each database disk page to WAL the first time it is modified
3943
after a checkpoint. This option turns off that functionality for more
3944
speed. This is safe to use with battery-backed disk caches where
3945
partial page writes cannot happen.
3951
Use <literal>O_DIRECT</> if available when using
3952
<literal>O_SYNC</> for <varname>wal_sync_method</varname>
3956
<literal>O_DIRECT</> causes disk writes to bypass the kernel
3957
cache, and for WAL writes, this improves performance.
3963
Improve <command>COPY FROM</> performance (Alon Goldshuv)
3966
This was accomplished by reading <command>COPY</> input in
3967
larger chunks, rather than character by character.
3973
Improve the performance of <function>COUNT()</function>,
3974
<function>SUM</function>, <function>AVG()</function>,
3975
<function>STDDEV()</function>, and
3976
<function>VARIANCE()</function> (Neil, Tom)
3983
<title>Server Changes</title>
3988
Prevent problems due to transaction ID (XID) wraparound (Tom)
3991
The server will now warn when the transaction counter approaches
3992
the wraparound point. If the counter becomes too close to wraparound,
3993
the server will stop accepting queries. This ensures that data is
3994
not lost before needed vacuuming is performed.
4000
Fix problems with object IDs (OIDs) conflicting with existing system
4001
objects after the OID counter has wrapped around (Tom)
4007
Add warning about the need to increase
4008
<varname>max_fsm_relations</> and <varname>max_fsm_pages</>
4009
during <command>VACUUM</> (Ron Mayer)
4015
Add <varname>temp_buffers</> configuration parameter to allow
4016
users to determine the size of the local buffer area for
4017
temporary table access (Tom)
4023
Add session start time and client IP address to
4024
<literal>pg_stat_activity</> (Magnus)
4030
Adjust <literal>pg_stat</> views for bitmap scans (Tom)
4033
The meanings of some of the fields have changed slightly.
4039
Enhance <literal>pg_locks</> view (Tom)
4045
Log queries for client-side <command>PREPARE</> and
4046
<command>EXECUTE</> (Simon)
4052
Allow Kerberos name and user name case sensitivity to be
4053
specified in <filename>postgresql.conf</> (Magnus)
4059
Add configuration parameter <varname>krb_server_hostname</> so
4060
that the server host name can be specified as part of service
4061
principal (Todd Kover)
4064
If not set, any service principal matching an entry in the
4065
keytab can be used. This is new Kerberos matching behavior in
4072
Add <varname>log_line_prefix</> options for millisecond
4073
timestamps (<literal>%m</>) and remote host (<literal>%h</>) (Ed
4080
Add WAL logging for GiST indexes (Teodor, Oleg)
4083
GiST indexes are now safe for crash and point-in-time recovery.
4089
Remove old <filename>*.backup</> files when we do
4090
<function>pg_stop_backup()</> (Bruce)
4093
This prevents a large number of <filename>*.backup</> files from
4094
existing in <filename>pg_xlog/</>.
4100
Add configuration parameters to control TCP/IP keep-alive
4101
times for idle, interval, and count (Oliver Jowett)
4105
These values can be changed to allow more rapid detection of
4106
lost client connections.
4112
Add per-user and per-database connection limits (Petr Jelinek)
4115
Using <command>ALTER USER</> and <command>ALTER DATABASE</>,
4116
limits can now be enforced on the maximum number of sessions that
4117
can concurrently connect as a specific user or to a specific database.
4118
Setting the limit to zero disables user or database connections.
4124
Allow more than two gigabytes of shared memory and per-backend
4125
work memory on 64-bit machines (Koichi Suzuki)
4131
New system catalog <structname>pg_pltemplate</> allows overriding
4132
obsolete procedural-language definitions in dump files (Tom)
4141
<title>Query Changes</title>
4146
Add temporary views (Koju Iijima, Neil)
4152
Fix <command>HAVING</> without any aggregate functions or
4153
<command>GROUP BY</> so that the query returns a single group (Tom)
4156
Previously, such a case would treat the <command>HAVING</>
4157
clause the same as a <command>WHERE</> clause. This was not per spec.
4163
Add <command>USING</> clause to allow additional tables to be
4164
specified to <command>DELETE</> (Euler Taveira de Oliveira, Neil)
4167
In prior releases, there was no clear method for specifying
4168
additional tables to be used for joins in a <command>DELETE</>
4169
statement. <command>UPDATE</> already has a <literal>FROM</>
4170
clause for this purpose.
4176
Add support for <literal>\x</> hex escapes in backend and ecpg
4180
This is just like the standard C <literal>\x</> escape syntax.
4181
Octal escapes were already supported.
4187
Add <command>BETWEEN SYMMETRIC</> query syntax (Pavel Stehule)
4190
This feature allows <command>BETWEEN</> comparisons without
4191
requiring the first value to be less than the second. For
4192
example, <command>2 BETWEEN [ASYMMETRIC] 3 AND 1</> returns
4193
false, while <command>2 BETWEEN SYMMETRIC 3 AND 1</> returns
4194
true. <command>BETWEEN ASYMMETRIC</> was already supported.
4200
Add <command>NOWAIT</> option to <command>SELECT ... FOR
4201
UPDATE/SHARE</> (Hans-Juergen Schoenig)
4204
While the <varname>statement_timeout</> configuration
4205
parameter allows a query taking more than a certain amount of
4206
time to be cancelled, the <command>NOWAIT</> option allows a
4207
query to be canceled as soon as a <command>SELECT ... FOR
4208
UPDATE/SHARE</> command cannot immediately acquire a row lock.
4216
<title>Object Manipulation Changes</title>
4221
Track dependencies of shared objects (Alvaro)
4224
<productname>PostgreSQL</productname> allows global tables
4225
(users, databases, tablespaces) to reference information in
4226
multiple databases. This addition adds dependency information
4227
for global tables, so, for example, user ownership can be
4228
tracked across databases, so a user who owns something in any
4229
database can no longer be removed. Dependency tracking already
4230
existed for database-local objects.
4236
Allow limited <command>ALTER OWNER</> commands to be performed
4237
by the object owner (Stephen Frost)
4240
Prior releases allowed only superusers to change object owners.
4241
Now, ownership can be transferred if the user executing the command
4242
owns the object and would be able to create it as the new owner
4243
(that is, the user is a member of the new owning role and that role
4244
has the CREATE permission that would be needed to create the object
4251
Add <command>ALTER</> object <command>SET SCHEMA</> capability
4252
for some object types (tables, functions, types) (Bernd Helmle)
4255
This allows objects to be moved to different schemas.
4261
Add <command>ALTER TABLE ENABLE/DISABLE TRIGGER</command> to
4262
disable triggers (Satoshi Nagayasu)
4271
<title>Utility Command Changes</title>
4276
Allow <command>TRUNCATE</> to truncate multiple tables in a
4277
single command (Alvaro)
4280
Because of referential integrity checks, it is not allowed to
4281
truncate a table that is part of a referential integrity
4282
constraint. Using this new functionality, <command>TRUNCATE</>
4283
can be used to truncate such tables, if both tables involved in
4284
a referential integrity constraint are truncated in a single
4285
<command>TRUNCATE</> command.
4291
Properly process carriage returns and line feeds in
4292
<command>COPY CSV</> mode (Andrew)
4295
In release 8.0, carriage returns and line feeds in <command>CSV
4296
COPY TO</> were processed in an inconsistent manner. (This was
4297
documented on the TODO list.)
4303
Add <command>COPY WITH CSV HEADER</> to allow a header line as
4304
the first line in <command>COPY</> (Andrew)
4307
This allows handling of the common <command>CSV</> usage of
4308
placing the column names on the first line of the data file. For
4309
<command>COPY TO</>, the first line contains the column names,
4310
and for <command>COPY FROM</>, the first line is ignored.
4316
On Windows, display better sub-second precision in
4317
<command>EXPLAIN ANALYZE</> (Magnus)
4323
Add trigger duration display to <command>EXPLAIN ANALYZE</>
4327
Prior releases included trigger execution time as part of the
4328
total execution time, but did not show it separately. It is now
4329
possible to see how much time is spent in each trigger.
4335
Add support for <literal>\x</> hex escapes in <command>COPY</>
4339
Previous releases only supported octal escapes.
4345
Make <command>SHOW ALL</> include variable descriptions
4349
<command>SHOW</> varname still only displays the variable's
4350
value and does not include the description.
4356
Make <application>initdb</application> create a new standard
4357
database called <literal>postgres</>, and convert utilities to
4358
use <literal>postgres</> rather than <literal>template1</> for
4359
standard lookups (Dave)
4362
In prior releases, <literal>template1</> was used both as a
4363
default connection for utilities like
4364
<application>createuser</application>, and as a template for
4365
new databases. This caused <command>CREATE DATABASE</> to
4366
sometimes fail, because a new database cannot be created if
4367
anyone else is in the template database. With this change, the
4368
default connection database is now <literal>postgres</>,
4369
meaning it is much less likely someone will be using
4370
<literal>template1</> during <command>CREATE DATABASE</>.
4376
Create new <application>reindexdb</application> command-line
4377
utility by moving <filename>/contrib/reindexdb</> into the
4378
server (Euler Taveira de Oliveira)
4387
<title>Data Type and Function Changes</title>
4392
Add <function>MAX()</> and <function>MIN()</> aggregates for
4393
array types (Koju Iijima)
4399
Fix <function>to_date()</> and <function>to_timestamp()</> to
4400
behave reasonably when <literal>CC</> and <literal>YY</> fields
4401
are both used (Karel Zak)
4404
If the format specification contains <literal>CC</> and a year
4405
specification is <literal>YYY</> or longer, ignore the
4406
<literal>CC</>. If the year specification is <literal>YY</> or
4407
shorter, interpret <literal>CC</> as the previous century.
4413
Add <function>md5(bytea)</> (Abhijit Menon-Sen)
4416
<function>md5(text)</> already existed.
4422
Add support for <command>numeric ^ numeric</> based on
4423
<function>power(numeric, numeric)</>
4426
The function already existed, but there was no operator assigned
4433
Fix <type>NUMERIC</> modulus by properly truncating the quotient
4434
during computation (Bruce)
4437
In previous releases, modulus for large values sometimes
4438
returned negative results due to rounding of the quotient.
4444
Add a function <function>lastval()</> (Dennis Björklund)
4447
<function>lastval()</> is a simplified version of
4448
<function>currval()</>. It automatically determines the proper
4449
sequence name based on the most recent <function>nextval()</> or
4450
<function>setval()</> call performed by the current session.
4456
Add <function>to_timestamp(DOUBLE PRECISION) (Michael Glaesemann)</>
4459
Converts Unix seconds since 1970 to a <type>TIMESTAMP WITH
4466
Add <function>pg_postmaster_start_time()</> function (Euler
4467
Taveira de Oliveira, Matthias Schmidt)
4473
Allow the full use of time zone names in <command>AT TIME
4474
ZONE</>, not just the short list previously available (Magnus)
4477
Previously, only a predefined list of time zone names were
4478
supported by <command>AT TIME ZONE</>. Now any supported time
4479
zone name can be used, e.g.:
4481
SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London';
4483
In the above query, the time zone used is adjusted based on the
4484
daylight saving time rules that were in effect on the supplied
4491
Add <function>GREATEST()</> and <function>LEAST()</> variadic
4492
functions (Pavel Stehule)
4495
These functions take a variable number of arguments and return
4496
the greatest or least value among the arguments.
4502
Add <function>pg_column_size()</> (Mark Kirkwood)
4505
This returns storage size of a column, which might be compressed.
4511
Add <function>regexp_replace()</> (Atsushi Ogawa)
4514
This allows regular expression replacement, like sed. An optional
4515
flag argument allows selection of global (replace all) and
4516
case-insensitive modes.
4522
Fix interval division and multiplication (Bruce)
4525
Previous versions sometimes returned unjustified results, like
4526
<command>'4 months'::interval / 5</> returning <command>'1 mon
4533
Fix roundoff behavior in timestamp, time, and interval output (Tom)
4536
This fixes some cases in which the seconds field would be shown as
4537
<literal>60</> instead of incrementing the higher-order fields.
4543
Add a separate day field to type <type>interval</> so a one day
4544
interval can be distinguished from a 24 hour interval (Michael
4548
Days that contain a daylight saving time adjustment are not 24
4549
hours long, but typically 23 or 25 hours. This change creates a
4550
conceptual distinction between intervals of <quote>so many days</>
4551
and intervals of <quote>so many hours</>. Adding
4552
<literal>1 day</> to a timestamp now gives the same local time on
4553
the next day even if a daylight saving time adjustment occurs
4554
between, whereas adding <literal>24 hours</> will give a different
4555
local time when this happens. For example, under US DST rules:
4557
'2005-04-03 00:00:00-05' + '1 day' = '2005-04-04 00:00:00-04'
4558
'2005-04-03 00:00:00-05' + '24 hours' = '2005-04-04 01:00:00-04'
4565
Add <function>justify_days()</> and <function>justify_hours()</>
4566
(Michael Glaesemann)
4569
These functions, respectively, adjust days to an appropriate
4570
number of full months and days, and adjust hours to an
4571
appropriate number of full days and hours.
4577
Move <filename>/contrib/dbsize</> into the backend, and rename
4578
some of the functions (Dave Page, Andreas Pflug)
4585
<function>pg_tablespace_size()</>
4591
<function>pg_database_size()</>
4597
<function>pg_relation_size()</>
4603
<function>pg_total_relation_size()</>
4609
<function>pg_size_pretty()</>
4616
<function>pg_total_relation_size()</> includes indexes and TOAST
4623
Add functions for read-only file access to the cluster directory
4624
(Dave Page, Andreas Pflug)
4631
<function>pg_stat_file()</>
4637
<function>pg_read_file()</>
4643
<function>pg_ls_dir()</>
4653
Add <function>pg_reload_conf()</> to force reloading of the
4654
configuration files (Dave Page, Andreas Pflug)
4660
Add <function>pg_rotate_logfile()</> to force rotation of the
4661
server log file (Dave Page, Andreas Pflug)
4667
Change <literal>pg_stat_*</> views to include TOAST tables (Tom)
4676
<title>Encoding and Locale Changes</title>
4681
Rename some encodings to be more consistent and to follow
4682
international standards (Bruce)
4689
<literal>UNICODE</> is now <literal>UTF8</>
4695
<literal>ALT</> is now <literal>WIN866</>
4701
<literal>WIN</> is now <literal>WIN1251</>
4707
<literal>TCVN</> is now <literal>WIN1258</>
4715
The original names still work.
4721
Add support for <literal>WIN1252</> encoding (Roland Volkmann)
4727
Add support for four-byte <literal>UTF8</> characters (John
4731
Previously only one, two, and three-byte <literal>UTF8</> characters
4732
were supported. This is particularly important for support for
4733
some Chinese character sets.
4739
Allow direct conversion between <literal>EUC_JP</> and
4740
<literal>SJIS</> to improve performance (Atsushi Ogawa)
4746
Allow the UTF8 encoding to work on Windows (Magnus)
4749
This is done by mapping UTF8 to the Windows-native UTF16
4759
<title>General Server-Side Language Changes</title>
4764
Fix <command>ALTER LANGUAGE RENAME</> (Sergey Yatskevich)
4770
Allow function characteristics, like strictness and volatility,
4771
to be modified via <command>ALTER FUNCTION</> (Neil)
4777
Increase the maximum number of function arguments to 100 (Tom)
4783
Allow SQL and PL/pgSQL functions to use <command>OUT</> and
4784
<command>INOUT</> parameters (Tom)
4787
<command>OUT</> is an alternate way for a function to return
4788
values. Instead of using <command>RETURN</>, values can be
4789
returned by assigning to parameters declared as <command>OUT</> or
4790
<command>INOUT</>. This is notationally simpler in some cases,
4791
particularly so when multiple values need to be returned.
4792
While returning multiple values from a function
4793
was possible in previous releases, this greatly simplifies the
4794
process. (The feature will be extended to other server-side
4795
languages in future releases.)
4801
Move language handler functions into the <literal>pg_catalog</> schema
4804
This makes it easier to drop the public schema if desired.
4810
Add <function>SPI_getnspname()</function> to SPI (Neil)
4818
<title>PL/pgSQL Server-Side Language Changes</title>
4823
Overhaul the memory management of PL/pgSQL functions (Neil)
4826
The parsetree of each function is now stored in a separate
4827
memory context. This allows this memory to be easily reclaimed
4828
when it is no longer needed.
4834
Check function syntax at <command>CREATE FUNCTION</> time,
4835
rather than at runtime (Neil)
4838
Previously, most syntax errors were reported only when the
4839
function was executed.
4845
Allow <command>OPEN</> to open non-<command>SELECT</> queries
4846
like <command>EXPLAIN</> and <command>SHOW</> (Tom)
4852
No longer require functions to issue a <command>RETURN</>
4856
This is a byproduct of the newly added <command>OUT</> and
4857
<command>INOUT</> functionality. <command>RETURN</> can
4858
be omitted when it is not needed to provide the function's
4865
Add support for an optional <command>INTO</> clause to
4866
PL/pgSQL's <command>EXECUTE</> statement (Pavel Stehule, Neil)
4872
Make <command>CREATE TABLE AS</> set <command>ROW_COUNT</> (Tom)
4878
Define <literal>SQLSTATE</> and <literal>SQLERRM</> to return
4879
the <literal>SQLSTATE</> and error message of the current
4880
exception (Pavel Stehule, Neil)
4883
These variables are only defined inside exception blocks.
4889
Allow the parameters to the <command>RAISE</> statement to be
4890
expressions (Pavel Stehule, Neil)
4896
Add a loop <command>CONTINUE</> statement (Pavel Stehule, Neil)
4902
Allow block and loop labels (Pavel Stehule)
4911
<title>PL/Perl Server-Side Language Changes</title>
4916
Allow large result sets to be returned efficiently (Abhijit
4920
This allows functions to use <function>return_next()</> to avoid
4921
building the entire result set in memory.
4927
Allow one-row-at-a-time retrieval of query results (Abhijit Menon-Sen)
4930
This allows functions to use <function>spi_query()</> and
4931
<function>spi_fetchrow()</> to avoid accumulating the entire
4932
result set in memory.
4938
Force PL/Perl to handle strings as <literal>UTF8</> if the
4939
server encoding is <literal>UTF8</> (David Kamholz)
4945
Add a validator function for PL/Perl (Andrew)
4948
This allows syntax errors to be reported at definition time,
4949
rather than execution time.
4955
Allow PL/Perl to return a Perl array when the function returns
4956
an array type (Andrew)
4959
This basically maps <productname>PostgreSQL</productname> arrays
4966
Allow Perl nonfatal warnings to generate <command>NOTICE</>
4973
Allow Perl's <literal>strict</> mode to be enabled (Andrew)
4982
<title><application>psql</> Changes</title>
4987
Add <command>\set ON_ERROR_ROLLBACK</> to allow statements in
4988
a transaction to error without affecting the rest of the
4989
transaction (Greg Sabino Mullane)
4992
This is basically implemented by wrapping every statement in a
4999
Add support for <literal>\x</> hex strings in
5000
<application>psql</> variables (Bruce)
5003
Octal escapes were already supported.
5009
Add support for <command>troff -ms</> output format (Roger
5016
Allow the history file location to be controlled by
5017
<envar>HISTFILE</> (Andreas Seltenreich)
5020
This allows configuration of per-database history storage.
5026
Prevent <command>\x</> (expanded mode) from affecting
5027
the output of <command>\d tablename</> (Neil)
5033
Add <option>-L</> option to <application>psql</application> to
5034
log sessions (Lorne Sunley)
5037
This option was added because some operating systems do not have
5038
simple command-line activity logging functionality.
5044
Make <command>\d</> show the tablespaces of indexes (Qingqing
5051
Allow <application>psql</application> help (<command>\h</>) to
5052
make a best guess on the proper help information (Greg Sabino
5056
This allows the user to just add <command>\h</> to the front of
5057
the syntax error query and get help on the supported syntax.
5058
Previously any additional query text beyond the command name
5059
had to be removed to use <command>\h</>.
5065
Add <command>\pset numericlocale</> to allow numbers to be
5066
output in a locale-aware format (Eugen Nedelcu)
5069
For example, using <literal>C</> locale <literal>100000</> would
5070
be output as <literal>100,000.0</> while a European locale might
5071
output this value as <literal>100.000,0</>.
5077
Make startup banner show both server version number and
5078
<application>psql</>'s version number, when they are different (Bruce)
5081
Also, a warning will be shown if the server and <application>psql</>
5082
are from different major releases.
5091
<title><application>pg_dump</> Changes</title>
5096
Add <option>-n</> / <option>--schema</> switch to
5097
<application>pg_restore</> (Richard van den Berg)
5100
This allows just the objects in a specified schema to be restored.
5106
Allow <application>pg_dump</> to dump large objects even in
5110
With this change, large objects are now always dumped; the former
5111
<option>-b</> switch is a no-op.
5117
Allow <application>pg_dump</> to dump a consistent snapshot of
5124
Dump comments for large objects (Tom)
5130
Add <option>--encoding</> to <application>pg_dump</>
5134
This allows a database to be dumped in an encoding that is
5135
different from the server's encoding. This is valuable when
5136
transferring the dump to a machine with a different encoding.
5142
Rely on <structname>pg_pltemplate</> for procedural languages (Tom)
5145
If the call handler for a procedural language is in the
5146
<literal>pg_catalog</> schema, <application>pg_dump</> does not
5147
dump the handler. Instead, it dumps the language using just
5148
<command>CREATE LANGUAGE <replaceable>name</></command>,
5149
relying on the <structname>pg_pltemplate</> catalog to provide
5150
the language's creation parameters at load time.
5159
<title><application>libpq</application> Changes</title>
5164
Add a <envar>PGPASSFILE</> environment variable to specify the
5165
password file's filename (Andrew)
5171
Add <function>lo_create()</>, that is similar to
5172
<function>lo_creat()</> but allows the OID of the large object
5173
to be specified (Tom)
5179
Make <application>libpq</application> consistently return an error
5180
to the client application on <function>malloc()</function>
5189
<title>Source Code Changes</title>
5194
Fix <application>pgxs</> to support building against a relocated
5201
Add spinlock support for the Itanium processor using Intel
5202
compiler (Vikram Kalsi)
5208
Add Kerberos 5 support for Windows (Magnus)
5214
Add Chinese FAQ (laser@pgsqldb.com)
5220
Rename Rendezvous to Bonjour to match OS/X feature renaming
5227
Add support for <literal>fsync_writethrough</literal> on
5228
Darwin (Chris Campbell)
5234
Streamline the passing of information within the server, the
5235
optimizer, and the lock system (Tom)
5241
Allow <application>pg_config</> to be compiled using MSVC (Andrew)
5244
This is required to build DBD::Pg using <application>MSVC</>.
5250
Remove support for Kerberos V4 (Magnus)
5253
Kerberos 4 had security vulnerabilities and is no longer
5260
Code cleanups (Coverity static analysis performed by
5267
Modify <filename>postgresql.conf</> to use documentation defaults
5268
<literal>on</>/<literal>off</> rather than
5269
<literal>true</>/<literal>false</> (Bruce)
5275
Enhance <application>pg_config</> to be able to report more
5276
build-time values (Tom)
5282
Allow <application>libpq</application> to be built thread-safe
5283
on Windows (Dave Page)
5289
Allow IPv6 connections to be used on Windows (Andrew)
5295
Add Server Administration documentation about I/O subsystem
5302
Move private declarations from <filename>gist.h</filename> to
5303
<filename>gist_private.h</filename> (Neil)
5307
In previous releases, <filename>gist.h</> contained both the
5308
public GiST API (intended for use by authors of GiST index
5309
implementations) as well as some private declarations used by
5310
the implementation of GiST itself. The latter have been moved
5311
to a separate file, <filename>gist_private.h</>. Most GiST
5312
index implementations should be unaffected.
5318
Overhaul GiST memory management (Neil)
5322
GiST methods are now always invoked in a short-lived memory
5323
context. Therefore, memory allocated via <function>palloc()</>
5324
will be reclaimed automatically, so GiST index implementations
5325
do not need to manually release allocated memory via
5326
<function>pfree()</>.
5334
<title>Contrib Changes</title>
5339
Add <filename>/contrib/pg_buffercache</> contrib module (Mark
5343
This displays the contents of the buffer cache, for debugging and
5344
performance tuning purposes.
5350
Remove <filename>/contrib/array</> because it is obsolete (Tom)
5356
Clean up the <filename>/contrib/lo</> module (Tom)
5362
Move <filename>/contrib/findoidjoins</> to
5363
<filename>/src/tools</> (Tom)
5369
Remove the <literal><<</>, <literal>>></>,
5370
<literal>&<</>, and <literal>&></> operators from
5371
<filename>/contrib/cube</>
5374
These operators were not useful.
5380
Improve <filename>/contrib/btree_gist</> (Janko Richter)
5386
Improve <filename>/contrib/pgbench</> (Tomoaki Sato, Tatsuo)
5389
There is now a facility for testing with SQL command scripts given
5390
by the user, instead of only a hard-wired command sequence.
5396
Improve <filename>/contrib/pgcrypto</> (Marko Kreen)
5403
Implementation of OpenPGP symmetric-key and public-key encryption
5406
Both RSA and Elgamal public-key algorithms are supported.
5412
Stand alone build: include SHA256/384/512 hashes, Fortuna PRNG
5418
OpenSSL build: support 3DES, use internal AES with OpenSSL < 0.9.7
5424
Take build parameters (OpenSSL, zlib) from <filename>configure</> result
5427
There is no need to edit the <filename>Makefile</> anymore.
5433
Remove support for <filename>libmhash</> and <filename>libmcrypt</>