Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to increase max_locks_per_transaction

Tags:

I've been performing kind of intensive schema dropping and creating over a PostgreSQL server,

ERROR: out of shared memory

HINT: You might need to increase max_locks_per_transaction.

I need to increase max_locks_per_transaction but how can i increase it in MAC OSX

like image 906
Farhan Yaseen Avatar asked Nov 17 '16 12:11

Farhan Yaseen


2 Answers

you might find ../data/postgresql.conf file, then edit with notepad, set max_locks_per_transaction = 1024 if it looks like # max_locks_per_transaction... you must remove #.

it must look like that: max_locks_per_transaction = 1024 # min 10

than save it and restart postgresql

like image 98
Hard_Coder Avatar answered Sep 30 '22 02:09

Hard_Coder


It is a setting in your postgresql.conf if you do not know where that file is run SHOW config_file; on an sql prompt/window.

Then when you have modified that file restart postgresql, I don't know how you do that on MacOS a reboot will work of course.

like image 23
Eelke Avatar answered Sep 30 '22 01:09

Eelke