Re: [PATCHES] WAL logging freezing - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCHES] WAL logging freezing
Date
Msg-id 20593.1162246208@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCHES] WAL logging freezing  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> In fact I don't understand what's the point about multiple databases vs.
> a single database.  Surely a checkpoint would flush all buffers in all
> databases, no?

Yeah --- all the ones that are dirty *now*.  Consider the case where you
vacuum DB X, update its datvacuumxid, and don't checkpoint because the
global min didn't advance.  Now you crash, possibly leaving some hint
bits unwritten; but the datvacuumxid change did make it to disk.  After
restart, vacuum DB Y, update its datvacuumxid, and find that the global
min *did* advance.  You checkpoint, and that guarantees that DB Y is
clean for the clog truncation.  But DB X isn't.

The 8.2 changes have created the equivalent risk at the level of each
individual table.  We can't write a vacuumxid change unless we are sure
that the hint-bit changes it promises are actually down to disk.

            regards, tom lane

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] WAL logging freezing
Next
From: "Simon Riggs"
Date:
Subject: Re: [PATCHES] WAL logging freezing