agora inbox for pgsql-bugs@postgresql.org
help / color / mirror / Atom feedFrom: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Alexander Kukushkin <cyberdemn@gmail.com>
Cc: Sutou Kouhei <kou@clear-code.com>
Cc: smithpb2250@gmail.com
Cc: torikoshia@oss.nttdata.com
Cc: horikyota.ntt@gmail.com
Cc: michael@paquier.xyz
Cc: pgsql-hackers@postgresql.org
Cc: bungina@gmail.com
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pg_rewind WAL segments deletion pitfall
Date: Fri, 15 Nov 2024 13:22:21 +0100
Message-ID: <202411151222.7qbg5ujnrnxt@alvherre.pgsql> (raw)
In-Reply-To: <CAFh8B=kr3umY1c-jfUeG1LbdP__Rv4nb=6zpozxJQsmFXr07YQ@mail.gmail.com>
Hello Alexander,
On 2024-Nov-14, Alexander Kukushkin wrote:
> The commit message looks good to me, except maybe using a "master" word,
> which I would suggest to replace with "primary".
Oh wow, thanks for noticing that. I had already rewritten the commit
message to some extent, but "master" had remained. Now I pushed the
patch to branches 14+, having replaced it as you suggested.
(This reminds me that I used to have a notification set in the
2ndQuadrant Mattermost instance so that I could LART anybody who used
the words 'master' or 'slave' in the chats there).
> + /*
> + * This hash table is empty in the vast majority of cases, so set an
> + * initial size of 0.
> + */
> + keepwal = keepwal_create(0, NULL);
> +}
>
> I don't think that the hash table will be empty. It needs to hold all WAL
> filenames starting from the last checkpoint and up to divergent point.
> On loaded clusters it could be hundreds and thousands of files.
Oh, okay. The initial size is just there to avoid having to grow the
hash table, but using the same constant that we use for the filemap hash
table seems good enough ... it shouldn't make much of a difference in
practice.
Regards
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
<Schwern> It does it in a really, really complicated way
<crab> why does it need to be complicated?
<Schwern> Because it's MakeMaker.
view thread (50+ messages) latest in thread
Message-ID: <202411151222.7qbg5ujnrnxt@alvherre.pgsql>
Permalink: ../202411151222.7qbg5ujnrnxt@alvherre.pgsql/
Also on: postgresql.org/message-id/202411151222.7qbg5ujnrnxt@alvherre.pgsql
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: alvherre@alvh.no-ip.org, cyberdemn@gmail.com, kou@clear-code.com, smithpb2250@gmail.com, torikoshia@oss.nttdata.com, horikyota.ntt@gmail.com, michael@paquier.xyz, pgsql-hackers@postgresql.org, bungina@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: pg_rewind WAL segments deletion pitfall
In-Reply-To: <202411151222.7qbg5ujnrnxt@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox