Problem/Case
When using typical physical streaming, pg_wal size grows very fast and unexpectedly on DR (Disaster)/Backup/Standby node
Check inactive replication slots on DR node. If it exists, drop them
Problem/Case
When using typical physical streaming, pg_wal size grows very fast and unexpectedly on DR (Disaster)/Backup/Standby node
-- show the connection info
# \conninfo
-- show IP address connected by the postgres client
# select inet_server_addr();
-- enable timing
# \timing
Timing is on.
-- enable expanded display
# \x
Expanded display is on.
-- run linux command inside psql command line
# \! date
Fri Sep 1 11:50:28 AM +03 2023
-- show the command history
# \s
-- prepare/set custom prompt:
# \set PROMPT1 '%M:%> user:%n database:%/ %l %x%# '
# \set PROMPT1 '%M:%> U:%n d:%/ %l %x%# '
PROMPT1 -> normal prompt
PROMPT2 -> if need to give more than one input command (extra prompt)
PROMPT3 -> if need to use "SQL COPY FROM STDIN" (extra prompt)
Ref: https://www.postgresql.org/docs/13/app-psql.html#APP-PSQL-PROMPTING