Catégorie : Postgresql
-
[Postgres] How to Enable / Disable Archive Mode
https://orahow.com/enable-disable-archive-mode-in-postgres/ Steps to Enable WAL Archiving in Postgres STEP 1: Verify archive mode is enabled or not using below command. postgres=# show archive_mode; archive_mode ————– off (1 row) postgres=# […]
-
L’extension oracle_fdw
#se connecter au serveur targetpsql -U <muyser>CREATE EXTENSION oracle_fdw;dewCREATE SERVER orasrv FOREIGN DATA WRAPPER oracle_fdw (dbserver ‘<servername>:<port>/<SID>’);des+GRANT USAGE ON FOREIGN SERVER orasrv TO <muyser>;CREATE USER MAPPING FOR <muyser> SERVER orasrv […]
-
On tire la chasse et on nettoie ?
PostgreSQL – vacuumdb – vacuumdb — ramasse les ordures et analyse une base de données PostgreSQL Synopsi – Français (runebook.dev)
-
Calcul stats PostgreSQL
for tablename in $(psql -U postgres -h $2 -d $1 -t -c « select table_name as _table from information_schema.tables t where t.table_schema=’sche_admin’ order by _table asc »); do echo $tablename […]
-
[PostgreSQL] pgBackRest sauvegarder la standby
Backup From a Standby | pgBackRest (pmatseykanets.github.io)
-
[PostgreSQL] Vérifier le statut de la réplication
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, […]
-
Detecting inline, inline-compressed and TOAST storage
Detecting inline, inline-compressed and TOAST storage +–+————–+——————+———-+———–+————-+ |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 […]
-
Deploy new postgreSQL instance dMZR
Deploy new postgreSQL instance dMZR #!/bin/sh#set -excd $ORA2PG_HOME/hvaultwhile truedoif [ « $# » -eq « 0 » ] thenclearecho » « echo » Welcome to the program of a new deployment in <cloudDBname> – dMZR »echo […]
-
Modifier l’encodage PostgreSQL en UTF8
How to change PostgreSQL database encoding to UTF8 (shubhamdipt.com)
-
PostgreSQL bonnes pratiques
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) Exporter les […]
