← Back to team overview

launchpad-reviewers team mailing list archive

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

 

Steve Kowalik has proposed merging lp:~stevenk/launchpad/reset-session-on-full-restore into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~stevenk/launchpad/reset-session-on-full-restore/+merge/160265

Reset the session_staging's sessiondata table just after we destroy the current staging database during a full restore.
-- 
https://code.launchpad.net/~stevenk/launchpad/reset-session-on-full-restore/+merge/160265
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/reset-session-on-full-restore into lp:launchpad.
=== modified file 'database/replication/Makefile'
--- database/replication/Makefile	2012-08-07 10:56:04 +0000
+++ database/replication/Makefile	2013-04-23 05:20:33 +0000
@@ -57,6 +57,8 @@
 	${STAGING_PGBOUNCER} -c 'kill launchpad_staging'
 	${STAGING_PGBOUNCER} -c 'kill launchpad_staging_slave'
 	-${PGMASSACRE} lpmain_staging
+	${STAGING_PGBOUNCER} -c 'kill session_staging'
+	psql -d session_staging -c 'TRUNCATE sessiondata CASCADE;'
 	# Create the DB with the desired default tablespace.
 	${CREATEDB} --tablespace ${STAGING_TABLESPACE} lpmain_staging
 	# Restore the database. We need to restore permissions, despite