From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Subject: | Re: Metadata about relation creation & full scans. |
Date: | 2017-03-22 14:43:56 |
Message-ID: | 20170322144356.ygs3pz6oy5qtgu3h@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2017-03-22 10:14:14 -0400, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
> > I propose that for each pg_class entry we start to keep the following
> > additional metadata:
> > - CATALOG_VERSION_NO at relation creation
> > - PG_VERSION_NUM at relation creation
> > - CATALOG_VERSION_NO at last full scan by vacuum
> > - PG_VERSION_NUM at last full scan by vacuum
>
> (1) It's very very hard for me to believe that we need *two* versions of
> the version number. Pick one.
PG_VERSION_NUM is probably enough, alright.
> (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.
That requires to hand up whether the whole table is scanned, which'd not
be entirely pretty. Alternatively we could "just" PROC_IN_VACUUM* in
lazy_vacuum_rel(), but that seems like a cure worse than the disease.
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2017-03-22 14:50:34 | Re: Monitoring roles patch |
Previous Message | Stephen Frost | 2017-03-22 14:41:27 | Re: increasing the default WAL segment size |