Catégorie : Postgresql
-
Status instance postgres
POSTGRES_IS_RUNNING=$(export PGPASSWORD=${PG_PWD}; psql –host=${MACH_DEST} –port=${PORT} –user=${PG_USER} –dbname=postgres –quiet –tuples-only –no-psqlrc –command « SELECT 1; » 2>/dev/null)INSTANCE_STATUS=$(export PGPASSWORD=${PG_PWD}; psql –host=${MACH_DEST} –port=${PORT} –user=${PG_USER} –dbname=postgres –quiet –tuples-only –no-psqlrc –command= »SELECT CASE pg_is_in_recovery() WHEN true THEN ‘IN […]
-
Calcul de stats postgreSQL
$PGHOME/bin/vacuumdb –port=$PORT –username=$PG_USER –analyze-only –verbose –jobs=$NB_JOBS $PG_DATABASE » 2>&1
-
About JSON in RDBMS
2 links : JSONB PostgreSQL: How To Store & Index JSON Data (scalegrid.io) PostgreSQL JSON Tutorial (postgresqltutorial.com)
-
PG_BADGER
pgbadger -j 4 –outfile $HOME/rapport_complet.html -f stderr -p ‘%t:%r:%u@%d:[%p]:’ /pglog/postgresql-2021-09-10_000000.log
-
Configuration application cloud postgres
USERNAME :: postgres://<instance>/<role>/user PASSWORD ::postgres://<instance>/<role>/password URL :: jdbc:postgresql://<instance>.<domain>:<port>/<dbname>
-
Ora2PG now supports oracle_fdw to increase the data migration speed
source : https://www.migops.com/blog/2021/07/01/ora2pg-now-supports-oracle_fdw-to-increase-the-data-migration-speed/
-
[PostgreSQL] Voir les tables partitionnées
WITH RECURSIVE partition_info(relid, relname, relsize, relispartition, relkind)AS (SELECT oid AS relid, relname, pg_relation_size(oid) AS relsize, relispartition, relkind FROM pg_catalog.pg_class WHERE relkind = ‘p’ AND relname = ‘mof_ple_part’ — Pour une […]
-
[PostgreSQL] Déploiement d’un cluster PATRONI
Convert a Standalone to a Patroni Cluster Déployer le cluster PATRONI dans un nouvel environnement
-
[PostgreSQL] Voir les tablespaces
show default_tablespace ;alter system set default_tablespace=’tbs_msg_data’ ;select pg_reload_conf();show default_tablespace show temp_tablespaces ;alter system set temp_tablespaces=’temp’ ;select pg_reload_conf();show temp_tablespaces
