Re: vacuum vs heap_update_tuple() and multixactids

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Subject: Re: vacuum vs heap_update_tuple() and multixactids
Date: 2017-12-20 22:45:37
Message-ID: CA+TgmoanPDKs1Rh+unOr-K7E6W8JKOFNAn0wxzvnhu1ZcOM8MQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Wed, Dec 20, 2017 at 9:05 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> Indeed. I kinda wonder whether we hackishly solve this by simply
> returning true fore all pids if it's waiting for a cleanup lock. That's
> not actually that far from the truth... The big problem with that I see
> is very short waits that resolve themselves causing issues - but given
> that waiting for cleanup locks is really rare, that might not be too
> bad.

I'm wondering if that might cause random, spurious failures. We go on
to the next step if we detect that the current step is waiting... and
the decisions we make about whether to do that cause differences in
the output.

>> <me thinks for a while>
>>
>> What if we add a hook to vacuum that lets you invoke some arbitrary C
>> code after each block, and then write a test module that uses that
>> hook to acquire and release an advisory lock at that point? Then you
>> could do:
>
> I guess that'd work, albeit a bit invasive and specific to this
> test. Trying to come up with a concept that'll be generizable longer
> term would be neat.

True, but I'm not sure there's much hope of that.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Jeff Janes 2017-12-21 06:16:02 Order of columns in GROUP BY is significant to the planner.
Previous Message PG Bug reporting form 2017-12-20 17:59:46 BUG #14987: pg_dump fails due to postgis linking problem

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-12-20 23:06:15 Re: Letting plpgsql in on the fun with the new expression eval stuff
Previous Message Tom Lane 2017-12-20 22:41:18 Re: domain cast in parameterized vs. non-parameterized query