Re: Patch for migration of the pg_commit_ts directory

From: ls7777 <ls7777(at)yandex(dot)ru>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
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-07-21 19:08:00
Message-ID: 7105101784659908@mail.yandex.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

<div>Hi,</div><div><div>Are you talking about checking for files in the pg_commit_ts directory of the old cluster?</div><div> </div><div>The possibility of copying the catalog is checked here:</div></div><div>+    /*</div><div><div>+     * Copy old commit_timestamp data to new, if available.</div><div>+     */</div><div>+    is_copy_commit_ts =</div><div>+        (old_cluster.controldata.chkpnt_oldstCommitTsxid &gt; 0 &amp;&amp;</div><div>+         old_cluster.controldata.chkpnt_newstCommitTsxid &gt; 0 &amp;&amp;</div><div>+         user_opts.do_copy_pg_commit_ts);</div><div>+</div><div>+    if (is_copy_commit_ts)</div><div>+    {<!-- --></div><div>+        copy_subdir_files("pg_commit_ts", "pg_commit_ts");</div><div>+        oldest_xid = old_cluster.controldata.chkpnt_oldstCommitTsxid;</div><div>+        newest_xid = old_cluster.controldata.chkpnt_newstCommitTsxid;</div><div>+    }</div><div>+    else</div><div>+        oldest_xid = newest_xid = old_cluster.controldata.chkpnt_nxtxid;</div><div>+</div><div> </div></div><div><div>Do I need to check something else additionally in the old cluster before copying the pg_commit_ts directory?</div></div><div> </div><div>----------------</div><div>Кому: 'ls7777' (ls7777(at)yandex(dot)ru);</div><div>Копия: pgsql-hackers(at)postgresql(dot)org, orlovmg(at)gmail(dot)com, amit(dot)kapila16(at)gmail(dot)com, Masahiko Sawada (sawada(dot)mshk(at)gmail(dot)com);</div><div>Тема: Patch for migration of the pg_commit_ts directory;</div><div>01.06.2026, 06:25, "Hayato Kuroda (Fujitsu)" &lt;kuroda(dot)hayato(at)fujitsu(dot)com&gt;:</div><blockquote><p>Dear Sergey,<br /> </p><blockquote> During copying, the copy_subdir_files function cleans up the target<br /> directory with the remove_new_subdir(new_subdir, true) function.</blockquote><p><br />Correct, the function can discard existing directory. But my point was that how<br />do we ENSURE it's OK to remove.<br /><br />Best regards,<br />Hayato Kuroda<br />FUJITSU LIMITED<br /> </p></blockquote>

Attachment Content-Type Size
unknown_filename text/html 2.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ayush Tiwari 2026-07-21 19:10:00 Re: Caching a partition index's parent OID in the relcache?
Previous Message Sami Imseih 2026-07-21 18:51:22 Re: Track skipped tables during autovacuum and autoanalyze