sorintlab / stolon

PostgreSQL cloud native High Availability and more.
https://talk.stolon.io
Apache License 2.0
4.66k stars 447 forks source link

Why is the unix_socket_directories parameter not supported for configuration? #916

Open shangjin92 opened 1 year ago

shangjin92 commented 1 year ago

The unix_socket_directories parameter is hard-coded in the code. Why doesn't it support custom configuration? In some cases, such as using postgres_fdw, the /var/run/posgresql/.s.PGSQL.5432 socket file will be relied upon.

log.Infow("starting database")
name := filepath.Join(p.pgBinPath, "postgres")
args = append([]string{"-D", p.dataDir, "-c", "unix_socket_directories=" + common.PgUnixSocketDirectories}, args...)
cmd := exec.Command(name, args...)
log.Debugw("execing cmd", "cmd", cmd)