pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Database-level collation version tracking
3+ messages / 2 participants
[nested] [flat]
* pgsql: Database-level collation version tracking
@ 2022-02-14 07:40 Peter Eisentraut <peter@eisentraut.org>
2022-02-14 08:18 ` Re: pgsql: Database-level collation version tracking Michael Paquier <michael@paquier.xyz>
0 siblings, 1 reply; 3+ messages in thread
From: Peter Eisentraut @ 2022-02-14 07:40 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Database-level collation version tracking
This adds to database objects the same version tracking that collation
objects have. There is a new pg_database column datcollversion that
stores the version, a new function
pg_database_collation_actual_version() to get the version from the
operating system, and a new subcommand ALTER DATABASE ... REFRESH
COLLATION VERSION.
This was not originally added together with pg_collation.collversion,
since originally version tracking was only supported for ICU, and ICU
on a database-level is not currently supported. But we now have
version tracking for glibc (since PG13), FreeBSD (since PG14), and
Windows (since PG13), so this is useful to have now.
Reviewed-by: Julien Rouhaud <rjuju123@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/f0ff3190-29a3-5b39-a179-fa32eee57db6%40enterprisedb.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/37851a8b83d3d57ca48736093b10aa5f3bc0c177
Modified Files
--------------
doc/src/sgml/catalogs.sgml | 11 ++
doc/src/sgml/func.sgml | 18 +++
doc/src/sgml/ref/alter_collation.sgml | 3 +-
doc/src/sgml/ref/alter_database.sgml | 12 ++
doc/src/sgml/ref/create_database.sgml | 21 +++
src/backend/commands/dbcommands.c | 194 ++++++++++++++++++++++-
src/backend/parser/gram.y | 6 +
src/backend/tcop/utility.c | 14 +-
src/backend/utils/init/postinit.c | 34 ++++
src/bin/initdb/initdb.c | 12 ++
src/bin/pg_dump/pg_dump.c | 21 +++
src/bin/psql/tab-complete.c | 2 +-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_database.h | 3 +
src/include/catalog/pg_proc.dat | 5 +
src/include/commands/dbcommands.h | 1 +
src/include/nodes/nodes.h | 1 +
src/include/nodes/parsenodes.h | 6 +
src/test/regress/expected/collate.icu.utf8.out | 4 +
src/test/regress/expected/collate.linux.utf8.out | 4 +
src/test/regress/sql/collate.icu.utf8.sql | 4 +
src/test/regress/sql/collate.linux.utf8.sql | 4 +
22 files changed, 367 insertions(+), 15 deletions(-)
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Database-level collation version tracking
2022-02-14 07:40 pgsql: Database-level collation version tracking Peter Eisentraut <peter@eisentraut.org>
@ 2022-02-14 08:18 ` Michael Paquier <michael@paquier.xyz>
2022-02-14 17:02 ` Re: pgsql: Database-level collation version tracking Peter Eisentraut <peter@eisentraut.org>
0 siblings, 1 reply; 3+ messages in thread
From: Michael Paquier @ 2022-02-14 08:18 UTC (permalink / raw)
To: Peter Eisentraut <peter@eisentraut.org>; +Cc: pgsql-committers@lists.postgresql.org
On Mon, Feb 14, 2022 at 07:40:22AM +0000, Peter Eisentraut wrote:
> Database-level collation version tracking
>
> This adds to database objects the same version tracking that collation
> objects have. There is a new pg_database column datcollversion that
> stores the version, a new function
> pg_database_collation_actual_version() to get the version from the
> operating system, and a new subcommand ALTER DATABASE ... REFRESH
> COLLATION VERSION.
>
> This was not originally added together with pg_collation.collversion,
> since originally version tracking was only supported for ICU, and ICU
> on a database-level is not currently supported. But we now have
> version tracking for glibc (since PG13), FreeBSD (since PG14), and
> Windows (since PG13), so this is useful to have now.
calliphoridae does not like this one:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=calliphoridae&dt=2022-02-14%2007%3A41%3A...
SELECT current_database() AS datname \\gset
ALTER DATABASE :"datname" REFRESH COLLATION VERSION;
-NOTICE: version has not changed
+ERROR: unrecognized node type: 291
Worth noting that it uses -DDCOPY_PARSE_PLAN_TREES and
-DRAW_EXPRESSION_COVERAGE_TEST, so you may have missed a piece in this
area.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Database-level collation version tracking
2022-02-14 07:40 pgsql: Database-level collation version tracking Peter Eisentraut <peter@eisentraut.org>
2022-02-14 08:18 ` Re: pgsql: Database-level collation version tracking Michael Paquier <michael@paquier.xyz>
@ 2022-02-14 17:02 ` Peter Eisentraut <peter@eisentraut.org>
0 siblings, 0 replies; 3+ messages in thread
From: Peter Eisentraut @ 2022-02-14 17:02 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-committers@lists.postgresql.org
On 14.02.22 09:18, Michael Paquier wrote:
> calliphoridae does not like this one:
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=calliphoridae&dt=2022-02-14%2007%3A41%3A...
>
> SELECT current_database() AS datname \\gset
> ALTER DATABASE :"datname" REFRESH COLLATION VERSION;
> -NOTICE: version has not changed
> +ERROR: unrecognized node type: 291
>
> Worth noting that it uses -DDCOPY_PARSE_PLAN_TREES and
> -DRAW_EXPRESSION_COVERAGE_TEST, so you may have missed a piece in this
> area.
Fun fact: You'd think that just copying "-DDCOPY_PARSE_PLAN_TREES
-DRAW_EXPRESSION_COVERAGE_TEST" into, say, COPT, would help debug this,
but that only works if the originals are spelled correctly. ;-)
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2022-02-14 17:02 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-02-14 07:40 pgsql: Database-level collation version tracking Peter Eisentraut <peter@eisentraut.org>
2022-02-14 08:18 ` Michael Paquier <michael@paquier.xyz>
2022-02-14 17:02 ` Peter Eisentraut <peter@eisentraut.org>
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