select pg_size_pretty(pg_database_size('DB1'));
pg_size_pretty
----------------
48 GB
Non default parameterspg_size_pretty
----------------
48 GB
select name, setting, boot_val from pg_settings where setting != boot_val;
name | setting | boot_val
--------------------------------+--------------------------------+-------------------
archive_command | cp %p /backup/DB1/current/%f |
archive_mode | on | off
archive_timeout | 600 | 0
bgwriter_lru_maxpages | 200 | 100
checkpoint_segments | 100 | 3
client_encoding | UTF8 | SQL_ASCII
deadlock_timeout | 10000 | 1000
default_text_search_config | pg_catalog.english | pg_catalog.simple
effective_cache_size | 13107200 | 16384
lc_collate | en_US.UTF-8 | C
lc_ctype | en_US.UTF-8 | C
lc_messages | en_US.UTF-8 |
lc_monetary | en_US.UTF-8 | C
lc_numeric | en_US.UTF-8 | C
lc_time | en_US.UTF-8 | C
listen_addresses | * | localhost
log_autovacuum_min_duration | 0 | -1
log_checkpoints | on | off
log_connections | on | off
log_directory | /podom_02/pg_log | pg_log
log_duration | on | off
log_hostname | on | off
log_line_prefix | %d %u %r %p %c |
log_lock_waits | on | off
log_min_duration_statement | 1000 | -1
log_min_messages | notice | warning
log_rotation_size | 0 | 10240
log_statement | ddl | none
log_statement_stats | on | off
log_temp_files | 0 | -1
log_timezone | Europe/Paris | UNKNOWN
log_truncate_on_rotation | on | off
logging_collector | on | off
maintenance_work_mem | 1048576 | 16384
max_connections | 200 | 100
max_stack_depth | 2048 | 100
random_page_cost | 1 | 4
server_encoding | UTF8 | SQL_ASCII
shared_buffers | 1048576 | 1024
superuser_reserved_connections | 5 | 3
TimeZone | Europe/Paris | UNKNOWN
timezone_abbreviations | Default | UNKNOWN
wal_buffers | 2048 | 8
work_mem | 32768 | 1024
(44 rows)
name | setting | boot_val
--------------------------------+--------------------------------+-------------------
archive_command | cp %p /backup/DB1/current/%f |
archive_mode | on | off
archive_timeout | 600 | 0
bgwriter_lru_maxpages | 200 | 100
checkpoint_segments | 100 | 3
client_encoding | UTF8 | SQL_ASCII
deadlock_timeout | 10000 | 1000
default_text_search_config | pg_catalog.english | pg_catalog.simple
effective_cache_size | 13107200 | 16384
lc_collate | en_US.UTF-8 | C
lc_ctype | en_US.UTF-8 | C
lc_messages | en_US.UTF-8 |
lc_monetary | en_US.UTF-8 | C
lc_numeric | en_US.UTF-8 | C
lc_time | en_US.UTF-8 | C
listen_addresses | * | localhost
log_autovacuum_min_duration | 0 | -1
log_checkpoints | on | off
log_connections | on | off
log_directory | /podom_02/pg_log | pg_log
log_duration | on | off
log_hostname | on | off
log_line_prefix | %d %u %r %p %c |
log_lock_waits | on | off
log_min_duration_statement | 1000 | -1
log_min_messages | notice | warning
log_rotation_size | 0 | 10240
log_statement | ddl | none
log_statement_stats | on | off
log_temp_files | 0 | -1
log_timezone | Europe/Paris | UNKNOWN
log_truncate_on_rotation | on | off
logging_collector | on | off
maintenance_work_mem | 1048576 | 16384
max_connections | 200 | 100
max_stack_depth | 2048 | 100
random_page_cost | 1 | 4
server_encoding | UTF8 | SQL_ASCII
shared_buffers | 1048576 | 1024
superuser_reserved_connections | 5 | 3
TimeZone | Europe/Paris | UNKNOWN
timezone_abbreviations | Default | UNKNOWN
wal_buffers | 2048 | 8
work_mem | 32768 | 1024
(44 rows)
This shows all of the server configuration changes made via updates to the postgresql.conf file, from a running server:
SELECT version();
SELECT name, current_setting(name), SOURCE
FROM pg_settings
WHERE SOURCE NOT IN ('default', 'override');
SELECT name, current_setting(name), SOURCE
FROM pg_settings
WHERE SOURCE NOT IN ('default', 'override');
No comments:
Post a Comment