{
    "api_version": "1",
    "kind": "dse_post",
    "self": "https://update.dsesecurity.com/api/v1/posts/check-postgresql-rewind-prerequisites-before-modifying-a-former-primary/",
    "item": {
        "id": "https://update.dsesecurity.com/updates/check-postgresql-rewind-prerequisites-before-modifying-a-former-primary/",
        "slug": "check-postgresql-rewind-prerequisites-before-modifying-a-former-primary",
        "url": "https://update.dsesecurity.com/updates/check-postgresql-rewind-prerequisites-before-modifying-a-former-primary/",
        "alternate_urls": {
            "markdown": "https://update.dsesecurity.com/updates/check-postgresql-rewind-prerequisites-before-modifying-a-former-primary.md",
            "json": "https://update.dsesecurity.com/api/v1/posts/check-postgresql-rewind-prerequisites-before-modifying-a-former-primary/"
        },
        "title": "Check PostgreSQL rewind prerequisites before modifying a former primary",
        "summary": "Preserve a clear fallback and verify prerequisites before rewinding a former PostgreSQL primary.",
        "format": {
            "slug": "guide",
            "name": "Guide"
        },
        "priority": {
            "slug": "info",
            "name": "Information"
        },
        "featured": false,
        "image": {
            "theme": "continuity-recovery",
            "label": "Continuity & recovery",
            "alt": "Paired infrastructure paths converging on a stable recovered service.",
            "card_url": "https://update.dsesecurity.com/assets/editorial/continuity-recovery-card.webp?v=1.8.20",
            "hero_url": "https://update.dsesecurity.com/assets/editorial/continuity-recovery-hero.webp?v=1.8.20",
            "social_url": "https://update.dsesecurity.com/assets/editorial/continuity-recovery-social-v2.jpg?v=1.8.20",
            "width": 2400,
            "height": 1350
        },
        "topics": [
            {
                "slug": "business-continuity",
                "name": "Business Continuity",
                "url": "https://update.dsesecurity.com/topic/business-continuity/"
            },
            {
                "slug": "it",
                "name": "IT",
                "url": "https://update.dsesecurity.com/topic/it/"
            }
        ],
        "author": {
            "name": "DSE Security Editorial Team",
            "url": "https://update.dsesecurity.com/#editorial-team",
            "type": "Organization"
        },
        "publisher": {
            "name": "Detection Systems & Engineering",
            "url": "https://dsesecurity.com/"
        },
        "published_at": "2026-10-15T13:32:30+00:00",
        "modified_at": "2026-10-15T13:36:15+00:00",
        "reviewed_on": "2026-10-15",
        "reading_minutes": 2,
        "word_count": 243,
        "potentially_affected": "This applies to PostgreSQL 17 pg_rewind after timeline divergence. It is a rejoin procedure for a qualified administrator, not an instruction to reconnect an old primary automatically.",
        "dse_recommendation": "DSE recommends documenting the authoritative source and preserving the former primary's stopped state before evaluating rewind.",
        "primary_source": {
            "name": "PostgreSQL 17 — pg_rewind",
            "url": "https://www.postgresql.org/docs/17/app-pgrewind.html",
            "published_on": null,
            "authority": "www.postgresql.org"
        },
        "publishing_principles": "https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/",
        "usage_info": "https://update.dsesecurity.com/usage/",
        "copyright_notice": "Copyright © 2026 Detection Systems & Engineering. All rights reserved.",
        "content_html": "<p>Preserve a clear fallback and verify prerequisites before rewinding a former PostgreSQL primary.</p>\n<h2>Source facts</h2>\n<p>PostgreSQL 17 pg_rewind requires the target cluster to have data checksums or wal_log_hints enabled, along with full_page_writes. Its dry-run option performs the work without modifying the target directory. A failure during actual rewind can leave the target directory unusable; the documentation recommends taking a fresh backup in that case. Rewind also copies configuration files from the source, so recovery configuration may need correction before the target is restarted as a standby.</p>\n<p>Source: <a href=\"https://www.postgresql.org/docs/17/app-pgrewind.html\">PostgreSQL 17 — pg_rewind</a>.</p>\n<h2>Applicability</h2>\n<p>This applies to PostgreSQL 17 pg_rewind after timeline divergence. It is a rejoin procedure for a qualified administrator, not an instruction to reconnect an old primary automatically.</p>\n<h2>DSE recommendation</h2>\n<p>DSE recommends documenting the authoritative source and preserving the former primary&#8217;s stopped state before evaluating rewind. Verify prerequisites and WAL availability, run the dry run, and agree on a fresh-base-backup fallback. Review copied configuration before startup, especially the settings that establish the standby role. Include a stopping condition for any uncertainty about source identity; recovery speed should not replace an explicit decision about which timeline the service will retain.</p>\n<h2>Verification</h2>\n<p>Rehearse divergence and rejoin with disposable clusters. Record prerequisite checks, dry-run output, the actual operation&#8217;s result, and the target&#8217;s verified standby state afterward. Confirm replication resumes from the intended source and keep the tested fresh-backup fallback available if rewind cannot finish safely.</p>\n<h2>Official reference</h2>\n<p><a href=\"https://www.postgresql.org/docs/17/app-pgrewind.html\">PostgreSQL 17 — pg_rewind</a>. Reviewed October 15, 2026.</p>",
        "content_text": "Preserve a clear fallback and verify prerequisites before rewinding a former PostgreSQL primary.\nSource facts\nPostgreSQL 17 pg_rewind requires the target cluster to have data checksums or wal_log_hints enabled, along with full_page_writes. Its dry-run option performs the work without modifying the target directory. A failure during actual rewind can leave the target directory unusable; the documentation recommends taking a fresh backup in that case. Rewind also copies configuration files from the source, so recovery configuration may need correction before the target is restarted as a standby.\nSource: PostgreSQL 17 — pg_rewind.\nApplicability\nThis applies to PostgreSQL 17 pg_rewind after timeline divergence. It is a rejoin procedure for a qualified administrator, not an instruction to reconnect an old primary automatically.\nDSE recommendation\nDSE recommends documenting the authoritative source and preserving the former primary’s stopped state before evaluating rewind. Verify prerequisites and WAL availability, run the dry run, and agree on a fresh-base-backup fallback. Review copied configuration before startup, especially the settings that establish the standby role. Include a stopping condition for any uncertainty about source identity; recovery speed should not replace an explicit decision about which timeline the service will retain.\nVerification\nRehearse divergence and rejoin with disposable clusters. Record prerequisite checks, dry-run output, the actual operation’s result, and the target’s verified standby state afterward. Confirm replication resumes from the intended source and keep the tested fresh-backup fallback available if rewind cannot finish safely.\nOfficial reference\nPostgreSQL 17 — pg_rewind. Reviewed October 15, 2026.",
        "content_markdown": "Preserve a clear fallback and verify prerequisites before rewinding a former PostgreSQL primary.\n\n## Source facts\n\nPostgreSQL 17 pg_rewind requires the target cluster to have data checksums or wal_log_hints enabled, along with full_page_writes. Its dry-run option performs the work without modifying the target directory. A failure during actual rewind can leave the target directory unusable; the documentation recommends taking a fresh backup in that case. Rewind also copies configuration files from the source, so recovery configuration may need correction before the target is restarted as a standby.\n\nSource: [PostgreSQL 17 — pg_rewind](https://www.postgresql.org/docs/17/app-pgrewind.html).\n\n## Applicability\n\nThis applies to PostgreSQL 17 pg_rewind after timeline divergence. It is a rejoin procedure for a qualified administrator, not an instruction to reconnect an old primary automatically.\n\n## DSE recommendation\n\nDSE recommends documenting the authoritative source and preserving the former primary’s stopped state before evaluating rewind. Verify prerequisites and WAL availability, run the dry run, and agree on a fresh-base-backup fallback. Review copied configuration before startup, especially the settings that establish the standby role. Include a stopping condition for any uncertainty about source identity; recovery speed should not replace an explicit decision about which timeline the service will retain.\n\n## Verification\n\nRehearse divergence and rejoin with disposable clusters. Record prerequisite checks, dry-run output, the actual operation’s result, and the target’s verified standby state afterward. Confirm replication resumes from the intended source and keep the tested fresh-backup fallback available if rewind cannot finish safely.\n\n## Official reference\n\n[PostgreSQL 17 — pg_rewind](https://www.postgresql.org/docs/17/app-pgrewind.html). Reviewed October 15, 2026."
    },
    "json_ld": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://dsesecurity.com/#organization",
                "name": "Detection Systems & Engineering",
                "alternateName": "DSE Security",
                "url": "https://dsesecurity.com/",
                "logo": {
                    "@type": "ImageObject",
                    "url": "https://update.dsesecurity.com/assets/dse-logo-20260812.png?v=1.8.20"
                }
            },
            {
                "@type": "Organization",
                "@id": "https://update.dsesecurity.com/#editorial-team",
                "name": "DSE Security Editorial Team",
                "url": "https://update.dsesecurity.com/",
                "parentOrganization": {
                    "@id": "https://dsesecurity.com/#organization"
                }
            },
            {
                "@type": "WebSite",
                "@id": "https://update.dsesecurity.com/#website",
                "name": "DSE Updates",
                "alternateName": "DSE Security Knowledge Hub",
                "url": "https://update.dsesecurity.com/",
                "inLanguage": "en-US",
                "publisher": {
                    "@id": "https://dsesecurity.com/#organization"
                },
                "potentialAction": {
                    "@type": "SearchAction",
                    "target": {
                        "@type": "EntryPoint",
                        "urlTemplate": "https://update.dsesecurity.com/?q={search_term_string}"
                    },
                    "query-input": "required name=search_term_string"
                }
            },
            {
                "@type": "WebPage",
                "@id": "https://update.dsesecurity.com/updates/check-postgresql-rewind-prerequisites-before-modifying-a-former-primary/",
                "url": "https://update.dsesecurity.com/updates/check-postgresql-rewind-prerequisites-before-modifying-a-former-primary/",
                "isPartOf": {
                    "@id": "https://update.dsesecurity.com/#website"
                },
                "lastReviewed": "2026-10-15"
            },
            {
                "@type": "BreadcrumbList",
                "@id": "https://update.dsesecurity.com/updates/check-postgresql-rewind-prerequisites-before-modifying-a-former-primary/#breadcrumbs",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "name": "DSE Updates",
                        "item": "https://update.dsesecurity.com/"
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "name": "Check PostgreSQL rewind prerequisites before modifying a former primary",
                        "item": "https://update.dsesecurity.com/updates/check-postgresql-rewind-prerequisites-before-modifying-a-former-primary/"
                    }
                ]
            },
            {
                "@type": [
                    "Article",
                    "TechArticle"
                ],
                "@id": "https://update.dsesecurity.com/updates/check-postgresql-rewind-prerequisites-before-modifying-a-former-primary/#article",
                "identifier": "https://update.dsesecurity.com/updates/check-postgresql-rewind-prerequisites-before-modifying-a-former-primary/",
                "url": "https://update.dsesecurity.com/updates/check-postgresql-rewind-prerequisites-before-modifying-a-former-primary/",
                "headline": "Check PostgreSQL rewind prerequisites before modifying a former primary",
                "description": "Preserve a clear fallback and verify prerequisites before rewinding a former PostgreSQL primary.",
                "abstract": "Preserve a clear fallback and verify prerequisites before rewinding a former PostgreSQL primary.",
                "articleBody": "Preserve a clear fallback and verify prerequisites before rewinding a former PostgreSQL primary.\nSource facts\nPostgreSQL 17 pg_rewind requires the target cluster to have data checksums or wal_log_hints enabled, along with full_page_writes. Its dry-run option performs the work without modifying the target directory. A failure during actual rewind can leave the target directory unusable; the documentation recommends taking a fresh backup in that case. Rewind also copies configuration files from the source, so recovery configuration may need correction before the target is restarted as a standby.\nSource: PostgreSQL 17 — pg_rewind.\nApplicability\nThis applies to PostgreSQL 17 pg_rewind after timeline divergence. It is a rejoin procedure for a qualified administrator, not an instruction to reconnect an old primary automatically.\nDSE recommendation\nDSE recommends documenting the authoritative source and preserving the former primary’s stopped state before evaluating rewind. Verify prerequisites and WAL availability, run the dry run, and agree on a fresh-base-backup fallback. Review copied configuration before startup, especially the settings that establish the standby role. Include a stopping condition for any uncertainty about source identity; recovery speed should not replace an explicit decision about which timeline the service will retain.\nVerification\nRehearse divergence and rejoin with disposable clusters. Record prerequisite checks, dry-run output, the actual operation’s result, and the target’s verified standby state afterward. Confirm replication resumes from the intended source and keep the tested fresh-backup fallback available if rewind cannot finish safely.\nOfficial reference\nPostgreSQL 17 — pg_rewind. Reviewed October 15, 2026.",
                "datePublished": "2026-10-15T13:32:30+00:00",
                "dateModified": "2026-10-15T13:36:15+00:00",
                "mainEntityOfPage": {
                    "@id": "https://update.dsesecurity.com/updates/check-postgresql-rewind-prerequisites-before-modifying-a-former-primary/"
                },
                "inLanguage": "en-US",
                "isAccessibleForFree": true,
                "author": {
                    "@type": "Organization",
                    "name": "DSE Security Editorial Team",
                    "url": "https://update.dsesecurity.com/#editorial-team"
                },
                "publisher": {
                    "@id": "https://dsesecurity.com/#organization"
                },
                "image": {
                    "@type": "ImageObject",
                    "@id": "https://update.dsesecurity.com/updates/check-postgresql-rewind-prerequisites-before-modifying-a-former-primary/#primaryimage",
                    "url": "https://update.dsesecurity.com/assets/editorial/continuity-recovery-social-v2.jpg?v=1.8.20",
                    "contentUrl": "https://update.dsesecurity.com/assets/editorial/continuity-recovery-social-v2.jpg?v=1.8.20",
                    "width": 1200,
                    "height": 630,
                    "caption": "Check PostgreSQL rewind prerequisites before modifying a former primary"
                },
                "articleSection": [
                    "Business Continuity",
                    "IT"
                ],
                "keywords": [
                    "Business Continuity",
                    "IT",
                    "Guide",
                    "Information priority"
                ],
                "genre": "Guide",
                "about": [
                    {
                        "@type": "Thing",
                        "name": "Business Continuity",
                        "url": "https://update.dsesecurity.com/topic/business-continuity/"
                    },
                    {
                        "@type": "Thing",
                        "name": "IT",
                        "url": "https://update.dsesecurity.com/topic/it/"
                    }
                ],
                "wordCount": 243,
                "timeRequired": "PT2M",
                "publishingPrinciples": "https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/",
                "usageInfo": "https://update.dsesecurity.com/usage/",
                "copyrightHolder": {
                    "@id": "https://dsesecurity.com/#organization"
                },
                "copyrightNotice": "Copyright © 2026 Detection Systems & Engineering. All rights reserved.",
                "citation": {
                    "@type": "CreativeWork",
                    "name": "PostgreSQL 17 — pg_rewind",
                    "url": "https://www.postgresql.org/docs/17/app-pgrewind.html"
                }
            }
        ]
    }
}