Thread: [BUGS] BUG #14806: WAL replay on standby: could not link file"pg_xlog/...4C" to "pg_xlog/...D1": File exists
[BUGS] BUG #14806: WAL replay on standby: could not link file"pg_xlog/...4C" to "pg_xlog/...D1": File exists
From
email@piotr-stefaniak.me
Date:
The following bug has been logged on the website: Bug reference: 14806 Logged by: Piotr Stefaniak Email address: email@piotr-stefaniak.me PostgreSQL version: 9.4.13 Operating system: FreeBSD 10.3 Description: We have an archive-only replicating standby. During intensive WAL replay, it sometimes happens that the standby will say "58P02: could not link file "pg_xlog/[...]" to "pg_xlog/[...]": File exists" as in the example below. It looks like some kind of race condition. I'm pretty convinced that nothing, except the standby itself, is modifying the contents of pg_xlog when it happens (or anytime else). log_line_prefix is '%t [%p]: [%l] %d %h %u '. 2017-08-25 22:12:08 CEST [30660]: [4873] LOG: 00000: restored log file "0000000100001560000000D0" from archive 2017-08-25 22:12:08 CEST [30660]: [4874] LOCATION: RestoreArchivedFile, xlogarchive.c:254 2017-08-25 22:12:08 CEST [30660]: [4875] DEBUG: 00000: got WAL segment from archive 2017-08-25 22:12:08 CEST [30660]: [4876] LOCATION: XLogFileReadAnyTLI, xlog.c:3594 2017-08-25 22:12:09 CEST [30660]: [4877] LOG: 00000: restored log file "0000000100001560000000D1" from archive 2017-08-25 22:12:09 CEST [30660]: [4878] LOCATION: RestoreArchivedFile, xlogarchive.c:254 2017-08-25 22:12:09 CEST [30923]: [7638] DEBUG: 00000: attempting to remove WAL segments older than log file 000000000000155D00000071 2017-08-25 22:12:09 CEST [30923]: [7639] LOCATION: RemoveOldXlogFiles, xlog.c:3778 2017-08-25 22:12:09 CEST [30660]: [4879] DEBUG: 00000: got WAL segment from archive 2017-08-25 22:12:09 CEST [30660]: [4880] LOCATION: XLogFileReadAnyTLI, xlog.c:3594 2017-08-25 22:12:09 CEST [30923]: [7640] LOG: 58P02: could not link file "pg_xlog/000000010000155C0000004C" to "pg_xlog/0000000100001560000000D1": File exists 2017-08-25 22:12:09 CEST [30923]: [7641] LOCATION: durable_link_or_rename, fd.c:541 2017-08-25 22:12:09 CEST [30923]: [7642] DEBUG: 00000: removing transaction log file "000000010000155C0000004C" 2017-08-25 22:12:09 CEST [30923]: [7643] LOCATION: RemoveXlogFile, xlog.c:3864 2017-08-25 22:12:09 CEST [30923]: [7644] DEBUG: 00000: recycled transaction log file "000000010000155C0000004D" 2017-08-25 22:12:09 CEST [30923]: [7645] LOCATION: RemoveXlogFile, xlog.c:3849 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #14806: WAL replay on standby: could not link file "pg_xlog/...4C" to "pg_xlog/...D1": File exists
From
Tom Lane
Date:
email@piotr-stefaniak.me writes: > We have an archive-only replicating standby. During intensive WAL replay, it > sometimes happens that the standby will say "58P02: could not link file > "pg_xlog/[...]" to "pg_xlog/[...]": File exists" as in the example below. It > looks like some kind of race condition. This is normal I believe; in any case it looks pretty harmless, since RemoveXlogFile will just remove the file if it fails to recycle it as a future xlog segment. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs