From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Claudio Freire <klaussfreire@gmail.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Jim Nasby <Jim.Nasby@bluetreble.com>
Cc: Aleksander Alekseev <a.alekseev@postgrespro.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: [Patch] Temporary tables that do not bloat pg_catalog (a.k.a fast temp tables)
Date: Wed, 24 Aug 2016 02:04:45 -0300
Message-ID: <20160824050445.GA192014@alvherre.pgsql> (raw)
In-Reply-To: <CAGTBQpY+A=DeYHRh6ZfekdNKX=KZsMjQjStLfqEyZLNEL622=w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Claudio Freire wrote:
> After looking at it from a birdseye view, I agree it's conceptually
> complex (reading HeapTupleSatisfiesSelf already makes one dizzy).
>
> But other than that, the implementation seems rather simple. It seems
> to me, if one figures out that it is safe to do so (a-priori, xmin not
> committed, xmax is current transaction), it would simply be a matter
> of chasing the HOT chain root, setting all LP except the first to
> LP_UNUSED and the first one to LP_DEAD.
>
> Of course I may be missing a ton of stuff.
What you seem to be missing is that rows corresponding to temp tables
are not "visible to its own transaction only". The rows are valid
after the transaction is gone; what makes the tables temporary is the
fact that they are in a temporary schema. And what makes them invisible
to one backend is the fact that they are in the temporary schema for
another backend. Not that they are uncommitted.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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: alvherre@2ndquadrant.com, klaussfreire@gmail.com, tomas.vondra@2ndquadrant.com, robertmhaas@gmail.com, Jim.Nasby@bluetreble.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: <20160824050445.GA192014@alvherre.pgsql>
* 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