Postgres max_locks_per_transaction

I’m using liquibase with Postgres and I’m hitting the error when running a particular changeSet:

ERROR: out of shared memory

[ERROR] Hint: You might need to increase max_locks_per_transaction.

So I increased my max locks in Postgres to 512 and my changeSet was able to complete.  However, I don’t want to do this on my production servers.  Is there documentation on how to decrease the number of locks needed to complete a changeSet?

My changeSet needs to create 2000 schemas and 10 tables per schema.

There were a few unclosed statements that were fixed in 3.0.8 and 3.1.0. What version of liquibase are you running? 


We are running 3.0.8

Hopefully the upcoming 3.1 version will hopefully work better for you. I believe that caught the last of the unclosed statements and result sets.

Ok thanks.  I’ll wait for the 3.1. release, try again, and report back the results.