Merge lp:~wgrant/launchpad/staging-restore-hax into lp:launchpad

Proposed by William Grant
Status: Merged
Merged at revision: 18507
Proposed branch: lp:~wgrant/launchpad/staging-restore-hax
Merge into: lp:launchpad
Diff against target: 24 lines (+4/-2)
1 file modified
database/replication/Makefile (+4/-2)
To merge this branch: bzr merge lp:~wgrant/launchpad/staging-restore-hax
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+333787@code.launchpad.net

Commit message

Fix staging restores and make them more verbose.

Description of the change

Fix staging restores and make them more verbose.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'database/replication/Makefile'
2--- database/replication/Makefile 2016-09-06 14:02:09 +0000
3+++ database/replication/Makefile 2017-11-16 03:40:07 +0000
4@@ -56,8 +56,10 @@
5 stagingsetup:
6 # List the dump first to make sure it is usable before destroying
7 # anything.
8+ # XXX wgrant 2017-11-16: Exclude tsearch2 bits that are
9+ # erreonously being dumped now.
10 pg_restore --list ${STAGING_DUMP} | grep -v 'TRIGGER public _sl_' \
11- > ${DUMPLIST}
12+ | grep -v 'OPERATOR FAMILY ts2' > ${DUMPLIST}
13
14 # Deny new connections to the main DBs and kill any leftovers.
15 ${STAGING_PGBOUNCER} -c 'DISABLE launchpad_staging'
16@@ -82,7 +84,7 @@
17 cat ${STAGING_DUMP} \
18 | ./walblock.py -n 5000 -d /var/lib/postgresql/9.3/staging/pg_xlog \
19 | pg_restore --dbname=lpmain_staging --no-owner ${EXIT_ON_ERROR} \
20- --use-list=${DUMPLIST}
21+ --use-list=${DUMPLIST} -v
22 rm ${DUMPLIST}
23 # Apply database patches.
24 @echo Running upgrade.py `date`.