Re: Full page images in WAL & Cache Invalidation - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Full page images in WAL & Cache Invalidation
Date
Msg-id 24598.1185201621@sss.pgh.pa.us
Whole thread Raw
In response to Re: Full page images in WAL & Cache Invalidation  ("Florian G. Pflug" <fgp@phlo.org>)
Responses Re: Full page images in WAL & Cache Invalidation  ("Florian G. Pflug" <fgp@phlo.org>)
List pgsql-hackers
"Florian G. Pflug" <fgp@phlo.org> writes:
> I came up with the following plan for both inval events and locks
> .) Store two flags in the commit record of a transaction, for
>     "transaction generated inval events" and "transaction held an
>     access exlusive lock".
> .) Upon replay, block until no transactions are running (for
>     "transaction held an exclusive lock") before replaying the
>     record, or flush the caches after replaying it (for
>     "transaction generated inval events").

This does not work; the lock has to be taken earlier than that.
(See for instance VACUUM's truncate calls.)  Not to mention that
you have converted "exclusive lock on one table" to "exclusive lock
on every table", which is even worse than the idea of converting
per-table cache flushes to system-wide ones.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Oops in fe-auth.c
Next
From: Tom Lane
Date:
Subject: Re: syslogging oddity