Remove synchronous_standby_names
alter system set synchronous_standby_names = '';
pg_dumpall | gzip -c > all.dbs.out.gz
psql -d doc -f 9.6/dump.sql
or
psql doc < 9.6/dump.sql
GRANT ALL privileges ON DATABASE doc TO doc;
alter database doc owner to doc;
ALTER ROLE doc superuser;
alter user doc with nosuperuser;
alter user doc with superuser;
SUPERUSER
NOSUPERUSER
CREATEDB
NOCREATEDB
CREATEROLE
NOCREATEROLE
CREATEUSER
NOCREATEUSER
INHERIT
NOINHERIT
LOGIN
NOLOGIN
REPLICATION
NOREPLICATION
CONNECTION LIMIT connlimit
PASSWORD password
ENCRYPTED
UNENCRYPTED
VALID UNTIL 'timestamp'
ALTER ROLE doc login ;
alter system set synchronous_commit = 'off';
alter system set synchronous_standby_names = '';
select pg_reload_conf();
Show slots and replication status
select * from pg_stat_replication;
select * from pg_replication_slots;
Current queries sort by runtime
SELECT pid, datname, usename, client_addr, now() - query_start as "runtime", query_start, wait_event, state, query
FROM pg_stat_activity
ORDER BY runtime DESC limit 30;