2011-11-27 83 views

回答

130

能夠儘量簡單。請注意,它可能與postgresql.conf中的設置有所不同,因爲有couple of ways to set run-time parameters in PostgreSQL。然而

RESET max_connections; 

,並不適用於這個特定的設置:要重置從postgresql.conf「原始」設置在當前會話。 Per documentation

此參數只能在服務器啓動時設置。

要查看所有設置:

SHOW ALL; 

More on the SHOW command in the manual
如果您需要了解更多信息或想查找集成到標準SELECT查詢,也有:

SELECT * FROM pg_settings; 

返回相同的結果SHOW ALL,但是每個設置的其他信息。您的原始要求:

SELECT * 
FROM pg_settings 
WHERE name = 'max_connections';