Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High cpu and mem utilization with pg_repack (1.5.0)on child table that has 80GB in size #438

Open
Durgamahesh671 opened this issue Jan 23, 2025 · 2 comments

Comments

@Durgamahesh671
Copy link

Durgamahesh671 commented Jan 23, 2025

Hi
We are using postgres 16 version with resources (32GB,8vcpus) .So memory and cpu util about high when runing pg_repack on 80GB table
How to optimize it when using pg_repack on table has huge size . During non peak hours we generallly run it .

Should we disable autovacuum workers temporarily before running pgrepack on table to avoid any spike issues?
Logical replication would be running out of sync with slight records diffrence after running pgrepack on prod archiving child tables ?
(I have observered that data out of sync with slight record difference after running pg_repack)

Could you please your recommendations to run pg_repack on child tables that have size in terms of gb (80Gb and 90GB)?
How to optimize db performance while using pg_repack?
We are using weekly partition tables and planning to move daily partitions
Your help in this regard would be appriciated

Regards,
Durga Mahesh

@Durgamahesh671
Copy link
Author

Can we create index concurrently on repack table when running pgrepack activity on table has huge size ?

@za-arthur
Copy link
Collaborator

@Durgamahesh671 you can create an index concurrently, but it will break pg_repack. There is a relevant issue #420 to handle this case and lock CIC like operations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants