Skip to content

Deadlock detected when CALL partman.run_maintenance_proc() was invoked #555

Answered by keithf4
sriram-au asked this question in Q&A
Discussion options

You must be logged in to vote

The procedure just calls the function in a loop over all the partition sets. But the procedure runs individual transactions for each partition set vs one giant transaction if you called just the regular function. So it's mostly just a different transaction state.

One other thing I thought of that you're likely not doing when you make a child table manually is an analyze on the partition set. In the past, the analyze was enabled by default, but later versions of pg_partman disabled it by default (https://github.com/pgpartman/pg_partman/blob/master/sql/functions/run_maintenance.sql#L146). It doesn't look like you're enabling it from what I can see, but it's something else to check.

The dead…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
7 replies
@sriram-au
Comment options

@keithf4
Comment options

@sriram-au
Comment options

@sriram-au
Comment options

@keithf4
Comment options

Comment options

You must be logged in to vote
1 reply
@keithf4
Comment options

Answer selected by sriram-au
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants