public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Jialun Zhang <[email protected]>
Cc: Gerald Cheves <[email protected]>
Cc: Laurenz Albe <[email protected]>
Cc: [email protected]
Subject: Re: What's the best practice to compare the transaction with the checkpoint?
Date: Mon, 06 Jul 2020 11:44:35 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAMFL+JisTCugv5T8n=gQNFKcvWMMJwARz1sWwhv1nQ8=EKvQTQ@mail.gmail.com>
References: <CAMFL+Jg88HxVL75db9HY_QebL+iLGAH4p-0Drmii4z1m6QD7aw@mail.gmail.com>
	<[email protected]>
	<CAMFL+JjnQE8NWP1vMxfzJXFyjCP-9yvA6ku6FkJAjTpRkOoyTg@mail.gmail.com>
	<[email protected]>
	<CAMFL+JisTCugv5T8n=gQNFKcvWMMJwARz1sWwhv1nQ8=EKvQTQ@mail.gmail.com>

Jialun Zhang <[email protected]> writes:
> Actually I am trying to add file support for TOAST. I mean store the
> toasted value in the file system and leave a file path in the toast
> pointer.

Why in the world would that be a good idea?

> Therefore, for garbage collection, we need to remove the file
> after confirming that a deleted tuple is older than the latest checkpoint.

Even granting that shoving each toasted value into its own file is a
sane design, I do not see why you'd need to invent a GC mechanism for it.
Seems like you could drive removal of the file off vacuum's removal of
the parent tuple.

Moreover, even if you want to do it like that, you still don't need to
know whether the deleting transaction is older than the last checkpoint;
indeed that's entirely the wrong question.  What you need to know is
whether it's older than global xmin, so that it's certain no other
transaction will wish to fetch the field value.

			regards, tom lane





view thread (11+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: What's the best practice to compare the transaction with the checkpoint?
  In-Reply-To: <[email protected]>

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

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