Re: [HACKERS] Metadata about relation creation & full scans. - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [HACKERS] Metadata about relation creation & full scans.
Date
Msg-id 8D2BDDAA-8AC6-4061-8433-CB3D1DFFB220@anarazel.de
Whole thread Raw
In response to Re: [HACKERS] Metadata about relation creation & full scans.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers


On March 22, 2017 3:54:07 PM GMT+01:00, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>Andres Freund <andres@anarazel.de> writes:
>> On 2017-03-22 10:14:14 -0400, Tom Lane wrote:
>>> (2) How you gonna update this in vacuum? It cannot do a
>transactional
>>> update.
>
>> I think we can just do that in a separate transaction, at the tail
>end
>> of vacuum_rel() - if we crash just before that, not that much is
>lost.
>
>Blech. What if someone's queued an exclusive lock request on the
>table?

Point - could do that with a session lock if needed.


>Actually though, maybe you could get away with updating the last-vacuum
>field nontransactionally. I think we're already updating some of the
>other pg_class fields nontransactionally.

We do, reltuples/pages, relfrozenxid and such. That should work too, the whole inplace business ain't pretty, but one more column won't make it much worse.

Andres

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] WIP: Faster Expression Processing v4
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] logical replication access control patches