agora inbox for pgsql-hackers@postgresql.org  
help / color / mirror / Atom feed
From: Antonin Houska <ah@cybertec.at>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Andres Freund <andres@anarazel.de>
Cc: Noah Misch <noah@leadboat.com>
Cc: vignesh C <vignesh21@gmail.com>
Cc: Srinath Reddy Sadipiralla <srinath2133@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Mihail Nikalayeu <mihailnikalayeu@gmail.com>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Robert Treat <rob@xzilla.net>
Subject: Re: Adding REPACK [concurrently]
Date: Fri, 19 Jun 2026 08:48:51 +0200
Message-ID: <5998.1781851731@localhost> (raw)
In-Reply-To: <202604062121.ijkompbo4ezj@alvherre.pgsql>
References: <202604062121.ijkompbo4ezj@alvherre.pgsql>

This is a diff to remove a comment that was only valid in earlier versions of
the patch - I failed to notice that so far. Another comment in
copy_table_data() explains why rd_toastoid is not set in the CONCURRENTLY
mode:

	 * This would not work with CONCURRENTLY because we may need to delete
	 * TOASTed tuples from the new heap. With this hack, we'd delete them
	 * from the old heap.
	 */
	NewHeap->rd_toastoid = OldHeap->rd_rel->reltoastrelid;


-- 
Antonin Houska
Web: https://www.cybertec-postgresql.com



Attachments:

  [text/x-diff] repack_comment.diff (506B, ../5998.1781851731@localhost/2-repack_comment.diff)
  download | inline diff:
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 4d177c868bb..195d85c323b 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1453,8 +1453,6 @@ copy_table_data(Relation NewHeap, Relation OldHeap, Relation OldIndex,
 
 	/*
 	 * Reset rd_toastoid just to be tidy --- it shouldn't be looked at again.
-	 * In the CONCURRENTLY case, we need to set it again before applying the
-	 * concurrent changes.
 	 */
 	NewHeap->rd_toastoid = InvalidOid;
 


view thread (417+ 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: pgsql-hackers@postgresql.org
  Cc: ah@cybertec.at, alvherre@alvh.no-ip.org, andres@anarazel.de, noah@leadboat.com, vignesh21@gmail.com, srinath2133@gmail.com, amit.kapila16@gmail.com, mihailnikalayeu@gmail.com, boekewurm+postgres@gmail.com, pgsql-hackers@lists.postgresql.org, rob@xzilla.net
  Subject: Re: Adding REPACK [concurrently]
  In-Reply-To: <5998.1781851731@localhost>

* 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