Re: Temporary tables under hot standby

Simon Riggs <simon@2ndquadrant.com>

From: Simon Riggs <simon@2ndQuadrant.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Noah Misch <noah@leadboat.com>, pgsql-hackers@postgresql.org
Date: 2012-04-25T16:08:05Z
Lists: pgsql-hackers
On Wed, Apr 25, 2012 at 4:49 PM, Robert Haas <robertmhaas@gmail.com> wrote:

>> How important is support for VACUUM on these tables under hot standby?  The
>> alternative is to fail when a session retains a temporary table across 2B
>> local transactions.  I do not currently see any challenges sufficient to
>> motivate not supporting VACUUM, but it might be a useful simplification to
>> keep in mind.  What about ANALYZE support; how important is the ability to
>> collect statistics on temporary tables?  Again, I tentatively expect to
>> support it regardless of the answer.
>
> I think it's probably pretty important to support VACUUM, because even
> ignoring wraparound considerations, not vacuuming tends to cause
> performance to suck.  I think ANALYZE is less important for the
> reasons stated above.

ANALYZE is essential for temp tables in many cases... not sure what
the "reasons stated above" were, I can't resolve that reference.

I've never seen VACUUM used on a temp table. Perhaps we need it for
edge cases, but either way ISTM to be low priority. If people find
temp tables restrictive they can just use unlogged tables instead.

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