Skip to content

Custom 'listen_addresses' not applied #2904

@cornel-masson

Description

@cornel-masson

Overview

After configuring for listen_addresses = "*", the db is still created with listen_addresses = "0.0.0.0".

Environment

Please provide the following details:

  • Platform: Kubernetes
  • Platform Version: 4.7.3
  • PGO Image Tag: centos8-4.7.
  • Postgres Version: 13
  • Storage: hostpath

Steps to Reproduce

REPRO

According to the documentation, you can customize listen_addresses by setting postgresql.listen. I created a custom configmap - hippo-custom-config - with an entry for postgres-ha.yaml, which has listen: '*':

Data
====
postgres-ha.yaml:
----
bootstrap:
  dcs:
    postgresql:
      parameters:
        shared_preload_libraries: pg_stat_statements.so,pgnodemx.so,timescaledb
        listen: '*'

I then created the cluster, with --custom-config pointing to hippo-custom-config:

pgo create cluster hippo --custom-config=hippo-custom-config

I then created a port-forward to the hippo database, and used psql to connect.

EXPECTED

When I show listen_addresses; in psql, I expect to see "*".

ACTUAL

When I show listen_addresses; in psql, I see the default "0.0.0.0", not my custom "*".
I also opened a shell into the 'hippo' pod and looked at the running processes (ps -fA). It shows the postgres process started with an explicit listen_addresses parameter of "0.0.0.0":

postgres -D /pgdata/hippo --config-file=/pgdata/hippo/postgresql.conf --listen_addresses=0.0.0.0

According to the documentation, listen_addresses is one of the few parameters that is set in this way, rather than in postgresql.conf itself. I expect to see the parameter passed in as listen_addresses=*.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions