pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Berg <myon@debian.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Cc: Aleksander Alekseev <a.alekseev@postgrespro.ru>
Subject: Re: [Patch] Temporary tables that do not bloat pg_catalog (a.k.a fast temp tables)
Date: Mon, 15 Aug 2016 13:10:57 +0200
Message-ID: <20160815111057.v2mqqjp4aabvwqnc@msg.df7cb.de> (raw)
In-Reply-To: <1184.1469890030@sss.pgh.pa.us>
References: <20160729141552.4062e19b@fujitsu>
	<39b0f423-a4df-3564-3b4a-b1de6f9eea80@2ndquadrant.com>
	<CAFj8pRAv+vPxzTQMviCsYqQrfpYei5bTvX80zRUp1Q3xAbTWyg@mail.gmail.com>
	<1184.1469890030@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Re: Tom Lane 2016-07-30 <1184.1469890030@sss.pgh.pa.us>
> In short, I think that the way to make something like this work is to
> figure out how to have "virtual" catalog rows describing a temp table.
> Or maybe to partition the catalogs so that vacuuming away temp-table
> rows is easier/cheaper than today.

We should also be thinking about how the opposite idea of "global"
temp tables (I believe that's what Oracle calls them) would work.
These have a persistent structure in the catalogs, just the data is
private to every session (or transaction); every connection starts
with an empty temp table and for their use.

I'd guess that type of global temp tables would fix the bloat problem
also very efficiently. (Ad-hoc temp tables shouldn't occur that often
so the bloat caused by them wouldn't matter that much. If they do,
their structure is likely always the same, and they could be made
"global" in the schema.)

The bit that needs to be thought out here would be how to maintain
statistics for these tables. Obviously ANALYZE shouldn't update any
globally visible data.

Christoph


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (63+ messages)  latest in thread

Message-ID: <20160815111057.v2mqqjp4aabvwqnc@msg.df7cb.de>
Permalink:  ../20160815111057.v2mqqjp4aabvwqnc@msg.df7cb.de/
Also on:    postgresql.org/message-id/20160815111057.v2mqqjp4aabvwqnc@msg.df7cb.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: myon@debian.org, tgl@sss.pgh.pa.us, pavel.stehule@gmail.com, tomas.vondra@2ndquadrant.com, a.alekseev@postgrespro.ru
  Subject: Re: [Patch] Temporary tables that do not bloat pg_catalog (a.k.a fast temp tables)
  In-Reply-To: <20160815111057.v2mqqjp4aabvwqnc@msg.df7cb.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox