Re: Temporary tables under hot standby - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: Temporary tables under hot standby
Date
Msg-id CAHyXU0wijiQUFkA+Kf82ej5M+D6HsJwE7DM7b4zKNKQGuh34DQ@mail.gmail.com
Whole thread Raw
In response to Re: Temporary tables under hot standby  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Temporary tables under hot standby
List pgsql-hackers
On Wed, Apr 25, 2012 at 11:53 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Wed, Apr 25, 2012 at 12:30 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
>> On Wed, Apr 25, 2012 at 5:19 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>>
>>> Oh, we're talking about different things, and I'm slightly confused.
>>>
>>> Yes, we need to support ANALYZE; what we might not need to support, at
>>> least initially, is every user of a global temp table having their own
>>> SEPARATE copy of the table statistics.
>>
>> Yes, we are. Global Temp Tables won't solve the "Works on HS" problem,
>> so we'd better decide fairly quickly which use case we are addressing,
>> and why. ISTM Global Temp Tables is more an Oracle compatibility issue
>> than a problem PostgreSQL users have.
>>
>> ...I have zero basis for deciding whether what you say about Global
>> Temp Tables is useful or not.
>
> Well, Noah presented a pretty good outline of how to make global temp
> tables work under Hot Standby.  As Noah already said, making regular
> temporary tables work under Hot Standby is far more difficult.  I
> think he's right.  I'd rather see us get global temp tables working
> under HS than insist we have to have regular temp tables working under
> HS and ultimately end up with nothing.  Even getting global temp
> tables working under HS is probably going to require an entire
> development cycle, maybe two.  So raising the bar still higher seems
> rather self-defeating to me.  Half a loaf is better than none.
>
> In the interest of full disclosure, I freely admit that global
> temporary tables would also be a neat Oracle compatibility feature,
> and I do work for a company that sells Oracle compatibility products
> based on PostgreSQL, so there are surely some reasons for me to like
> that, but AFAICT they aren't all *that* heavily used by most Oracle
> users either, which is why I haven't been able to justify doing this
> project before now.

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.

merlin


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Patch: add timing of buffer I/O requests
Next
From: Jaime Casanova
Date:
Subject: Re: Temporary tables under hot standby