Skip site navigation (1) Skip section navigation (2)

Re: Temporary tables under hot standby

From: Jim Nasby <jim(at)nasby(dot)net>
To: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Temporary tables under hot standby
Date: 2012-05-01 20:22:32
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On 4/25/12 6:15 PM, Jaime Casanova wrote:
> On Wed, Apr 25, 2012 at 5:46 PM, Merlin Moncure<mmoncure(at)gmail(dot)com>  wrote:
>> >
>> >  I don't know how GTT play inside the Oracle stack such that they
>> >  aren't super popular, but if they work in the standby they will
>> >  quickly become a killer feature.  IMNSHO it's annoying but acceptable
>> >  to be forced to define them into the permanent schema.  Lack of temp
>> >  tables on the standby is a popular question/complaint on irc and in
>> >  most cases the proposal would satisfactorily address the problem.
>> >
> The problem with using GTT for this is, IMHO, that you need to know
> what your temp table will look before hand.
> I have seen applications that uses the same name (ie: temp1, t1, tt or
> t_temp) for all or almost all temp tables and, of course, all those
> have different structures.

Not to pick on Jaime, but this is the 2nd or 3rd comment I've seen about applications using temp tables.

How many of these applications are actually trying to function on a read-only slave?

ISTM that an *application* would likely not need to modify it's use of temp tables (unless we actually rip out support for how they currently work, but I don't think that's on the table).

Now, reporting may well be a different story... we can't use streaming replication at work because of the lack of temp tables, but GTT's would not really solve our problem either. That said, the places in our application where we use temp tables it would actually be easier for us to use GTT's rather than LTT's.
Jim C. Nasby, Database Architect                   jim(at)nasby(dot)net
512.569.9461 (cell)               

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2012-05-01 20:25:07
Subject: Re: port _srv.o makefile rules don't observe dependency tracking
Previous:From: Hannu KrosingDate: 2012-05-01 20:16:01
Subject: Re: JSON in 9.2 - Could we have just one to_json() function instead of two separate versions ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group