• 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
  • Locations
  • Blogs
    • Blog
    • Blog – PostgreSQL Support
    • Blog – PostgreSQL Migration
    • Blog – All DB’s
    • Blog – Linux
  • Courses

    About Courses

    • List Of Courses
    • Become an Instructor
    Greenplum

    Greenplum

    $1,500.00
    Read More
    Have any question?
    (+91)8838953252
    ITsupport@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
    • Locations
    • Blogs
      • Blog
      • Blog – PostgreSQL Support
      • Blog – PostgreSQL Migration
      • Blog – All DB’s
      • Blog – Linux
    • Courses

      About Courses

      • List Of Courses
      • Become an Instructor
      Greenplum

      Greenplum

      $1,500.00
      Read More

      How to Rebuid the standalone postgres slave server ?

      • Home
      • How to Rebuid the standalone postgres slave server ?

      How to Rebuid the standalone postgres slave server ?

      • Posted by 2ndnijam
      • Date December 16, 2018

      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 support@2ndquadrant.in.

      Contact Us

      Fields with (*) are compulsory.

      • Share:
      2ndnijam

      Previous post

      PostgreSQL Hot Standby Setup, Failover,Rebuilding,Monitoring,Recoverability
      December 16, 2018

      Next post

      Tips to increase PostgreSQL performance
      December 18, 2018

      Search

      ADVERTISEMENT

      Latest Posts

      Don’t See What You’re Looking For? We’ll Customize a Package to Fit Your Business Office space!
      14May2022
      Need an Address, Phone Number, And Virtual Office In Chennai?
      14May2022
      Rayafeel Technologies can provide you with ideal meeting solutions
      14May2022
      Virtual Offices VS. Coworking Spaces: What’s The Difference?
      14May2022
      SQL Manager for Oracle Type 6 – 10
      13May2022
      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 Twitter Login with Linkedin Login with Windowslive Login with Yahoo

      Login with your site account

      Connect with



      Lost your password?