PostgreSQL Replication with Easy Failback

Поділитися
Вставка
  • Опубліковано 19 лип 2024
  • To get the commands used in this tutorial, visit: www.scalingpostgres.com/tutor....
    Learn how to failover to a replica database and then failback to the original primary database easily without a full restore of the database and without using pg_rewind.
    This tutorial assumes you already have streaming replication setup using replication slots, if not, check out these two videos:
    • PostgreSQL Streaming R...
    • PostgreSQL Replication...
    Want to learn more about Postgres performance?
    Join my FREE mini-course called the PostgreSQL Performance Starter Kit here: www.scalingpostgres.com/cours...

КОМЕНТАРІ • 9

  • @decipheringthematrix56
    @decipheringthematrix56 5 років тому

    Nice! I can't wait to try this.

  • @CR-rg5nh
    @CR-rg5nh 5 років тому +1

    Hi! Do i need Replication slots for this situation (failback) or i can do it without slots? Thanks

  • @adammulla9181
    @adammulla9181 4 роки тому

    Hi,
    Thanks for your tutorial..
    Can we do switchover and switchback without adding parameter recovery _target_timeline='latest' in 9.4
    My friend told me he has done switchover and switchback in 9.5 without adding recovery _target_timeline=latest. is it possible ?

  • @1487atul
    @1487atul Рік тому

    I think there is no need to define restore_command in recovery.conf file if you are already creating a replication slot. please correct me if I am wrong as far as I know restore_command is needed when you are archiving xlog file to archive location but if you have replication slot then there is no need of restore_command . please correct me If I am wrong ?

  • @saintsun90
    @saintsun90 3 роки тому

    Hello. Its not working v12 do you have any solution about it

    • @mrmik82
      @mrmik82 3 роки тому

      Version 12 doesn't use recovery.conf but recovery.signal, standby.signal and postgresql.auto.conf.

  • @davebrunkow9194
    @davebrunkow9194 5 років тому

    Everything works great until I remove the replication slot. I immediately get replication terminated by primary server. Only a pg_basebackup gets me out of it.

    • @davebrunkow9194
      @davebrunkow9194 5 років тому

      I did not add recovery_target_timeline = 'latest' to the recovery.conf on the replica which caused all kinds of funkiness; WAL streaming at LOG: replication terminated by primary server DETAIL: End of WAL reached on timeline. DOH!