Home
%3CLINGO-SUB%20id%3D%22lingo-sub-917637%22%20slang%3D%22en-US%22%3EAuto%20Failover%20with%20PostgreSQL%2012%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-917637%22%20slang%3D%22en-US%22%3E%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20%26amp%3Bquot%3B%22%3EEarlier%20this%20month%20the%20PostgreSQL%20community%20announced%20the%20release%20of%20%3CA%20href%3D%22https%3A%2F%2Fwww.postgresql.org%2Fabout%2Fnews%2F1976%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EPostgreSQL%2012%3C%2FA%3E!%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200px%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20%26amp%3Bquot%3B%22%20data-contrast%3D%22none%22%3EGiven%20that%20the%20development%20of%20Postgres%20is%20all%20done%20in%20the%20open%2C%20we%20in%20the%20%3C%2FSPAN%3E%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23146cac%3B%20text-decoration%3A%20underline%3B%22%20href%3D%22https%3A%2F%2Fgithub.com%2Fcitusdata%2Fpg_auto_failover%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20%26amp%3Bquot%3B%22%20data-contrast%3D%22none%22%3Epg_auto_failover%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20%26amp%3Bquot%3B%22%20data-contrast%3D%22none%22%3E%20team%20could%20test%20the%20new%20code%20base%20ahead%20of%20time%20and%20discover%20s%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20%26amp%3Bquot%3B%22%20data-contrast%3D%22none%22%3Eome%20API%20changes%20in%20standby%20settings%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20%26amp%3Bquot%3B%22%20data-contrast%3D%22none%22%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20%26amp%3Bquot%3B%22%20data-contrast%3D%22none%22%3E%E2%80%AFthis%20summer.%20You%E2%80%99ll%20be%20pleased%20to%20know%20that%20we%20released%E2%80%AF%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20%26amp%3Bquot%3B%22%20data-contrast%3D%22none%22%3Epg_auto_failover%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20%26amp%3Bquot%3B%22%20data-contrast%3D%22none%22%3E%201.0.5%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20%26amp%3Bquot%3B%22%20data-contrast%3D%22none%22%3E%26nbsp%3Bwith%20Postgres%2012%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20%26amp%3Bquot%3B%22%20data-contrast%3D%22none%22%3Ecompatibility%2C%20and%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20%26amp%3Bquot%3B%22%20data-contrast%3D%22none%22%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fcitusdata%2Fpg_auto_failover%2Freleases%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Epublished%20our%20packages%20already%3C%2FA%3E.%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20%26amp%3Bquot%3B%22%20data-ccp-props%3D%22%7B%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH2%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20inherit%3B%20font-family%3A%20inherit%3B%20font-size%3A%2024px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20normal%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.2%3B%20margin-bottom%3A%2012px%3B%20margin-top%3A%2024px%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%20aria-level%3D%222%22%20id%3D%22toc-hId-1846953584%22%20id%3D%22toc-hId-1846953584%22%3EPostgres%20recovery%20changes%3C%2FH2%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22none%22%3E%3CBR%20%2F%3EIn%20Postgres%2012%20there%20were%20changes%26nbsp%3B%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%20data-contrast%3D%22none%22%3Earound%20the%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%20data-contrast%3D%22none%22%3Erecovery.conf%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%20data-contrast%3D%22none%22%3E%20file%3B%20the%20changes%20were%20such%20that%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%20data-contrast%3D%22none%22%3E%20the%20presence%20of%20the%20recovery.conf%20file%20%3CA%20href%3D%22https%3A%2F%2Fwww.postgresql.org%2Fdocs%2F12%2Frelease-12.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ewould%20prevent%20your%20Postgres%20instance%20from%20starting%20at%20all%3C%2FA%3E.%20In%20previous%20versions%20of%20Postgres%2C%20the%20recovery.conf%20file%20was%20used%20to%20signal%20to%20PostgreSQL%20that%20we%20expect%20the%20server%20to%20remain%20in%20recovery%20mode%2C%20either%20as%20a%20PITR%20instance%20or%20as%20a%20standby%20instance.%20However%2C%20in%20Postgres%2012%20you%20signal%20that%20by%20using%20either%20the%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%20data-contrast%3D%22none%22%3Estandby.signal%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%20data-contrast%3D%22none%22%3E%20or%20the%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%20data-contrast%3D%22none%22%3Erecovery.signal%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%20data-contrast%3D%22none%22%3E%20file.%20As%20a%20result%2C%20the%20recovery%20and%20replication%20parameters%20can%20now%20be%20found%20in%20the%20usual%20setup%20for%20PostgreSQL%2C%20%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23146cac%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20underline%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%20href%3D%22https%3A%2F%2Fwww.postgresql.org%2Fdocs%2F12%2Fruntime-config-wal.html%23RUNTIME-CONFIG-WAL-ARCHIVE-RECOVERY%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ejust%20like%20any%20other%20GUC%3C%2FA%3E.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22none%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%20data-ccp-props%3D%22%7B%7D%22%3ETo%20make%20pg_auto_failover%20compatible%20with%20Postgres%2012%2C%20we%20adjusted%20the%20code%20to%20handle%20these%20new%20settings.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20aria-level%3D%222%22%20id%3D%22toc-hId--705203377%22%20id%3D%22toc-hId--705203377%22%3E%3CSPAN%20data-contrast%3D%22none%22%3EWhat%20is%20%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3Epg_auto_failover%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3E%3F%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B335559738%26quot%3B%3A40%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3CBR%20%2F%3E%3C%2FSPAN%3EThe%20pg_auto_failover%20project%20aims%20to%20provide%20fully%20automated%20HA%20for%20Postgres%2C%20in%20a%20simple%20and%20correct%20way.%20Simple%20to%20use.%20Correct%20implementation.%20That%20means%20the%20solution%20is%20robust%2C%20well%20tested%2C%20and%20%3CA%20href%3D%22https%3A%2F%2Fwww.citusdata.com%2Fblog%2F2019%2F05%2F30%2Fintroducing-pg-auto-failover%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eeasy%20to%20setup%20and%20get%20started%20with%3C%2FA%3E.%20Also%20anything%20that%20could%20be%20done%20automatically%20will%20be%20done%20automatically%2C%20and%20when%20the%20situation%20does%20not%20allow%20for%20an%20automated%20decision%20making%20process%2C%20then%20pg_auto_failover%20refuses%20to%20take%20any%20action.%3CSPAN%20data-ccp-props%3D%22%7B%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-ccp-props%3D%22%7B%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EA%20telling%20example%20of%20our%20approach%20to%20HA%20in%20%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3Epg_auto_failover%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%20can%20be%20found%20in%20the%20way%20we%20handle%20a%20primary%20server%20where%20Postgres%20is%20discovered%20not%20to%20be%20running%2C%20where%20we%20expect%20that%20it%20would%20be%20running%2C%20and%20it%20was%20known%20the%20be%20running%20before%20that.%20In%20that%20case%2C%20the%20first%20thing%20that%20%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3Epg_auto_failover%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%20does%20is%20to%20restart%20Postgres.%20Because%20that%E2%80%99s%20the%20simplest%20way%20to%20fix%20your%20production%2C%20and%20in%20many%20cases%2C%20it%20will%20just%20work.%20If%20that%20fails%2C%20%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3Epg_auto_failover%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%20continues%20trying%20----%20after%20all%2C%20your%20supervision%20script%20that%20frees%20some%20disk%20space%20on%20the%20WAL%20volume%20might%20need%20more%20time%20to%20be%20effective.%20Only%20after%203%20consecutives%20failures%20or%2020s%20spent%20trying%20to%20restart%20Postgres%20will%20%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3Epg_auto_failover%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%20bail%20out%20and%20failover%20to%20the%20secondary.%20And%20that%20only%20happens%20when%20the%20secondary%20is%20known%20to%20be%20available%20and%20all%20caught-up.%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-ccp-props%3D%22%7B%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EThat%E2%80%99s%20just%20an%20example%20of%20course.%20I%20think%20it%E2%80%99s%20an%20important%20one%20in%20that%20it%20shows%20the%20spirit%20with%20which%20the%20%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3Epg_auto_failover%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%20solution%20has%20been%20%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3Eimplemented%2C%20and%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%20continues%20to%20be%20improved.%20Simple%20and%20correct.%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20aria-level%3D%222%22%20id%3D%22toc-hId-1037606958%22%20id%3D%22toc-hId-1037606958%22%3E%3CSPAN%20data-contrast%3D%22none%22%3ECan%20I%20use%20%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3Epg_auto_failover%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3E%20in%20production%20now%3F%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B335559738%26quot%3B%3A40%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3E%3CSPAN%20data-ccp-props%3D%22%7B%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22none%22%3EYes!%20Some%20people%20%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3Eactually%20use%3C%2FSPAN%3E%20%3CSPAN%20data-contrast%3D%22none%22%3Epg_auto_failover%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3E%20in%20production%20already%2C%20and%20happily%20so.%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-ccp-props%3D%22%7B%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22none%22%3EThe%20%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3Epg_auto_failover%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3E%20project%20is%20already%20delivering%20a%20solid%20solution%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3E.%20We%20stil%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3El%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3E%20have%20lots%20of%20ideas%20and%20%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3Eambitions%20in%20the%20area%20of%20automating%20Postgres%20HA%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3E%2C%20so%20there%E2%80%99s%20more%20to%20come!%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3E%20We%20have%20not%20implemented%20all%20the%20things%20yet%20at%20this%20time%2C%20and%20we%20focus%20on%20having%20a%20very%20solid%20solution%20for%20what%20we%20have.%20%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3ESo%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3E%20to%20decide%20if%20you%20want%20to%20use%20%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3Epg_auto_failover%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3E%2C%20you%20should%20first%20understand%20what%20we%20have%20done%20at%20the%20moment%20and%20see%20if%20that%20matches%20your%20expectations%20in%20terms%20of%20features.%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-ccp-props%3D%22%7B%7D%22%3E%3CSPAN%20class%3D%22TextRun%20%20BCX4%20SCXW117723327%22%20data-contrast%3D%22none%22%3E%3CSPAN%20class%3D%22NormalTextRun%20CommentStart%20%20BCX4%20SCXW117723327%22%3ESo%2C%20what%20it%20is%20that%20we%20have%20already%20done%3F%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22EOP%20%20BCX4%20SCXW117723327%22%20data-ccp-props%3D%22%7B%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%20aria-setsize%3D%22-1%22%20data-leveltext%3D%22%EF%82%B7%22%20data-font%3D%22Symbol%22%20data-listid%3D%221%22%20data-aria-posinset%3D%221%22%20data-aria-level%3D%221%22%3E%3CSPAN%20data-contrast%3D%22none%22%3E%3CSPAN%3EWe%20support%20a%20single%20production%20architecture%2C%20with%20a%20hard-coded%20availability%20trade%20off%20that%20is%20giving%20priority%20to%20the%20service%20over%20the%20data%20in%20some%20situation.%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B134233279%26quot%3B%3Atrue%7D%22%3E%26nbsp%3BThis%20allows%20us%20to%20remain%20very%20simple%20and%20robust.%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20aria-setsize%3D%22-1%22%20data-leveltext%3D%22%EF%82%B7%22%20data-font%3D%22Symbol%22%20data-listid%3D%221%22%20data-aria-posinset%3D%221%22%20data-aria-level%3D%221%22%3E%3CSPAN%20data-contrast%3D%22none%22%3E%3CSPAN%3ERegistering%20existing%20primary%20servers%20is%20possible%2C%20without%20service%20interruption.%20Just%20register%20your%20already%20running%20PostgreSQL%20instance%20as%20a%20primary%20server%20to%20the%20pg_auto_failover%20monitor%20and%20get%20started%20from%20there.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20data-ccp-props%3D%22%7B%7D%22%3E%3CSPAN%20class%3D%22EOP%20%20BCX4%20SCXW117723327%22%20data-ccp-props%3D%22%7B%7D%22%3EHBA%20editing%20is%20automated%20in%20pg_auto_failover%2C%20and%20you%20don't%20have%20to%20take%20care%20of%20it%20yourself.%20It%20might%20be%20that%20you%20have%20specific%20security%20rules%20to%20implement%20though%2C%20in%20which%20case%20you%20can%20of%20course%20edit%20the%20HBA%20yourself%20and%20discard%20the%20pg_auto_failover%20changes%20there.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH2%20aria-level%3D%222%22%20id%3D%22toc-hId--1514550003%22%20id%3D%22toc-hId--1514550003%22%3E%3CSPAN%20data-contrast%3D%22none%22%3EWhat%E2%80%99s%20next%20for%20%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3Epg_auto_failover%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3E%3F%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B335559738%26quot%3B%3A40%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22none%22%3E%E2%80%AF%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22none%22%3EWe%20have%20a%20long%20list%20of%20improvements%20in%20the%20work%20for%20%E2%80%AF%3C%2FSPAN%3E%3CSPAN%3Epg_auto_failover%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3E%2C%20and%20many%20more%20ideas%20for%20the%20future.%20We%20are%20still%20building%20some%20of%20the%20fundamentals%20in%20the%20area%20of%20Postgres%20HA%2C%20and%20working%20hard%20to%20implement%20a%E2%80%AF%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22none%22%3Efully%20automated%20HA%20solution%20for%20Postgres%20that%20is%20both%20simple%20and%20correct%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22none%22%3E.%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22none%22%3E%E2%80%AF%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22none%22%3EStay%20tuned%20for%20more%20updates%2C%20including%20user%20facing%20improvements%20in%20terms%20of%20HA%20architectures%20%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3Eand%20also%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3E%20a%20set%20of%20features%20targeted%20at%20docker%20and%20Kubernetes%20integration%20made%20(even)%20easier.%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3E%20The%20main%20items%20on%20our%20roadmap%20for%20the%20next%20releases%20now%20are%3A%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%20aria-setsize%3D%22-1%22%20data-leveltext%3D%22%EF%82%B7%22%20data-font%3D%22Symbol%22%20data-listid%3D%222%22%20data-aria-posinset%3D%221%22%20data-aria-level%3D%221%22%3E%3CSPAN%20data-contrast%3D%22none%22%3Esupport%20for%20multiple%20secondary%20servers%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B134233279%26quot%3B%3Atrue%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20aria-setsize%3D%22-1%22%20data-leveltext%3D%22%EF%82%B7%22%20data-font%3D%22Symbol%22%20data-listid%3D%222%22%20data-aria-posinset%3D%222%22%20data-aria-level%3D%221%22%3E%3CSPAN%20data-contrast%3D%22none%22%3Esupport%20for%20standby%20that%20are%20not%20candidate%20for%20failover%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B134233279%26quot%3B%3Atrue%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20aria-setsize%3D%22-1%22%20data-leveltext%3D%22%EF%82%B7%22%20data-font%3D%22Symbol%22%20data-listid%3D%222%22%20data-aria-posinset%3D%223%22%20data-aria-level%3D%221%22%3E%3CSPAN%20data-contrast%3D%22none%22%3Efully%20automated%20disaster%20recovery%20of%20the%20monitor%20and%20the%20Postgres%20nodes%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B134233279%26quot%3B%3Atrue%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CUL%3E%0A%3CLI%20aria-setsize%3D%22-1%22%20data-leveltext%3D%22%EF%82%B7%22%20data-font%3D%22Symbol%22%20data-listid%3D%222%22%20data-aria-posinset%3D%221%22%20data-aria-level%3D%221%22%3E%3CSPAN%20data-contrast%3D%22none%22%3Enative%20integration%20with%20docker%2C%20including%20a%20controller%20HTTP%20API%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B134233279%26quot%3B%3Atrue%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20aria-setsize%3D%22-1%22%20data-leveltext%3D%22%EF%82%B7%22%20data-font%3D%22Symbol%22%20data-listid%3D%222%22%20data-aria-posinset%3D%222%22%20data-aria-level%3D%221%22%3E%3CSPAN%20data-contrast%3D%22none%22%3Econfiguration%20management%20and%20syncing%20in%20between%20primary%20and%20standby%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B134233279%26quot%3B%3Atrue%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B134233279%26quot%3B%3Atrue%7D%22%3ERemember%20that%20pg_auto_failover%20is%20fully%20Open%20Source.%20All%20the%20development%20happens%20in%20the%20open%20on%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fcitusdata%2Fpg_auto_failover%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EGitHub%3C%2FA%3E.%20You%20are%20more%20than%20welcome%20to%20contribute%2C%20either%20by%20opening%20issues%20where%20you%20can%20let%20us%20know%20about%20shortcomings%2C%20bugs%2C%20or%20feature%20ideas%2C%20or%20by%20opening%20a%20Pull%20Request%20where%20you%20improve%20the%20product!%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22none%22%3E%E2%80%AF%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-917637%22%20slang%3D%22en-US%22%3E%3CP%3Epg_auto_failover%20is%20PostgreSQL%2012%20compatible.%20This%20blog%20also%20shares%20a%20tip%20about%20changes%20to%20recovery%20configuration%20in%20Postgres%2012.%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F138375i601199DE2E1D28CB%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22twelve.jpg%22%20title%3D%22twelve.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-917637%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAuto%20Failover%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Efailover%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Efailover%20cluster%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eha%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Epostgresql%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Earlier this month the PostgreSQL community announced the release of PostgreSQL 12!

 

Given that the development of Postgres is all done in the open, we in the pg_auto_failover team could test the new code base ahead of time and discover some API changes in standby settings  this summer. You’ll be pleased to know that we released  pg_auto_failover 1.0.5 with Postgres 12 compatibility, and published our packages already. 

Postgres recovery changes


In Postgres 12 there were changes around the recovery.conf file; the changes were such that the presence of the recovery.conf file would prevent your Postgres instance from starting at all. In previous versions of Postgres, the recovery.conf file was used to signal to PostgreSQL that we expect the server to remain in recovery mode, either as a PITR instance or as a standby instance. However, in Postgres 12 you signal that by using either the standby.signal or the recovery.signal file. As a result, the recovery and replication parameters can now be found in the usual setup for PostgreSQL, just like any other GUC.

To make pg_auto_failover compatible with Postgres 12, we adjusted the code to handle these new settings.

 

What is pg_auto_failover? 

 
The pg_auto_failover project aims to provide fully automated HA for Postgres, in a simple and correct way. Simple to use. Correct implementation. That means the solution is robust, well tested, and easy to setup and get started with. Also anything that could be done automatically will be done automatically, and when the situation does not allow for an automated decision making process, then pg_auto_failover refuses to take any action. 

 

A telling example of our approach to HA in pg_auto_failover can be found in the way we handle a primary server where Postgres is discovered not to be running, where we expect that it would be running, and it was known the be running before that. In that case, the first thing that pg_auto_failover does is to restart Postgres. Because that’s the simplest way to fix your production, and in many cases, it will just work. If that fails, pg_auto_failover continues trying ---- after all, your supervision script that frees some disk space on the WAL volume might need more time to be effective. Only after 3 consecutives failures or 20s spent trying to restart Postgres will pg_auto_failover bail out and failover to the secondary. And that only happens when the secondary is known to be available and all caught-up. 

 

That’s just an example of course. I think it’s an important one in that it shows the spirit with which the pg_auto_failover solution has been implemented, and continues to be improved. Simple and correct. 

 

Can I use pg_auto_failover in production now? 

 

Yes! Some people actually use pg_auto_failover in production already, and happily so. 

 

The pg_auto_failover project is already delivering a solid solution. We still have lots of ideas and ambitions in the area of automating Postgres HA, so there’s more to come! We have not implemented all the things yet at this time, and we focus on having a very solid solution for what we have. So to decide if you want to use pg_auto_failover, you should first understand what we have done at the moment and see if that matches your expectations in terms of features. 

 

So, what it is that we have already done? 

  • We support a single production architecture, with a hard-coded availability trade off that is giving priority to the service over the data in some situation. This allows us to remain very simple and robust.
  • Registering existing primary servers is possible, without service interruption. Just register your already running PostgreSQL instance as a primary server to the pg_auto_failover monitor and get started from there.
  • HBA editing is automated in pg_auto_failover, and you don't have to take care of it yourself. It might be that you have specific security rules to implement though, in which case you can of course edit the HBA yourself and discard the pg_auto_failover changes there.

What’s next for pg_auto_failover? 

 

We have a long list of improvements in the work for  pg_auto_failover, and many more ideas for the future. We are still building some of the fundamentals in the area of Postgres HA, and working hard to implement a  fully automated HA solution for Postgres that is both simple and correct. 

 

Stay tuned for more updates, including user facing improvements in terms of HA architectures and also a set of features targeted at docker and Kubernetes integration made (even) easier. The main items on our roadmap for the next releases now are: 

  • support for multiple secondary servers 
  • support for standby that are not candidate for failover 
  • fully automated disaster recovery of the monitor and the Postgres nodes 
  • native integration with docker, including a controller HTTP API 
  • configuration management and syncing in between primary and standby 

 

Remember that pg_auto_failover is fully Open Source. All the development happens in the open on GitHub. You are more than welcome to contribute, either by opening issues where you can let us know about shortcomings, bugs, or feature ideas, or by opening a Pull Request where you improve the product!