Re: Small TRUNCATE glitch

From: Alex Shulgin <ash(at)commandprompt(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Small TRUNCATE glitch
Date: 2014-12-10 14:07:26
Message-ID: 877fxz1tup.fsf@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)us> writes:

> On Wed, Dec 10, 2014 at 10:32:42AM +0200, Heikki Linnakangas wrote:
>> >I don't think we need to have 2PC files survive a pg_upgrade. It seems
>> >perfectly okay to remove them from the new cluster at some appropriate
>> >time, *if* they are copied from the old cluster at all (I don't think
>> >they should be.)
>>
>> I think pg_upgrade should check if there are any prepared
>> transactions pending, and refuse to upgrade if there are. It could
>> be made to work, but it's really not worth the trouble. If there are
>> any pending prepared transactions in the system when you run
>> pg_upgrade, it's more likely to be a mistake or oversight in the
>> first place, than on purpose.
>
> pg_upgrade already checks for prepared transactions and errors out if
> they exist; see check_for_prepared_transactions().

Alright, that's good to know. So I'm just adding a new bool field to
the 2PC pgstat record instead of the bit magic.

Attached is v0.2, now with a regression test included.

--
Alex

Attachment Content-Type Size
truncate-and-pgstat-v0.2.patch text/x-diff 15.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Rahila Syed 2014-12-10 14:10:46 Re: [REVIEW] Re: Compression of full-page-writes
Previous Message Kevin Grittner 2014-12-10 14:02:21 Re: PATCH: hashjoin - gracefully increasing NTUP_PER_BUCKET instead of batching