Hardcoded database
Describe the bug Hardcoded database in pgbouncer.ini config - https://github.com/CrunchyData/postgres-operator/blob/89fef9fc325c0645a604fba7c7b41448663bcdda/conf/postgres-operator/cluster/1/pgbouncer.ini#L2
Expected behavior Operator PG_DATABASE should be considered here, but it's ignored
Any problem i just replacing dbname=userdb with dbname={{.PG_DATABASE}}?
It should be also added into pgbouncer.go
And if one adds " * = host... " into pgbouncer.ini - > pgo test will fail connectivity test via pgbouncer
@lkhomenk , thinking about changing that line in pgbouncer.ini to something like this:
'* = host={{.PG_PRIMARY_SERVICE_NAME}} port={{.PG_PORT}} auth_user={{.PG_USERNAME}}'
Wanted your thoughts on any downside to doing it that way.
@flamingdumpster, yep I did that. But that way replica service won't be available at least for read-only
ok, going to update so that all parameters in that line are configurable through a variable.
verified on 3.5.2 - now we can use both port and database name in pgbouncer configs! :+1: