Our application uses a PostgreSQL database (with the PostGIS spatial extension). Now one of our customers has requested direct access to the database; because, as they claim, it’s their data.

We’d rather not provide direct access to the database, because a wrong query might end up killing (or temporarily disabling) the database server, resulting in downtime for our application, or even a corrupt database.

Instead, we were thinking of setting up a slave database, and replicate the master. The slave would then only be used for read-only querying, so doesn’t need to write back to the master.

What is the easiest method of doing this with Postgres, while working with PostGIS as well? Or is a daily data dump easier to accomplish?


1 Answer 1


If it's one time setup, I think dump would be easiest. But if You need your update be available on customer, then I think streaming replication would be easier, set up once and no need to update in the future as the replication will handle the data updates.


  • It's not a one-time thing; the customer wants to have it available and updated at all time; a day old would be OK, but not much more.
    – Martijn
    Apr 28, 2016 at 11:27
  • I mean one time set up, but still available for the next usage Apr 28, 2016 at 11:29
  • it’s for a single database, if that’s what you mean.
    – Martijn
    Apr 28, 2016 at 11:31
  • I mean, restore from the dump, could be for many databases, and You can use the restored database as long as You want. Apr 28, 2016 at 11:33
  • 1
    If that's the case, then streaming replication would be a better solution IMO Apr 28, 2016 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.