Re: [HACKERS] Metadata about relation creation & full scans.

2017-03-22 Thread Andres Freund
On March 22, 2017 3:54:07 PM GMT+01:00, Tom Lane wrote: >Andres Freund 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 >>

Re: [HACKERS] Metadata about relation creation & full scans.

2017-03-22 Thread Tom Lane
Andres Freund 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 lo

Re: [HACKERS] Metadata about relation creation & full scans.

2017-03-22 Thread Andres Freund
On 2017-03-22 10:14:14 -0400, Tom Lane wrote: > Andres Freund 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 sca

Re: [HACKERS] Metadata about relation creation & full scans.

2017-03-22 Thread Tom Lane
Andres Freund 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