Re: Temporary tables under hot standby

Lists: pgsql-hackers
From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <robertmhaas(at)gmail(dot)com>,<noah(at)leadboat(dot)com>
Cc: <simon(at)2ndquadrant(dot)com>,<nicolas(dot)barbier(at)gmail(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Temporary tables under hot standby
Date: 2012-04-26 11:49:36
Message-ID: 4F98F00002000025000473A5@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> Robert Haas wrote:
> Noah Misch wrote:
>> Based on the range of assessments spanning your "almost useless"
>> to Merlin's "killer feature", I gather that its utility is
>> exceptionally site-specific.
>
> Well said, sir.

+1

> I find it a rather elegant and well-thought-out kludge.

Global temporary tables as a feature are far more than a kludge; I
assume you're talking about that feature as a solution for the "no
temporary tables on a hot standby" problem? Even there I would
consider GTT as more than a kludge. They have been part of the SQL
standard since at least the SQL-93 version, and have some very clean,
clear uses.

> It is pretty obvious that we could get around all of these problems
> easily if we instead did logical replication.

> So, I can't help wonder if what we're really missing here is a
> high-performance, log-based logical replication solution with good
> core support.

The GSoC xReader project is intended to be a major step toward that,
by providing a way to translate the WAL stream to a series of
notifications of logical events to clients which register with
xReader.

-Kevin


From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Andres Freund <andres(at)anarazel(dot)de>
Cc: robertmhaas(at)gmail(dot)com, noah(at)leadboat(dot)com, nicolas(dot)barbier(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Temporary tables under hot standby
Date: 2012-04-26 12:42:30
Message-ID: CA+U5nM+T+KzBA-yeegO7VEYYPDMJDegXjjVwzEtbWpBADy6TNA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Apr 26, 2012 at 12:49 PM, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:

>> So, I can't help wonder if what we're really missing here is a
>> high-performance, log-based logical replication solution with good
>> core support.

On that, we do agree completely. That is exactly my goal for 9.3.

> The GSoC xReader project is intended to be a major step toward that,
> by providing a way to translate the WAL stream to a series of
> notifications of logical events to clients which register with
> xReader.

This is already nearly finished in prototype and will be published in
May. Andres Freund is working on it, copied here. It looks like there
is significant overlap there.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: robertmhaas(at)gmail(dot)com, noah(at)leadboat(dot)com, nicolas(dot)barbier(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Temporary tables under hot standby
Date: 2012-04-26 12:52:13
Message-ID: CA+U5nMJ5qUNTQBNE3QDfhYevuZoqKvKZk0ug=-kCK+zWdA+TWg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Apr 26, 2012 at 12:49 PM, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:

>> I find it a rather elegant and well-thought-out kludge.
>
> Global temporary tables as a feature are far more than a kludge; I
> assume you're talking about that feature as a solution for the "no
> temporary tables on a hot standby" problem?  Even there I would
> consider GTT as more than a kludge.  They have been part of the SQL
> standard since at least the SQL-93 version, and have some very clean,
> clear uses.

Just to be clear, I haven't described GTTs as a kludge.

Again I say: if you want GTTs, build them. But don't build them
because they solve other problems as well, because they don't, and the
topic title of this thread is regrettably misnamed when we conflate
GTTs with $TOPIC. If Noah wishes to solve $TOPIC rather than build
GTTs then a different route is required.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services