Re: Temporary tables under hot standby

From: Greg Stark <stark(at)mit(dot)edu>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Temporary tables under hot standby
Date: 2012-04-26 13:57:59
Message-ID: CAM-w4HNHtM1hVDNpCokGGx-tQWNChcSYYXuCM6Fif1wuTj_g0g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 26, 2012 at 9:18 AM, Simon Riggs <simon(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-04-26 14:10:09 Re: Future In-Core Replication
Previous Message Greg Stark 2012-04-26 13:42:19 Re: patch submission: truncate trailing nulls from heap rows to reduce the size of the null bitmap