Catégorie : Postgresql
-
Migration from Oracle Legacy to postgreSQL dMZR
Migration from Oracle Legacy to postgreSQL dMZR //on the ora2Pg management server : 0- prerequisite create role role_own_DB login; 1 – export schema gives the metadata // on […]
-
POST MIGRATION ajouter un booleen
# changer type en booleenalter table « <your_table> »alter column « <your_column> »set data type booleanusing case when « <your_column> » = ‘1’ then true when « <your_column> » = ‘0’ then false else nullend; […]
-
Difference between Clustered and Non-clustered index
link Difference between Clustered and Non-clustered index (guru99.com)
-
Modify the owner of the tables and the sequences (post migration)
Modify the owner of the tables and the sequences (post migration) #change table ownerfor tbl in `psql -h $SERVER$DOMAIN -p $PORT -U <dbauser> -qAt -c « select tablename from pg_tables where schemaname […]
-
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>