Catégorie : Postgresql
-
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 […]
-
[HVAULT] Roles postgreSQL
Script de création des roles HVAULT dans ibm cloud pour postgreSQL (dMZR); #!/bin/sh#-ex#set -xwhile truedoclear if [[ « $VAULT_ADDR » == <adresse de prod>]] then […]
-
[PostgreSQL] restore de blobs
SELECT lo_unlink(oid) FROM pg_largeobject_metadata;WARNING: out of shared memoryERROR: out of shared memoryHINT: You might need to increase max_locks_per_transaction.
-
[PostgreSQL]tables sans oid en big serial
select sch.nspname as schemaname, tab.relname as tablename, col.attname as columnname, col.attnum as columnnumber, col.atttypid, typ.typname as columntypefrom pg_attribute coljoin pg_type […]
-
[PostgreSQL] Find all the table and index size
SELECT TableName ,pg_size_pretty(pg_table_size(TableName)) AS TableSize ,pg_size_pretty(pg_indexes_size(TableName)) AS IndexSize ,pg_size_pretty(pg_total_relation_size(TableName)) AS TotalSize FROM ( SELECT (‘ »‘ || table_schema || ‘ ». »‘ || table_name || ‘ »‘) AS TableName FROM information_schema.tables ) AS Tables […]
-
[PostgreSQL] Streaming Replication Monitoring Script
Script de création d’une fonction « streaming_slave_check » pour la réplication en postgreSQL.