1

I kicked off pg_repack 7 days ago and it's still running. I haven't really seen any examples take this long anywhere in my googling... Is this typical for my setup (see below details)? Should I let it keep going? Or should I cancel? And if I cancel, what's the best way to do that w/o causing issues?

My setup:

It's running on postgres aurora. The total table size is ~950GB (indices ~650GB and table size ~300GB).

I'm running pg_repack from a client on screen on an ec2 machine on the same vpn like instructions say here: https://aws.amazon.com/blogs/database/remove-bloat-from-amazon-aurora-and-rds-for-postgresql-with-pg_repack/

pg_repack --version = 1.4.4

The command I used was

pg_repack -h <host> -U <user> -t <tablename> -k <db>

I can confirm pg_repack is still running by looking at performance insights on AWS b/c

SELECT repack.repack_apply($1, $2, $3, $4, $5, $6)

is still taking up active sessions.

The writer instance is hovering around 700-800 commits/s.

The instances are db.r6g.16xlarge and there is 1 writer and 2 read replicas.

bguiz
  • 27,371
  • 47
  • 154
  • 243
Markus
  • 11
  • 1

1 Answers1

-1

It will wait until a query is completed if you are performing pg_repack on the table user and another process is attempting to update something on the table.

You can check running queries using

select pid, usename, query from pg_stat_activity

You can terminate the query using

select pg_terminate_backend(<PID>);

I hope this will help you