Here's a script to help manage backups.
Fold branch.sql into schema.sql.
Remove homepage_new_participants cache table..

The explain for the original query to get new participants:

                                                 QUERY PLAN
------------------------------------------------------------------------------------------------------------
 Limit  (cost=13791.88..13791.91 rows=12 width=19)
   ->  Sort  (cost=13791.88..13843.58 rows=20683 width=19)
         Sort Key: p.claimed_time
         ->  Unique  (cost=13007.48..13110.89 rows=20683 width=19)
               ->  Sort  (cost=13007.48..13059.18 rows=20683 width=19)
                     Sort Key: p.username
                     ->  Hash Join  (cost=1716.85..11524.90 rows=20683 width=19)
                           Hash Cond: (e.participant = p.username)
                           ->  Seq Scan on elsewhere e  (cost=0.00..8570.72 rows=48972 width=11)
                           ->  Hash  (cost=1336.11..1336.11 rows=20699 width=19)
                                 ->  Seq Scan on participants p  (cost=0.00..1336.11 rows=20699 width=19)
                                       Filter: ((claimed_time IS NOT NULL) AND (is_suspicious IS NOT TRUE))

The explain for the updated query with the added index:

                                                     QUERY PLAN
--------------------------------------------------------------------------------------------------------------------
 Limit  (cost=0.00..27.86 rows=12 width=19)
   ->  Nested Loop Semi Join  (cost=0.00..39941.83 rows=17203 width=19)
         ->  Index Scan using participants_claimed_time on participants p  (cost=0.00..3981.65 rows=20699 width=19)
               Index Cond: (claimed_time IS NOT NULL)
         ->  Index Scan using elsewhere_participant on elsewhere e  (cost=0.00..1.87 rows=1 width=11)
               Index Cond: (participant = p.username)

The new query is roughly 80x faster (under 10ms).
Split homepage update query by statements.

Each query by itself is less likely to hit statement_timeout.
Adding .strip() to the queries enables searching through logs
with 'grep postgres duration' to see which queries are over 50ms.
First line of the query can be used for its identification.
Tell sentry about exceptions in homepage thread.
Prune old branch.sql
Append old branch.sql to master
Merge branch 'master' into homepage-updater-fixes

Conflicts:
	branch.sql
Log number of busy threads instead of %age

It's too hard to reason about the charts we're seeing as we change the
number of threads.
Merge pull request #1614 from gittip/perc-to-n

Log number of busy threads instead of %age
Bump version to 10.1.36
Bump version to 10.1.36-dev
Merge branch 'master' into snapper
Update .vimrc_local.vim (tracking #1485 a little)
Update .vimrc_local.vim indentation to match
Configure payday for no db timeout
update the README to cover out of date dependencies
Merge pull request #1624 from seanlinsley/doc/dependency-refresh

Update the README to cover out of date dependencies
Reduce the amount of db requests for homepage.
Add forgotten modifications.