Removing max_connection requirement on hot_standby - Mailing list pgsql-hackers

From Chris Winslett
Subject Removing max_connection requirement on hot_standby
Date
Msg-id CALfAUrhWwqojnzqCfg-Rxt3E2UL3KMR_DyW0oiF_S21+Xpw6Pw@mail.gmail.com
Whole thread Raw
Responses Re: Removing max_connection requirement on hot_standby  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
I'm orchestrating Postgres to behave as a leader-follower cluster. I've run into issues when I am scaling down a connection count for a cluster (scaling up is fine -- scaling down results in fatal errors).  I use an open source tool I've written to orchestrate the cluster called Governor (http://github.com/compose/governor).  It would work if I weren't running hot_standby, but alas…I'm running with it.

I found the code which throws the fatal is actually a pre-flight test for hot_standby written in 2009 (i.e. battle tested):


I've tested changing this value from a FATAL to a WARN.  I've compiled and tested my scenario and all appears to be correct:


In researching these lines of code, it appears the original FATAL code was put in place to ensure that a hot_standby is as close as possibly configured the same as the leader.

This change will also allow backups taken using `pg_basebackup` to work with settings that different from the original host.

Am I missing something with this change?

Cheers,
Chris

pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: No Issue Tracker - Say it Ain't So!
Next
From: Robert Haas
Date:
Subject: Re: Parallel Seq Scan