]> granicus.if.org Git - postgresql/commit
Repair longstanding bug in slru/clog logic: it is possible for two backends
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 21 Jan 2006 04:38:36 +0000 (04:38 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 21 Jan 2006 04:38:36 +0000 (04:38 +0000)
commit6a928e11fa1ca59f17940a698fdf081073a959f3
tree9916a3ab1f5cb9ccfbe1c5d631d5d9ee6de927ec
parent1f57f2e311f6538e38181497428c1153535cefb6
Repair longstanding bug in slru/clog logic: it is possible for two backends
to try to create a log segment file concurrently, but the code erroneously
specified O_EXCL to open(), resulting in a needless failure.  Before 7.4,
it was even a PANIC condition :-(.  Correct code is actually simpler than
what we had, because we can just say O_CREAT to start with and not need a
second open() call.  I believe this accounts for several recent reports of
hard-to-reproduce "could not create file ...: File exists" errors in both
pg_clog and pg_subtrans.
src/backend/access/transam/slru.c