RE: Patch for migration of the pg_commit_ts directory

From: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'Sergey' <ls7777(at)yandex(dot)ru>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "orlovmg(at)gmail(dot)com" <orlovmg(at)gmail(dot)com>, "amit(dot)kapila16(at)gmail(dot)com" <amit(dot)kapila16(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Subject: RE: Patch for migration of the pg_commit_ts directory
Date: 2026-08-25 08:46:13
Message-ID: OS9PR01MB1214953D981C1DFC9B29481EAF5AF2@OS9PR01MB12149.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear Sergey,

> I was writing emails in the browser. I am writing this letter and
> sending it in the mail client. The letter format is plain text. I think
> this should fix the problem.

Yes, solved. Thanks for the corporation.

> You do not need to check for files in the pg_commit_ts directory in the
> new cluster BEFORE the copy operation. These files are not needed. This
> patch is designed to copy the pg_commit_ts directory from the old
> cluster. If the user does not want to copy the pg_commit_ts directory,
> it is enough not to specify the --pg-commit-ts option. This is the
> default behavior. And for most, this is a suitable option.

OK, understood. Let me think over it again...

BTW, I still think this patch must be coordinate with the migration of replication
origins [1], and this patch itself should not handle the origin migration.
To separate them clearly, I split your patch into three parts:

0001 - migrate commit_ts sub directory.
0002 - add --pg-commit-ts option. (Actually I'm not sure it's needed)
0003 - Save and restore the roident and remote_lsn from the old cluster.
IIUC it's not needed if [1] is pushed.

I feel this method allows patches to be pushed separately. How do you feel?

[1]: https://www.postgresql.org/message-id/CAFPTHDbPXU7cs189J=BrzSa20EJzajOU25N7G7nT6UZqMkRnXg@mail.gmail.com

Best regards,
Hayato Kuroda
FUJITSU LIMITED

Attachment Content-Type Size
v15-0001-pg_upgrade-transfer-commit-timestamps-to-the-new.patch application/octet-stream 8.8 KB
v15-0002-Add-pg-commit-ts-option.patch application/octet-stream 4.0 KB
v15-0003-Save-and-restore-roident-and-remote_lsn-for-new-.patch application/octet-stream 10.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Laurenz Albe 2026-08-25 08:46:30 Re: Adding a stored generated column without long-lived locks
Previous Message Daniel Gustafsson 2026-08-25 08:45:08 Re: pgcrypto.sgml: built in -> built-in