Re: Creation of temporary tables on read-only standby servers

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org, Bruce Momjian <bruce(at)momjian(dot)us>
Subject: Re: Creation of temporary tables on read-only standby servers
Date: 2010-10-20 20:22:18
Message-ID: AANLkTi=Hr=cA-vcsFYMArjnPkqgYpeuDwPUj_M22v4qr@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 20, 2010 at 8:37 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I think it's pointless to speculate about whether we might have divvied
> up the meta-information about tables differently if we'd foreseen
> wanting to do this.  It is what it is, and there is *way* too much code
> depending on it, both inside the backend and in clients.  Any
> reimplementation of temp tables will still have to expose largely the
> same catalog information that exists for tables now.  We can probably
> get away with marginal changes like redefining relfilenode, but we can't
> avoid providing catalog entries that describe the schema and statistics
> of a temp table.

I agree about the schema -- that's the whole point of the catalog tables.

I felt like the statistics were pretty marginal to begin with. There
may be a large number of places but there's no complex structure of
relationships to other tables or complex data structures going on
here. Surely they can all be coded to look up the relpages from
somewhere else just as easily?

But I'm not about to start working on this area so my judgement on how
much work that would be isn't very important here.

And your point that if we have a complete local copy of the entire
catalog schema then we can create temporary tables from whole cloth on
a read-only database
just as easily is attractive.

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-10-20 20:23:25 Re: WIP: extensible enums
Previous Message Marti Raudsepp 2010-10-20 20:18:11 Re: [PATCH] pgcrypto: Test for NULL before dereferencing pointer