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

From Greg Stark
Subject Re: Temporary tables under hot standby
Date
Msg-id CAM-w4HNHtM1hVDNpCokGGx-tQWNChcSYYXuCM6Fif1wuTj_g0g@mail.gmail.com
Whole thread Raw
In response to Re: Temporary tables under hot standby  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Temporary tables under hot standby  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Thu, Apr 26, 2012 at 9:18 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
> Implementing a feature that *requires* those things is madness and
> obscuring those crucial points is not balanced or fair.

I think this whole discussion started the wrong way around. If the
goal of implementing GTTs is to solve a need with replication then
yes, it's kind of weird. But GTTs solve lots of problems with our
existing implementation of temporary tables. Our existing temporary
tables are really normal tables that just get cleaned up automatically
but incur almost all the overhead of a real table including needless
heavyweight DDL in your OLTP application. It's a bad design and
providing GTTs would be providing a nice feature that allows people to
implement much better systems. As a side benefit they would be easy to
support on a standby as well which would be a pretty nice feature.

I do think storing local xids is a bit scary. It might be a dead-end
if we ever want to support having persistent non-local objects in the
standby database. We'll need some way to generate a separate xid space
(along with other feature we don't need for GTTs of course) in that
case and then the ability to store local xids and check snapshots
against them would be kind of useless once we have that.

-- 
greg


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: patch submission: truncate trailing nulls from heap rows to reduce the size of the null bitmap
Next
From: Simon Riggs
Date:
Subject: Re: Future In-Core Replication