Merge lp:~stevenk/launchpad/reset-session-on-full-restore into lp:launchpad

Proposed by Steve Kowalik
Status: Merged
Approved by: Steve Kowalik
Approved revision: no longer in the source branch.
Merged at revision: 16581
Proposed branch: lp:~stevenk/launchpad/reset-session-on-full-restore
Merge into: lp:launchpad
Diff against target: 12 lines (+2/-0)
1 file modified
database/replication/Makefile (+2/-0)
To merge this branch: bzr merge lp:~stevenk/launchpad/reset-session-on-full-restore
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+160265@code.launchpad.net

Commit message

Reset the session_staging's sessiondata table just after we destroy the current staging database during a full restore.

Description of the change

Reset the session_staging's sessiondata table just after we destroy the current staging database during a full restore.

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 2012-08-07 10:56:04 +0000
3+++ database/replication/Makefile 2013-04-23 05:20:33 +0000
4@@ -57,6 +57,8 @@
5 ${STAGING_PGBOUNCER} -c 'kill launchpad_staging'
6 ${STAGING_PGBOUNCER} -c 'kill launchpad_staging_slave'
7 -${PGMASSACRE} lpmain_staging
8+ ${STAGING_PGBOUNCER} -c 'kill session_staging'
9+ psql -d session_staging -c 'TRUNCATE sessiondata CASCADE;'
10 # Create the DB with the desired default tablespace.
11 ${CREATEDB} --tablespace ${STAGING_TABLESPACE} lpmain_staging
12 # Restore the database. We need to restore permissions, despite