| From: | Bruce Momjian <bruce(at)momjian(dot)us> | 
|---|---|
| To: | Greg Stark <gsstark(at)mit(dot)edu> | 
| Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org | 
| Subject: | Re: Creation of temporary tables on read-only standby servers | 
| Date: | 2010-10-22 00:00:46 | 
| Message-ID: | 201010220000.o9M00kw20867@momjian.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Greg Stark wrote:
> On Tue, Oct 19, 2010 at 12:03 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> > The trick is that it would require us to have two pg_class tables, two
> > pg_attribute tables, two pg_attrdef tables, etc.: in each case, one
> > permanent and one temporary. ?I am not sure how complex that will turn
> > out to be.
> 
> Tom suggested using inheritance for this.
> 
> I find it strange to try constructing catalog tables to represent
> these local definitions which never need to be read by any other
> backend and in any case are 1:1 copies of the global catalog entries.
> 
> It seems to me simpler and more direct to just nail relcache
> entries for these objects into memory and manipulate them directly.
> They can be constructed from the global catalog tables and then
> tweaked to point to the backend local temporary tables.
Funny, but that is how I implemented temporary tables in 1999 and lasted
until 2002 when schema support was added.  It actually worked because
all the lookups go through the syscache.
-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com
+ It's impossible for everything to be true. +
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stephen R. van den Berg | 2010-10-22 00:03:54 | Re: pg_rawdump | 
| Previous Message | Greg Stark | 2010-10-21 23:55:01 | Re: Floating-point timestamps versus Range Types |