Re: Protecting against unexpected zero-pages: proposal

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, Aidan Van Dyk <aidan(at)highrise(dot)ca>, Jim Nasby <jim(at)nasby(dot)net>, Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>, PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Protecting against unexpected zero-pages: proposal
Date: 2010-11-09 23:42:09
Message-ID: 20570.1289346129@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> <dons asbestos underpants>
> 4. There would presumably be some finite limit on the size of the
> shared memory structure for aborted transactions. I don't think
> there'd be any reason to make it particularly small, but if you sat
> there and aborted transactions at top speed you might eventually run
> out of room, at which point any transactions you started wouldn't be
> able to abort until vacuum made enough progress to free up an entry.

Um, that bit is a *complete* nonstarter. The possibility of a failed
transaction always has to be allowed. What if vacuum itself gets an
error for example? Or, what if the system crashes?

I thought for a bit about inverting the idea, such that there were a
limit on the number of unvacuumed *successful* transactions rather than
the number of failed ones. But that seems just as unforgiving: what if
you really need to commit a transaction to effect some system state
change? An example might be dropping some enormous table that you no
longer need, but vacuum is going to insist on plowing through before
it'll let you have any more transactions.

I'm of the opinion that any design that presumes it can always fit all
the required transaction-status data in memory is probably not even
worth discussing. There always has to be a way for status data to spill
to disk. What's interesting is how you can achieve enough locality of
access so that most of what you need to look at is usually in memory.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-11-10 00:04:05 Re: Protecting against unexpected zero-pages: proposal
Previous Message Tom Lane 2010-11-09 23:30:58 Re: Protecting against unexpected zero-pages: proposal