Re: PITR, checkpoint, and local relations - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PITR, checkpoint, and local relations
Date
Msg-id 29568.1028296896@sss.pgh.pa.us
Whole thread Raw
In response to Re: PITR, checkpoint, and local relations  ("J. R. Nield" <jrnield@usol.com>)
Responses Re: PITR, checkpoint, and local relations  ("J. R. Nield" <jrnield@usol.com>)
List pgsql-hackers
"J. R. Nield" <jrnield@usol.com> writes:
> Ok. This is what I wanted to hear, but I had assumed someone decided to
> put it in for a reason, and I wasn't going to submit a patch to pull-out
> the local buffer manager without clearing it first.

> The main area where it seems to get heavy use is during index builds,

Yeah.  I do not think it really saves any I/O: unless you abort your
index build, the data is eventually going to end up on disk anyway.
What it saves is contention for shared buffers (the overhead of
acquiring BufMgrLock, for example).

Just out of curiosity, though, what does it matter?  On re-reading your
message I think you are dealing with a non problem, or at least the
wrong problem.  Local relations do not need to be checkpointed, because
by definition they were created by a transaction that hasn't committed
yet.  They must be, and are, checkpointed to disk before the transaction
commits; but up till that time, if you have a crash then the entire
relation should just go away.

That mechanism is there already --- perhaps it needs a few tweaks for
PITR but I do not see any need for cross-backend flush commands for
local relations.
        regards, tom lane


pgsql-hackers by date:

Previous
From: cbbrowne@cbbrowne.com
Date:
Subject: Third Manifesto
Next
From: Greg Copeland
Date:
Subject: Re: Why is MySQL more chosen over PostgreSQL?