pg_subtrans and WAL - Mailing list pgsql-hackers

From Tom Lane
Subject pg_subtrans and WAL
Date
Msg-id 29088.1092155046@sss.pgh.pa.us
Whole thread Raw
Responses Re: pg_subtrans and WAL
List pgsql-hackers
My discovery last night of a WAL synchronization error in pg_clog led me
to take a look at pg_subtrans too.  I soon realized that in fact we are
not WAL-logging pg_subtrans updates at all: subtransaction start sets up
a pg_subtrans entry but makes no WAL entry for this action.

Seems like this is a problem.

It may be that we do not care because pg_subtrans doesn't have to be
valid after a crash, but I haven't seen any proof of that theory.
And if that theory is correct, then it is a seriously bad design to be
using the same code infrastructure for both pg_clog and pg_subtrans.
Every fsync on pg_subtrans is wasted effort if that is going to be our
approach.  We should in fact just delete pg_subtrans and re-init it to
zeroes during postmaster start...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: fsync vs open_sync (more info)
Next
From: Tom Lane
Date:
Subject: We have got a serious problem with pg_clog/WAL synchronization