Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 4fba8b7

Browse files
committed
Revert "Kill autovacuum before truncating"
This reverts commit 03333e5.
1 parent 03333e5 commit 4fba8b7

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

apps/move-rows-to-shards/src/main/java/org/mediacloud/mrts/TruncateActivitiesImpl.java

-7
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@ public void truncateIfEmpty(String table) {
3030
log.info("Table '" + table + "' is empty");
3131
}
3232

33-
log.info("Killing autovacuum of '" + table + "'...");
34-
Database.query(List.of(String.format("""
35-
SELECT pg_cancel_backend(pid)
36-
FROM pg_stat_activity
37-
WHERE query ILIKE 'autovacuum:%%%s%%'
38-
""", table)));
39-
4033
log.info("Truncating table '" + table + "'...");
4134
Database.query(List.of("TRUNCATE " + table));
4235

0 commit comments

Comments
 (0)