postgresql 如何增加 max_locks_per_transaction
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40654766/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to increase max_locks_per_transaction
提问by Farhan Yaseen
I've been performing kind of intensive schema dropping and creating over a PostgreSQL server,
我一直在 PostgreSQL 服务器上执行某种密集的模式删除和创建,
ERROR: out of shared memory
HINT: You might need to increase max_locks_per_transaction.
错误:共享内存不足
提示:您可能需要增加 max_locks_per_transaction。
I need to increase max_locks_per_transaction but how can i increase it in MAC OSX
我需要增加 max_locks_per_transaction 但如何在MAC OSX 中增加它
采纳答案by Hard_Coder
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 #.
你可能会找到 ../data/postgresql.conf 文件,然后用记事本编辑,如果它看起来像 #max_locks_per_transaction... 你必须删除 #,设置 max_locks_per_transaction = 1024。
it must look like that: max_locks_per_transaction = 1024 # min 10
它必须是这样的: max_locks_per_transaction = 1024 # min 10
than save it and restart postgresql
比保存它并重新启动 postgresql
回答by Eelke
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.
如果您不知道该文件SHOW config_file;
在 sql 提示符/窗口中的运行位置,则它是您 postgresql.conf 中的一个设置。
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.
然后,当您修改该文件时,重新启动 postgresql,我不知道您如何在 MacOS 上执行此操作,当然重新启动会起作用。