Re: User feedback requested on temp tables usage for Hot Standby

From: Ben Chobot <bench(at)silentmedia(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: User feedback requested on temp tables usage for Hot Standby
Date: 2011-10-28 04:22:10
Message-ID: 4796FE51-0B5E-418C-B84E-040518FA6FC4@silentmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Oct 27, 2011, at 5:13 PM, Simon Riggs wrote:

> Some people have asked for the ability to create temp tables on a Hot
> Standby server.
>
> I've got a rough implementation plan but it would have some
> restrictions, so I would like to check my understanding of the use
> case for this feature so I don't waste time implementing something
> nobody actually finds useful.
>
> My understanding is that the main use cases for that would be limited
> to these two options only:
>
> 1. CREATE TEMP TABLE foo AS SELECT ....
>
> 2. CREATE TEMP TABLE foo (..);
> INSERT INTO foo ...
>
> and sometimes a TRUNCATE foo;
>
> In almost all cases people don't run multiple INSERTs, nor do they run
> UPDATEs or DELETEs, so the above actions would cover 99% of use cases.
>
> Can anyone give backup to that opinion, or alternate viewpoints?

The times that we would use a temp table on a slave are times when we would want to materialize a large set of intermediate results while doing ad hoc queries. This seems to cover that….. although, just to be sure, do I understand you in that UDPATEs and DELETEs would not be allowed? That would be fine, but having multiple INSERTs would be very handy.

Of course, even having a one-time insert temp table is better than no temp table at all. :)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-10-28 04:44:40 Re: JDBC connections very occasionally hang
Previous Message Josh Kupershmidt 2011-10-28 02:25:09 Re: PostgreSQL at LISA in Boston: Dec. 7-8