This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'pg' | |
=begin | |
when creating a postgres db replica in RDS, or restoring from a snapshot, the | |
underlying EBS volume of the new instance must be initialized by reading every | |
block, otherwise the blocks will be lazy-initialized by production queries | |
which will be extremely latent. (i've seen normally 50ms queries take 30s in |