From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Checking for missing heap/index files |
Date: | 2022-06-17 15:56:33 |
Message-ID: | 20220617155633.ikohjcc3ov4ya6tl@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2022-Jun-09, Stephen Frost wrote:
> TL;DR: if you're removing files from a directory that you've got an
> active readdir() running through, you might not actually get all of the
> *existing* files. Given that PG is happy to remove files from PGDATA
> while a backup is running, in theory this could lead to a backup utility
> like pgbackrest or pg_basebackup not actually backing up all the files.
>
> Now, pgbackrest runs the readdir() very quickly to build a manifest of
> all of the files to backup, minimizing the window for this to possibly
> happen, but pg_basebackup keeps a readdir() open during the entire
> backup, making this more possible.
Hmm, this sounds pretty bad, and I agree that a workaround should be put
in place. But where is pg_basebackup looping around readdir()? I
couldn't find it. There's a call to readdir() in FindStreamingStart(),
but that doesn't seem to match what you describe.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2022-06-17 16:05:11 | Re: Typo in ro.po file? |
Previous Message | Aleksander Alekseev | 2022-06-17 15:04:11 | Re: [PATCH] Compression dictionaries for JSONB |