I have PostgreSQL 8.4 installed on a headless Ubuntu 10.04 server. Sometimes the server is not available. I would like to continue working on the database, so I thought of installing PostgreSQL onto my laptop. I'm familiar with PostgreSQL, but not with replication. Would I setup replication so that the two databases are kept synchronized when the server becomes available again? This does not need to be automated. What is the easiest and simplest approach? The database is not used extensively by others at this stage and is small, so a simple, lightweight solution would be adequate.
1 Answer
For reference, one of these may be suitable:
A general discussion of replication and clustering in PostgreSQL is here.
There are also many questions on StackOverflow and this useful one on ServerFault.
-
An update to to 9.1 which offers out-of-the-box asynchronous and synchronous replication is also an option.– user1822Commented Jun 25, 2012 at 21:10
-
I considered that. Ubuntu 10.04 provides PostgreSQL version 8.4 from the repositories. I don't know how involved installing a different version would be. Commented Jun 25, 2012 at 21:23
-
I will never understand why Linux makes it so hard to install up-to-date software. Can't you just download the RPM's (or whatever is needed for Ubuntu) from the Postgres website?– user1822Commented Jun 25, 2012 at 22:34
-
Ubuntu 10.04 is a long-term support (LTS) release. Ubuntu, like most distributions, provides versions of software in the repositories for "easy" installation. The paradigm is different to Windows. Other versions of Debian (testing/unstable) and other distributions provide "always-updated" rolling releases which will have the latest versions of software. This is not what you would want on a server though, where you want stability. The next LTS release of Ubuntu, released recently, includes PostgreSQL 9. This would be the natural upgrade route. Commented Jun 25, 2012 at 22:49
-
Not that I'm about to upgrade "just" for replication functionality, but here is a link for .deb packages for PostgreSQL 9: openscg.com/se/postgresql/packages.jsp Commented Jun 25, 2012 at 23:05