Comments on: Understanding pg_repack: What Can Go Wrong – and How to Avoid It https://www.percona.com/blog/understanding-pg_repack-what-can-go-wrong-and-how-to-avoid-it/ Fri, 10 Nov 2023 14:17:22 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: jimis https://www.percona.com/blog/understanding-pg_repack-what-can-go-wrong-and-how-to-avoid-it/#comment-10974205 Fri, 10 Nov 2023 14:17:22 +0000 https://www.percona.com/blog/?p=76724#comment-10974205 Thank you for the insight into pg_repack, this I haven’t found documented elsewhere.

There is still, one mystery to me: why does pg_repack require a primary key or a UNIQUE key?

According to your article, it must be because of the CDC table:
CREATE TABLE repack.log_16423 (id bigserial PRIMARY KEY, pk repack.pk_16423, row public.t1)

We see it contains the public key of our table as a separate column. But where is it used and why? It baffles me that I can’t run pg_repack on a table without a UNIQUE column.

]]>
By: Amaan https://www.percona.com/blog/understanding-pg_repack-what-can-go-wrong-and-how-to-avoid-it/#comment-10974154 Wed, 06 Sep 2023 16:58:11 +0000 https://www.percona.com/blog/?p=76724#comment-10974154 Man, this seems to be a bigger issue. AFAIK, You should have at least twice the amount of table size on the DB disk before running pg_repack. That is one of the basic validations of this extension. This seems to be an outage-like situation. Can you provide some insights into what happened after this issue?

]]>
By: sarvesh https://www.percona.com/blog/understanding-pg_repack-what-can-go-wrong-and-how-to-avoid-it/#comment-10974132 Mon, 07 Aug 2023 09:45:51 +0000 https://www.percona.com/blog/?p=76724#comment-10974132 Seeing below issue while pg_repack, db is hosted ve aws postgres aurora 12.x.
Table size is 650GB plus including index

ERROR: query failed: ERROR: could not write to file “base/pgsql_tmp/pgsql_tmp17644.58”: No space left on device

]]>
By: Jobin Augustine https://www.percona.com/blog/understanding-pg_repack-what-can-go-wrong-and-how-to-avoid-it/#comment-10973845 Thu, 01 Dec 2022 03:37:54 +0000 https://www.percona.com/blog/?p=76724#comment-10973845 “facing issues” issue is a very broad statement. Without more details, others won’t be able to understand.

]]>
By: sushant kamboj https://www.percona.com/blog/understanding-pg_repack-what-can-go-wrong-and-how-to-avoid-it/#comment-10973707 Fri, 05 Aug 2022 07:24:47 +0000 https://www.percona.com/blog/?p=76724#comment-10973707 We are facing issues while doing the repacking of tables for which we have kept the replica identity : FULL , to full fill our debezium use case.

]]>
By: Jobin Augustine https://www.percona.com/blog/understanding-pg_repack-what-can-go-wrong-and-how-to-avoid-it/#comment-10973242 Tue, 06 Jul 2021 14:43:51 +0000 https://www.percona.com/blog/?p=76724#comment-10973242 Thank you @Michael, Thank you for your feedback. Yes it was a formatting mistake and it is corrected as per your feedback.
Hope you liked the article.

]]>
By: Michael Banck https://www.percona.com/blog/understanding-pg_repack-what-can-go-wrong-and-how-to-avoid-it/#comment-10973235 Sun, 27 Jun 2021 07:55:06 +0000 https://www.percona.com/blog/?p=76724#comment-10973235 The ‘followed by the data copy:” sentence is malformatted and looks like part of the SQL session, so I read over it on first pass and then wondered where the actual copying happens.

]]>