stolon icon indicating copy to clipboard operation
stolon copied to clipboard

Create pg_hba.conf from a file

Open jpninanjohn opened this issue 6 years ago • 2 comments

Submission type

  • Request for enhancement (RFE)

Enhancement Description

For an existing cluster, is it possible to add a flag for the keeper to take in an existing pg_hba.conf file. If the file exists use it, if it does not, then do the default which is what it is doing now.

Context: We were trying to migrate an already running postgres to use stolon. The pg_hba.conf had many entries. Instead of recreating the entries by giving it as pgHBA in cluster spec, we thought it would be nice to have an option to give a file from which the pg_hba.conf can be created.

Eg.

stolon-keeper --cluster-name stolon-cluster
--store-backend=consul
--uid keeper1
--data-dir /home/vagrant/data_dir
--pg-su-password=vagrant
--pg-repl-username=vagrant
--pg-repl-password=vagrant
--pg-listen-address=127.0.0.1
--pg-port 5432
--pghba-conf-file /home/vagrant/data_dir/pg_hba.conf

I am already working on a PR for this. Please do tell if there are any concerns.

jpninanjohn avatar Jun 23 '19 04:06 jpninanjohn

Any progress on this?

FarhanSajid1 avatar Jul 13 '20 14:07 FarhanSajid1

Yes. I have done it to a point. But have not worked on it for quite some time(around a year). Let me bring my fork up to date. Ill let you know.

jpninanjohn avatar Jul 14 '20 16:07 jpninanjohn