Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
E.50. Release 11
Prev UpAppendix E. Release NotesHome Next

E.50. Release 11

Release date: 2018-10-18

E.50.1. Overview

Major enhancements inPostgreSQL 11 include:

  • Improvements to partitioning functionality, including:

    • Add support for partitioning by a hash key

    • Add support forPRIMARY KEY,FOREIGN KEY, indexes, and triggers on partitioned tables

    • Allow creation of adefault partition for storing data that does not match any of the remaining partitions

    • UPDATE statements that change a partition key column now cause affected rows to be moved to the appropriate partitions

    • ImproveSELECT performance through enhanced partition elimination strategies during query planning and execution

  • Improvements to parallelism, including:

    • CREATE INDEX can now use parallel processing while building a B-tree index

    • Parallelization is now possible inCREATE TABLE ... AS,CREATE MATERIALIZED VIEW, and certain queries usingUNION

    • Parallelized hash joins and parallelized sequential scans now perform better

  • SQL stored procedures that support embedded transactions

  • Optional Just-in-Time (JIT) compilation for some SQL code, speeding evaluation of expressions

  • Window functions now support all framing options shown in the SQL:2011 standard, includingRANGEdistance PRECEDING/FOLLOWING,GROUPS mode, and frame exclusion options

  • Covering indexes can now be created, using theINCLUDE clause ofCREATE INDEX

  • Many other useful performance improvements, including the ability to avoid a table rewrite forALTER TABLE ... ADD COLUMN with a non-null column default

The above items are explained in more detail in the sections below.

E.50.2. Migration to Version 11

A dump/restore usingpg_dumpall or use ofpg_upgrade or logical replication is required for those wishing to migrate data from any previous release. SeeSection 17.6 for general information on migrating to new major releases.

Version 11 contains a number of changes that may affect compatibility with previous releases. Observe the following incompatibilities:

  • Makepg_dump dump the properties of a database, not just its contents (Haribabu Kommi)

    Previously, attributes of the database itself, such as database-levelGRANT/REVOKE permissions andALTER DATABASE SET variable settings, were only dumped bypg_dumpall. Nowpg_dump --create andpg_restore --create will restore these database properties in addition to the objects within the database.pg_dumpall -g now only dumps role- and tablespace-related attributes.pg_dumpall's complete output (without-g) is unchanged.

    pg_dump andpg_restore, without--create, no longer dump/restore database-level comments and security labels; those are now treated as properties of the database.

    pg_dumpall's output script will now always create databases with their original locale and encoding, and hence will fail if the locale or encoding name is unknown to the destination system. Previously,CREATE DATABASE would be emitted without these specifications if the database locale and encoding matched the old cluster's defaults.

    pg_dumpall --clean now restores the original locale and encoding settings of thepostgres andtemplate1 databases, as well as those of user-created databases.

  • Consider syntactic form when disambiguating function versus column references (Tom Lane)

    Whenx is a table name or composite column,PostgreSQL has traditionally considered the syntactic formsf(x) andx.f to be equivalent, allowing tricks such as writing a function and then using it as though it were a computed-on-demand column. However, if both interpretations are feasible, the column interpretation was always chosen, leading to surprising results if the user intended the function interpretation. Now, if there is ambiguity, the interpretation that matches the syntactic form is chosen.

  • Fully enforce uniqueness of table and domain constraint names (Tom Lane)

    PostgreSQL expects the names of a table's constraints to be distinct, and likewise for the names of a domain's constraints. However, there was not rigid enforcement of this, and previously there were corner cases where duplicate names could be created.

  • Makepower(numeric, numeric) andpower(float8, float8) handleNaN inputs according to the POSIX standard (Tom Lane, Dang Minh Huong)

    POSIX says thatNaN ^ 0 = 1 and1 ^ NaN = 1, but all other cases withNaN input(s) should returnNaN.power(numeric, numeric) just returnedNaN in all such cases; now it honors the two exceptions.power(float8, float8) followed the standard if the C library does; but on some old Unix platforms the library doesn't, and there were also problems on some versions of Windows.

  • Preventto_number() from consuming characters when the template separator does not match (Oliver Ford)

    Specifically,SELECT to_number('1234', '9,999') used to return134. It will now return1234.L andTH now only consume characters that are not digits, positive/negative signs, decimal points, or commas.

  • Fixto_date(),to_number(), andto_timestamp() to skip a character for each template character (Tom Lane)

    Previously, they skipped onebyte for each byte of template character, resulting in strange behavior if either string contained multibyte characters.

  • Adjust the handling of backslashes inside double-quotes in template strings forto_char(),to_number(), andto_timestamp().

    Such a backslash now escapes the character after it, particularly a double-quote or another backslash.

  • Correctly handle relative path expressions inxmltable(),xpath(), and other XML-handling functions (Markus Winand)

    Per the SQL standard, relative paths start from the document node of the XML input document, not the root node as these functions previously did.

  • In theextended query protocol, makestatement_timeout apply to each Execute message separately, not to all commands before Sync (Tatsuo Ishii, Andres Freund)

  • Remove therelhaspkey column from system catalogpg_class (Peter Eisentraut)

    Applications needing to check for a primary key should consultpg_index.

  • Replace system catalogpg_proc'sproisagg andproiswindow columns withprokind (Peter Eisentraut)

    This new column more clearly distinguishes functions, procedures, aggregates, and window functions.

  • Correct information schema columntables.table_type to returnFOREIGN instead ofFOREIGN TABLE (Peter Eisentraut)

    This new output matches the SQL standard.

  • Change the ps process display labels for background workers to match thepg_stat_activity.backend_type labels (Peter Eisentraut)

  • Cause large object permission checks to happen during large object open,lo_open(), not when a read or write is attempted (Tom Lane, Michael Paquier)

    If write access is requested and not available, an error will now be thrown even if the large object is never written to.

  • Prevent non-superusers from reindexing shared catalogs (Michael Paquier, Robert Haas)

    Previously, database owners were also allowed to do this, but now it is considered outside the bounds of their privileges.

  • Remove deprecatedadminpack functionspg_file_read(),pg_file_length(), andpg_logfile_rotate() (Stephen Frost)

    Equivalent functionality is now present in the core backend. Existingadminpack installs will continue to have access to these functions until they are updated viaALTER EXTENSION ... UPDATE.

  • Honor the capitalization of double-quoted command options (Daniel Gustafsson)

    Previously, option names in certain SQL commands were forcibly lower-cased even if entered with double quotes; thus for example"FillFactor" would be accepted as an index storage option, though properly its name is lower-case. Such cases will now generate an error.

  • Remove server parameterreplacement_sort_tuples (Peter Geoghegan)

    Replacement sorts were determined to be no longer useful.

  • RemoveWITH clause inCREATE FUNCTION (Michael Paquier)

    PostgreSQL has long supported a more standard-compliant syntax for this capability.

  • In PL/pgSQL trigger functions, theOLD andNEW variables now read as NULL when not assigned (Tom Lane)

    Previously, references to these variables could be parsed but not executed.

E.50.3. Changes

Below you will find a detailed account of the changes betweenPostgreSQL 11 and the previous major release.

E.50.3.1. Server

E.50.3.1.1. Partitioning
  • Allow the creation of partitions based on hashing a key column (Amul Sul)

  • Support indexes on partitioned tables (Álvaro Herrera, Amit Langote)

    Anindex on a partitioned table is not a physical index across the whole partitioned table, but rather a template for automatically creating similar indexes on each partition of the table.

    If the partition key is part of the index's column set, a partitioned index may be declaredUNIQUE. It will represent a valid uniqueness constraint across the whole partitioned table, even though each physical index only enforces uniqueness within its own partition.

    The new commandALTER INDEX ATTACH PARTITION causes an existing index on a partition to be associated with a matching index template for its partitioned table. This provides flexibility in setting up a new partitioned index for an existing partitioned table.

  • Allow foreign keys on partitioned tables (Álvaro Herrera)

  • AllowFOR EACH ROW triggers on partitioned tables (Álvaro Herrera)

    Creation of a trigger on a partitioned table automatically creates triggers on all existing and future partitions. This also allows deferred unique constraints on partitioned tables.

  • Allow partitioned tables to have a default partition (Jeevan Ladhe, Beena Emerson, Ashutosh Bapat, Rahila Syed, Robert Haas)

    The default partition will store rows that don't match any of the other defined partitions, and is searched accordingly.

  • UPDATE statements that change a partition key column now cause affected rows to be moved to the appropriate partitions (Amit Khandekar)

  • AllowINSERT,UPDATE, andCOPY on partitioned tables to properly route rows to foreign partitions (Etsuro Fujita, Amit Langote)

    This is supported bypostgres_fdw foreign tables. Since theExecForeignInsert callback function is called for this in a different way than it used to be, foreign data wrappers must be modified to cope with this change.

  • Allow faster partition elimination during query processing (Amit Langote, David Rowley, Dilip Kumar)

    This speeds access to partitioned tables with many partitions.

  • Allow partition elimination during query execution (David Rowley, Beena Emerson)

    Previously, partition elimination only happened at planning time, meaning many joins and prepared queries could not use partition elimination.

  • In an equality join between partitioned tables, allow matching partitions to be joined directly (Ashutosh Bapat)

    This feature is disabled by default but can be enabled by changingenable_partitionwise_join.

  • Allow aggregate functions on partitioned tables to be evaluated separately for each partition, subsequently merging the results (Jeevan Chalke, Ashutosh Bapat, Robert Haas)

    This feature is disabled by default but can be enabled by changingenable_partitionwise_aggregate.

  • Allowpostgres_fdw to push down aggregates to foreign tables that are partitions (Jeevan Chalke)

E.50.3.1.2. Parallel Queries
  • Allow parallel building of a btree index (Peter Geoghegan, Rushabh Lathia, Heikki Linnakangas)

  • Allow hash joins to be performed in parallel using a shared hash table (Thomas Munro)

  • AllowUNION to run eachSELECT in parallel if the individualSELECTs cannot be parallelized (Amit Khandekar, Robert Haas, Amul Sul)

  • Allow partition scans to more efficiently use parallel workers (Amit Khandekar, Robert Haas, Amul Sul)

  • AllowLIMIT to be passed to parallel workers (Robert Haas, Tom Lane)

    This allows workers to reduce returned results and use targeted index scans.

  • Allow single-evaluation queries, e.g.,WHERE clause aggregate queries, and functions in the target list to be parallelized (Amit Kapila, Robert Haas)

  • Add server parameterparallel_leader_participation to control whether the leader also executes subplans (Thomas Munro)

    The default is enabled, meaning the leader will execute subplans.

  • Allow parallelization of commandsCREATE TABLE ... AS,SELECT INTO, andCREATE MATERIALIZED VIEW (Haribabu Kommi)

  • Improve performance of sequential scans with many parallel workers (David Rowley)

  • Add reporting of parallel workers' sort activity inEXPLAIN (Robert Haas, Tom Lane)

E.50.3.1.3. Indexes
  • Allow B-tree indexes to include columns that are not part of the search key or unique constraint, but are available to be read by index-only scans (Anastasia Lubennikova, Alexander Korotkov, Teodor Sigaev)

    This is enabled by the newINCLUDE clause ofCREATE INDEX. It facilitates buildingcovering indexes that optimize specific types of queries. Columns can be included even if their data types don't have B-tree support.

  • Improve performance of monotonically increasing index additions (Pavan Deolasee, Peter Geoghegan)

  • Improve performance of hash index scans (Ashutosh Sharma)

  • Add predicate locking for hash, GiST and GIN indexes (Shubham Barai)

    This reduces the likelihood of serialization conflicts in serializable-mode transactions.

E.50.3.1.3.1. SP-Gist
  • Add prefix-match operatortext^@text, which is supported by SP-GiST (Ildus Kurbangaliev)

    This is similar to usingvarLIKE 'word%' with a btree index, but it is more efficient.

  • Allow polygons to be indexed with SP-GiST (Nikita Glukhov, Alexander Korotkov)

  • Allow SP-GiST to use lossy representation of leaf keys (Teodor Sigaev, Heikki Linnakangas, Alexander Korotkov, Nikita Glukhov)

E.50.3.1.4. Optimizer
E.50.3.1.6. Monitoring
  • Show memory usage in output fromlog_statement_stats,log_parser_stats,log_planner_stats, andlog_executor_stats (Justin Pryzby, Peter Eisentraut)

  • Add columnpg_stat_activity.backend_type to show the type of a background worker (Peter Eisentraut)

    The type is also visible inps output.

  • Makelog_autovacuum_min_duration log skipped tables that are concurrently being dropped (Nathan Bossart)

E.50.3.1.6.1. Information Schema
  • Addinformation_schema columns related to table constraints and triggers (Peter Eisentraut)

    Specifically,triggers.action_order,triggers.action_reference_old_table, andtriggers.action_reference_new_table are now populated, where before they were always null. Also,table_constraints.enforced now exists but is not yet usefully populated.

  • Adddefault roles that enable file system access (Stephen Frost)

    Specifically, the new roles are:pg_read_server_files,pg_write_server_files, andpg_execute_server_program. These roles now also control who can use server-sideCOPY and thefile_fdw extension. Previously, only superusers could use these functions, and that is still the default behavior.

  • Allow access to file system functions to be controlled byGRANT/REVOKE permissions, rather than superuser checks (Stephen Frost)

    Specifically, these functions were modified:pg_ls_dir(),pg_read_file(),pg_read_binary_file(),pg_stat_file().

  • UseGRANT/REVOKE to control access tolo_import() andlo_export() (Michael Paquier, Tom Lane)

    Previously, only superusers were granted access to these functions.

    The compile-time optionALLOW_DANGEROUS_LO_FUNCTIONS has been removed.

  • Use view owner not session owner when preventing non-password access topostgres_fdw tables (Robert Haas)

    PostgreSQL only allows superusers to accesspostgres_fdw tables without passwords, e.g., viapeer. Previously, the session owner had to be a superuser to allow such access; now the view owner is checked instead.

  • Fix invalid locking permission check inSELECT FOR UPDATE on views (Tom Lane)

E.50.3.6. Server-Side Languages

  • Addpg_dumpall option--encoding to control output encoding (Michael Paquier)

    pg_dump already had this option.

  • Addpg_dump option--load-via-partition-root to force loading of data into the partition's root table, rather than the original partition (Rushabh Lathia)

    This is useful if the system to be loaded to has different collation definitions or endianness, possibly requiring rows to be stored in different partitions than previously.

  • Add an option to suppress dumping and restoring database object comments (Robins Tharakan)

    The newpg_dump,pg_dumpall, andpg_restore option is--no-comments.

E.50.3.10. Source Code

  • Allow extensionpg_prewarm to restore the previous shared buffer contents on startup (Mithun Cy, Robert Haas)

    This is accomplished by havingpg_prewarm store the shared buffers' relation and block number data to disk occasionally during server operation, and at shutdown.

  • Addpg_trgm functionstrict_word_similarity() to compute the similarity of whole words (Alexander Korotkov)

    The functionword_similarity() already existed for this purpose, but it was designed to find similar parts of words, whilestrict_word_similarity() computes the similarity to whole words.

  • Allowbtree_gin to indexbool,bpchar,name anduuid data types (Matheus Oliveira)

  • Allowcube andseg extensions to perform index-only scans using GiST indexes (Andrey Borodin)

  • Allow retrieval of negative cube coordinates using the~> operator (Alexander Korotkov)

    This is useful for KNN-GiST searches when looking for coordinates in descending order.

  • Add Vietnamese letter handling to theunaccent extension (Dang Minh Huong, Michael Paquier)

  • Enhanceamcheck to check that each heap tuple has an index entry (Peter Geoghegan)

  • Haveadminpack use the new default file system access roles (Stephen Frost)

    Previously, only superusers could calladminpack functions; now role permissions are checked.

  • Widenpg_stat_statement's query ID to 64 bits (Robert Haas)

    This greatly reduces the chance of query ID hash collisions. The query ID can now potentially display as a negative value.

  • Remove thecontrib/start-scripts/osx scripts since they are no longer recommended (usecontrib/start-scripts/macos instead) (Tom Lane)

  • Remove thechkpass extension (Peter Eisentraut)

    This extension is no longer considered to be a usable security tool or example of how to write an extension.

E.50.4. Acknowledgments

The following individuals (in alphabetical order) have contributed to this release as patch authors, committers, reviewers, testers, or reporters of issues.

Abhijit Menon-Sen
Adam Bielanski
Adam Brightwell
Adam Brusselback
Aditya Toshniwal
Adrián Escoms
Adrien Nayrat
Akos Vandra
Aleksander Alekseev
Aleksandr Parfenov
Alexander Korotkov
Alexander Kukushkin
Alexander Kuzmenkov
Alexander Lakhin
Alexandre Garcia
Alexey Bashtanov
Alexey Chernyshov
Alexey Kryuchkov
Alik Khilazhev
Álvaro Herrera
Amit Kapila
Amit Khandekar
Amit Langote
Amul Sul
Anastasia Lubennikova
Andreas Joseph Krogh
Andreas Karlsson
Andreas Seltenreich
André Hänsel
Andrei Gorita
Andres Freund
Andrew Dunstan
Andrew Fletcher
Andrew Gierth
Andrew Grossman
Andrew Krasichkov
Andrey Borodin
Andrey Lizenko
Andy Abelisto
Anthony Bykov
Antoine Scemama
Anton Dignös
Antonin Houska
Arseniy Sharoglazov
Arseny Sher
Arthur Zakirov
Ashutosh Bapat
Ashutosh Sharma
Ashwin Agrawal
Asim Praveen
Atsushi Torikoshi
Badrul Chowdhury
Balazs Szilfai
Basil Bourque
Beena Emerson
Ben Chobot
Benjamin Coutu
Bernd Helmle
Blaz Merela
Brad DeJong
Brent Dearth
Brian Cloutier
Bruce Momjian
Catalin Iacob
Chad Trabant
Chapman Flack
Christian Duta
Christian Ullrich
Christoph Berg
Christoph Dreis
Christophe Courtois
Christopher Jones
Claudio Freire
Clayton Salem
Craig Ringer
Dagfinn Ilmari Mannsåker
Dan Vianello
Dan Watson
Dang Minh Huong
Daniel Gustafsson
Daniel Vérité
Daniel Westermann
Daniel Wood
Darafei Praliaskouski
Dave Cramer
Dave Page
David Binderman
David Carlier
David Fetter
David G. Johnston
David Gould
David Hinkle
David Pereiro Lagares
David Rader
David Rowley
David Steele
Davy Machado
Dean Rasheed
Dian Fay
Dilip Kumar
Dmitriy Sarafannikov
Dmitry Dolgov
Dmitry Ivanov
Dmitry Shalashov
Don Seiler
Doug Doole
Doug Rady
Edmund Horner
Eiji Seki
Elvis Pranskevichus
Emre Hasegeli
Erik Rijkers
Erwin Brandstetter
Etsuro Fujita
Euler Taveira
Everaldo Canuto
Fabien Coelho
Fabrízio de Royes Mello
Feike Steenbergen
Frits Jalvingh
Fujii Masao
Gao Zengqi
Gianni Ciolli
Greg Stark
Gunnlaugur Thor Briem
Guo Xiang Tan
Hadi Moshayedi
Hailong Li
Haribabu Kommi
Heath Lord
Heikki Linnakangas
Hugo Mercier
Igor Korot
Igor Neyman
Ildar Musin
Ildus Kurbangaliev
Ioseph Kim
Jacob Champion
Jaime Casanova
Jakob Egger
Jean-Pierre Pelletier
Jeevan Chalke
Jeevan Ladhe
Jeff Davis
Jeff Janes
Jeremy Evans
Jeremy Finzel
Jeremy Schneider
Jesper Pedersen
Jim Nasby
Jimmy Yih
Jing Wang
Jobin Augustine
Joe Conway
John Gorman
John Naylor
Jon Nelson
Jon Wolski
Jonathan Allen
Jonathan S. Katz
Julien Rouhaud
Jürgen Purtz
Justin Pryzby
KaiGai Kohei
Kaiting Chen
Karl Lehenbauer
Keith Fiske
Kevin Bloch
Kha Nguyen
Kim Rose Carlsen
Konstantin Knizhnik
Kuntal Ghosh
Kyle Samson
Kyotaro Horiguchi
Lætitia Avrot
Lars Kanis
Laurenz Albe
Leonardo Cecchi
Liudmila Mantrova
Lixian Zou
Lloyd Albin
Luca Ferrari
Lucas Fairchild
Lukas Eder
Lukas Fittl
Magnus Hagander
Mai Peng
Maksim Milyutin
Maksym Boguk
Mansur Galiev
Marc Dilger
Marco Nenciarini
Marina Polyakova
Mario de Frutos Dieguez
Mark Cave-Ayland
Mark Dilger
Mark Wood
Marko Tiikkaja
Markus Winand
Martín Marqués
Masahiko Sawada
Matheus Oliveira
Matthew Stickney
Metin Doslu
Michael Banck
Michael Meskes
Michael Paquier
Michail Nikolaev
Mike Blackwell
Minh-Quan Tran
Mithun Cy
Morgan Owens
Nathan Bossart
Nathan Wagner
Neil Conway
Nick Barnes
Nicolas Thauvin
Nikhil Sontakke
Nikita Glukhov
Nikolay Shaplov
Noah Misch
Noriyoshi Shinoda
Oleg Bartunov
Oleg Samoilov
Oliver Ford
Pan Bian
Pascal Legrand
Patrick Hemmer
Patrick Krecker
Paul Bonaud
Paul Guo
Paul Ramsey
Pavan Deolasee
Pavan Maddamsetti
Pavel Golub
Pavel Stehule
Peter Eisentraut
Peter Geoghegan
Petr Jelínek
Petru-Florin Mihancea
Phil Florent
Philippe Beaudoin
Pierre Ducroquet
Piotr Stefaniak
Prabhat Sahu
Pu Qun
QL Zhuo
Rafia Sabih
Rahila Syed
Rainer Orth
Rajkumar Raghuwanshi
Raúl Marín Rodríguez
Regina Obe
Richard Yen
Robert Haas
Robins Tharakan
Rod Taylor
Rushabh Lathia
Ryan Murphy
Sahap Asci
Samuel Horwitz
Scott Ure
Sean Johnston
Shao Bret
Shay Rojansky
Shubham Barai
Simon Riggs
Simone Gotti
Sivasubramanian Ramasubramanian
Stas Kelvich
Stefan Kaltenbrunner
Stephen Froehlich
Stephen Frost
Steve Singer
Steven Winfield
Sven Kunze
Taiki Kondo
Takayuki Tsunakawa
Takeshi Ideriha
Tatsuo Ishii
Tatsuro Yamada
Teodor Sigaev
Thom Brown
Thomas Kellerer
Thomas Munro
Thomas Reiss
Tobias Bussmann
Todd A. Cook
Tom Kazimiers
Tom Lane
Tomas Vondra
Tomonari Katsumata
Torsten Grust
Tushar Ahuja
Vaishnavi Prabakaran
Vasundhar Boddapati
Victor Drobny
Victor Wagner
Victor Yegorov
Vik Fearing
Vinayak Pokale
Vincent Lachenal
Vitaliy Garnashevich
Vitaly Burovoy
Vladimir Baranoff
Xin Zhang
Yi Wen Wong
Yorick Peterse
Yugo Nagata
Yuqi Gu
Yura Sokolov
Yves Goergen
Zhou Digoal

Prev Up Next
E.49. Release 11.1 Home E.51. Prior Releases
epubpdf
Go to Postgres Pro Standard 11
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp