-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: avoid reloading Postgres when unnecessary #4531
Conversation
❗ By default, the pull request is configured to backport to all release branches.
|
/test limit=local |
@leonardoce, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/9081617544 |
I'm waiting for the E2e test to finish before merging it. |
/test limit=local |
@leonardoce, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/9084593252 |
The instance manages stores the PostgreSQL configuration inside a dictionary, mapping GUC names to their actual value. When writing the configuration file, the code is iterating over a map and since the iteration order is not defined, was re-writing the configuration file even when the parameters didn't really change. This made the instance manager SIGHUP the postmaster everytime, even if this is not really needed. This patch fixes the issue by writing che configuration file in lexicographic order. Closes: cloudnative-pg#4529 Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
/ok-to-merge |
The instance manager stores the PostgreSQL configuration inside a dictionary, mapping GUC names to their actual value. When writing the configuration file, the code is iterating over a map. Since the iteration order is not defined, the configuration file was re-written even when the parameters didn't change. This made the instance manager SIGHUP the postmaster every time, even if this was not needed. This patch fixes the issue by writing the configuration file in lexicographic order. Closes: #4529 Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com> Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com> Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com> Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com> (cherry picked from commit 5686af3)
The instance manager stores the PostgreSQL configuration inside a dictionary, mapping GUC names to their actual value. When writing the configuration file, the code is iterating over a map. Since the iteration order is not defined, the configuration file was re-written even when the parameters didn't change. This made the instance manager SIGHUP the postmaster every time, even if this was not needed. This patch fixes the issue by writing the configuration file in lexicographic order. Closes: #4529 Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com> Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com> Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com> Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com> (cherry picked from commit 5686af3)
The instance manager stores the PostgreSQL configuration inside a dictionary, mapping GUC names to their actual value. When writing the configuration file, the code is iterating over a map. Since the iteration order is not defined, the configuration file was re-written even when the parameters didn't change. This made the instance manager SIGHUP the postmaster every time, even if this was not needed. This patch fixes the issue by writing the configuration file in lexicographic order. Closes: #4529 Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com> Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com> Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com> Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com> (cherry picked from commit 5686af3)
The instance manager stores the PostgreSQL configuration inside a dictionary, mapping GUC names to their actual value.
When writing the configuration file, the code is iterating over a map. Since the iteration order is not defined, the configuration file was re-written even when the parameters didn't change.
This made the instance manager SIGHUP the postmaster every time, even if this was not needed.
This patch fixes the issue by writing the configuration file in lexicographic order.
Closes: #4529