pgsql: Avoid some table rewrites for ALTER TABLE .. SET DATA TYPEtimes - Mailing list pgsql-committers

From Noah Misch
Subject pgsql: Avoid some table rewrites for ALTER TABLE .. SET DATA TYPEtimes
Date
Msg-id E1h2TU0-00059a-Ds@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Avoid some table rewrites for ALTER TABLE .. SET DATA TYPE timestamp.

When the timezone is UTC, timestamptz and timestamp are binary coercible
in both directions.  See b8a18ad4850ea5ad7884aa6ab731fd392e73b4ad and
c22ecc6562aac895f0f0529707d7bdb460fd2a49 for the previous attempt in
this problem space.  Skip the table rewrite; for now, continue to
needlessly rewrite any index on an affected column.

Reviewed by Simon Riggs and Tom Lane.

Discussion: https://postgr.es/m/20190226061450.GA1665944@rfd.leadboat.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3c5926301aea476025f118159688a6a88b2738bc

Modified Files
--------------
src/backend/commands/tablecmds.c            | 32 ++++++++++++++++++++++++-----
src/backend/utils/adt/timestamp.c           | 17 +++++++++++++++
src/include/utils/timestamp.h               |  2 ++
src/test/regress/expected/event_trigger.out | 11 +++++++++-
src/test/regress/sql/event_trigger.sql      | 10 ++++++++-
5 files changed, 65 insertions(+), 7 deletions(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Tighten use of OpenTransientFile and CloseTransientFile
Next
From: Magnus Hagander
Date:
Subject: pgsql: Track block level checksum failures in pg_stat_database