I’m looking for a way to hot “mount” a postgresql database to a running instance of postgresql. That is I have an amazon S3 block containing a tablespace, can I mount that block to an EC2 instance running postgresql and bring the database up? (without restarting the instance as it will already be serving other db’s).
Would it be a better strategy to run multiple instances of postgres and fire them up as I mount the volumes? i.e. a one-to-one relationship between db’s and postgresql instances.
This is a related question, but the answers are somewhat incomplete:
Copying a tablespace from one postgresql instance to another
The best way I’ve found to do this is indeed to run multiple instances of Postgresql. Notably, Ubuntu has some rad built in postgres cluster management functions (if you’re using Ubuntu obviously, not sure about other Debians…). Check ’em out: