Re: Global temporary tables - Mailing list pgsql-hackers

From Konstantin Knizhnik
Subject Re: Global temporary tables
Date
Msg-id 91de2094-165a-04f1-9b3d-348473394345@postgrespro.ru
Whole thread Raw
In response to Re: Global temporary tables  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: Global temporary tables
List pgsql-hackers


On 13.08.2019 11:27, Craig Ringer wrote:


On Tue, 13 Aug 2019 at 16:19, Konstantin Knizhnik <k.knizhnik@postgrespro.ru> wrote:


On 13.08.2019 8:34, Craig Ringer wrote:
On Tue, 13 Aug 2019 at 00:47, Pavel Stehule <pavel.stehule@gmail.com> wrote:
 
But Postgres is not storing this information now anywhere else except statistic, isn't it?

not only - critical numbers are reltuples, relpages from pg_class

That's a very good point. relallvisible too. How's the global temp table impl handling that right now, since you won't be changing the pg_class row? AFAICS relpages doesn't need to be up to date (and reltuples certainly doesn't) so presumably you're just leaving them as zero?
As far as I understand relpages and reltuples are set only when you perform "analyze" of the table.

Also autovacuum's autoanalyze.

When it happen?
I have created normal table, populated it with some data and then wait several hours but pg_class was not updated for this table.


I attach to this mail slightly refactored versions of this patches with fixes of issues reported in your review.

-- 
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company 
Attachment

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: errbacktrace
Next
From: Alvaro Herrera
Date:
Subject: Re: progress report for ANALYZE