Skip to content

Simplify postgres load_balancing setup instructions

Dylan Griffith requested to merge simplify-db-load-balancing-setup into main

What does this merge request do and why?

This is a few simplifications for our load_balancing and geo setup process. This makes the following changes:

  1. Remove the redundant steps for make postgresql-replication/data. This step was using initdb to create a new database. But the subsequent steps just made this redundant because they tell you to rm -rf postgresql-replica/data/*. So effectively this step was just creating the directory. We replace this instruction now with simply mkdir -p.
  2. There were existing redundant /access tasks. These tasks were meant to be amending some access rules to pg_hba.conf. But they weren't actually necessary because the pg_hba.conf was already defaulting to allowing replication locally from all users locally with the line local replication all trust. I verified with a few other GDK users that they already had this default. Also if you look closely the existing duplicated /access tasks were redundant anyway because they were all writing to the pg_hba.conf of the primary and just adding the same line over and over.
  3. A minor refactoring to move the postgresql-geo-replication-secondary make task to the geo specific makefile
  4. Removing the postgresql-replication-secondary make task because this is not documented to be used anywhere nor used by anything else

How to set up and validate locally

Run the setup instructions in the docs that were edited.

Impacted categories

The following categories relate to this merge request:

Merge request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • Documentation added/updated, if needed.
  • Announcement added, if change is notable.
  • gdk doctor test added, if needed.
  • Add the ~highlight label if this MR should be included in the CHANGELOG.md.

Merge request reports