forked from HariSekhon/SQL-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
postgres_settings_connections.sql
44 lines (41 loc) · 1.03 KB
/
postgres_settings_connections.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--
-- Author: Hari Sekhon
-- Date: 2020-08-06 18:07:25 +0100 (Thu, 06 Aug 2020)
--
-- vim:ts=2:sts=2:sw=2:et:filetype=sql
--
-- https://github.com/HariSekhon/SQL-scripts
--
-- License: see accompanying Hari Sekhon LICENSE file
--
-- If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish
--
-- https://www.linkedin.com/in/HariSekhon
--
-- Show PostgreSQL connection settings
--
-- eg. listen_addresses, port, max_connections, unix sockets
--
-- Requires PostgreSQL 9.5+
--
-- Tested on PostgreSQL 9.5, 9.6, 10.x 11.x, 12.x, 13.0
-- https://www.postgresql.org/docs/12/runtime-config-connection.html#RUNTIME-CONFIG-CONNECTION-SETTINGS
SELECT
name,
setting,
-- category,
vartype,
short_desc,
-- enumvals,
source,
min_val,
max_val,
boot_val,
reset_val,
-- not available on PostgreSQL < 9.5
pending_restart
FROM
pg_settings
WHERE
-- Connections and Authentication / Connection Settings
category ILIKE '% / Connection Settings%';