Re: could not link file in wal restore lines
От | Zsolt Ero |
---|---|
Тема | Re: could not link file in wal restore lines |
Дата | |
Msg-id | CAKw-smCHmcUsdhK3Gf1JbZuHYBhYEUx8m-Unu9qWJaRM4_fk7Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: could not link file in wal restore lines (Michael Paquier <michael@paquier.xyz>) |
Список | pgsql-bugs |
My script does the following:
0. no processes running
1. rm -rf data_dir
2. mkdir -p data_dir
3. pgbackrest restore
4. start pg service
I don't know where could this come from or how should I start to debug it. Also, if this is not critical then I can just stop worrying about it, but I don't like having possible bugs in a DB restore process.
Zsolt
On 23. Jul 2022 at 05:36:47, Michael Paquier <michael@paquier.xyz> wrote:
On Fri, Jul 22, 2022 at 04:24:54AM -0500, Zsolt Ero wrote:I've opened an issue on pgbackrest, where the developer confirmed thatthose files are not touched by pgbackrest, they are basically copied backexactly as they were. The backup/restore is on the same partition as thedata folder, so no chance of file system changes, etc. Single master, noreplication.I'm always doing clean data dir + init_db so there is nothing there beforethe restore. I can replicate this behaviour 100%.PostgreSQL version: psql (PostgreSQL) 12.11 (Ubuntu 12.11-1.pgdg18.04+1)OS is Ubuntu 18.04pgbackrest issue: https://github.com/pgbackrest/pgbackrest/issues/1815log details:could not link file "pg_wal/000000010000015600000098" to"pg_wal/00000001000001570000006E": File exists
FWIW, the backend code has protections to prevent *exactly* this kind
of problems when recycling WAL segment files at checkpoints with a set
of LWLocks taken on the control file, for one. Perhaps you have
messed up things and you have finished in such a state that backrest
writes to pg_wal/ concurrently with a cluster running and running a
checkpoint, which would explain those link() calls to be failing?
--
Michael
В списке pgsql-bugs по дате отправления: