reorg / pg_repack

Reorganize tables in PostgreSQL databases with minimal locks
BSD 3-Clause "New" or "Revised" License
1.89k stars 175 forks source link

Respect table order list passed as argument #379

Closed benoittgt closed 9 months ago

benoittgt commented 9 months ago

Hello

I ran pg_repack with 5 tables but notices it does not respect passed table argument order

appuser@debug-benoit:/$ time pg_repack -U admin -h x.x.x -d db_name -t business_events -t platform_events -t envelopes -t off_peak_retries -t files
Password:
INFO: repacking table "public.business_events"
INFO: repacking table "public.envelopes"
INFO: repacking table "public.files"
INFO: repacking table "public.off_peak_retries"
INFO: repacking table "public.platform_events"

I think it should respect order because in my case I choose from the smaller table to the bigger table.

dvarrazzo commented 9 months ago

You can call repack 5 times if you want the order to be enforced. I don't think that the order of repacking should be part of the interface.