pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Track collation versions for indexes.
Date: Mon, 02 Nov 2020 12:27:02 +0000
Message-ID: <E1kZYvO-00032l-Pt@gemulon.postgresql.org> (raw )
Track collation versions for indexes.
Record the current version of dependent collations in pg_depend when
creating or rebuilding an index. When accessing the index later, warn
that the index may be corrupted if the current version doesn't match.
Thanks to Douglas Doole, Peter Eisentraut, Christoph Berg, Laurenz Albe,
Michael Paquier, Robert Haas, Tom Lane and others for very helpful
discussion.
Author: Thomas Munro <thomas.munro@gmail.com>
Author: Julien Rouhaud <rjuju123@gmail.com>
Reviewed-by: Peter Eisentraut <peter.eisentraut@2ndquadrant.com> (earlier versions)
Discussion: https://postgr.es/m/CAEepm%3D0uEQCpfq_%2BLYFBdArCe4Ot98t1aR4eYiYTe%3DyavQygiQ%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/257836a75585934cc05ed7a80bccf8190d41e056
Modified Files
--------------
doc/src/sgml/catalogs.sgml | 3 +-
doc/src/sgml/charset.sgml | 38 +++++
doc/src/sgml/func.sgml | 4 +-
doc/src/sgml/ref/alter_index.sgml | 15 ++
doc/src/sgml/ref/pgupgrade.sgml | 15 ++
doc/src/sgml/ref/reindex.sgml | 9 ++
src/backend/catalog/dependency.c | 182 ++++++++++++++++++----
src/backend/catalog/heap.c | 7 +-
src/backend/catalog/index.c | 197 ++++++++++++++++++++++--
src/backend/catalog/pg_constraint.c | 2 +-
src/backend/catalog/pg_depend.c | 46 +++++-
src/backend/catalog/pg_type.c | 60 ++++++++
src/backend/commands/collationcmds.c | 16 +-
src/backend/commands/tablecmds.c | 31 ++++
src/backend/nodes/copyfuncs.c | 1 +
src/backend/optimizer/util/plancat.c | 9 ++
src/backend/parser/gram.y | 8 +
src/backend/utils/adt/pg_locale.c | 46 +++++-
src/backend/utils/adt/pg_upgrade_support.c | 1 +
src/backend/utils/cache/relcache.c | 2 +
src/bin/pg_dump/pg_backup.h | 1 +
src/bin/pg_dump/pg_dump.c | 182 +++++++++++++++++++++-
src/bin/pg_dump/pg_dump.h | 2 +
src/bin/pg_upgrade/dump.c | 4 +-
src/bin/pg_upgrade/option.c | 7 +
src/bin/pg_upgrade/pg_upgrade.h | 1 +
src/bin/psql/tab-complete.c | 29 +++-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/dependency.h | 25 ++-
src/include/catalog/index.h | 3 +
src/include/catalog/pg_depend.h | 3 +-
src/include/catalog/pg_type.h | 2 +
src/include/nodes/parsenodes.h | 4 +-
src/include/utils/pg_locale.h | 2 +-
src/include/utils/rel.h | 1 +
src/test/Makefile | 3 +-
src/test/locale/.gitignore | 1 +
src/test/locale/Makefile | 7 +
src/test/locale/t/001_index.pl | 67 +++++++++
src/test/regress/expected/collate.icu.utf8.out | 201 +++++++++++++++++++++++++
src/test/regress/expected/create_index.out | 8 +-
src/test/regress/sql/collate.icu.utf8.sql | 132 ++++++++++++++++
src/tools/pgindent/typedefs.list | 2 +
43 files changed, 1287 insertions(+), 94 deletions(-)
view thread (3+ messages) latest in thread
Message-ID: <E1kZYvO-00032l-Pt@gemulon.postgresql.org>
Permalink: ../E1kZYvO-00032l-Pt@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1kZYvO-00032l-Pt@gemulon.postgresql.org
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tmunro@postgresql.org
Subject: Re: pgsql: Track collation versions for indexes.
In-Reply-To: <E1kZYvO-00032l-Pt@gemulon.postgresql.org>
References: <E1kZYvO-00032l-Pt@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox