| From: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
|---|---|
| To: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
| Cc: | Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: repack: clarify final phase of concurrent mode in file header comment |
| Date: | 2026-11-26 00:39:15 |
| Message-ID: | 463006F2-BE4B-40BF-AD37-BF41D218F881@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On Nov 26, 2026, at 00:41, Álvaro Herrera <alvherre(at)kurilemu(dot)de> wrote:
>
> On 2026-Apr-16, Chao Li wrote:
>
>> The file header comment in repack.c briefly explains the workflow of concurrent mode as:
>>
>> 1. Lock the table with ShareUpdateExclusiveLock
>> 2. Do an initial copy as non-concurrent mode
>> 3. While the initial copy is going on, accumulates concurrent changes to a file
>> 4. After the initial copy, read the file and re-apply the changes
>> 5. Upgrade to AccessExclusiveLock and swap the relfilenodes
>>
>> When I read the comment, I got confused at step 4. While that re-apply
>> pass is running, concurrent changes can still occur, so what happens
>> to those changes?
>
> Somebody independently mentioned this a few days ago, so I have pushed
> this patch, thanks.
>
> --
> Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
Thanks for pushing and back-patching to 19.
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Chao Li | 2026-11-26 00:37:17 | Re: pg_rewind: Fix buffer size passed when building WAL file name |