~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-updates

« back to all changes in this revision

Viewing changes to doc/src/sgml/release-9.1.sgml

  • Committer: Package Import Robot
  • Author(s): Jamie Strandboge
  • Date: 2012-08-16 17:06:20 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20120816170620-jo0bdsnqqc4u5iqf
Tags: 9.1.5-0ubuntu11.10
* New upstream bug fix/security release:
 - Prevent access to external files/URLs via XML entity references
   (Noah Misch, Tom Lane)
   xml_parse() would attempt to fetch external files or URLs as needed
   to resolve DTD and entity references in an XML value, thus allowing
   unprivileged database users to attempt to fetch data with the
   privileges of the database server. While the external data wouldn't
   get returned directly to the user, portions of it could be exposed
   in error messages if the data didn't parse as valid XML; and in any
   case the mere ability to check existence of a file might be useful
   to an attacker. (CVE-2012-3489)
 - Prevent access to external files/URLs via "contrib/xml2"'s
   xslt_process() (Peter Eisentraut)
   libxslt offers the ability to read and write both files and URLs
   through stylesheet commands, thus allowing unprivileged database
   users to both read and write data with the privileges of the
   database server. Disable that through proper use of libxslt's
   security options. (CVE-2012-3488)
   Also, remove xslt_process()'s ability to fetch documents and
   stylesheets from external files/URLs. While this was a documented
   "feature", it was long regarded as a bad idea. The fix for
   CVE-2012-3489 broke that capability, and rather than expend effort
   on trying to fix it, we're just going to summarily remove it.
 - Prevent too-early recycling of btree index pages (Noah Misch)
   When we allowed read-only transactions to skip assigning XIDs, we
   introduced the possibility that a deleted btree page could be
   recycled while a read-only transaction was still in flight to it.
   This would result in incorrect index search results. The
   probability of such an error occurring in the field seems very low
   because of the timing requirements, but nonetheless it should be
   fixed.
 - Fix crash-safety bug with newly-created-or-reset sequences (Tom
   Lane)
   If "ALTER SEQUENCE" was executed on a freshly created or reset
   sequence, and then precisely one nextval() call was made on it, and
   then the server crashed, WAL replay would restore the sequence to a
   state in which it appeared that no nextval() had been done, thus
   allowing the first sequence value to be returned again by the next
   nextval() call. In particular this could manifest for serial
   columns, since creation of a serial column's sequence includes an
   "ALTER SEQUENCE OWNED BY" step.
 - Fix race condition in enum-type value comparisons (Robert Haas, Tom
   Lane)
   Comparisons could fail when encountering an enum value added since
   the current query started.
 - Fix txid_current() to report the correct epoch when not in hot
   standby (Heikki Linnakangas)
   This fixes a regression introduced in the previous minor release.
 - Prevent selection of unsuitable replication connections as the
   synchronous standby (Fujii Masao)
   The master might improperly choose pseudo-servers such as
   pg_receivexlog or pg_basebackup as the synchronous standby, and
   then wait indefinitely for them.
 - Fix bug in startup of Hot Standby when a master transaction has
   many subtransactions (Andres Freund)
   This mistake led to failures reported as "out-of-order XID
   insertion in KnownAssignedXids".
 - Ensure the "backup_label" file is fsync'd after pg_start_backup()
   (Dave Kerr)
 - Fix timeout handling in walsender processes (Tom Lane)
   WAL sender background processes neglected to establish a SIGALRM
   handler, meaning they would wait forever in some corner cases where
   a timeout ought to happen.
 - Wake walsenders after each background flush by walwriter (Andres
   Freund, Simon Riggs)
   This greatly reduces replication delay when the workload contains
   only asynchronously-committed transactions.
 - Fix LISTEN/NOTIFY to cope better with I/O problems, such as out of
   disk space (Tom Lane)
   After a write failure, all subsequent attempts to send more NOTIFY
   messages would fail with messages like "Could not read from file
   "pg_notify/nnnn" at offset nnnnn: Success".
 - Only allow autovacuum to be auto-canceled by a directly blocked
   process (Tom Lane)
   The original coding could allow inconsistent behavior in some
   cases; in particular, an autovacuum could get canceled after less
   than deadlock_timeout grace period.
 - Improve logging of autovacuum cancels (Robert Haas)
 - Fix log collector so that log_truncate_on_rotation works during the
   very first log rotation after server start (Tom Lane)
 - Fix WITH attached to a nested set operation
   (UNION/INTERSECT/EXCEPT) (Tom Lane)
 - Ensure that a whole-row reference to a subquery doesn't include any
   extra GROUP BY or ORDER BY columns (Tom Lane)
 - Fix dependencies generated during ALTER TABLE ... ADD CONSTRAINT
   USING INDEX (Tom Lane)
   This command left behind a redundant pg_depend entry for the index,
   which could confuse later operations, notably ALTER TABLE ... ALTER
   COLUMN TYPE on one of the indexed columns.
 - Fix "REASSIGN OWNED" to work on extensions (Alvaro Herrera)
 - Disallow copying whole-row references in CHECK constraints and
   index definitions during "CREATE TABLE" (Tom Lane)
   This situation can arise in "CREATE TABLE" with LIKE or INHERITS.
   The copied whole-row variable was incorrectly labeled with the row
   type of the original table not the new one. Rejecting the case
   seems reasonable for LIKE, since the row types might well diverge
   later. For INHERITS we should ideally allow it, with an implicit
   coercion to the parent table's row type; but that will require more
   work than seems safe to back-patch.
 - Fix memory leak in ARRAY(SELECT ...) subqueries (Heikki
   Linnakangas, Tom Lane)
 - Fix planner to pass correct collation to operator selectivity
   estimators (Tom Lane)
   This was not previously required by any core selectivity estimation
   function, but third-party code might need it.
 - Fix extraction of common prefixes from regular expressions (Tom
   Lane)
   The code could get confused by quantified parenthesized
   subexpressions, such as ^(foo)?bar. This would lead to incorrect
   index optimization of searches for such patterns.
 - Fix bugs with parsing signed "hh":"mm" and "hh":"mm":"ss" fields in
   interval constants (Amit Kapila, Tom Lane)
 - Fix pg_dump to better handle views containing partial GROUP BY
   lists (Tom Lane)
   A view that lists only a primary key column in GROUP BY, but uses
   other table columns as if they were grouped, gets marked as
   depending on the primary key. Improper handling of such primary key
   dependencies in pg_dump resulted in poorly-ordered dumps, which at
   best would be inefficient to restore and at worst could result in
   outright failure of a parallel pg_restore run.
 - In PL/Perl, avoid setting UTF8 flag when in SQL_ASCII encoding
   (Alex Hunsaker, Kyotaro Horiguchi, Alvaro Herrera)
 - Use Postgres' encoding conversion functions, not Python's, when
   converting a Python Unicode string to the server encoding in
   PL/Python (Jan Urbanski)
   This avoids some corner-case problems, notably that Python doesn't
   support all the encodings Postgres does. A notable functional
   change is that if the server encoding is SQL_ASCII, you will get
   the UTF-8 representation of the string; formerly, any non-ASCII
   characters in the string would result in an error.
 - Fix mapping of PostgreSQL encodings to Python encodings in
   PL/Python (Jan Urbanski)
 - Report errors properly in "contrib/xml2"'s xslt_process() (Tom
   Lane)
 - Update time zone data files to tzdata release 2012e for DST law
   changes in Morocco and Tokelau

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<!-- doc/src/sgml/release-9.1.sgml -->
2
2
<!-- See header comment in release.sgml about typical markup -->
3
3
 
 
4
 <sect1 id="release-9-1-5">
 
5
  <title>Release 9.1.5</title>
 
6
 
 
7
  <note>
 
8
  <title>Release Date</title>
 
9
  <simpara>2012-08-17</simpara>
 
10
  </note>
 
11
 
 
12
  <para>
 
13
   This release contains a variety of fixes from 9.1.4.
 
14
   For information about new features in the 9.1 major release, see
 
15
   <xref linkend="release-9-1">.
 
16
  </para>
 
17
 
 
18
  <sect2>
 
19
   <title>Migration to Version 9.1.5</title>
 
20
 
 
21
   <para>
 
22
    A dump/restore is not required for those running 9.1.X.
 
23
   </para>
 
24
 
 
25
   <para>
 
26
    However, if you are upgrading from a version earlier than 9.1.4,
 
27
    see the release notes for 9.1.4.
 
28
   </para>
 
29
 
 
30
  </sect2>
 
31
 
 
32
  <sect2>
 
33
   <title>Changes</title>
 
34
 
 
35
   <itemizedlist>
 
36
 
 
37
    <listitem>
 
38
     <para>
 
39
      Prevent access to external files/URLs via XML entity references
 
40
      (Noah Misch, Tom Lane)
 
41
     </para>
 
42
 
 
43
     <para>
 
44
      <function>xml_parse()</> would attempt to fetch external files or
 
45
      URLs as needed to resolve DTD and entity references in an XML value,
 
46
      thus allowing unprivileged database users to attempt to fetch data
 
47
      with the privileges of the database server.  While the external data
 
48
      wouldn't get returned directly to the user, portions of it could be
 
49
      exposed in error messages if the data didn't parse as valid XML; and
 
50
      in any case the mere ability to check existence of a file might be
 
51
      useful to an attacker.  (CVE-2012-3489)
 
52
     </para>
 
53
    </listitem>
 
54
 
 
55
    <listitem>
 
56
     <para>
 
57
      Prevent access to external files/URLs via <filename>contrib/xml2</>'s
 
58
      <function>xslt_process()</> (Peter Eisentraut)
 
59
     </para>
 
60
 
 
61
     <para>
 
62
      <application>libxslt</> offers the ability to read and write both
 
63
      files and URLs through stylesheet commands, thus allowing
 
64
      unprivileged database users to both read and write data with the
 
65
      privileges of the database server.  Disable that through proper use
 
66
      of <application>libxslt</>'s security options.  (CVE-2012-3488)
 
67
     </para>
 
68
 
 
69
     <para>
 
70
      Also, remove <function>xslt_process()</>'s ability to fetch documents
 
71
      and stylesheets from external files/URLs.  While this was a
 
72
      documented <quote>feature</>, it was long regarded as a bad idea.
 
73
      The fix for CVE-2012-3489 broke that capability, and rather than
 
74
      expend effort on trying to fix it, we're just going to summarily
 
75
      remove it.
 
76
     </para>
 
77
    </listitem>
 
78
 
 
79
    <listitem>
 
80
     <para>
 
81
      Prevent too-early recycling of btree index pages (Noah Misch)
 
82
     </para>
 
83
 
 
84
     <para>
 
85
      When we allowed read-only transactions to skip assigning XIDs, we
 
86
      introduced the possibility that a deleted btree page could be
 
87
      recycled while a read-only transaction was still in flight to it.
 
88
      This would result in incorrect index search results.  The probability
 
89
      of such an error occurring in the field seems very low because of the
 
90
      timing requirements, but nonetheless it should be fixed.
 
91
     </para>
 
92
    </listitem>
 
93
 
 
94
    <listitem>
 
95
     <para>
 
96
      Fix crash-safety bug with newly-created-or-reset sequences (Tom Lane)
 
97
     </para>
 
98
 
 
99
     <para>
 
100
      If <command>ALTER SEQUENCE</> was executed on a freshly created or
 
101
      reset sequence, and then precisely one <function>nextval()</> call
 
102
      was made on it, and then the server crashed, WAL replay would restore
 
103
      the sequence to a state in which it appeared that no
 
104
      <function>nextval()</> had been done, thus allowing the first
 
105
      sequence value to be returned again by the next
 
106
      <function>nextval()</> call.  In particular this could manifest for
 
107
      <type>serial</> columns, since creation of a serial column's sequence
 
108
      includes an <command>ALTER SEQUENCE OWNED BY</> step.
 
109
     </para>
 
110
    </listitem>
 
111
 
 
112
    <listitem>
 
113
     <para>
 
114
      Fix race condition in <literal>enum</>-type value comparisons (Robert
 
115
      Haas, Tom Lane)
 
116
     </para>
 
117
 
 
118
     <para>
 
119
      Comparisons could fail when encountering an enum value added since
 
120
      the current query started.
 
121
     </para>
 
122
    </listitem>
 
123
 
 
124
    <listitem>
 
125
     <para>
 
126
      Fix <function>txid_current()</> to report the correct epoch when not
 
127
      in hot standby (Heikki Linnakangas)
 
128
     </para>
 
129
 
 
130
     <para>
 
131
      This fixes a regression introduced in the previous minor release.
 
132
     </para>
 
133
    </listitem>
 
134
 
 
135
    <listitem>
 
136
     <para>
 
137
      Prevent selection of unsuitable replication connections as
 
138
      the synchronous standby (Fujii Masao)
 
139
     </para>
 
140
 
 
141
     <para>
 
142
      The master might improperly choose pseudo-servers such as
 
143
      <application>pg_receivexlog</> or <application>pg_basebackup</>
 
144
      as the synchronous standby, and then wait indefinitely for them.
 
145
     </para>
 
146
    </listitem>
 
147
 
 
148
    <listitem>
 
149
     <para>
 
150
      Fix bug in startup of Hot Standby when a master transaction has many
 
151
      subtransactions (Andres Freund)
 
152
     </para>
 
153
 
 
154
     <para>
 
155
      This mistake led to failures reported as <quote>out-of-order XID
 
156
      insertion in KnownAssignedXids</>.
 
157
     </para>
 
158
    </listitem>
 
159
 
 
160
    <listitem>
 
161
     <para>
 
162
      Ensure the <filename>backup_label</> file is fsync'd after
 
163
      <function>pg_start_backup()</> (Dave Kerr)
 
164
     </para>
 
165
    </listitem>
 
166
 
 
167
    <listitem>
 
168
     <para>
 
169
      Fix timeout handling in walsender processes (Tom Lane)
 
170
     </para>
 
171
 
 
172
     <para>
 
173
      WAL sender background processes neglected to establish a
 
174
      <systemitem>SIGALRM</> handler, meaning they would wait forever in
 
175
      some corner cases where a timeout ought to happen.
 
176
     </para>
 
177
    </listitem>
 
178
 
 
179
    <listitem>
 
180
     <para>
 
181
      Wake walsenders after each background flush by walwriter (Andres
 
182
      Freund, Simon Riggs)
 
183
     </para>
 
184
 
 
185
     <para>
 
186
      This greatly reduces replication delay when the workload contains
 
187
      only asynchronously-committed transactions.
 
188
     </para>
 
189
    </listitem>
 
190
 
 
191
    <listitem>
 
192
     <para>
 
193
      Fix <literal>LISTEN</>/<literal>NOTIFY</> to cope better with I/O
 
194
      problems, such as out of disk space (Tom Lane)
 
195
     </para>
 
196
 
 
197
     <para>
 
198
      After a write failure, all subsequent attempts to send more
 
199
      <literal>NOTIFY</> messages would fail with messages like
 
200
      <quote>Could not read from file "pg_notify/<replaceable>nnnn</>" at
 
201
      offset <replaceable>nnnnn</>: Success</quote>.
 
202
     </para>
 
203
    </listitem>
 
204
 
 
205
    <listitem>
 
206
     <para>
 
207
      Only allow autovacuum to be auto-canceled by a directly blocked
 
208
      process (Tom Lane)
 
209
     </para>
 
210
 
 
211
     <para>
 
212
      The original coding could allow inconsistent behavior in some cases;
 
213
      in particular, an autovacuum could get canceled after less than
 
214
      <literal>deadlock_timeout</> grace period.
 
215
     </para>
 
216
    </listitem>
 
217
 
 
218
    <listitem>
 
219
     <para>
 
220
      Improve logging of autovacuum cancels (Robert Haas)
 
221
     </para>
 
222
    </listitem>
 
223
 
 
224
    <listitem>
 
225
     <para>
 
226
      Fix log collector so that <literal>log_truncate_on_rotation</> works
 
227
      during the very first log rotation after server start (Tom Lane)
 
228
     </para>
 
229
    </listitem>
 
230
 
 
231
    <listitem>
 
232
     <para>
 
233
      Fix <literal>WITH</> attached to a nested set operation
 
234
      (<literal>UNION</>/<literal>INTERSECT</>/<literal>EXCEPT</>)
 
235
      (Tom Lane)
 
236
     </para>
 
237
    </listitem>
 
238
 
 
239
    <listitem>
 
240
     <para>
 
241
      Ensure that a whole-row reference to a subquery doesn't include any
 
242
      extra <literal>GROUP BY</> or <literal>ORDER BY</> columns (Tom Lane)
 
243
     </para>
 
244
    </listitem>
 
245
 
 
246
    <listitem>
 
247
     <para>
 
248
      Fix dependencies generated during <literal>ALTER TABLE ... ADD
 
249
      CONSTRAINT USING INDEX</> (Tom Lane)
 
250
     </para>
 
251
 
 
252
     <para>
 
253
      This command left behind a redundant <structname>pg_depend</> entry
 
254
      for the index, which could confuse later operations, notably
 
255
      <literal>ALTER TABLE ... ALTER COLUMN TYPE</> on one of the indexed
 
256
      columns.
 
257
     </para>
 
258
    </listitem>
 
259
 
 
260
    <listitem>
 
261
     <para>
 
262
      Fix <command>REASSIGN OWNED</> to work on extensions (Alvaro Herrera)
 
263
     </para>
 
264
    </listitem>
 
265
 
 
266
    <listitem>
 
267
     <para>
 
268
      Disallow copying whole-row references in <literal>CHECK</>
 
269
      constraints and index definitions during <command>CREATE TABLE</>
 
270
      (Tom Lane)
 
271
     </para>
 
272
 
 
273
     <para>
 
274
      This situation can arise in <command>CREATE TABLE</> with
 
275
      <literal>LIKE</> or <literal>INHERITS</>.  The copied whole-row
 
276
      variable was incorrectly labeled with the row type of the original
 
277
      table not the new one.  Rejecting the case seems reasonable for
 
278
      <literal>LIKE</>, since the row types might well diverge later.  For
 
279
      <literal>INHERITS</> we should ideally allow it, with an implicit
 
280
      coercion to the parent table's row type; but that will require more
 
281
      work than seems safe to back-patch.
 
282
     </para>
 
283
    </listitem>
 
284
 
 
285
    <listitem>
 
286
     <para>
 
287
      Fix memory leak in <literal>ARRAY(SELECT ...)</> subqueries (Heikki
 
288
      Linnakangas, Tom Lane)
 
289
     </para>
 
290
    </listitem>
 
291
 
 
292
    <listitem>
 
293
     <para>
 
294
      Fix planner to pass correct collation to operator selectivity
 
295
      estimators (Tom Lane)
 
296
     </para>
 
297
 
 
298
     <para>
 
299
      This was not previously required by any core selectivity estimation
 
300
      function, but third-party code might need it.
 
301
     </para>
 
302
    </listitem>
 
303
 
 
304
    <listitem>
 
305
     <para>
 
306
      Fix extraction of common prefixes from regular expressions (Tom Lane)
 
307
     </para>
 
308
 
 
309
     <para>
 
310
      The code could get confused by quantified parenthesized
 
311
      subexpressions, such as <literal>^(foo)?bar</>.  This would lead to
 
312
      incorrect index optimization of searches for such patterns.
 
313
     </para>
 
314
    </listitem>
 
315
 
 
316
    <listitem>
 
317
     <para>
 
318
      Fix bugs with parsing signed
 
319
      <replaceable>hh</><literal>:</><replaceable>mm</> and
 
320
      <replaceable>hh</><literal>:</><replaceable>mm</><literal>:</><replaceable>ss</>
 
321
      fields in <type>interval</> constants (Amit Kapila, Tom Lane)
 
322
     </para>
 
323
    </listitem>
 
324
 
 
325
    <listitem>
 
326
     <para>
 
327
      Fix <application>pg_dump</> to better handle views containing partial
 
328
      <literal>GROUP BY</> lists (Tom Lane)
 
329
     </para>
 
330
 
 
331
     <para>
 
332
      A view that lists only a primary key column in <literal>GROUP BY</>,
 
333
      but uses other table columns as if they were grouped, gets marked as
 
334
      depending on the primary key.  Improper handling of such primary key
 
335
      dependencies in <application>pg_dump</> resulted in poorly-ordered
 
336
      dumps, which at best would be inefficient to restore and at worst
 
337
      could result in outright failure of a parallel
 
338
      <application>pg_restore</> run.
 
339
     </para>
 
340
    </listitem>
 
341
 
 
342
    <listitem>
 
343
     <para>
 
344
      In PL/Perl, avoid setting UTF8 flag when in SQL_ASCII encoding
 
345
      (Alex Hunsaker, Kyotaro Horiguchi, Alvaro Herrera)
 
346
     </para>
 
347
    </listitem>
 
348
 
 
349
    <listitem>
 
350
     <para>
 
351
      Use Postgres' encoding conversion functions, not Python's, when
 
352
      converting a Python Unicode string to the server encoding in
 
353
      PL/Python (Jan Urbanski)
 
354
     </para>
 
355
 
 
356
     <para>
 
357
      This avoids some corner-case problems, notably that Python doesn't
 
358
      support all the encodings Postgres does.  A notable functional change
 
359
      is that if the server encoding is SQL_ASCII, you will get the UTF-8
 
360
      representation of the string; formerly, any non-ASCII characters in
 
361
      the string would result in an error.
 
362
     </para>
 
363
    </listitem>
 
364
 
 
365
    <listitem>
 
366
     <para>
 
367
      Fix mapping of PostgreSQL encodings to Python encodings in PL/Python
 
368
      (Jan Urbanski)
 
369
     </para>
 
370
    </listitem>
 
371
 
 
372
    <listitem>
 
373
     <para>
 
374
      Report errors properly in <filename>contrib/xml2</>'s
 
375
      <function>xslt_process()</> (Tom Lane)
 
376
     </para>
 
377
    </listitem>
 
378
 
 
379
    <listitem>
 
380
     <para>
 
381
      Update time zone data files to <application>tzdata</> release 2012e
 
382
      for DST law changes in Morocco and Tokelau
 
383
     </para>
 
384
    </listitem>
 
385
 
 
386
   </itemizedlist>
 
387
 
 
388
  </sect2>
 
389
 </sect1>
 
390
 
4
391
 <sect1 id="release-9-1-4">
5
392
  <title>Release 9.1.4</title>
6
393