Re: Creation of temporary tables on read-only standby servers - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Creation of temporary tables on read-only standby servers
Date
Msg-id 11126.1287529977@sss.pgh.pa.us
Whole thread Raw
In response to Re: Creation of temporary tables on read-only standby servers  (Greg Stark <gsstark@mit.edu>)
Responses Re: Creation of temporary tables on read-only standby servers
List pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> On Tue, Oct 19, 2010 at 3:45 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Relcache entries alone are not gonna work. �There is way too much stuff
>> that assumes that tables are correctly represented in the system
>> catalogs.

> Well we're talking about multiple things now. In the global temporary
> table case they *are* properly represented in the system catalogs.
> Except for their local state such as the actual relfilenode all the
> structural attributes are going to be accurate.

... and relpages and reltuples ... it's really not going to be that easy
to have a table that isn't described in pg_class.  Which the structure
you're describing isn't.  There might be a template for it in pg_class,
but that's something entirely different.

> In the case of tables created locally on a slave, well, that's more
> complicated.

I think they're more alike than you think.  If we had the infrastructure
to do local temp tables this way, it'd be pretty easy to use that to
instantiate per-backend copies of global temp tables.  (The global
entities would be templates, not actual tables.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Terry Laurenzo
Date:
Subject: Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP)
Next
From: Greg Stark
Date:
Subject: Re: Creation of temporary tables on read-only standby servers