• Home
  • Services
    • DBA Support
    • DBA Consultancy Services
    • PostgreSQL Support
    • Website Maintenance
  • Courses

    About Courses

    • List Of Courses
    • Become an Instructor
    Greenplum Database

    Greenplum Database

    $2,000.00 $1,500.00
    Read More
  • Company
    • FAQs
    • About Us
    • Contact
  • Events
  • Portfolio
  • Blogs
    • Blog – RayaFeeL
    • Blog – PostgreSQL Support
    • Blog – PostgreSQL Migration
    • Blog – All DB’s
    • Blog – Linux
    • Blog – Medical Coding
      • Cart

        0

    Have any question?
    (+91)8838953252
    ITsupport@rayafeel.com
    RegisterLogin
    RayaFeeL
    • Home
    • Services
      • DBA Support
      • DBA Consultancy Services
      • PostgreSQL Support
      • Website Maintenance
    • Courses

      About Courses

      • List Of Courses
      • Become an Instructor
      Greenplum Database

      Greenplum Database

      $2,000.00 $1,500.00
      Read More
    • Company
      • FAQs
      • About Us
      • Contact
    • Events
    • Portfolio
    • Blogs
      • Blog – RayaFeeL
      • Blog – PostgreSQL Support
      • Blog – PostgreSQL Migration
      • Blog – All DB’s
      • Blog – Linux
      • Blog – Medical Coding
        • Cart

          0

      How to recover The greenplum segments ?

      Home › Forums › Greenplum Database › How to recover The greenplum segments ?

      Tagged: greenplum, segments

      • This topic has 1 reply, 2 voices, and was last updated 2 years, 2 months ago by 2ndnijam.
      Viewing 2 posts - 1 through 2 (of 2 total)
      • Author
        Posts
      • December 21, 2018 at 11:06 am #10504
        Vihan Gupta
        Participant

        Recently one of the greenplum segments is currupted so how to recover that ? please help me to find out

        • This topic was modified 2 years, 2 months ago by 2ndnijam.
        December 22, 2018 at 10:34 am #10506
        2ndnijam
        Keymaster

        Recovering From Segment Failures
        Segment host failures usually cause multiple segment failures: all primary or mirror segments on the host are marked as down and nonoperational. If mirroring is not enabled and a segment goes down, the system automatically becomes nonoperational.

        To recover with mirroring enabled
        Ensure you can connect to the segment host from the master host. For example:
        $ ping failed_seg_host_address
        Troubleshoot the problem that prevents the master host from connecting to the segment host. For example, the host machine may need to be restarted or replaced.
        After the host is online and you can connect to it, run the gprecoverseg utility from the master host to reactivate the failed segment instances. For example:
        $ gprecoverseg
        The recovery process brings up the failed segments and identifies the changed files that need to be synchronized. The process can take some time; wait for the process to complete. During this process, database write activity is suspended.
        After gprecoverseg completes, the system goes into Resynchronizing mode and begins copying the changed files. This process runs in the background while the system is online and accepting database requests.
        When the resynchronization process completes, the system state is Synchronized. Run the gpstate utility to verify the status of the resynchronization process:
        $ gpstate -m

        To return all segments to their preferred role
        When a primary segment goes down, the mirror activates and becomes the primary segment. After running gprecoverseg, the currently active segment remains the primary and the failed segment becomes the mirror. The segment instances are not returned to the preferred role that they were given at system initialization time. This means that the system could be in a potentially unbalanced state if segment hosts have more active segments than is optimal for top system performance. To check for unbalanced segments and rebalance the system, run:

        $ gpstate -e
        All segments must be online and fully synchronized to rebalance the system. Database sessions remain connected during rebalancing, but queries in progress are canceled and rolled back.

        Run gpstate -m to ensure all mirrors are Synchronized.
        $ gpstate -m
        If any mirrors are in Resynchronizing mode, wait for them to complete.
        Run gprecoverseg with the -r option to return the segments to their preferred roles.
        $ gprecoverseg -r
        After rebalancing, run gpstate -e to confirm all segments are in their preferred roles.
        $ gpstate -e

        To recover from a double fault
        In a double fault, both a primary segment and its mirror are down. This can occur if hardware failures on different segment hosts happen simultaneously. Greenplum Database is unavailable if a double fault occurs. To recover from a double fault:

        Restart Greenplum Database
        $ gpstop -r
        After the system restarts, run gprecoverseg:
        $ gprecoverseg
        After gprecoverseg completes, use gpstate to check the status of your mirrors:
        $ gpstate -m
        If you still have segments in Change Tracking mode, run a full copy recovery:
        $ gprecoverseg -F
        If a segment host is not recoverable and you have lost one or more segments, recreate your Greenplum Database system from backup files. See Backing Up and Restoring Databases.

        To recover without mirroring enabled
        Ensure you can connect to the segment host from the master host. For example:
        $ ping failed_seg_host_address
        Troubleshoot the problem that is preventing the master host from connecting to the segment host. For example, the host machine may need to be restarted.
        After the host is online, verify that you can connect to it and restart Greenplum Database. For example:
        $ gpstop -r
        Run the gpstate utility to verify that all segment instances are online:
        $ gpstate

      • Author
        Posts
      Viewing 2 posts - 1 through 2 (of 2 total)

      You must be logged in to reply to this topic. Login here

      Search

      ADVERTISEMENT

      Latest Posts

      PostgreSQL Patching version 9, 10,11
      10Oct2019
      Tools for PostgreSQL
      16Sep2019
      Postgres user creation and restrict DDL & database access
      13Sep2019
      PostgreSQL SSL Setup
      07Sep2019
      How to DELETE current XLOG / WAL LOG in postgresql database ?
      19Aug2019

      Latest Courses

      PostgreSQL Database

      PostgreSQL Database

      $600.00 $500.00
      Greenplum Database

      Greenplum Database

      $2,000.00 $1,500.00

      Preview Course

      Free

      Recent Forum Topics

      • thought behind whiteboard activity
      • Are you going to take your first ste
      • How to start working on an application?
      • please let me know pre requirements to increase work_mem
      • how to copy some data in one table to another table in postgres

      2ndquadrant.in

      (+91) 8838953252

      ITsupport@rayafeel.com

      Company

      • About Us
      • Contact
      • Our Team
      • Blog

      COURSES

      • List Of Course
      • Become An Instructor
      • Events
      • Postgres Support Blog

      Support

      • DBA Support
      • Consultancy Services
      • Postgres Migration Blogs
      • Forum

      Recommend

      • Groups
      • Login
      • FAQs
      • SignUp

      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

      Login with:

      Login with Google Login with Twitter Login with LinkedIn Login with Microsoft

      Login with your site account

      Lost your password?

      Not a member yet? Register now

      Register a new account

      Are you a member? Login now