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: 4FA04608.3090108@nasby.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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) http://jim.nasby.net

In response to

Browse pgsql-hackers by date

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