Simon Riggs wrote:
The idea outlined before didn't deal with all call points for
RecordIsCleanupRecord(), so doesn't actually work.
Are we talking about the same thing? If we put the control of locking to
the hands of the redo-function, I don't see why it couldn't use a lock
of the right strength. Surely the redo-function can be taught what lock
it needs to take.
ISTM easier to do things within the rmgr at the time WAL records are
written, rather than in the rmgr while handling redo.
I don't like that idea. I'd like to keep the coupling between the
primary and standby to the minimum.
This avoids another rmgr call and is much more straightforward since we
define how to redo the record at the time it is written, rather than via
a separate mechanism that could mismatch.
The code that generates a WAL record and the redo-functions need to
match in general anyway. The strength of the lock is not any more
error-prone than other things that a redo-function must do.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers