Visitar URL original
`work_dir` and/or `logdir` not set to default on `4.7` ? · Issue #144 · pgpool/pgpool2 · GitHub
Skip to content

work_dir and/or logdir not set to default on 4.7 ? #144

Description

@fluca1978

I'm migrating a configuration from PgPool-II 4.6.2 to 4.7, and I'm having some issues with logdir and workdir.
According to the release notes, logdir has been renamed to workdir (see https://www.pgpool.net/docs/latest/en/html/release-4-7-0.html).
In my previous configuration (4.6) I didn't have an explicit setting for logdir, and the pooler was working. Once I updated to 4.7 the pooler did not start anymore.

$ sudo -u postgres /usr/sbin/pgpool -v
pgpool-II version 4.7.0 (tasukiboshi)

The documentation for work_dir states that it defaults to /tmp, which is a catch-all space (https://www.pgpool.net/docs/latest/en/html/runtime-misc.html#GUC-WORK-DIR).
However, a permission denied error is raised:

$ sudo -u postgres /usr/sbin/pgpool -n -d 
2026-01-26 15:19:07.863: main pid 2916: DEBUG:  read pgpool node id file /etc/pgpool2/pgpool_node_id
2026-01-26 15:19:07.863: main pid 2916: DETAIL:  pgpool node id: 0
...
2026-01-26 15:19:07.980: main pid 2916: FATAL:  watchdog child process exit with fatal error. exiting pgpool-II
2026-01-26 15:19:07.981: main pid 2916: WARNING:  failed to open status file at: "/pgpool_status"
2026-01-26 15:19:07.981: main pid 2916: DETAIL:  Permission denied
2026-01-26 15:19:07.981: main pid 2916: LOG:  shutting down

and I don't have logdir nor work_dir in my configuration:

$ sudo grep logdir /etc/pgpool2/pgpool.conf
#logdir = '/var/log/postgresql'

$ sudo grep work_dir /etc/pgpool2/pgpool.conf
$ 

Now, either setting up logdir or work_dir makes the system start.

$ sudo grep work_dir /etc/pgpool2/pgpool.conf
work_dir = '/var/log/postgresql'

$ sudo grep logdir /etc/pgpool2/pgpool.conf
#logdir = '/var/log/postgresql'


$ sudo -u postgres /usr/sbin/pgpool -n -d  
2026-01-26 15:31:03.400: main pid 1198: WARNING:  logdir is changed to work_dir
2026-01-26 15:31:03.400: main pid 1198: DETAIL:  if logdir is specified, the value will be set to work_dir
2026-01-26 15:31:03.401: main pid 1198: DEBUG:  initializing pool configuration
...
026-01-26 15:31:23.782: sr_check_worker pid 1235: DEBUG:  node status[0]: 1
2026-01-26 15:31:23.782: sr_check_worker pid 1235: DEBUG:  node status[1]: 2
2026-01-26 15:31:23.782: sr_check_worker pid 1235: DEBUG:  node status[2]: 2
2026-01-26 15:31:23.783: sr_check_worker pid 1235: DEBUG:  pool_release_follow_primary_lock called

Am I misunderstanding the usage of work_dir? It seems to me it is not set to /tmp if omitted from the configuration, as well as using logdir still works.
This is from Ubuntu packaged PgPool-II, if that matters.

Activity

  1. pengbo0328 commented on Jan 27, 2026

    @pengbo0328
    Collaborator

    We have confirmed that this is a bug in version 4.7.0.
    We plan to fix this issue in the next minor release.
    Thank you for reporting this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions