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 4894.1185140534@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  (Gregory Stark <stark@enterprisedb.com>)
Re: Full page images in WAL & Cache Invalidation  ("Florian G. Pflug" <fgp@phlo.org>)
List pgsql-hackers
"Florian G. Pflug" <fgp@phlo.org> writes:
>> Anyway, if you believe that DDL is infrequent, why are you resistant
>> to the idea of WAL-logging cache flushes?

> First, cache invalidations are not the only problem caused by replaying 
> system-table updates. The whole SnapshotNow
> business doesn't exactly make things easier too. So it feels like a
> lot of added complexity and code for little gain - unless a *lot*
> more things (like locking requests) are logged too.

The mention of locking requests brought to mind the following
gedankenexperiment:

1. slave server backend is running some long-running query on table X.

2. WAL-reading process receives and executes DROP TABLE X.

(It doesn't even have to be a DROP; most varieties of ALTER are enough
to create problems for a concurrently-running query.)

It's really hard to see how to defend against that without a fairly
complete simulation of locking on the slave side.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Full page images in WAL & Cache Invalidation
Next
From: "Simon Riggs"
Date:
Subject: Re: Full page images in WAL & Cache Invalidation