| From: | shihao zhong <zhong950419(at)gmail(dot)com> |
|---|---|
| To: | Manu <manuelreyesbravo(at)gmail(dot)com> |
| Cc: | Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alexandre Felipe <o(dot)alexandre(dot)felipe(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #19686: Rolling back SET TABLESPACE |
| Date: | 2026-10-04 04:22:21 |
| Message-ID: | CAGRkXqTwGvh6Ce8RafmJ1nXvxfMe7DBOMQVcML=tzoT-BcEPCw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Manu,
v6 looks good to me. The child CHECK case, VALIDATE CONSTRAINT and
sql_drop all leave 0 stale entries now. One small thing.
ATSetTableSpaceCopyIndexes() also runs for ALTER INDEX, so a plain
ALTER INDEX SET TABLESPACE in a pipeline now commits on its own.
Maybe only call it for tables and matviews.
I recently got interested in replication lag with physical
replication, so I also looked at the replay side on a standby.
A plain top-level ALTER costs the same as master. In a transaction
block it costs more.
WAL size. The index copy is logged page by page, so the extra WAL
is the size of the indexes. Given they are mostly FPI, I think it is okay
for
replicas to quickly catch up.
AccessExclusiveLock. Each index now gets one too, so one more lock
record per index goes to the standby. I think that is okay. The
table already has that lock, and queries lock the table before its
indexes, so nobody new is blocked.
Thanks,
Shihao
| From | Date | Subject | |
|---|---|---|---|
| Next Message | shihao zhong | 2026-10-04 05:07:07 | Re: Checkpointer write combining |
| Previous Message | shihao zhong | 2026-10-04 04:12:38 | Re: [Patch] New pg_stat_tablespace view |