lp://staging/ubuntu/karmic-proposed/postgresql-8.4

Created by James Westby and last modified
Get this branch:
bzr branch lp://staging/ubuntu/karmic-proposed/postgresql-8.4
Members of Ubuntu branches can upload to this branch. Log in for directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Ubuntu branches
Review team:
Ubuntu Development Team
Status:
Mature

Recent revisions

11. By Martin Pitt

* New upstream bug fix release: (LP: #693157)
  - Force the default wal_sync_method to be fdatasync on Linux.
    The default on Linux has actually been fdatasync for many years,
    but recent kernel changes caused PostgreSQL to choose open_datasync
    instead. This choice did not result in any performance improvement,
    and caused outright failures on certain filesystems, notably ext4
    with the data=journal mount option.
  - Fix assorted bugs in WAL replay logic for GIN indexes.
    This could result in "bad buffer id: 0" failures or corruption of
    index contents during replication.
  - Fix recovery from base backup when the starting checkpoint WAL
    record is not in the same WAL segment as its redo point.
  - Fix persistent slowdown of autovacuum workers when multiple workers
    remain active for a long time.
    The effective vacuum_cost_limit for an autovacuum worker could drop
    to nearly zero if it processed enough tables, causing it to run
    extremely slowly.
  - Add support for detecting register-stack overrun on IA64.
    The IA64 architecture has two hardware stacks. Full prevention of
    stack-overrun failures requires checking both.
  - Add a check for stack overflow in copyObject().
    Certain code paths could crash due to stack overflow given a
    sufficiently complex query.
  - Fix detection of page splits in temporary GiST indexes.
    It is possible to have a "concurrent" page split in a temporary
    index, if for example there is an open cursor scanning the index
    when an insertion is done. GiST failed to detect this case and
    hence could deliver wrong results when execution of the cursor
    continued.
  - Fix error checking during early connection processing.
    The check for too many child processes was skipped in some cases,
    possibly leading to postmaster crash when attempting to add the new
    child process to fixed-size arrays.
  - Improve efficiency of window functions.
    Certain cases where a large number of tuples needed to be read in
    advance, but work_mem was large enough to allow them all to be held
    in memory, were unexpectedly slow. percent_rank(), cume_dist() and
    ntile() in particular were subject to this problem.
  - Avoid memory leakage while "ANALYZE"'ing complex index expressions.
  - Ensure an index that uses a whole-row Var still depends on its
    table.
    An index declared like create index i on t (foo(t.-)) would not
    automatically get dropped when its table was dropped.
  - Do not "inline" a SQL function with multiple OUT parameters.
    This avoids a possible crash due to loss of information about the
    expected result rowtype.
  - Behave correctly if ORDER BY, LIMIT, FOR UPDATE, or WITH is
    attached to the VALUES part of INSERT ... VALUES.
  - Fix constant-folding of COALESCE() expressions.
    The planner would sometimes attempt to evaluate sub-expressions
    that in fact could never be reached, possibly leading to unexpected
    errors.
  - Fix postmaster crash when connection acceptance (accept() or one of
    the calls made immediately after it) fails, and the postmaster was
    compiled with GSSAPI support.
  - Fix missed unlink of temporary files when log_temp_files is active.
    If an error occurred while attempting to emit the log message, the
    unlink was not done, resulting in accumulation of temp files.
  - Add print functionality for InhRelation nodes.
    This avoids a failure when debug_print_parse is enabled and certain
    types of query are executed.
  - Fix incorrect calculation of distance from a point to a horizontal
    line segment.
    This bug affected several different geometric distance-measurement
    operators.
  - Fix incorrect calculation of transaction status in ecpg.
  - Fix PL/pgSQL's handling of "simple" expressions to not fail in
    recursion or error-recovery cases.
  - Fix PL/Python's handling of set-returning functions.
    Attempts to call SPI functions within the iterator generating a set
    result would fail.
  - Fix bug in "contrib/cube"'s GiST picksplit algorithm.
    This could result in considerable inefficiency, though not actually
    incorrect answers, in a GiST index on a cube column. If you have
    such an index, consider "REINDEX"ing it after installing this
    update.
  - Don't emit "identifier will be truncated" notices in
    "contrib/dblink" except when creating new connections.
  - Fix potential coredump on missing public key in "contrib/pgcrypto".
  - Fix memory leak in "contrib/xml2"'s XPath query functions.

10. By Martin Pitt

* New upstream security/bug fix release:
  - Enforce restrictions in plperl using an opmask applied to the whole
    interpreter, instead of using "Safe.pm".
    Recent developments have convinced us that "Safe.pm" is too
    insecure to rely on for making plperl trustable. This change
    removes use of "Safe.pm" altogether, in favor of using a separate
    interpreter with an opcode mask that is always applied. Pleasant
    side effects of the change include that it is now possible to use
    Perl's strict pragma in a natural way in plperl, and that Perl's $a
    and $b variables work as expected in sort routines, and that
    function compilation is significantly faster. (CVE-2010-1169)
  - Prevent PL/Tcl from executing untrustworthy code from pltcl_modules.
    PL/Tcl's feature for autoloading Tcl code from a database table
    could be exploited for trojan-horse attacks, because there was no
    restriction on who could create or insert into that table. This
    change disables the feature unless pltcl_modules is owned by a
    superuser. (However, the permissions on the table are not checked,
    so installations that really need a less-than-secure modules table
    can still grant suitable privileges to trusted non-superusers.)
    Also, prevent loading code into the unrestricted "normal" Tcl
    interpreter unless we are really going to execute a pltclu
    function. (CVE-2010-1170)
  - Fix data corruption during WAL replay of ALTER ... SET TABLESPACE.
    When archive_mode is on, ALTER ... SET TABLESPACE generates a WAL
    record whose replay logic was incorrect. It could write the data to
    the wrong place, leading to possibly-unrecoverable data corruption.
    Data corruption would be observed on standby slaves, and could
    occur on the master as well if a database crash and recovery
    occurred after committing the ALTER and before the next checkpoint.
  - Fix possible crash if a cache reset message is received during
    rebuild of a relcache entry.
    This error was introduced in 8.4.3 while fixing a related failure.
  - Apply per-function GUC settings while running the language
    validator for the function. This avoids failures if the function's code
    is invalid without the setting; an example is that SQL functions may not
    parse if the search_path is not correct.
  - Do constraint exclusion for inherited "UPDATE" and "DELETE" target
    tables when constraint_exclusion = partition.
    Due to an oversight, this setting previously only caused constraint
    exclusion to be checked in "SELECT" commands.
  - Do not allow an unprivileged user to reset superuser-only parameter
    settings.
    Previously, if an unprivileged user ran ALTER USER ... RESET ALL
    for himself, or ALTER DATABASE ... RESET ALL for a database he
    owns, this would remove all special parameter settings for the user
    or database, even ones that are only supposed to be changeable by a
    superuser. Now, the "ALTER" will only remove the parameters that
    the user has permission to change.
  - Avoid possible crash during backend shutdown if shutdown occurs
    when a CONTEXT addition would be made to log entries.
    In some cases the context-printing function would fail because the
    current transaction had already been rolled back when it came time
    to print a log message.
  - Fix erroneous handling of %r parameter in recovery_end_command.
    The value always came out zero.
  - Ensure the archiver process responds to changes in archive_command
    as soon as possible.
  - Fix pl/pgsql's CASE statement to not fail when the case expression
    is a query that returns no rows.
  - Update pl/perl's "ppport.h" for modern Perl versions.
  - Fix assorted memory leaks in pl/python.
  - Handle empty-string connect parameters properly in ecpg.
  - Prevent infinite recursion in psql when expanding a variable that
    refers to itself.
  - Fix psql's \copy to not add spaces around a dot within \copy
    (select ...).
    Addition of spaces around the decimal point in a numeric literal
    would result in a syntax error.
  - Avoid formatting failure in psql when running in a locale context
    that doesn't match the client_encoding.
  - Fix unnecessary "GIN indexes do not support whole-index scans"
    errors for unsatisfiable queries using "contrib/intarray" operators.
  - Ensure that "contrib/pgstattuple" functions respond to cancel
    interrupts promptly.

9. By Martin Pitt

* New upstream bug fix release: (LP: #557408)
  - Add new configuration parameter ssl_renegotiation_limit to control
    how often we do session key renegotiation for an SSL connection.
    This can be set to zero to disable renegotiation completely, which
    may be required if a broken SSL library is used. In particular,
    some vendors are shipping stopgap patches for CVE-2009-3555 that
    cause renegotiation attempts to fail.
  - Fix possible deadlock during backend startup.
  - Fix possible crashes due to not handling errors during relcache
    reload cleanly.
  - Fix possible crash due to use of dangling pointer to a cached plan.
  - Fix possible crash due to overenthusiastic invalidation of cached
    plan for "ROLLBACK".
  - Fix possible crashes when trying to recover from a failure in
    subtransaction start.
  - Fix server memory leak associated with use of savepoints and a
    client encoding different from server's encoding.
  - Fix incorrect WAL data emitted during end-of-recovery cleanup of a
    GIST index page split.
  - Fix bug in WAL redo cleanup method for GIN indexes.
  - Fix incorrect comparison of scan key in GIN index search.
  - Make substring() for bit types treat any negative length as meaning
    "all the rest of the string". The previous coding treated only -1 that
    way, and would produce an invalid result value for other negative
    values, possibly leading to a crash (CVE-2010-0442).
  - Fix integer-to-bit-string conversions to handle the first
    fractional byte correctly when the output bit width is wider than
    the given integer by something other than a multiple of 8 bits.
  - Fix some cases of pathologically slow regular expression matching.
  - Fix bug occurring when trying to inline a SQL function that returns
    a set of a composite type that contains dropped columns.
  - Fix bug with trying to update a field of an element of a
    composite-type array column.
  - Avoid failure when "EXPLAIN" has to print a FieldStore or
    assignment ArrayRef expression.
    These cases can arise now that "EXPLAIN VERBOSE" tries to print
    plan node target lists.
  - Avoid an unnecessary coercion failure in some cases where an
    undecorated literal string appears in a subquery within
    "UNION"/"INTERSECT"/"EXCEPT".
    This fixes a regression for some cases that worked before 8.4.
  - Avoid undesirable rowtype compatibility check failures in some
    cases where a whole-row Var has a rowtype that contains dropped
    columns.
  - Fix the STOP WAL LOCATION entry in backup history files to report
    the next WAL segment's name when the end location is exactly at a
    segment boundary.
  - Always pass the catalog ID to an option validator function
    specified in "CREATE FOREIGN DATA WRAPPER".
  - Fix some more cases of temporary-file leakage.
    This corrects a problem introduced in the previous minor release.
    One case that failed is when a plpgsql function returning set is
    called within another function's exception handler.
  - Add support for doing FULL JOIN ON FALSE.
    This prevents a regression from pre-8.4 releases for some queries
    that can now be simplified to a constant-false join condition.
  - Improve constraint exclusion processing of boolean-variable cases,
    in particular make it possible to exclude a partition that has a
    "bool_column = false" constraint.
  - Prevent treating an INOUT cast as representing binary compatibility.
  - Include column name in the message when warning about inability to
    grant or revoke column-level privileges.
    This is more useful than before and helps to prevent confusion when
    a "REVOKE" generates multiple messages, which formerly appeared to
    be duplicates.
  - When reading "pg_hba.conf" and related files, do not treat
    @something as a file inclusion request if the @ appears inside
    quote marks; also, never treat @ by itself as a file inclusion
    request.
    This prevents erratic behavior if a role or database name starts
    with @. If you need to include a file whose path name contains
    spaces, you can still do so, but you must write @"/path to/file"
    rather than putting the quotes around the whole construct.
  - Prevent infinite loop on some platforms if a directory is named as
    an inclusion target in "pg_hba.conf" and related files.
  - Fix possible infinite loop if SSL_read or SSL_write fails without
    setting errno.
    This is reportedly possible with some Windows versions of openssl.
  - Disallow GSSAPI authentication on local connections, since it
    requires a hostname to function correctly.
  - Protect ecpg against applications freeing strings unexpectedly.
  - Make ecpg report the proper SQLSTATE if the connection disappears.
  - Fix translation of cell contents in psql \d output.
  - Fix psql's numericlocale option to not format strings it shouldn't
    in latex and troff output formats.
  - Fix a small per-query memory leak in psql.
  - Make psql return the correct exit status (3) when ON_ERROR_STOP and
    --single-transaction are both specified and an error occurs during
    the implied "COMMIT".
  - Fix pg_dump's output of permissions for foreign servers.
  - Fix possible crash in parallel pg_restore due to out-of-range
    dependency IDs.
  - Fix plpgsql failure in one case where a composite column is set to
    NULL.
  - Fix possible failure when calling PL/Perl functions from PL/PerlU
    or vice versa.
  - Add volatile markings in PL/Python to avoid possible
    compiler-specific misbehavior>
  - Ensure PL/Tcl initializes the Tcl interpreter.
    The only known symptom of this oversight is that the Tcl clock
    command misbehaves if using Tcl 8.5 or later.
  - Prevent ExecutorEnd from being run on portals created within a
    failed transaction or subtransaction.
    This is known to cause issues when using "contrib/auto_explain".
  - Prevent crash in "contrib/dblink" when too many key columns are
    specified to a dblink_build_sql_- function.
  - Allow zero-dimensional arrays in "contrib/ltree" operations.
    This case was formerly rejected as an error, but it's more
    convenient to treat it the same as a zero-element array. In
    particular this avoids unnecessary failures when an ltree operation
    is applied to the result of ARRAY(SELECT ...) and the sub-select
    returns no rows.
  - Fix assorted crashes in "contrib/xml2" caused by sloppy memory
    management.

8. By Martin Pitt

* New upstream security/bug fix release: (LP: #496923)
  - Protect against indirect security threats caused by index functions
    changing session-local state. This change prevents allegedly-immutable
    index functions from possibly subverting a superuser's session
    (CVE-2009-4136).
  - Reject SSL certificates containing an embedded null byte in the
    common name (CN) field. This prevents unintended matching of a
    certificate to a server or client name during SSL validation
    (CVE-2009-4034).
  - Fix hash index corruption. The 8.4 change that made hash indexes keep
    entries sorted by hash value failed to update the bucket splitting and
    compaction routines to preserve the ordering. So application of either
    of those operations could lead to permanent corruption of an index, in
    the sense that searches might fail to find entries that are present. To
    deal with this, it is recommended to REINDEX any hash indexes you may
    have after installing this update.
  - Fix possible crash during backend-startup-time cache initialization.
  - Avoid crash on empty thesaurus dictionary.
  - Prevent signals from interrupting VACUUM at unsafe times.
  - Fix possible crash due to integer overflow in hash table size
    calculation.
  - Fix crash if a DROP is attempted on an internally-dependent object.
  - Fix very rare crash in inet/cidr comparisons.
  - Ensure that shared tuple-level locks held by prepared transactions
    are not ignored.
  - Fix premature drop of temporary files used for a cursor that is
    accessed within a subtransaction.
  - Fix memory leak in syslogger process when rotating to a new CSV
    logfile.
  - Fix memory leak in postmaster when re-parsing "pg_hba.conf".
  - Make FOR UPDATE/SHARE in the primary query not propagate into WITH
    queries.
  - Fix bug with a WITH RECURSIVE query immediately inside another one.
  - Fix concurrency bug in hash indexes.
  - Fix incorrect logic for GiST index page splits, when the split
    depends on a non-first column of the index.
  - Fix wrong search results for a multi-column GIN index with
    fastupdate enabled.
  - Fix bugs in WAL entry creation for GIN indexes.
  - Don't error out if recycling or removing an old WAL file fails at
    the end of checkpoint.
  - Fix PAM password processing to be more robust.
    The previous code is known to fail with the combination of the
    Linux pam_krb5 PAM module with Microsoft Active Directory as the
    domain controller. It might have problems elsewhere too, since it
    was making unjustified assumptions about what arguments the PAM
    stack would pass to it.
  - Raise the maximum authentication token (Kerberos ticket) size in
    GSSAPI and SSPI authentication methods. While the old 2000-byte limit
    was more than enough for Unix Kerberos implementations, tickets issued
    by Windows Domain Controllers can be much larger.
  - Ensure that domain constraints are enforced in constructs like
    ARRAY[...]::domain, where the domain is over an array type.
  - Fix foreign-key logic for some cases involving composite-type
    columns as foreign keys.
  - Ensure that a cursor's snapshot is not modified after it is created.
  - Fix CREATE TABLE to properly merge default expressions coming from
    different inheritance parent tables. This used to work but was broken in
    8.4.
  - Re-enable collection of access statistics for sequences. This used to
    work but was broken in 8.3.
  - Fix processing of ownership dependencies during CREATE OR REPLACE
    FUNCTION.
  - Fix incorrect handling of WHERE "x"="x" conditions.
    In some cases these could get ignored as redundant, but they aren't
    -- they're equivalent to "x" IS NOT NULL.
  - Fix incorrect plan construction when using hash aggregation to
    implement DISTINCT for textually identical volatile expressions
  - Fix Assert failure for a volatile SELECT DISTINCT ON expression
  - Fix ts_stat() to not fail on an empty tsvector value
  - Make text search parser accept underscores in XML attributes
  - Fix encoding handling in xml binary input.
    If the XML header doesn't specify an encoding, we now assume UTF-8
    by default; the previous handling was inconsistent.
  - Fix bug with calling plperl from plperlu or vice versa.
  - Fix session-lifespan memory leak when a PL/Perl function is
    redefined.
  - Ensure that Perl arrays are properly converted to PostgreSQL arrays
    when returned by a set-returning PL/Perl function.
  - Fix rare crash in exception processing in PL/Python.
  - Fix ecpg problem with comments in DECLARE CURSOR statements
  - Fix ecpg to not treat recently-added keywords as reserved words
    This affected the keywords CALLED, CATALOG, DEFINER, ENUM,
    FOLLOWING, INVOKER, OPTIONS, PARTITION, PRECEDING, RANGE, SECURITY,
    SERVER, UNBOUNDED, and WRAPPER.
  - Re-allow regular expression special characters in psql's \df
    function name parameter.
  - Put FREEZE and VERBOSE options in the right order in the VACUUM
    command that "contrib/vacuumdb" produces.
  - Fix possible leak of connections when "contrib/dblink" encounters
    an error
  - Make the postmaster ignore any application_name parameter in
    connection request packets, to improve compatibility with future
    libpq versions.

7. By Martin Pitt

* Urgency medium due to security fix.
* New upstream security/bug fix release:
  - Disallow "RESET ROLE" and "RESET SESSION AUTHORIZATION" inside
    security-definer functions. This covers a case that was missed in the
    previous patch that disallowed "SET ROLE" and "SET SESSION
    AUTHORIZATION" inside security-definer functions. [CVE-2007-6600]
  - Fix WAL page header initialization at the end of archive recovery.
    This could lead to failure to process the WAL in a subsequent archive
    recovery.
  - Fix "cannot make new WAL entries during recovery" error.
  - Fix problem that could make expired rows visible after a crash.
    This bug involved a page status bit potentially not being set
    correctly after a server crash.
  - Make "LOAD" of an already-loaded loadable module into a no-op.
    Formerly, "LOAD" would attempt to unload and re-load the module,
    but this is unsafe and not all that useful.
  - Make window function PARTITION BY and ORDER BY items always be
    interpreted as simple expressions.
    In 8.4.0 these lists were parsed following the rules used for
    top-level GROUP BY and ORDER BY lists. But this was not correct per
    the SQL standard, and it led to possible circularity.
  - Fix several errors in planning of semi-joins. These led to wrong query
    results in some cases where IN or EXISTS was used together with another
    join.
  - Fix handling of whole-row references to subqueries that are within
    an outer join. An example is SELECT COUNT(ss.-) FROM ... LEFT JOIN
    (SELECT ...) ss ON .... Here, ss.- would be treated as
    ROW(NULL,NULL,...) for null-extended join rows, which is not the same as
    a simple NULL. Now it is treated as a simple NULL.
  - Fix locale handling with plperl. This bug could cause the server's
    locale setting to change when a plperl function is called, leading to
    data corruption.
  - Fix handling of reloptions to ensure setting one option doesn't
    force default values for others.
  - Ensure that a "fast shutdown" request will forcibly terminate open
    sessions, even if a "smart shutdown" was already in progress.
  - Avoid memory leak for array_agg() in GROUP BY queries.
  - Treat to_char(..., 'TH') as an uppercase ordinal suffix with
    'HH'/'HH12'. It was previously handled as 'th'.
  - Include the fractional part in the result of EXTRACT(second) and
    EXTRACT(milliseconds) for time and time with time zone inputs.
    This has always worked for floating-point datetime configurations,
    but was broken in the integer datetime code.
  - Fix overflow for INTERVAL 'x ms' when "x" is more than 2 million
    and integer datetimes are in use.
  - Improve performance when processing toasted values in index scans.
    This is particularly useful for PostGIS.
  - Fix a typo that disabled commit_delay.
  - Output early-startup messages to "postmaster.log" if the server is
    started in silent mode. Previously such error messages were discarded,
    leading to difficulty in debugging.
  - Remove translated FAQs. They are now on the wiki. The main FAQ was moved
    to the wiki some time ago.
  - Fix pg_ctl to not go into an infinite loop if "postgresql.conf" is
    empty.
  - Fix several errors in pg_dump's --binary-upgrade mode. pg_dump
    --binary-upgrade is used by pg_migrator.
  - Fix "contrib/xml2"'s xslt_process() to properly handle the maximum
    number of parameters (twenty).
  - Improve robustness of libpq's code to recover from errors during
    "COPY FROM STDIN".
  - Avoid including conflicting readline and editline header files when
    both libraries are installed.
  - Work around gcc bug that causes "floating-point exception" instead
    of "division by zero" on some platforms.
* debian/control: Bump Standards-Version to 3.8.3 (no changes necessary).

6. By Martin Pitt

* debian/libpq-dev.install: Ship catalog/genbki.h. (Closes: #536139)
* debian/rules: Drop --enable-cassert for final release.

5. By Martin Pitt

* Second public beta of 8.4.
* debian/control: Slightly lower the dependencies for postgresql-common to
  >= 98~, so that backports also match.

4. By Martin Pitt

New upstream snapshot.

3. By Martin Pitt

* First public beta of 8.4.
* debian/*.install: Add new gettext translations.
* debian/control: Bump p-common dependency to >= 98 to ensure support for
  8.4.
* debian/rules: Build with --enable-cassert while in beta.

2. By Martin Pitt

* Package current trunk, which will become 8.4 in time. Packaging branched
  from 8.3 packaging trunk. Move from cdbs' tarball.mk to bzr-builddeb.
* Drop obsolete patches:
  - 03-gettext-domains.patch: Adopted upstream.
  - 04-psql-passwordprompt.patch: Obsoleted by new psql -w option.
  - 05-check-rlimits-nofile.patch: Adopted upstream.
* Update remaining patches for new upstream version.
* Add debian/docbook2man-sgmlspl/docbook2man-spec{.pl,_makelinks}: Current
  Debian version in docbook-utils is way too old and broken (see #275715,
  #271611), locally ship the current ones from upstream, in order to build
  manpages.
* debian/rules: Build documentation and manpage tarballs if not present (as
  with building from CVS). Add necessary build dependencies docbook-utils,
  openjade, and docbook.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp://staging/ubuntu/lucid/postgresql-8.4
This branch contains Public information 
Everyone can see this information.

Subscribers