From 1f694e6b5b597cd2ff1d83f12f0f78d2df24968a Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Sat, 10 Feb 2018 03:23:50 +0000 Subject: [PATCH] Don't sync Koji buildroot listings in staging buildroot_listing is by far the biggest table in koji db (>100 GB for table data, plus indexes) and it's rarely used - skipping it saves us some considerable amount of time. If the table turns out to be needed, the playbook can always be updated not to exclude it. --- playbooks/manual/staging-sync/koji.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/playbooks/manual/staging-sync/koji.yml b/playbooks/manual/staging-sync/koji.yml index 4ac9e96a18..d4172b61db 100644 --- a/playbooks/manual/staging-sync/koji.yml +++ b/playbooks/manual/staging-sync/koji.yml @@ -46,15 +46,14 @@ dest=/var/tmp/koji.dump.xz owner=postgres group=postgres - - command: unxz /var/tmp/koji.dump.xz - creates=/var/tmp/koji.dump # TODO -- stop replication and wipe db's - command: dropdb koji - command: createdb -O koji koji +# buildroot_listing is excluded from the sync to save some time - name: Import the prod db. This will take quite a while. Go get a snack! - shell: cat /var/tmp/koji.dump | psql koji + shell: xzcat /var/tmp/koji.dump.xz | sed '/COPY buildroot_listing /,/\./d' | psql koji - name: repoint all the prod rpm entries at the secondary volume (and other stuff) shell: psql koji < /var/lib/pgsql/koji-reset-staging.sql