pgsql: Avoid some table rewrites for ALTER TABLE .. SET DATA TYPE times

From: Noah Misch <noah(at)leadboat(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Avoid some table rewrites for ALTER TABLE .. SET DATA TYPE times
Date: 2019-03-09 04:21:12
Message-ID: E1h2TU0-00059a-Ds@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Magnus Hagander 2019-03-09 18:48:11 pgsql: Track block level checksum failures in pg_stat_database
Previous Message Michael Paquier 2019-03-09 01:15:37 Re: pgsql: Improve autovacuum logging for aggressive and anti-wraparound ru