Re: Global temporary tables

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Global temporary tables
Date: 2019-08-16 06:25:03
Message-ID: CAMsr+YFFZ2c0XfvNO2FK27gncZn8FdYLjZL2=2wCEy=vDFZk1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 13 Aug 2019 at 21:50, Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>
wrote:

> 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.
>
>

heap_vacuum_rel() in src/backend/access/heap/vacuumlazy.c below

* Update statistics in pg_class.

which I'm pretty sure is common to explicit vacuum and autovacuum. I
haven't run up a test to verify 100% but most DBs would never have relpages
etc set if autovac didn't do it since most aren't explicitly VACUUMed at
all.

I thought it was done when autovac ran an analyze, but it looks like it's
all autovac. Try setting very aggressive autovac thresholds and inserting +
deleting a bunch of tuples maybe.

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

Thanks.

Did you have a chance to consider my questions too? I see a couple of
things where there's no patch change, which is fine, but I'd be interested
in your thoughts on the question/issue in those cases.

>

--
Craig Ringer http://www.2ndQuadrant.com/
2ndQuadrant - PostgreSQL Solutions for the Enterprise

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2019-08-16 06:41:34 Re: proposal: type info support functions for functions that use "any" type
Previous Message Etsuro Fujita 2019-08-16 05:43:25 Re: Useless bms_free() calls in build_child_join_rel()