64
Appendix E. Release Notes
•
Reduce overhead for shared invalidation cache messages (Robert Haas)
•
Move the frequently accessed members of the
PGPROC
shared memory array to a separate array
(Pavan Deolasee, Heikki Linnakangas, Robert Haas)
•
Improve
COPY
performance by adding tuples to the heap inbatches (Heikki Linnakangas)
•
Improve GiST index performance for geometric data types by producing better trees with less
memory allocation overhead (Alexander Korotkov)
•
Improve GiST index build times (Alexander Korotkov, Heikki Linnakangas)
•
Allow hint bits to be set sooner for temporary and unlogged tables (Robert Haas)
•
Allow sorting to be performed by inlined, non-SQL-callable comparisonfunctions (Peter Geoghe-
gan, Robert Haas, Tom Lane)
•
Make the number of CLOG buffers scale based on
shared_buffers
(Robert Haas, Simon Riggs,
Tom Lane)
•
Improve performance of buffer pool scans that occur when tables or databases are dropped (Jeff
Janes, Simon Riggs)
•
Improve performance of checkpointer’s fsync-request queue when many tables are being dropped
or truncated (Tom Lane)
•
Pass the safe number of file descriptors to child processes on Windows (Heikki Linnakangas)
This allows Windows sessions to use more open file descriptors than before.
E.38.3.1.2. Process Management
•
Create a dedicated background process to perform checkpoints (Simon Riggs)
Formerly the backgroundwriter did bothdirty-page writingandcheckpointing. Separatingthis into
two processes allows each goal to be accomplished more predictably.
•
Improve asynchronous commit behavior by waking the walwriter sooner (Simon Riggs)
Previously, only
wal_writer_delay
triggered WAL flushing to disk; now filling a WAL buffer
also triggers WAL writes.
•
Allow the bgwriter, walwriter, checkpointer, statistics collector, log collector, and archiver back-
ground processes to sleep more efficiently during periods of inactivity (Peter Geoghegan, Tom
Lane)
This series of changes reduces the frequency of process wake-ups when there is nothing to do,
dramatically reducing power consumption on idle servers.
E.38.3.1.3. Optimizer
•
Allowthe planner togeneratecustom plans for specificparameter values evenwhen using prepared
statements (Tom Lane)
In the past, a prepared statement always had a single “generic” plan that was used for all parameter
values, which was frequently much inferior to the plans used for non-prepared statements con-
taining explicit constant values. Now, the planner attempts to generate custom plans for specific
parameter values. A generic plan will only be used after custom plans have repeatedly proven to
provide nobenefit. This change shouldeliminate the performance penalties formerly seen from use
of prepared statements (including non-dynamic statements in PL/pgSQL).
2192
88
Appendix E. Release Notes
•
Improve the planner’s ability to use nested loops with inner index scans (Tom Lane)
The new“parameterizedpath” mechanism allows inner indexscans tousevaluesfrom relations that
are more than one join level up from the scan. This can greatly improve performance in situations
where semantic restrictions (such as outer joins) limit the allowed join orderings.
•
Improve the planning API for foreign data wrappers (Etsuro Fujita, Shigeru Hanada, Tom Lane)
Wrappers can nowprovidemultiple access “paths”for their tables, allowingmore flexibilityinjoin
planning.
•
Recognize self-contradictory restriction clauses for non-table relations (Tom Lane)
This check is only performed when
constraint_exclusion
is
on
.
•
Allow
indexed_col op ANY(ARRAY[...])
conditions to be used in plain index scans and
index-only scans (Tom Lane)
Formerly such conditions could only be used in bitmap index scans.
•
Support
MIN
/
MAX
index optimizations on
boolean
columns (Marti Raudsepp)
•
Account for set-returning functions in
SELECT
target lists when setting row count estimates (Tom
Lane)
•
Fix planner to handle indexes with duplicated columns more reliably (Tom Lane)
•
Collect and use element-frequency statistics for arrays (Alexander Korotkov, Tom Lane)
This change improves selectivity estimation for the array
<@
,
&&
,and
@>
operators (array contain-
ment and overlaps).
•
Allow statistics to be collected for foreign tables (Etsuro Fujita)
•
Improve cost estimates for use of partial indexes (Tom Lane)
•
Improve the planner’s ability to use statistics for columns referenced in subqueries (Tom Lane)
•
Improve statistical estimates for subqueries using
DISTINCT
(Tom Lane)
E.38.3.1.4. Authentication
•
Do not treat role names and
samerole
specified in
pg_hba.conf
as automatically including su-
perusers (AndrewDunstan)
This makes it easier to use
reject
lines with group roles.
•
Adjust
pg_hba.conf
processing to handle token parsing more consistently (BrendanJurd, Álvaro
Herrera)
•
Disallow empty
pg_hba.conf
files (Tom Lane)
This was done to more quickly detect misconfiguration.
•
Make superuser privilege imply replication privilege (Noah Misch)
This avoids the need to explicitly assign such privileges.
E.38.3.1.5. Monitoring
•
Attempt to log the current query string during a backend crash (Marti Raudsepp)
•
Make logging of autovacuum I/O activity more verbose (Greg Smith, Noah Misch)
2193
89
Appendix E. Release Notes
This logging is triggered by
log_autovacuum_min_duration
.
•
Make WAL replay report failures sooner (Fujii Masao)
There were some cases where failures were only reported once the server went into master mode.
•
Add
pg_xlog_location_diff()
to simplify WAL location comparisons (Euler Taveira de
Oliveira)
This is useful for computing replication lag.
•
Support configurable event log application names on Windows (MauMau, Magnus Hagander)
This allows different instances to use the event log with different identifiers, by setting the
event_source
server parameter, which is similar to how
syslog_ident
works.
•
Change “unexpected EOF” messages to
DEBUG1
level, except when there is an open transaction
(Magnus Hagander)
This change reduces log chatter caused by applications that close database connections ungrace-
fully.
E.38.3.1.6. Statistical Views
•
Tracktemporary file sizes andfile counts inthe
pg_stat_database
system view(Tomas Vondra)
•
Add a deadlock counter to the
pg_stat_database
system view (Magnus Hagander)
•
Add a server parameter
track_io_timing
to track I/O timings (Ants Aasma, Robert Haas)
•
Report checkpoint timing information in
pg_stat_bgwriter
(Greg Smith, Peter Geoghegan)
E.38.3.1.7. Server Settings
•
Silently ignore nonexistent schemas specified in
search_path
(Tom Lane)
This makes itmoreconvenient to use generic pathsettings, whichmightincludesome schemas that
don’t exist in all databases.
•
Allow superusers to set
deadlock_timeout
per-session, not just per-cluster (Noah Misch)
This allows
deadlock_timeout
to be reduced for transactions that are likely to be involved in a
deadlock, thus detecting the failure more quickly. Alternatively, increasingthe value can be used to
reduce the chances of a session being chosen for cancellation due to a deadlock.
•
Add a server parameter
temp_file_limit
to constrain temporary file space usage per session
(Mark Kirkwood)
•
Allow a superuser to
SET
an extension’s superuser-only custom variable before loading the associ-
ated extension (Tom Lane)
The system now remembers whether a
SET
was performed by a superuser, so that proper privilege
checking can be done when the extension is loaded.
•
Add postmaster
-C
option to query configuration parameters (Bruce Momjian)
This allows pg_ctlto better handle cases where
PGDATA
or
-D
points to a configuration-only direc-
tory.
•
Replace an empty locale name with the implied value in
CREATE DATABASE
(Tom Lane)
2194
75
Appendix E. Release Notes
This prevents cases where
pg_database
.
datcollate
or
datctype
could be interpreted differ-
ently after a server restart.
E.38.3.1.7.1.
postgresql.conf
•
Allow multiple errors in
postgresql.conf
to be reported, rather than just the first one (Alexey
Klyukin, Tom Lane)
•
Allow a reload of
postgresql.conf
to be processed by all sessions, even if there are some
settings that are invalid for particular sessions (Alexey Klyukin)
Previously, such not-valid-within-session values would cause all setting changes to be ignored by
that session.
•
Add an
include_if_exists
facility for configuration files (Greg Smith)
This works the same as
include
,except that an error is not thrown if the file is missing.
•
Identify the server time zone during initdb, and set
postgresql.conf
entries
timezone
and
log_timezone
accordingly (Tom Lane)
This avoids expensive time zone probes during server start.
•
Fix
pg_settings
to report
postgresql.conf
line numbers onWindows (Tom Lane)
E.38.3.2. Replication and Recovery
•
Allow streaming replication slaves to forward data to other slaves (cascading replication) (Fujii
Masao)
Previously, only the master server could supply streaming replication logfiles to standby servers.
•
Add new
synchronous_commit
mode
remote_write
(Fujii Masao, Simon Riggs)
This mode waits for the standby server to write transaction data to its own operating system, but
does not wait for the data to be flushed to the standby’s disk.
•
Add a pg_receivexlog tool to archive WAL file changes as they are written, rather than waiting for
completed WAL files (Magnus Hagander)
•
Allow pg_basebackup to make base backups from standby servers (Jun Ishizuka, Fujii Masao)
This feature lets the work of making new base backups be off-loaded from the primary server.
•
Allow streaming of WAL files while pg_basebackupis performing a backup (Magnus Hagander)
This allows passingof WAL files to the standby before they are discarded on the primary.
E.38.3.3. Queries
•
Cancel the running query if the client gets disconnected (Florian Pflug)
If the backend detects loss of client connection during a query, it will now cancel the query rather
than attempting to finish it.
•
Retain column names at run time for rowexpressions (Andrew Dunstan, Tom Lane)
2195
80
Appendix E. Release Notes
This change allows better results when a rowvalue is converted to
hstore
or
json
type: the fields
of the resulting value will now have the expected names.
•
Improve column labels used for sub-
SELECT
results (Marti Raudsepp)
Previously, the generic label
?column?
was used.
•
Improve heuristics for determining the types of unknown values (Tom Lane)
The longstanding rule that anunknown constant might have the same type as the value onthe other
side of the operator using it is now applied when considering polymorphic operators, not only for
simple operator matches.
•
Warn about creating casts to or from domain types (Robert Haas)
Such casts have no effect.
•
When a row fails a
CHECK
or
NOT NULL
constraint, show the row’s contents as error detail (Jan
Kundrát)
This should make it easier to identify which row is problematic when an insert or update is pro-
cessing many rows.
E.38.3.4. Object Manipulation
•
Provide more reliable operation during concurrent DDL (Robert Haas, Noah Misch)
This change adds locking that should eliminate “cache lookup failed” errors in many scenarios.
Also, it is no longer possible to add relations to a schema that is being concurrently dropped, a
scenario that formerly led to inconsistent system catalog contents.
•
Add
CONCURRENTLY
option to
DROP INDEX
(Simon Riggs)
This allows index removal without blocking other sessions.
•
Allow foreign data wrappers to have per-column options (Shigeru Hanada)
•
Improve pretty-printing of view definitions (Andrew Dunstan)
E.38.3.4.1. Constraints
•
Allow
CHECK
constraints to be declared
NOT VALID
(Álvaro Herrera)
Adding a
NOT VALID
constraint does not cause the table to be scanned to verify thatexisting rows
meet the constraint. Subsequently, newly added or updated rows are checked. Such constraints are
ignored by the planner when considering
constraint_exclusion
,since it is not certain that all
rows meet the constraint.
The new
ALTER TABLE VALIDATE
command allows
NOT VALID
constraints to be checked for
existing rows, after which they are converted into ordinary constraints.
•
Allow
CHECK
constraints to be declared
NO INHERIT
(Nikhil Sontakke, Alex Hunsaker, Álvaro
Herrera)
This makes them enforceable only on the parent table, not on child tables.
•
Add the ability to rename constraints (Peter Eisentraut)
2196
120
Appendix E. Release Notes
E.38.3.4.2.
ALTER
•
Reduce need to rebuild tables and indexes for certain
ALTER TABLE
...
ALTER COLUMN TYPE
operations (Noah Misch)
Increasing the length limit for a
varchar
or
varbit
column, or removing the limit altogether, no
longer requires a table rewrite. Similarly, increasing the allowable precisionof a
numeric
column,
or changing a column from constrained
numeric
to unconstrained
numeric
,no longer requires a
tablerewrite. Tablerewrites arealso avoided in similar cases involvingthe
interval
,
timestamp
,
and
timestamptz
types.
•
Avoid having
ALTER TABLE
revalidate foreign key constraints in some cases where it is not nec-
essary (Noah Misch)
•
Add
IF EXISTS
options to some
ALTER
commands (Pavel Stehule)
For example,
ALTER FOREIGN TABLE IF EXISTS foo RENAME TO bar
.
•
Add
ALTER FOREIGN DATA WRAPPER
...
RENAME
and
ALTER SERVER
...
RENAME
(Peter Eisen-
traut)
•
Add
ALTER DOMAIN
...
RENAME
(Peter Eisentraut)
You could already rename domains using
ALTER TYPE
.
•
Throwan error for
ALTER DOMAIN
...
DROP CONSTRAINT
on anonexistent constraint (Peter Eisen-
traut)
An
IF EXISTS
option has been added to provide the previous behavior.
E.38.3.4.3.
CREATE TABLE
•
Allow
CREATE TABLE (LIKE ...)
from foreign tables, views, and composite types (Peter
Eisentraut)
For example, this allows a table to be created whose schema matches a view.
•
Fix
CREATE TABLE (LIKE ...)
to avoid index name conflicts when copying index comments
(Tom Lane)
•
Fix
CREATE TABLE
...
AS EXECUTE
to handle
WITH NO DATA
and column name specifications
(Tom Lane)
E.38.3.4.4. Object Permissions
•
Add a
security_barrier
optionfor views (KaiGai Kohei, Robert Haas)
This option prevents optimizations that might allow view-protected data to be exposedto users, for
example pushing a clause involving an insecure function into the
WHERE
clause of the view. Such
views can be expected to perform more poorly than ordinary views.
•
Add a new
LEAKPROOF
function attribute to mark functions that can safely be pushed down into
security_barrier
views (KaiGai Kohei)
•
Add support for privileges on data types (Peter Eisentraut)
This adds support for the SQL-conforming
USAGE
privilege ontypes and domains. The intent is to
be able to restrict which users can create dependencies on types, since such dependencies limit the
owner’s ability to alter the type.
2197
Documents you may be interested
Documents you may be interested