[PostgreSQL] pgBackRest sauvegarder la standby
Backup From a Standby | pgBackRest (pmatseykanets.github.io)
En poursuivant votre navigation sur ce site, vous acceptez l'utilisation de cookies. Ces derniers assurent le bon fonctionnement de nos services. En savoir plus.
Backup From a Standby | pgBackRest (pmatseykanets.github.io)
On master:
select * from pg_stat_replication;
On replica (streaming replication in my case):
select * from pg_stat_wal_receiver;
On your master, pg_stat_replication provides data about ongoing replication:
select client_addr, state, sent_location, write_location,
flush_location, replay_location from pg_stat_replication;
On postgresql v10:
select client_addr, state, sent_lsn, write_lsn,
flush_lsn, replay_lsn from pg_stat_replication;
On server
postgres=# select usename,application_name,client_addr,backend_start,state,sync_state from pg_stat_replication ;
On client
postgres=# select pg_is_in_recovery();
postgres=# select pg_last_xlog_receive_location();
postgres=# SELECT CASE WHEN pg_last_xlog_receive_location() = pg_last_xlog_replay_location()
THEN 0
ELSE EXTRACT (EPOCH FROM now() - pg_last_xact_replay_timestamp())
END AS log_delay;
postgres=# select pg_last_xlog_replay_location();
+--+--------------+------------------+----------+-----------+-------------+
|id|full_name |uncompressed_bytes|compressed|out_of_line|bytes_on_disk|
+--+--------------+------------------+----------+-----------+-------------+
|1 |joe toast |4004 |false |true |4000 |
|2 |joe compressed|3000 |true |false |44 |
|3 |joe inline |10 |false |false |11 |
Deploy new postgreSQL instance dMZR
How to change PostgreSQL database encoding to UTF8 (shubhamdipt.com)
Restriction du schéma « public »
Définir des nouveaux tablespaces pour les données et indexes et temp et changer le nom du tablespace par défaut (data et temp)
Script de création des roles HVAULT dans ibm cloud pour postgreSQL (dMZR);
yum install oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm
yum install oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm
yum install oracle-instantclient12.2-jdbc-12.2.0.1.0-1.x86_64.rpm
yum install oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm
yum -y install perl-DBI
yum install gcc
yum install glibc-devel
yum install perl-ExtUtils-MakeMaker -y
yum install perl-open.noarch -y
export ORACLE_HOME=/usr/lib/oracle/12.2/client64
export LD_LIBRARY_PATH=/usr/lib/oracle/12.2/client64/lib
tar -xvzf ora2pg-23.0.tar.gz
cd ora2pg-23.0/
perl Makefile.PL
make && make install
tar -xvzf DBD-Oracle-1.83.tar.gz
cd DBD-Oracle-1.83
perl Makefile.PL
make && make install