Postgres Conf Log
Postgres Conf Log
[email protected]'s password:
Last login: Tue Aug 12 18:14:56 2025
[root@localhost ~]# su - postgres
Last login: Mon Aug 11 18:50:18 PDT 2025 on pts/1
[postgres@localhost ~]$ /usr/pgsql-11/bin/pg_ctl -D /home/postgres/app03 restart
pg_ctl: old server process (PID: 8913) seems to be gone
starting server anyway
waiting for server to start....2025-08-12 18:16:36.164 PDT [8971] LOG: listening
on IPv4 address "0.0.0.0", port 9999
2025-08-12 18:16:36.164 PDT [8971] LOG: listening on IPv6 address "::", port 9999
2025-08-12 18:16:36.165 PDT [8971] LOG: listening on Unix socket
"/var/run/postgresql/.s.PGSQL.9999"
2025-08-12 18:16:36.168 PDT [8971] LOG: listening on Unix socket
"/tmp/.s.PGSQL.9999"
2025-08-12 18:16:36.225 PDT [8971] LOG: redirecting log output to logging
collector process
2025-08-12 18:16:36.225 PDT [8971] HINT: Future log output will appear in
directory "log".
done
server started
[postgres@localhost ~]$ ps -ef | grep postgres
root 8928 8893 0 18:16 pts/1 00:00:00 su - postgres
postgres 8929 8928 0 18:16 pts/1 00:00:00 -bash
postgres 8971 1 0 18:16 pts/1 00:00:00 /usr/pgsql-11/bin/postgres -D
/home/postgres/app03
postgres 8972 8971 0 18:16 ? 00:00:00 postgres: logger
postgres 8974 8971 0 18:16 ? 00:00:00 postgres: checkpointer
postgres 8975 8971 0 18:16 ? 00:00:00 postgres: background writer
postgres 8976 8971 0 18:16 ? 00:00:00 postgres: walwriter
postgres 8977 8971 0 18:16 ? 00:00:00 postgres: autovacuum launcher
postgres 8978 8971 0 18:16 ? 00:00:00 postgres: stats collector
postgres 8979 8971 0 18:16 ? 00:00:00 postgres: logical replication
launcher
postgres 9133 8929 0 18:20 pts/1 00:00:00 ps -ef
postgres 9134 8929 0 18:20 pts/1 00:00:00 grep --color=auto postgres
[postgres@localhost ~]$ kill -9 8976
[postgres@localhost ~]$ ps -ef | grep postgres
root 8928 8893 0 18:16 pts/1 00:00:00 su - postgres
postgres 8929 8928 0 18:16 pts/1 00:00:00 -bash
postgres 8971 1 0 18:16 pts/1 00:00:00 /usr/pgsql-11/bin/postgres -D
/home/postgres/app03
postgres 8972 8971 0 18:16 ? 00:00:00 postgres: logger
postgres 9137 8971 0 18:21 ? 00:00:00 postgres: checkpointer
postgres 9138 8971 0 18:21 ? 00:00:00 postgres: background writer
postgres 9139 8971 0 18:21 ? 00:00:00 postgres: walwriter
postgres 9140 8971 0 18:21 ? 00:00:00 postgres: autovacuum launcher
postgres 9141 8971 0 18:21 ? 00:00:00 postgres: stats collector
postgres 9142 8971 0 18:21 ? 00:00:00 postgres: logical replication
launcher
postgres 9143 8929 0 18:21 pts/1 00:00:00 ps -ef
postgres 9144 8929 0 18:21 pts/1 00:00:00 grep --color=auto postgres
[postgres@localhost ~]$ cd /home/postgres/app03
[postgres@localhost app03]$ cd log
[postgres@localhost log]$ ls -lr
total 44
-rw-------. 1 postgres postgres 15823 Aug 6 09:34 postgresql-Wed.log
-rw-------. 1 postgres postgres 2770 Aug 12 18:21 postgresql-Tue.log
-rw-------. 1 postgres postgres 6313 Aug 7 07:24 postgresql-Thu.log
-rw-------. 1 postgres postgres 2861 Jul 20 21:05 postgresql-Sun.log
-rw-------. 1 postgres postgres 722 Jul 1 09:23 postgresql-Sat.log
-rw-------. 1 postgres postgres 952 Aug 11 18:50 postgresql-Mon.log
-rw-------. 1 postgres postgres 1728 Jul 13 09:19 postgresql-Fri.log
[postgres@localhost log]$ ls -ltr
total 44
-rw-------. 1 postgres postgres 722 Jul 1 09:23 postgresql-Sat.log
-rw-------. 1 postgres postgres 1728 Jul 13 09:19 postgresql-Fri.log
-rw-------. 1 postgres postgres 2861 Jul 20 21:05 postgresql-Sun.log
-rw-------. 1 postgres postgres 15823 Aug 6 09:34 postgresql-Wed.log
-rw-------. 1 postgres postgres 6313 Aug 7 07:24 postgresql-Thu.log
-rw-------. 1 postgres postgres 952 Aug 11 18:50 postgresql-Mon.log
-rw-------. 1 postgres postgres 2770 Aug 12 18:21 postgresql-Tue.log
[postgres@localhost log]$ tail -1000 postgresql-Tue.log
2025-07-22 22:31:15.869 PDT [8938] LOG: checkpoint complete: wrote 1 buffers
(0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.166 s, sync=0.000 s,
total=0.188 s; sync files=1, longest=0.000 s, average=0.000 s; distance=6 kB,
estimate=298 kB
2025-08-12 18:16:36.231 PDT [8973] LOG: database system was interrupted; last
known up at 2025-08-11 18:50:31 PDT
2025-08-12 18:16:36.461 PDT [8973] LOG: database system was not properly shut
down; automatic recovery in progress
2025-08-12 18:16:36.463 PDT [8973] LOG: redo starts at 0/1C65AA08
2025-08-12 18:16:36.463 PDT [8973] LOG: invalid record length at 0/1C65AA40:
wanted 24, got 0
2025-08-12 18:16:36.463 PDT [8973] LOG: redo done at 0/1C65AA08
2025-08-12 18:16:36.465 PDT [8973] LOG: checkpoint starting: end-of-recovery
immediate
2025-08-12 18:16:36.467 PDT [8973] LOG: checkpoint complete: wrote 0 buffers
(0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.000 s, sync=0.000 s,
total=0.002 s; sync files=0, longest=0.000 s, average=0.000 s; distance=0 kB,
estimate=0 kB
2025-08-12 18:16:36.471 PDT [8971] LOG: database system is ready to accept
connections
2025-08-12 18:21:09.500 PDT [8971] LOG: WAL writer process (PID 8976) was
terminated by signal 9: Killed
2025-08-12 18:21:09.500 PDT [8971] LOG: terminating any other active server
processes
2025-08-12 18:21:09.511 PDT [8977] WARNING: terminating connection because of
crash of another server process
2025-08-12 18:21:09.511 PDT [8977] DETAIL: The postmaster has commanded this
server process to roll back the current transaction and exit, because another
server process exited abnormally and possibly corrupted shared memory.
2025-08-12 18:21:09.511 PDT [8977] HINT: In a moment you should be able to
reconnect to the database and repeat your command.
2025-08-12 18:21:09.525 PDT [8971] LOG: all server processes terminated;
reinitializing
2025-08-12 18:21:09.543 PDT [9136] LOG: database system was interrupted; last
known up at 2025-08-12 18:16:36 PDT
2025-08-12 18:21:09.670 PDT [9136] LOG: database system was not properly shut
down; automatic recovery in progress
2025-08-12 18:21:09.671 PDT [9136] LOG: redo starts at 0/1C65AAB0
2025-08-12 18:21:09.671 PDT [9136] LOG: invalid record length at 0/1C65AAE8:
wanted 24, got 0
2025-08-12 18:21:09.671 PDT [9136] LOG: redo done at 0/1C65AAB0
2025-08-12 18:21:09.673 PDT [9136] LOG: checkpoint starting: end-of-recovery
immediate
2025-08-12 18:21:09.677 PDT [9136] LOG: checkpoint complete: wrote 0 buffers
(0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.000 s, sync=0.000 s,
total=0.004 s; sync files=0, longest=0.000 s, average=0.000 s; distance=0 kB,
estimate=0 kB
2025-08-12 18:21:09.683 PDT [8971] LOG: database system is ready to accept
connections
[postgres@localhost log]$ more postgresql-Tue.log
2025-07-22 22:31:15.869 PDT [8938] LOG: checkpoint complete: wrote 1 buffers
(0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; writ
e=0.166 s, sync=0.000 s, total=0.188 s; sync files=1, longest=0.000 s,
average=0.000 s; distance=6 kB, estimate=298 kB
2025-08-12 18:16:36.231 PDT [8973] LOG: database system was interrupted; last
known up at 2025-08-11 18:50:31 PDT
2025-08-12 18:16:36.461 PDT [8973] LOG: database system was not properly shut
down; automatic recovery in progress
2025-08-12 18:16:36.463 PDT [8973] LOG: redo starts at 0/1C65AA08
2025-08-12 18:16:36.463 PDT [8973] LOG: invalid record length at 0/1C65AA40:
wanted 24, got 0
2025-08-12 18:16:36.463 PDT [8973] LOG: redo done at 0/1C65AA08
2025-08-12 18:16:36.465 PDT [8973] LOG: checkpoint starting: end-of-recovery
immediate
2025-08-12 18:16:36.467 PDT [8973] LOG: checkpoint complete: wrote 0 buffers
(0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; writ
e=0.000 s, sync=0.000 s, total=0.002 s; sync files=0, longest=0.000 s,
average=0.000 s; distance=0 kB, estimate=0 kB
2025-08-12 18:16:36.471 PDT [8971] LOG: database system is ready to accept
connections
2025-08-12 18:21:09.500 PDT [8971] LOG: WAL writer process (PID 8976) was
terminated by signal 9: Killed
2025-08-12 18:21:09.500 PDT [8971] LOG: terminating any other active server
processes
2025-08-12 18:21:09.511 PDT [8977] WARNING: terminating connection because of
crash of another server process
2025-08-12 18:21:09.511 PDT [8977] DETAIL: The postmaster has commanded this
server process to roll back the current transaction and
exit, because another server process exited abnormally and possibly corrupted
shared memory.
2025-08-12 18:21:09.511 PDT [8977] HINT: In a moment you should be able to
reconnect to the database and repeat your command.
2025-08-12 18:21:09.525 PDT [8971] LOG: all server processes terminated;
reinitializing
2025-08-12 18:21:09.543 PDT [9136] LOG: database system was interrupted; last
known up at 2025-08-12 18:16:36 PDT
2025-08-12 18:21:09.670 PDT [9136] LOG: database system was not properly shut
down; automatic recovery in progress
2025-08-12 18:21:09.671 PDT [9136] LOG: redo starts at 0/1C65AAB0
2025-08-12 18:21:09.671 PDT [9136] LOG: invalid record length at 0/1C65AAE8:
wanted 24, got 0
2025-08-12 18:21:09.671 PDT [9136] LOG: redo done at 0/1C65AAB0
2025-08-12 18:21:09.673 PDT [9136] LOG: checkpoint starting: end-of-recovery
immediate
2025-08-12 18:21:09.677 PDT [9136] LOG: checkpoint complete: wrote 0 buffers
(0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; writ
e=0.000 s, sync=0.000 s, total=0.004 s; sync files=0, longest=0.000 s,
average=0.000 s; distance=0 kB, estimate=0 kB
2025-08-12 18:21:09.683 PDT [8971] LOG: database system is ready to accept
connections
[postgres@localhost log]$
[postgres@localhost log]$ more postgresql-Tue.log
2025-07-22 22:31:15.869 PDT [8938] LOG: checkpoint complete: wrote 1 buffers
(0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; writ
e=0.166 s, sync=0.000 s, total=0.188 s; sync files=1, longest=0.000 s,
average=0.000 s; distance=6 kB, estimate=298 kB
2025-08-12 18:16:36.231 PDT [8973] LOG: database system was interrupted; last
known up at 2025-08-11 18:50:31 PDT
2025-08-12 18:16:36.461 PDT [8973] LOG: database system was not properly shut
down; automatic recovery in progress
2025-08-12 18:16:36.463 PDT [8973] LOG: redo starts at 0/1C65AA08
2025-08-12 18:16:36.463 PDT [8973] LOG: invalid record length at 0/1C65AA40:
wanted 24, got 0
2025-08-12 18:16:36.463 PDT [8973] LOG: redo done at 0/1C65AA08
2025-08-12 18:16:36.465 PDT [8973] LOG: checkpoint starting: end-of-recovery
immediate
2025-08-12 18:16:36.467 PDT [8973] LOG: checkpoint complete: wrote 0 buffers
(0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; writ
e=0.000 s, sync=0.000 s, total=0.002 s; sync files=0, longest=0.000 s,
average=0.000 s; distance=0 kB, estimate=0 kB
2025-08-12 18:16:36.471 PDT [8971] LOG: database system is ready to accept
connections
2025-08-12 18:21:09.500 PDT [8971] LOG: WAL writer process (PID 8976) was
terminated by signal 9: Killed
2025-08-12 18:21:09.500 PDT [8971] LOG: terminating any other active server
processes
2025-08-12 18:21:09.511 PDT [8977] WARNING: terminating connection because of
crash of another server process
2025-08-12 18:21:09.511 PDT [8977] DETAIL: The postmaster has commanded this
server process to roll back the current transaction and
exit, because another server process exited abnormally and possibly corrupted
shared memory.
2025-08-12 18:21:09.511 PDT [8977] HINT: In a moment you should be able to
reconnect to the database and repeat your command.
2025-08-12 18:21:09.525 PDT [8971] LOG: all server processes terminated;
reinitializing
2025-08-12 18:21:09.543 PDT [9136] LOG: database system was interrupted; last
known up at 2025-08-12 18:16:36 PDT
2025-08-12 18:21:09.670 PDT [9136] LOG: database system was not properly shut
down; automatic recovery in progress
2025-08-12 18:21:09.671 PDT [9136] LOG: redo starts at 0/1C65AAB0
2025-08-12 18:21:09.671 PDT [9136] LOG: invalid record length at 0/1C65AAE8:
wanted 24, got 0
2025-08-12 18:21:09.671 PDT [9136] LOG: redo done at 0/1C65AAB0
2025-08-12 18:21:09.673 PDT [9136] LOG: checkpoint starting: end-of-recovery
immediate
2025-08-12 18:21:09.677 PDT [9136] LOG: checkpoint complete: wrote 0 buffers
(0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; writ
e=0.000 s, sync=0.000 s, total=0.004 s; sync files=0, longest=0.000 s,
average=0.000 s; distance=0 kB, estimate=0 kB
2025-08-12 18:21:09.683 PDT [8971] LOG: database system is ready to accept
connections
[postgres@localhost log]$ date
Tue Aug 12 18:22:40 PDT 2025
[postgres@localhost log]$ cd ,,
-bash: cd: ,,: No such file or directory
[postgres@localhost log]$ cd ..
[postgres@localhost app03]$ ls -ltr
total 64
drwx------. 2 postgres postgres 6 Jun 17 10:07 pg_twophase
drwx------. 2 postgres postgres 6 Jun 17 10:07 pg_tblspc
drwx------. 2 postgres postgres 6 Jun 17 10:07 pg_snapshots
drwx------. 2 postgres postgres 6 Jun 17 10:07 pg_serial
drwx------. 2 postgres postgres 6 Jun 17 10:07 pg_replslot
drwx------. 4 postgres postgres 36 Jun 17 10:07 pg_multixact
drwx------. 2 postgres postgres 6 Jun 17 10:07 pg_dynshmem
drwx------. 2 postgres postgres 6 Jun 17 10:07 pg_commit_ts
-rw-------. 1 postgres postgres 3 Jun 17 10:07 PG_VERSION
-rw-------. 1 postgres postgres 1636 Jun 17 10:07 pg_ident.conf
drwx------. 2 postgres postgres 18 Jun 17 10:07 pg_xact
drwx------. 2 postgres postgres 18 Jun 17 10:07 pg_subtrans
-rw-------. 1 postgres postgres 1018 Jun 17 10:10 logfile
drwx------. 3 postgres postgres 92 Jul 2 08:13 pg_wal_bkp
lrwxrwxrwx. 1 postgres postgres 30 Jul 2 09:14 pg_wal ->
/home/postgres/app04/wal_files
-rw-------. 1 postgres postgres 134 Jul 13 09:16 postgresql.auto.conf
drwx------. 2 postgres postgres 188 Jul 14 06:10 log
-rw-------. 1 postgres postgres 24009 Jul 14 06:15 postgresql.conf
-rw-------. 1 postgres postgres 4581 Jul 14 06:37 pg_hba.conf
drwx------. 12 postgres postgres 136 Aug 6 09:34 base
-rw-------. 1 postgres postgres 55 Aug 12 18:16 postmaster.opts
-rw-------. 1 postgres postgres 30 Aug 12 18:16 current_logfiles
drwx------. 2 postgres postgres 4096 Aug 12 18:16 global
drwx------. 2 postgres postgres 18 Aug 12 18:21 pg_notify
drwx------. 2 postgres postgres 6 Aug 12 18:21 pg_stat
drwx------. 4 postgres postgres 68 Aug 12 18:21 pg_logical
-rw-------. 1 postgres postgres 93 Aug 12 18:21 postmaster.pid
drwx------. 2 postgres postgres 25 Aug 12 18:24 pg_stat_tmp
[postgres@localhost app03]$ ls -ltr *.conf
-rw-------. 1 postgres postgres 1636 Jun 17 10:07 pg_ident.conf
-rw-------. 1 postgres postgres 134 Jul 13 09:16 postgresql.auto.conf
-rw-------. 1 postgres postgres 24009 Jul 14 06:15 postgresql.conf
-rw-------. 1 postgres postgres 4581 Jul 14 06:37 pg_hba.conf
[postgres@localhost app03]$ more postgresql.conf
# -----------------------------
# PostgreSQL configuration file
# -----------------------------
#
# This file consists of lines of the form:
#
# name = value
#
# (The "=" is optional.) Whitespace may be used. Comments are introduced with
# "#" anywhere on a line. The complete list of parameter names and allowed
# values can be found in the PostgreSQL documentation.
#
# The commented-out settings shown in this file represent the default values.
# Re-commenting a setting is NOT sufficient to revert it to the default value;
# you need to reload the server.
#
# This file is read on server startup and when the server receives a SIGHUP
# signal. If you edit the file on a running system, you have to SIGHUP the
# server for the changes to take effect, run "pg_ctl reload", or execute
# "SELECT pg_reload_conf()". Some parameters, which are marked below,
# require a server shutdown and restart to take effect.
#
# Any parameter can also be given as a command-line option to the server, e.g.,
# "postgres -c log_connections=on". Some parameters can be changed at run time
# with the "SET" SQL command.
#
# Memory units: kB = kilobytes Time units: ms = milliseconds
# MB = megabytes s = seconds
# GB = gigabytes min = minutes
# TB = terabytes h = hours
# d = days
#------------------------------------------------------------------------------
# FILE LOCATIONS
#------------------------------------------------------------------------------
# The default values of these variables are driven from the -D command-line
# option or PGDATA environment variable, represented here as ConfigDir.
#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------
# - Connection Settings -
# - TCP Keepalives -
# see "man 7 tcp" for details
# - Authentication -
#authentication_timeout = 1min # 1s-600s
#password_encryption = md5 # md5 or scram-sha-256
#db_user_namespace = off
# - SSL -
#ssl = off
#ssl_ca_file = ''
#ssl_cert_file = 'server.crt'
#ssl_crl_file = ''
#ssl_key_file = 'server.key'
#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers
#ssl_prefer_server_ciphers = on
#ssl_ecdh_curve = 'prime256v1'
#ssl_dh_params_file = ''
#ssl_passphrase_command = ''
#ssl_passphrase_command_supports_reload = off
#------------------------------------------------------------------------------
# RESOURCE USAGE (except WAL)
#------------------------------------------------------------------------------
# - Memory -
# - Disk -
# - Kernel Resources -
#max_files_per_process = 1000 # min 25
# (change requires restart)
# - Background Writer -
# - Asynchronous Behavior -
#------------------------------------------------------------------------------
# WRITE-AHEAD LOG
#------------------------------------------------------------------------------
# - Settings -
# - Checkpoints -
# - Archiving -
#------------------------------------------------------------------------------
# REPLICATION
#------------------------------------------------------------------------------
# - Sending Servers -
# Set these on the master and on any standby that will send replication data.
# - Master Server -
# - Standby Servers -
# - Subscribers -
#------------------------------------------------------------------------------
# QUERY TUNING
#------------------------------------------------------------------------------
#enable_bitmapscan = on
#enable_hashagg = on
#enable_hashjoin = on
#enable_indexscan = on
#enable_indexonlyscan = on
#enable_material = on
#enable_mergejoin = on
#enable_nestloop = on
#enable_parallel_append = on
#enable_seqscan = on
#enable_sort = on
#enable_tidscan = on
#enable_partitionwise_join = off
#enable_partitionwise_aggregate = off
#enable_parallel_hash = on
#enable_partition_pruning = on
#min_parallel_table_scan_size = 8MB
#min_parallel_index_scan_size = 512kB
#effective_cache_size = 4GB
#geqo = on
#geqo_threshold = 12
#geqo_effort = 5 # range 1-10
#geqo_pool_size = 0 # selects default based on effort
#geqo_generations = 0 # selects default based on effort
#geqo_selection_bias = 2.0 # range 1.5-2.0
#geqo_seed = 0.0 # range 0.0-1.0
#------------------------------------------------------------------------------
# REPORTING AND LOGGING
#------------------------------------------------------------------------------
# - Where to Log -
# - When to Log -
# - What to Log -
#debug_print_parse = off
#debug_print_rewritten = off
#debug_print_plan = off
#debug_pretty_print = on
#log_checkpoints = off
#log_connections = off
#log_disconnections = off
#log_duration = off
#log_error_verbosity = default # terse, default, or verbose messages
#log_hostname = off
log_line_prefix = '%m [%p] ' # special values:
# %a = application name
# %u = user name
# %d = database name
# %r = remote host and port
# %h = remote host
# %p = process ID
# %t = timestamp without milliseconds
# %m = timestamp with milliseconds
# %n = timestamp with milliseconds (as a
Unix epoch)
# %i = command tag
# %e = SQL state
# %c = session ID
# %l = session line number
# %s = session start timestamp
# %v = virtual transaction ID
# %x = transaction ID (0 if none)
# %q = stop here in non-session
# processes
# %% = '%'
# e.g. '<%u%%%d> '
#log_lock_waits = off # log lock waits >= deadlock_timeout
#log_statement = 'none' # none, ddl, mod, all
#log_replication_commands = off
#log_temp_files = -1 # log temporary files equal or larger
# than the specified size in kilobytes;
# -1 disables, 0 logs all temp files
log_timezone = 'America/Los_Angeles'
#------------------------------------------------------------------------------
# PROCESS TITLE
#------------------------------------------------------------------------------
#track_activities = on
#track_counts = on
#track_io_timing = off
#track_functions = none # none, pl, all
#track_activity_query_size = 1024 # (change requires restart)
#stats_temp_directory = 'pg_stat_tmp'
# - Monitoring -
#log_parser_stats = off
#log_planner_stats = off
#log_executor_stats = off
#log_statement_stats = off
#------------------------------------------------------------------------------
# AUTOVACUUM
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# CLIENT CONNECTION DEFAULTS
#------------------------------------------------------------------------------
# - Statement Behavior -
# - Other Defaults -
#dynamic_library_path = '$libdir'
#------------------------------------------------------------------------------
# LOCK MANAGEMENT
#------------------------------------------------------------------------------
#deadlock_timeout = 1s
#max_locks_per_transaction = 64 # min 10
# (change requires restart)
#max_pred_locks_per_transaction = 64 # min 10
# (change requires restart)
#max_pred_locks_per_relation = -2 # negative values mean
# (max_pred_locks_per_transaction
# / -max_pred_locks_per_relation) - 1
#max_pred_locks_per_page = 2 # min 0
#------------------------------------------------------------------------------
# VERSION AND PLATFORM COMPATIBILITY
#------------------------------------------------------------------------------
#array_nulls = on
#backslash_quote = safe_encoding # on, off, or safe_encoding
#default_with_oids = off
#escape_string_warning = on
#lo_compat_privileges = off
#operator_precedence_warning = off
#quote_all_identifiers = off
#standard_conforming_strings = on
#synchronize_seqscans = on
#transform_null_equals = off
#------------------------------------------------------------------------------
# ERROR HANDLING
#------------------------------------------------------------------------------
#exit_on_error = off # terminate session on any error?
#restart_after_crash = on # reinitialize after backend crash?
#data_sync_retry = off # retry or panic on failure to fsync
# data?
# (change requires restart)
#------------------------------------------------------------------------------
# CONFIG FILE INCLUDES
#------------------------------------------------------------------------------
# These options allow settings to be loaded from files other than the
# default postgresql.conf. Note that these are directives, not variable
# assignments, so they can usefully be given more than once.
#------------------------------------------------------------------------------
# CUSTOMIZED OPTIONS
#------------------------------------------------------------------------------
postgres=# exit
[postgres@localhost app03]$ psql -p 9999
psql (11.7)
Type "help" for help.
postgres=# select pg_reload_conf();
pg_reload_conf
----------------
t
(1 row)
postgres=# \a
Output format is unaligned.
postgres=# \q
[postgres@localhost app03]$ /usr/pgsql-11/bin/pg_ctl -D /home/postgres/app03
restart
waiting for server to shut down.... done
server stopped
waiting for server to start....postgres: superuser_reserved_connections (3) plus
max_wal_senders (10) must be less than max_connections (10)
stopped waiting
pg_ctl: could not start server
Examine the log output.
[postgres@localhost app03]$ vi postgresql.conf
[postgres@localhost app03]$ /usr/pgsql-11/bin/pg_ctl -D /home/postgres/app03
restart
pg_ctl: PID file "/home/postgres/app03/postmaster.pid" does not exist
Is server running?
trying to start server anyway
waiting for server to start....2025-08-12 18:33:54.844 PDT [9519] LOG: listening
on IPv4 address "0.0.0.0", port 9999
2025-08-12 18:33:54.844 PDT [9519] LOG: listening on IPv6 address "::", port 9999
2025-08-12 18:33:54.845 PDT [9519] LOG: listening on Unix socket
"/var/run/postgresql/.s.PGSQL.9999"
2025-08-12 18:33:54.847 PDT [9519] LOG: listening on Unix socket
"/tmp/.s.PGSQL.9999"
2025-08-12 18:33:54.864 PDT [9519] LOG: redirecting log output to logging
collector process
2025-08-12 18:33:54.864 PDT [9519] HINT: Future log output will appear in
directory "log".
done
server started
[postgres@localhost app03]$ vi postgresql.conf
[postgres@localhost app03]$ /usr/pgsql-11/bin/pg_ctl -D /home/postgres/app03
restart
waiting for server to shut down.... done
server stopped
waiting for server to start....postgres: superuser_reserved_connections (3) plus
max_wal_senders (10) must be less than max_connections (13)
stopped waiting
pg_ctl: could not start server
Examine the log output.
[postgres@localhost app03]$ vi postgresql.conf
[postgres@localhost app03]$ /usr/pgsql-11/bin/pg_ctl -D /home/postgres/app03
restart
pg_ctl: PID file "/home/postgres/app03/postmaster.pid" does not exist
Is server running?
trying to start server anyway
waiting for server to start....2025-08-12 18:35:21.887 PDT [9587] LOG: listening
on IPv4 address "0.0.0.0", port 9999
2025-08-12 18:35:21.887 PDT [9587] LOG: listening on IPv6 address "::", port 9999
2025-08-12 18:35:21.888 PDT [9587] LOG: listening on Unix socket
"/var/run/postgresql/.s.PGSQL.9999"
2025-08-12 18:35:21.890 PDT [9587] LOG: listening on Unix socket
"/tmp/.s.PGSQL.9999"
2025-08-12 18:35:21.901 PDT [9587] LOG: redirecting log output to logging
collector process
2025-08-12 18:35:21.901 PDT [9587] HINT: Future log output will appear in
directory "log".
done
server started
[postgres@localhost app03]$ psql -p 9999
psql (11.7)
Type "help" for help.
postgres=# exit
[postgres@localhost app03]$ more postgresql.conf | grep max_conn
max_connections = 20 # (change requires restart)
[postgres@localhost app03]$ psql -p 9999
psql (11.7)
Type "help" for help.
postgres=# exit
[postgres@localhost app03]$ ls -ltr *.conf
-rw-------. 1 postgres postgres 1636 Jun 17 10:07 pg_ident.conf
-rw-------. 1 postgres postgres 4581 Jul 14 06:37 pg_hba.conf
-rw-------. 1 postgres postgres 152 Aug 12 18:31 postgresql.auto.conf
-rw-------. 1 postgres postgres 24008 Aug 12 18:35 postgresql.conf
[postgres@localhost app03]$ more postgresql.auto.conf
# Do not edit this file manually!
# It will be overwritten by the ALTER SYSTEM command.
max_wal_size = '200MB'
log_checkpoints = 'on'
work_mem = '10MB'
[postgres@localhost app03]$ psql -p 9999
psql (11.7)
Type "help" for help.
postgres=# exit
[postgres@localhost app03]$ more postgresql.auto.conf
# Do not edit this file manually!
# It will be overwritten by the ALTER SYSTEM command.
max_wal_size = '200MB'
log_checkpoints = 'on'
work_mem = '20MB'
[postgres@localhost app03]$ psql -p 9999
psql (11.7)
Type "help" for help.
postgres=# \q
[postgres@localhost app03]$ more postgresql.conf | grep shared
shared_buffers = 128MB # min 128kB
dynamic_shared_memory_type = posix # the default is the first option
# use none to disable dynamic shared memory
#wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers
#shared_preload_libraries = '' # (change requires restart)
[postgres@localhost app03]$ psql -p 9999
psql (11.7)
Type "help" for help.
postgres=# exit
[postgres@localhost app03]$ more postgresql.conf | grep shared
shared_buffers = 128MB # min 128kB
dynamic_shared_memory_type = posix # the default is the first option
# use none to disable dynamic shared memory
#wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers
#shared_preload_libraries = '' # (change requires restart)
[postgres@localhost app03]$ more postgresql.auto.conf
# Do not edit this file manually!
# It will be overwritten by the ALTER SYSTEM command.
max_wal_size = '200MB'
log_checkpoints = 'on'
work_mem = '20MB'
shared_buffers = '200MB'
[postgres@localhost app03]$ /usr/pgsql-11/bin/pg_ctl -D /home/postgres/app03
restart
waiting for server to shut down.... done
server stopped
waiting for server to start....2025-08-12 18:43:51.701 PDT [9842] LOG: listening
on IPv4 address "0.0.0.0", port 9999
2025-08-12 18:43:51.702 PDT [9842] LOG: listening on IPv6 address "::", port 9999
2025-08-12 18:43:51.704 PDT [9842] LOG: listening on Unix socket
"/var/run/postgresql/.s.PGSQL.9999"
2025-08-12 18:43:51.705 PDT [9842] LOG: listening on Unix socket
"/tmp/.s.PGSQL.9999"
2025-08-12 18:43:51.726 PDT [9842] LOG: redirecting log output to logging
collector process
2025-08-12 18:43:51.726 PDT [9842] HINT: Future log output will appear in
directory "log".
done
server started
[postgres@localhost app03]$ more postgresql.auto.conf
# Do not edit this file manually!
# It will be overwritten by the ALTER SYSTEM command.
max_wal_size = '200MB'
log_checkpoints = 'on'
work_mem = '20MB'
shared_buffers = '200MB'
[postgres@localhost app03]$ more postgresql.conf | grep shared
shared_buffers = 128MB # min 128kB
dynamic_shared_memory_type = posix # the default is the first option
# use none to disable dynamic shared memory
#wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers
#shared_preload_libraries = '' # (change requires restart)
[postgres@localhost app03]$ psql -p 9999
psql (11.7)
Type "help" for help.
postgres=# exit
[postgres@localhost app03]$ more pg_hba.conf
# PostgreSQL Client Authentication Configuration File
# ===================================================
#
# Refer to the "Client Authentication" section in the PostgreSQL
# documentation for a complete description of this file. A short
# synopsis follows.
#
# This file controls: which hosts are allowed to connect, how clients
# are authenticated, which PostgreSQL user names they can use, which
# databases they can access. Records take one of these forms:
#
# local DATABASE USER METHOD [OPTIONS]
# host DATABASE USER ADDRESS METHOD [OPTIONS]
# hostssl DATABASE USER ADDRESS METHOD [OPTIONS]
# hostnossl DATABASE USER ADDRESS METHOD [OPTIONS]
#
# (The uppercase items must be replaced by actual values.)
#
# The first field is the connection type: "local" is a Unix-domain
# socket, "host" is either a plain or SSL-encrypted TCP/IP socket,
# "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a
# plain TCP/IP socket.
#
# DATABASE can be "all", "sameuser", "samerole", "replication", a
# database name, or a comma-separated list thereof. The "all"
# keyword does not match "replication". Access to replication
# must be enabled in a separate record (see example below).
#
# USER can be "all", a user name, a group name prefixed with "+", or a
# comma-separated list thereof. In both the DATABASE and USER fields
# you can also write a file name prefixed with "@" to include names
# from a separate file.
#
# ADDRESS specifies the set of hosts the record matches. It can be a
# host name, or it is made up of an IP address and a CIDR mask that is
# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that
# specifies the number of significant bits in the mask. A host name
# that starts with a dot (.) matches a suffix of the actual host name.
# Alternatively, you can write an IP address and netmask in separate
# columns to specify the set of hosts. Instead of a CIDR-address, you
# can write "samehost" to match any of the server's own IP addresses,
# or "samenet" to match any address in any subnet that the server is
# directly connected to.
#
# METHOD can be "trust", "reject", "md5", "password", "scram-sha-256",
# "gss", "sspi", "ident", "peer", "pam", "ldap", "radius" or "cert".
# Note that "password" sends passwords in clear text; "md5" or
# "scram-sha-256" are preferred since they send encrypted passwords.
#
# OPTIONS are a set of options for the authentication in the format
# NAME=VALUE. The available options depend on the different
# authentication methods -- refer to the "Client Authentication"
# section in the documentation for a list of which options are
# available for which authentication methods.
#
# Database and user names containing spaces, commas, quotes and other
# special characters must be quoted. Quoting one of the keywords
# "all", "sameuser", "samerole" or "replication" makes the name lose
# its special character, and just match a database or username with
# that name.
#
# This file is read on server startup and when the server receives a
# SIGHUP signal. If you edit the file on a running system, you have to
# SIGHUP the server for the changes to take effect, run "pg_ctl reload",
# or execute "SELECT pg_reload_conf()".
#
# Put your actual configuration here
# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records. In that case you will also need to make PostgreSQL
# listen on a non-local interface via the listen_addresses
# configuration parameter, or via the -i or -h command line switches.
postgres=# exit
[postgres@localhost app03]$ id
uid=1005(postgres) gid=1005(postgres) groups=1005(postgres)
context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[postgres@localhost app03]$ more /etc/passwd | grep ansar
ansar:x:1007:1007::/home/ansar:/bin/bash
[postgres@localhost app03]$ more /etc/passwd | grep ansar1
[postgres@localhost app03]$ useradd ansar1
-bash: /usr/sbin/useradd: Permission denied
[postgres@localhost app03]$ exit
logout
[root@localhost ~]# useradd ansar1
[root@localhost ~]# more /etc/passwd | grep ansa*
ansar:x:1007:1007::/home/ansar:/bin/bash
ansar1:x:1008:1008::/home/ansar1:/bin/bash
[root@localhost ~]# su - postgres
Last login: Tue Aug 12 18:16:26 PDT 2025 on pts/1
[postgres@localhost ~]$ psql -p 9999
psql (11.7)
Type "help" for help.