Re: Temporary tables under hot standby

From: Noah Misch <noah(at)leadboat(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Michael Nolan <htfoot(at)gmail(dot)com>
Subject: Re: Temporary tables under hot standby
Date: 2012-05-08 09:01:05
Message-ID: 20120508090105.GA3757@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, May 07, 2012 at 09:04:28AM -0500, Merlin Moncure wrote:
> On Mon, May 7, 2012 at 8:52 AM, Michael Nolan <htfoot(at)gmail(dot)com> wrote:
> > To cross-pollinate with another thread, if temporary tables (and
> > insert/delete/update transactions to them) are to be supported on a slave,
> > will the applications using those temporary tables expect to be able to use
> > 'nextval' on inserts to temporary tables as well?
>
> That's a very good question. I'm moving it -hackers...how do non
> table temporary objects work? Do you have CREATE GLOBAL TEMPORARY
> SEQUENCE? etc.

Probably so, yes.

> My understanding of the current proposal is that the sequence (along
> with the rest of the table) has to be defined in the master as a
> global temporary table.

Yes.

> It seems that it wouldn't be possible or
> desirable to serialize sequence fetches between the master and standby
> servers, but I'm not sure about that.

Like global temporary tables, each session has an independent copy of each
global temporary sequence. "nextval" would have no interaction with other
local backends, let alone remote ones.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2012-05-08 11:26:02 WIP Patch: Selective binary conversion of CSV file foreign tables
Previous Message Michael Nolan 2012-05-08 04:13:42 problem/bug in drop tablespace?