-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backport 'Avoid some table rewrites for ALTER TABLE .. SET DATA TYPE timestamp' #6900
Comments
tedyu
added a commit
that referenced
this issue
Jan 19, 2021
…SET DATA TYPE timestamp' Summary: Noah mentioned the following commit under the thread 'Alter timestamp without timezone to with timezone rewrites rows' (commit hash 3c5926301aea476025f118159688a6a88b2738bc) Here is the link to the thread: https://www.postgresql.org/message-id/20210116115342.GA1681052%40rfd.leadboat.com 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/[email protected] ``` This revision backports the patch. Related code in ybccmds.c is modified to allow timestamp <-> timestamptz type change when no rewrite is needed. Test Plan: Run org.yb.pgsql.TestPgRegressTrigger#testPgRegressTrigger which passes with the change. Reviewers: jason, ena Reviewed By: jason Subscribers: yql Differential Revision: https://phabricator.dev.yugabyte.com/D10381
polarweasel
pushed a commit
to lizayugabyte/yugabyte-db
that referenced
this issue
Mar 9, 2021
…ABLE .. SET DATA TYPE timestamp' Summary: Noah mentioned the following commit under the thread 'Alter timestamp without timezone to with timezone rewrites rows' (commit hash 3c5926301aea476025f118159688a6a88b2738bc) Here is the link to the thread: https://www.postgresql.org/message-id/20210116115342.GA1681052%40rfd.leadboat.com 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/[email protected] ``` This revision backports the patch. Related code in ybccmds.c is modified to allow timestamp <-> timestamptz type change when no rewrite is needed. Test Plan: Run org.yb.pgsql.TestPgRegressTrigger#testPgRegressTrigger which passes with the change. Reviewers: jason, ena Reviewed By: jason Subscribers: yql Differential Revision: https://phabricator.dev.yugabyte.com/D10381
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Noah mentioned the following commit under the thread 'Alter timestamp without timezone to with timezone rewrites rows':
Avoid some table rewrites for ALTER TABLE .. SET DATA TYPE timestamp
We should backport this enhancement.
The text was updated successfully, but these errors were encountered: