Search Postgresql Archives

Running on Docker, AWS with Data Stored on EBS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,


TL;TR: Can a new PostgreSQL process, running on a different server instance effectively resume operations by reading the same data directory location as another PostgreSQL process that is no longer running?


- - -


I have an application that is deployed to AWS as a docker container.  Although it is a single application, the container is running multiple services via supervisor.  One of those services is PostrgeSQL.


Currently I dump and reload the database between deployments, as each deployment completely destroys the server instance and creates a new one.


It is a small application without much data or usage load.


I'd like to store my data on a separate EBS volume.  Then, I was thinking that each time I perform a new deployment, I would attach the new server instance to the original EBS volume.


At any given moment, there would only ever be one PostgreSQL process attached to the data directory... but at any given time that would be a different process running on a different server.


I know that I can just test this out and see what happens, but I am concerned that even if it does appear to work at first, that it might still lead to some data corruption down the line if it is an incorrect strategy.


I have also considered using Amazon's hosted PostgreSQL service. While that would certainly work, I don't want to pay for an extra service, I'd like to use the most recent PostgreSQL version and I think my application will be faster if the data is served from the same instance.


If my application was larger, all of this would be moot because I'd run a dedicated PostgreSQL instance or just use RDS... but it isn't so I'd rather save money :)


Thanks in advance for your help,

Ryan


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux