Koji stg sync: run vacuum in a separate task
This commit is contained in:
parent
38786f14cf
commit
a97de30d27
2 changed files with 2 additions and 3 deletions
|
@ -71,10 +71,11 @@
|
||||||
# TODO: add pipe buffering
|
# TODO: add pipe buffering
|
||||||
- name: Import the prod db. This will take quite a while. Go get a snack!
|
- name: Import the prod db. This will take quite a while. Go get a snack!
|
||||||
shell: curl https://infrastructure.fedoraproject.org/infra/db-dumps/koji.dump.xz | xzcat | sed '/COPY buildroot_listing /,/\./d' | psql koji
|
shell: curl https://infrastructure.fedoraproject.org/infra/db-dumps/koji.dump.xz | xzcat | sed '/COPY buildroot_listing /,/\./d' | psql koji
|
||||||
# TODO: move vacuum to a separate task
|
|
||||||
# TODO: whap sql script in a transaction
|
# TODO: whap sql script in a transaction
|
||||||
- name: repoint all the prod rpm entries at the secondary volume (and other stuff)
|
- name: repoint all the prod rpm entries at the secondary volume (and other stuff)
|
||||||
shell: psql koji < /var/lib/pgsql/koji-reset-staging.sql
|
shell: psql koji < /var/lib/pgsql/koji-reset-staging.sql
|
||||||
|
- name: vacuum database
|
||||||
|
shell: psql koji <<<"VACUUM ANALYZE"
|
||||||
|
|
||||||
# TODO -- nuke old staging content in /mnt/fedora_koji/koji/
|
# TODO -- nuke old staging content in /mnt/fedora_koji/koji/
|
||||||
# TODO recreate directories under /mnt/fedora_koji/koji/
|
# TODO recreate directories under /mnt/fedora_koji/koji/
|
||||||
|
|
|
@ -112,5 +112,3 @@ insert into user_perms (user_id, perm_id, active, creator_id) values (
|
||||||
update users set krb_principal='{{principal}}@STG.FEDORAPROJECT.ORG' where name='{{username}}';
|
update users set krb_principal='{{principal}}@STG.FEDORAPROJECT.ORG' where name='{{username}}';
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
update users set krb_principal=replace(krb_principal, '@FEDORAPROJECT.ORG', '@STG.FEDORAPROJECT.ORG');
|
update users set krb_principal=replace(krb_principal, '@FEDORAPROJECT.ORG', '@STG.FEDORAPROJECT.ORG');
|
||||||
|
|
||||||
VACUUM ANALYZE;
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue