CYBERTEC PostgreSQL Logo

PostgreSQL 9.3: "One line - one standby"

01.2013 / Category: / Tags: |

Sometimes it happens that you reach a point where you know that things cannot be any easier than they already are.

Simple replica?

I think in PostgreSQL 9.3 we will pretty much have reached this point when we fire up a simple replica. Back in the old times you had to call pg_start_backup, rsync the entire stuff, call pg_stop_backup and finally come up with a recovery.conf file to setup a single standby.

And now?

Things have changed and some time ago pg_basebackup made life so much easier. No more rsync (in the typical case), no more function calls. But still, a normal user had to come up with a simple recovery.conf file to control the recovery process.

However, when you take a look at pg_basebackup, you'll figure out that the call itself already has all info a user will typically need to write a simple recovery.conf file. So, why not use this info and write a recovery.conf file straight away if desired?

This is exactly what Zoltan has implemented for 9.3:
The patch just got committed recently http://git.postgresql.org/pg/commitdiff/915a29a10cdabfbe301dc7201299841339b9798f

What does it mean for a typical user?

All you have to do is to call pg_basebackup with the "-R" option. A simple recovery.conf file will be written automatically. The only thing left to do now is to fire up your brand new standby (pg_ctl start ...).

I guess there is no way to make it any easier.

Read more:
pg_basebackup: Creating self-sufficient backups
PostgreSQL: Bulk loading huge amounts of data

Comments are closed.

CYBERTEC Logo white
CYBERTEC PostgreSQL International GmbH
Römerstraße 19
2752 Wöllersdorf
Austria

+43 (0) 2622 93022-0
office@cybertec.at

Get the newest PostgreSQL Info & Tools


    This site is protected by reCAPTCHA and the Google Privacy Policy & Terms of Service apply.

    ©
    2024
    CYBERTEC PostgreSQL International GmbH
    phone-handsetmagnifiercrosscross-circle
    linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram