Д
http://repo.postgrespro.ru/1c-archive/
отличается от этого
http://repo.postgrespro.ru/
Size: a a a
Д
MV
АШ
POSTGRES_DATABASES=$(su postgres -c ' psql -t -A -c "SELECT datname FROM pg_database"' | grep -v 'postgres\|template0\|template1')
for DATABASE in $POSTGRES_DATABASES
do
su postgres -c "psql -t -A -c 'create extension if not exists pg_repack;' $DATABASE"
done
АД
MV
АШ
MV
What about pg_repack?
Unlike another popular tool pg_repack this tool has some advantages:
does not requires lots of free space
tables are processed in-place
indexes are rebuild one by one, from smallest to largest therefore maximum space required is the size of the largest index
tables are processed with adaptive delays to prevent heavy IO and replication lag spikes (see --delay-ratio option)
АД
АД
What about pg_repack?
Unlike another popular tool pg_repack this tool has some advantages:
does not requires lots of free space
tables are processed in-place
indexes are rebuild one by one, from smallest to largest therefore maximum space required is the size of the largest index
tables are processed with adaptive delays to prevent heavy IO and replication lag spikes (see --delay-ratio option)
MV
АД
СГ
MV
#!/bin/bash
cd /tmp
PGCOMPACT_CMD="/opt/pg_scripts/pgcompacttable/bin/pgcompacttable --all --delay-ratio=0"
POSTGRES_DATABASES=$(su postgres -c ' psql -t -A -c "SELECT datname FROM pg_database"' | grep -v 'postgres\|template0\|template1')
apt install libdbi-perl libdbd-pg-perl -y
for DATABASE in $POSTGRES_DATABASES
do
su postgres -c "psql -t -A -c 'create extension if not exists pgstattuple;' $DATABASE"
done
su postgres -c "$PGCOMPACT_CMD"
АШ
АШ
АШ
MV
АШ
K
LK