0

I've a google big table instance that need to be populate with data that are in a Postgres Database. My product team give a URL's that allow me to replicate the database. So using simple words I need to duplicate the Postgres database into the google instance and the way that my product team give me is using this url, how can I do this? any tutorial that can help me?

Mikhail Berlyant
  • 165,386
  • 8
  • 154
  • 230
gustavotroconis
  • 223
  • 3
  • 10
  • 1
    How large is the Postgres database? What are the performance requirements? Have you considered some of the other cloud storage options? See: https://cloud.google.com/docs/storing-your-data for an overview of options based on your use. – Tim Swast Jun 30 '16 at 18:11
  • Tim, the Postgres database is around 10 GB. What is happening is that we have some tables that are related to queries that take too long to return the results when we execute them (sometimes we just get a timeout answer). So we are considering to generate a mirror database where the BI team can manage better the data, this mirror database will be in Google cloud platform. Thanks, for the link we already have review this options – gustavotroconis Jul 04 '16 at 17:50
  • @gustavotroconis — for a database of 10GB in size, you probably want to use PostgreSQL on Google Compute Engine rather than Bigtable (which is recommended for data sets in the TB range). I added an answer below with some details for a potential solution to your project. – Misha Brukman Jul 05 '16 at 18:53

1 Answers1

1

If you are already running PostgreSQL and would like to have a mirror of it on Google Cloud Platform, the best and simplest approach may be to run your own PostgreSQL instance on a Google Compute Engine virtual machine which can be done via several approaches, e.g.,

Then, you would want to continuously mirror data from your local instance to the PostgreSQL instance running in Google Cloud to be able to query it. Another SO answer suggests that there are two major approaches to this:

  • Master/Master replication (Bucardo)
  • Master/Slave replication (Slony)

Based on your use case where you want to keep your local PostgreSQL instance as the canonical one, and just replicate to Google Cloud for the purpose of querying it, you want a Master/Slave replication, and have the PostgreSQL instance be the read-only replica, so you probably want to use the Slony approach.

For a more in-depth look at PostgreSQL solutions for high availability, load balancing, and replication, see the comparison in the manual.

Community
  • 1
  • 1
Misha Brukman
  • 12,938
  • 4
  • 61
  • 78