From: | John H <johnhyvr(at)gmail(dot)com> |
---|---|
To: | wenhui qiu <qiuwenhuifx(at)gmail(dot)com> |
Cc: | Japin Li <japinli(at)hotmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Andres Freund <andres(at)anarazel(dot)de>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Justin Kwan <justinpkwan(at)outlook(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, vignesh <vignesh(at)cloudflare(dot)com>, vignesh ravichandran <admin(at)viggy28(dot)dev>, "hlinnaka(at)iki(dot)fi" <hlinnaka(at)iki(dot)fi>, "jkwan(at)cloudflare(dot)com" <jkwan(at)cloudflare(dot)com> |
Subject: | Re: Making pg_rewind faster |
Date: | 2025-07-02 18:21:54 |
Message-ID: | CA+-JvFvK9MReq-76R01qHmqBarD2O1k7sX4xRApfWJMFdVJQBA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
Thanks for the quick review.
On Tue, Jul 1, 2025 at 8:16 PM wenhui qiu <qiuwenhuifx(at)gmail(dot)com> wrote:
> > Perhaps decide_wal_file_action() could be defined in filemap.c.
>
That's a good point. I updated the patch to reflect that.
> > While this is unrelated to WAL logging, it could also contribute to faster
> > pg_rewind operations. Should we consider ignoring log files under PGDATA
> > (e.g., those in the default log/ directory)?
> Agree ,Usually the log file directory also takes up a lot of space, and the number of log files is quite large
>
Should we handle this use case? I do agree that for the more common
use-cases of pg_rewind which is synchronizing an old writer to the new
leader after failover, avoiding syncing the logging directory is
useful.
At the same time, pg_rewind is intended to make the same copy of the
source cluster as efficiently as possible which would include "all"
directories if they exist in $PGDATA. By default logging_collector is
off as well. I'd also think you would want to avoid putting the logs
in $PGDATA to have smaller backups if you are using tools like
pg_basebackup.
> On Wed, Jul 2, 2025 at 10:21 AM Japin Li <japinli(at)hotmail(dot)com> wrote:
>>
>> Hi, John
>>
>> Thanks for updating the patch.
>>
>> 1.
>> +/* Determine the type of file content (relation, WAL, or other) */
>> +static file_content_type_t
>> +getFileType(const char *path)
>>
>> Considering the existence of file_type_t, would getFileContentType() be a
>> suitable function for handling file content types?
Do you mean naming getFileType to getFileContentType?
Thanks,
--
John Hsu - Amazon Web Services
Attachment | Content-Type | Size |
---|---|---|
0005-Avoid-copying-WAL-segments-before-divergence-to-spee.patch | application/octet-stream | 8.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Giacchino, Luca | 2025-07-02 18:26:56 | RE: Proposal for optimizations with simd enabled sort |
Previous Message | Greg Burd | 2025-07-02 18:10:19 | Re: Expanding HOT updates for expression and partial indexes |