Re: [Proposal] Global temporary tables - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: [Proposal] Global temporary tables
Date
Msg-id 20200113210301.yakqxdmxjh2ogq6x@development
Whole thread Raw
In response to Re: [Proposal] Global temporary tables  (Julien Rouhaud <rjuju123@gmail.com>)
List pgsql-hackers
On Mon, Jan 13, 2020 at 09:12:38PM +0100, Julien Rouhaud wrote:
>On Mon, Jan 13, 2020 at 05:32:53PM +0100, Tomas Vondra wrote:
>> On Mon, Jan 13, 2020 at 11:08:40AM +0300, Konstantin Knizhnik wrote:
>> >
>> >"if any code tried to access the statistics directly from the table,
>> >rather than via the caches".
>> >
>> >Currently optimizer is accessing statistic though caches. So this
>> >approach works. If somebody will rewrite optimizer or provide own
>> >custom optimizer in extension which access statistic directly
>> >then it we really be a problem. But I wonder why bypassing catalog
>> >cache may be needed.
>> >
>>
>> I don't know, but it seems extensions like hypopg do it.
>
>AFAIR, hypopg only opens pg_statistic to use its tupledesc when creating
>statistics on hypothetical partitions, but it should otherwise never reads or
>need plain pg_statistic rows.

Ah, OK! Thanks for the clarification. I knew it does something with the
catalog, didn't realize it only gets the descriptor.


regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services 



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Removing pg_pltemplate and creating "trustable" extensions
Next
From: Michael Paquier
Date:
Subject: Re: isTempNamespaceInUse() is incorrect with its handling ofMyBackendId