• Home
  • Services
    • HR Services
      • HR Advisory Services
      • Contract Staffing
      • HR Outsourcing Services
      • Manpower Supply Services
      • Payroll Processing
      • Permanent Placement
      • Recruitment and Placement Services
      • Recruitment Process Outsourcing
      • Staffing Agency Services
    • DBA Support
      • DBA Consultancy Services
      • PostgreSQL Support
    • Website Maintenance
    • Company Registration Services
    • Virtual Office Space Address
  • Company
    • FAQs
    • About Us
    • Contact
  • Office Space
    • Virtual Space
    • Co-working Space
    • Private Space
    • Meeting Room
    • Locations
    • Add Listing
    • Dashboard
  • Blogs
  • Careers
    • Jobseeker
    • Employer
  • Courses

    About Courses

    • List Of Courses
    • Become an Instructor
    Greenplum

    Greenplum

    $1,500.00
    Read More
    Have any question?
    (+91)8148383856
    info@rayafeel.com
    Login
    RayaFeeL
    • Home
    • Services
      • HR Services
        • HR Advisory Services
        • Contract Staffing
        • HR Outsourcing Services
        • Manpower Supply Services
        • Payroll Processing
        • Permanent Placement
        • Recruitment and Placement Services
        • Recruitment Process Outsourcing
        • Staffing Agency Services
      • DBA Support
        • DBA Consultancy Services
        • PostgreSQL Support
      • Website Maintenance
      • Company Registration Services
      • Virtual Office Space Address
    • Company
      • FAQs
      • About Us
      • Contact
    • Office Space
      • Virtual Space
      • Co-working Space
      • Private Space
      • Meeting Room
      • Locations
      • Add Listing
      • Dashboard
    • Blogs
    • Careers
      • Jobseeker
      • Employer
    • Courses

      About Courses

      • List Of Courses
      • Become an Instructor
      Greenplum

      Greenplum

      $1,500.00
      Read More

      Blog

      • Home
      • Blog
      • Blog
      • How to Rebuild the standalone postgres slave server ?

      How to Rebuild the standalone postgres slave server ?

      • Posted by bushra.rayafeel
      • Categories Blog
      • Date May 28, 2022
      • Comments 0 comment

      If slave Connection is Broken form master due to network issue or some some data mismatch so we have to rebuild the slave server by following below six steps .

      TO REBUILD THE STANDBY SERVER BY FOLLOWING THE SIMPLE 6 STEPS :

      • Current Master : 10.100.128.82
      • Current Slave Server : 10.100.128.81 ( Slave Connection is broken from master )

      1. Stop the slave server:
      /opt/edb/as9.6/bin/pg_ctl -D /opt/edb/as9.6/data stop

      2. Create recovery.conf file if not exist on slave server then update the the new master information in primary_connection field

      Make sure your recovery.conf matches your environment

      standby_mode = 'on'
      primary_conninfo='host=10.100.128.82 port=5444 user=replica password=tcs@12345 application_name=pgslave001'
      restore_command = 'cp /opt/edb/as9.6/data/archive/%f "%p"'
      trigger_file = '/tmp/postgresql.trigger.5444'

      3. Take the incremental backup From new postgres master Server:

      /opt/edb/as9.6/bin/psql -d edb -c "select pg_start_backup('initial_backup');"
      rsync -cva --inplace --exclude recovery.conf --exclude recovery.done --exclude pg_hba.conf --exclude postgresql.conf /opt/edb/as9.6/data/ enterprisedb@10.100.128.81:/opt/edb/as9.6/data/
      /opt/edb/as9.6/bin/psql -d edb -c "select pg_stop_backup();"

      4. restarting new slave server:

      [root@2ndquadrant.in-1]# /opt/edb/as9.6/bin/pg_ctl -D /opt/edb/as9.6/data start

      MASTER:

      [root@2ndquadrant.in-1]# ps -ef|grep receiver
      enterpr+ 31404 25252 0 12:41 ? 00:00:00 postgres: wal sender process replica 10.11.128.81[36570] streaming 0/26000220
      root 31840 31656 0 12:54 pts/0 00:00:00 grep --color=auto sender

      SLAVE :

      [root@2ndquadrant.in-2]# ps -ef|grep receiver
      enterpr+ 23187 23180 0 12:41 ? 00:00:00 postgres: wal receiver process streaming 0/26000220
      root 24411 23650 0 12:53 pts/0 00:00:00 grep --color=auto receiver

      Now  master and slave streaming connectivity is happened successfully . For IT Support or want to talk regarding for project please touch with US itsupport@rayafeel.com.

      • Share:
      bushra.rayafeel

      Previous post

      Tips to increase PostgreSQL performance
      May 28, 2022

      Next post

      PostgreSQL Replication Setup , Failover , Rebuilding , Monitoring & Recoverability
      May 28, 2022

      Leave A Reply

      You must be logged in to post a comment.

      Connect with



      Search

      ADVERTISEMENT

      Latest Posts

      HOW VIRTUAL OFFICE IS GOING TO CHANGE YOUR BUSINESS STRATEGIES
      21Jun2022
      Take the best advantage of your Virtual Office
      21Jun2022
      Let’s discuss how corporates can improve their productivity through virtual office spaces?
      21Jun2022
      Virtual Office Space & Address Services
      21Jun2022
      HOW VIRTUAL OFFICES ARE TRANSFORMING BUSINESSES
      21Jun2022
      PostgreSQL

      PostgreSQL

      $800.00 $500.00
      Greenplum

      Greenplum

      $1,500.00
      Oracle Database

      Oracle Database

      $350.00
      2ndquadrant.in

      (+91) 8838953252

      ITsupport@rayafeel.com

      Company

      • About Us
      • Our Team

      COURSES

      • List Of Course
      • Become An Instructor

      Support

      • DBA Support
      • Consultancy Services

      Recommend

      • Login
      • Contact Us

      IT Services by rayafeel.com. Powered by Rayafeel Technologies Pvt Ltd.

      • Privacy
      • Terms

      Become An Instructor?

      Join thousand of instructors and earn money hassle free!

      Get Started Now

      Connect with

      Login with Google

      Login with your site account

      Connect with



      Lost your password?