Configure Stream Replication on PostgreSQL Master-Slave Setup | Postgresql Replication Tutorial

Поделиться
HTML-код
  • Опубликовано: 9 фев 2025
  • This tutorial explains, how to install postgresql 9.6 on ubuntu, how to setup master -slave with stream replication.

Комментарии • 65

  • @edenhub8114
    @edenhub8114 3 месяца назад

    wow, you made it so simple. Thanks a great deal

    • @Appychip
      @Appychip  3 месяца назад

      We are glad that you found it useful. Thanks for leaving positive feedback, this keeps us motivated to post more such useful videos.
      - Team

  • @mirzaali3379
    @mirzaali3379 5 лет назад +1

    Thank you, Helped me understand better and fast. Excellent video.

    • @Appychip
      @Appychip  5 лет назад

      We are glad to hear that. Please like and subscribe to keep us motivated. Keep Learning & Keep Sharing

  • @satyamprasad6463
    @satyamprasad6463 4 года назад +1

    Thank you. I was able to set up Replication.

    • @Appychip
      @Appychip  4 года назад

      We are glad to hear this. Please like, share and subscribe to keep us motivated. Keep Learning & Keep Sharing :)

    • @imtiazahmed156
      @imtiazahmed156 4 года назад +1

      @@Appychip Thank you for the detailed tutorial. Could you also do it for PostgreSQL 10.15? I'm trying to setup High-Availability for my Django project.

    • @Appychip
      @Appychip  4 года назад

      @@imtiazahmed156 We are glad that this video was helpful. We will surely try to make video on it. Please like, share and subscribe for upcoming videos and to keep us motivated. Keep Learning & Keep Sharing :)

  • @oscarparedes76
    @oscarparedes76 2 года назад

    Pls a question ❓.. archive files in /var/lib/pgsql/archive when I can delete?

  • @danieljohnson6652
    @danieljohnson6652 5 лет назад +4

    Thanks for this , Can you also post a Failover video or steps please?

    • @atharfahad7337
      @atharfahad7337 4 года назад

      Connect via whatsapp to +91-9999287640 for stream replication in sync and async mode with EFM..

  • @yadhukrishnana4855
    @yadhukrishnana4855 Год назад

    I want master-slave replication in psql on single ec2 instance. How to done that?

  • @debasistripathy7168
    @debasistripathy7168 3 года назад +1

    Thanks Rohini mam for uploading these video.I have followed all the steps.Now my master ,slave dbs are ready.I want to know if my master db got crashed or got down how slave db will run without doing any disturbance in application.

  • @chetanrede1499
    @chetanrede1499 3 года назад

    Location of postgresql.conf and recovery.conf looking different on slave server ,can you explain that sernario?

  • @sivanagi4143
    @sivanagi4143 Год назад

    This was super helpful. Appreciate your time and explanation. Can you attach the steps document to download please?

    • @Appychip
      @Appychip  4 месяца назад

      We are glad that you found it useful. Thanks for leaving positive feedback, this keeps us motivated to post more such useful videos.
      - Team Appychip

  • @utkarshshukla2448
    @utkarshshukla2448 Год назад

    mam please make video on failover and load balancing part also

    • @Appychip
      @Appychip  10 месяцев назад

      Glad you found it useful! Sure, we will pass the feedback to the person!

  • @vinayksingh1990
    @vinayksingh1990 6 лет назад +1

    Hello Mam, Thank you for the wonderful tutorial. I did the same steps and able to setup streaming replication in the server. My question is regarding archive directory, my archive directory is getting full very fast with so many WAL logs. How can I clear those ? Any suggestions ?

  • @srinivasanramkumar838
    @srinivasanramkumar838 5 лет назад

    I did the WALconfiguration, the master is upstreaming the data to the slave database but in my execution, there was a break between my network for 3days, but WAL stopped sending the data to my slave database.
    If I need to perform the sync between master to slave is it required to do full database sync? if no is there any possibility to do incremental sync?

  • @antonismakris1277
    @antonismakris1277 6 лет назад

    Thanks for the video. With the configuration of stream replication, a distribution of read requests between the two nodes can be achieved? In case of SELECT query, the data are requested from both nodes achieving a load balancing?

    • @atharfahad7337
      @atharfahad7337 4 года назад

      Connect via whatsapp to +91-9999287640 for understanding about load balancing in EDB PostgreSQL

  • @sivanagi4143
    @sivanagi4143 Год назад

    Can you add the pdf file for the steps? So that it will be easy for us copy paste while working on the replication instead of manual work.

    • @Appychip
      @Appychip  10 месяцев назад

      Sure, we will pass your feedback to our content team. Thanks!

  • @kranthi1385
    @kranthi1385 5 лет назад

    Thanks for this, can you please share link or document which is used to configure it will be helpful...

  • @Zharan_
    @Zharan_ 5 лет назад

    any text files or website to get the commmand lists?

  • @UmeshYadav-amh
    @UmeshYadav-amh 5 лет назад

    Hi may I know how to configure jboss app to connect with postgres master slave,
    I want write data in master and read from slave, please do reply @Appychip

  • @Vone_WorldClass
    @Vone_WorldClass 4 года назад

    I have issue with command replication on slave server : pg_basebackup -h 10.10.73.14(primary server IP) -D /var/lib/postgresql/10/main/ -P -U replication -xlog-method-stream
    Error: /usr/lib/postgresql/10/bin/pg_basebackup: invalid option -- 'x'
    Try "pg_basebackup --help" for more information.

  • @srinivasanramkumar838
    @srinivasanramkumar838 6 лет назад +1

    Hi it was helping me to take backup, but if i stop my master postgres and try to insert any table or update from slaver database it is not happening..
    how can we make slave as master ? if my master postgres down...

    • @Appychip
      @Appychip  6 лет назад

      We are glad to know that our tutorial helped you. To promote slave server as a master server, you have to create trigger file on the slave server, that you mentioned in the configuration.
      Please like and subscribe to keep us motivated

    • @srinivasanramkumar838
      @srinivasanramkumar838 6 лет назад

      thanks for your response, can you please say if my master comes up and the data which was collected on slave server will be synced back to master database?
      Also place share me the steps to configure trigger that's helps me to complete my RD and deploy in my customer setup.

    • @Appychip
      @Appychip  6 лет назад

      By default, the slave data won't get sync on master, when master will come up. You have to again setup replication. Regarding your second doubt, we specify trigger file location in slave's recovery.conf file. As per video, location of trigger file is `/var/lib/postgresql/9.6/2/trigger`. When you will create this file on slave server, it will get promote as master.

    • @srinivasanramkumar838
      @srinivasanramkumar838 6 лет назад

      Okay one small doubt should be create once replication user in slave also ?
      Below is the error i am getting once i stop the master and try to insert into slave..
      srini=# insert into srinivijay values ('vijay', '22');
      ERROR: cannot execute INSERT in a read-only transaction
      please advice..

    • @srinivasanramkumar838
      @srinivasanramkumar838 6 лет назад

      Hi team plz advice on the above...

  • @KfuPower
    @KfuPower 6 лет назад +1

    Thanks, very helpful

    • @Appychip
      @Appychip  6 лет назад

      We are glad that it helped you. Please like and subscribe to keep us motivated.
      Keep Learning & Keep Sharing

  • @suvamrout4638
    @suvamrout4638 6 лет назад

    Hello Mam,
    Your video really helpful for me and I followed the same process as per my environment. I am able to take base backup successfully and it's also reflecting master data on slave system after base backup, but continuously backup not happening for me(If I am adding any new data on master it's not reflecting on slave system continuously). My question is that.
    Q: Do we need to specify archive location same for backup and recovery for both master and slave ?
    Greatfully waiting for your replay.

    • @Appychip
      @Appychip  6 лет назад

      Please check if replication user is setup correctly and its related configurations in pg_hba.conf file.

    • @loaiabdallatif4947
      @loaiabdallatif4947 6 лет назад

      Thanks for your video , please share the text file if possible

  • @godwintheophilus5701
    @godwintheophilus5701 5 лет назад

    Awesome 🔥 can u post a video with fails over

  • @ramsiddu007
    @ramsiddu007 7 лет назад +1

    Thanks for Share Good Information. If you dont mine can you share the same replications method in windows servers.

    • @Appychip
      @Appychip  7 лет назад

      Thank-You for your kind word. We will try to make a tutorial for windows whenever time permits. Keep Learning & Keep Sharing

    • @renanlima5399
      @renanlima5399 7 лет назад

      Thanks for the video. I'm interesting too to know how this replication run in windows

  • @shubhankgupta2354
    @shubhankgupta2354 5 лет назад

    Hi, would you please share me the text file or link of that?

  • @divyasagi9962
    @divyasagi9962 5 лет назад

    How to open slave server port 5432

  • @morocho1979
    @morocho1979 5 лет назад

    i do the same step and have this error pg_control no found

    • @Appychip
      @Appychip  5 лет назад

      Thanks for referring the video. Can you help us with exact error and more context regarding the error. It will help us to understand the issue better and come up with a right solution.

  • @karanpandey3682
    @karanpandey3682 6 лет назад

    can you please provide me the cascading replication postgresql document.
    With Regards

    • @atharfahad7337
      @atharfahad7337 4 года назад

      Connect via whatsapp to +91-9999287640 for stream replication in sync and async mode with EFM..Even cascading techniques

  • @jenitorthomson9477
    @jenitorthomson9477 5 лет назад

    Can u share similar video

    • @Appychip
      @Appychip  5 лет назад

      We will try to make similar video. Thanks for watching. Please like and subscribe to keep us motivated

    • @jenitorthomson9477
      @jenitorthomson9477 5 лет назад

      Can u share the current video link as it is freased in first screen

    • @Appychip
      @Appychip  5 лет назад

      @@jenitorthomson9477 Here it is - ruclips.net/video/XFp8wHNtP3s/видео.html

  • @vasquezanton
    @vasquezanton 5 лет назад

    i need the guide on pdf

    • @Appychip
      @Appychip  5 лет назад

      We will try to create a pdf/blog post for the same. Please like and subscribe to receive the notification. Keep Learning & Keep Sharing :)

  • @Tuguj
    @Tuguj 5 лет назад

    This is not working for PostgreSQL 12... so my adventure is over :)
    pg_basebackup -h 192.168.1.185 -D /var/lib/postgresql/12/main -P -U replication --xlog-method=stream

    • @atharfahad7337
      @atharfahad7337 4 года назад

      Connect via whatsapp to +91-9999287640 for stream replication in sync and async mode with EFM..

    • @naredlasachinreddy
      @naredlasachinreddy Год назад

      replace wal with xlog