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

Table size increase post pg_repack and other queries #418

Open
Clnchandrika opened this issue Aug 31, 2024 · 3 comments
Open

Table size increase post pg_repack and other queries #418

Clnchandrika opened this issue Aug 31, 2024 · 3 comments

Comments

@Clnchandrika
Copy link

pg_repack was tried using Azure postgre Flexi version 14 and Pg_repack client 1.4.7 on Redhat linux

1Q-

case 1:Table Size increased post pg_repack from 8 to 12 G.

Pg_repack kept running for 23+hrs and displaying NOTICE:Waiting for 1 transactions to finish. First PID:6330
At this stage we terminated the long running pid per the bug :#125
select * from pg_stat_activity where pid = 6330;
Found that process 6330 is still active, hence terminated it as follows to allow the pg_repack extension to proceed
select pg_terminate_backend(6330);

case2:Table A was allowed to continue repacking for almost 5 complete days and ended up in "Waiting for 1 transactions to finish". Still not repacked.
What reasons can be attributed to this behaviour?

case3:Pg_repack was again tried on the table with server shut option which is against pg_repack.
It didnt repack at all. Can this be attributed to zero tuples of the table?

2Q -Is there a query or command apart from pg_stat_activity to monitor the pg_repack progress.

Table B of 96Kb was chosen for repack and it also got stuck at same "Waiting for 1 transactions to finish. First PID:9672" .
Upon the termination, the table size is repacked to 64Kb. Can you please explain Why would pg_repack not finish, and had to be killed?Pg_repack should be running background irrespective of the DB being used or not

3Q- Table C of 881 Mb got repacked to 761Mb when server is shut and server parameters changed for Idle_in_transaction_session_timeout.
Is there any basis for selcting the values of these parameters?

@andreasscherbaum
Copy link
Collaborator

Do you have very long running transactions in your database running?

@Clnchandrika
Copy link
Author

I was trying this pg_repack on a primary server with no active transactions.

@Clnchandrika
Copy link
Author

Hi I am still having the issue. Appreciate if some one suggests a solution.

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