## E.138. Release 9.1.10

Release date: 2013-10-10

This release contains a variety of fixes from 9.1.9. For information about new features in the 9.1 major release, see Section E.148.

### E.138.1. Migration to Version 9.1.10

A dump/restore is not required for those running 9.1.X.

However, if you are upgrading from a version earlier than 9.1.9, see Section E.139.

### E.138.2. Changes

- Prevent corruption of multi-byte characters when attempting to case-fold identifiers (Andrew Dunstan)

  PostgreSQL case-folds non-ASCII characters only when using a single-byte server encoding.

- Fix checkpoint memory leak in background writer when `wal_level = hot_standby` (Naoya Anzai)

- Fix memory leak caused by `lo_open()` failure (Heikki Linnakangas)

- Fix memory overcommit bug when `work_mem` is using more than 24GB of memory (Stephen Frost)

- Serializable snapshot fixes (Kevin Grittner, Heikki Linnakangas)

- Fix deadlock bug in libpq when using SSL (Stephen Frost)

- Fix possible SSL state corruption in threaded libpq applications (Nick Phillips, Stephen Frost)

- Properly compute row estimates for boolean columns containing many NULL values (Andrew Gierth)

  Previously tests like `col IS NOT TRUE` and `col IS NOT FALSE` did not properly factor in NULL values when estimating plan costs.

- Prevent pushing down `WHERE` clauses into unsafe `UNION/INTERSECT` subqueries (Tom Lane)

  Subqueries of a `UNION` or `INTERSECT` that contain set-returning functions or volatile functions in their `SELECT` lists could be improperly optimized, leading to run-time errors or incorrect query results.

- Fix rare case of “failed to locate grouping columns” planner failure (Tom Lane)

- Fix pg_dump of foreign tables with dropped columns (Andrew Dunstan)

  Previously such cases could cause a pg_upgrade error.

- Reorder pg_dump processing of extension-related rules and event triggers (Joe Conway)

- Force dumping of extension tables if specified by `pg_dump -t` or `-n` (Joe Conway)

- Improve view dumping code's handling of dropped columns in referenced tables (Tom Lane)

- Fix `pg_restore -l` with the directory archive to display the correct format name (Fujii Masao)

- Properly record index comments created using `UNIQUE` and `PRIMARY KEY` syntax (Andres Freund)

  This fixes a parallel pg_restore failure.

- Properly guarantee transmission of WAL files before clean switchover (Fujii Masao)

  Previously, the streaming replication connection might close before all WAL files had been replayed on the standby.

- Fix WAL segment timeline handling during recovery (Mitsumasa Kondo, Heikki Linnakangas)

  WAL file recycling during standby recovery could lead to premature recovery completion, resulting in data loss.

- Fix `REINDEX TABLE` and `REINDEX DATABASE` to properly revalidate constraints and mark invalidated indexes as valid (Noah Misch)

  `REINDEX INDEX` has always worked properly.

- Fix possible deadlock during concurrent `CREATE INDEX CONCURRENTLY` operations (Tom Lane)

- Fix `regexp_matches()` handling of zero-length matches (Jeevan Chalke)

  Previously, zero-length matches like '^' could return too many matches.

- Fix crash for overly-complex regular expressions (Heikki Linnakangas)

- Fix regular expression match failures for back references combined with non-greedy quantifiers (Jeevan Chalke)

- Prevent `CREATE FUNCTION` from checking `SET` variables unless function body checking is enabled (Tom Lane)

- Allow `ALTER DEFAULT PRIVILEGES` to operate on schemas without requiring CREATE permission (Tom Lane)

- Loosen restriction on keywords used in queries (Tom Lane)

  Specifically, lessen keyword restrictions for role names, language names, `EXPLAIN` and `COPY` options, and `SET` values. This allows `COPY ... (FORMAT BINARY)` to work as expected; previously `BINARY` needed to be quoted.

- Fix `pgp_pub_decrypt()` so it works for secret keys with passwords (Marko Kreen)

- Make pg_upgrade use `pg_dump --quote-all-identifiers` to avoid problems with keyword changes between releases (Tom Lane)

- Remove rare inaccurate warning during vacuum of index-less tables (Heikki Linnakangas)

- Ensure that `VACUUM ANALYZE` still runs the ANALYZE phase if its attempt to truncate the file is cancelled due to lock conflicts (Kevin Grittner)

- Avoid possible failure when performing transaction control commands (e.g `ROLLBACK`) in prepared queries (Tom Lane)

- Ensure that floating-point data input accepts standard spellings of “infinity” on all platforms (Tom Lane)

  The C99 standard says that allowable spellings are `inf`, `+inf`, `-inf`, `infinity`, `+infinity`, and `-infinity`. Make sure we recognize these even if the platform's `strtod` function doesn't.

- Expand ability to compare rows to records and arrays (Rafal Rzepecki, Tom Lane)

- Update time zone data files to tzdata release 2013d for DST law changes in Israel, Morocco, Palestine, and Paraguay. Also, historical zone data corrections for Macquarie Island.