Skip to content

Conversation

@dracic
Copy link

@dracic dracic commented Aug 27, 2019

So I noticed at the first play (CentOS) that configuration settings were not applied because systemd applied settings from data dir instead of /etc:

● postgresql-11.service - PostgreSQL 11 database server
   Loaded: loaded (/usr/lib/systemd/system/postgresql-11.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2019-08-27 08:31:23 CEST; 12min ago
     Docs: https://www.postgresql.org/docs/11/static/
  Process: 22838 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
  Process: 26353 ExecStartPre=/usr/pgsql-11/bin/postgresql-11-check-db-dir ${PGDATA} (code=exited, status=0/SUCCESS)
 Main PID: 26358 (postmaster)
   CGroup: /system.slice/postgresql-11.service
           ├─26358 /usr/pgsql-11/bin/postmaster -D /var/lib/pgsql/11/data/
           ├─26360 postgres: logger   
           ├─26362 postgres: checkpointer   
           ├─26363 postgres: background writer   
           ├─26364 postgres: walwriter   
           ├─26365 postgres: autovacuum launcher   
           ├─26366 postgres: stats collector   
           └─26367 postgres: logical replication launcher   

Aug 27 08:31:23 dbserver systemd[1]: Starting PostgreSQL 11 database server...
Aug 27 08:31:23 dbserver postmaster[26358]: 2019-08-27 08:31:23.233 CEST [26358] LOG:  listening on IPv6 addre... 5432
Aug 27 08:31:23 dbserver postmaster[26358]: 2019-08-27 08:31:23.233 CEST [26358] LOG:  listening on IPv4 addre... 5432
Aug 27 08:31:23 dbserver postmaster[26358]: 2019-08-27 08:31:23.236 CEST [26358] LOG:  listening on Unix socke...5432"
Aug 27 08:31:23 dbserver postmaster[26358]: 2019-08-27 08:31:23.241 CEST [26358] LOG:  listening on Unix socke...5432"
Aug 27 08:31:23 dbserver postmaster[26358]: 2019-08-27 08:31:23.259 CEST [26358] LOG:  redirecting log output ...ocess
Aug 27 08:31:23 dbserver postmaster[26358]: 2019-08-27 08:31:23.259 CEST [26358] HINT:  Future log output will...log".
Aug 27 08:31:23 dbserver systemd[1]: Started PostgreSQL 11 database server.
Warning: postgresql-11.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Hint: Some lines were ellipsized, use -l to show in full.

So we need extra handler for systemd config reload, and 'PostgreSQL | Use the conf directory when starting the Postgres service | RedHat' task should notify it on every systemd config change.

@dracic
Copy link
Author

dracic commented Aug 27, 2019

Ok, I'm fixing this. But errors that popped out for Fedora weren't caused by my commits.

@dracic
Copy link
Author

dracic commented Aug 27, 2019

Build fail related to: #444

@dracic
Copy link
Author

dracic commented Aug 27, 2019

For centOS 6 (or other RHEL upstart) service manager we need /etc/sysconfig/pgsql/clustername template to override default variables:

PGENGINE=/usr/pgsql-9.5/bin
PGDATA=/var/lib/pgsql/9.5/data
PGLOG=/var/lib/pgsql/9.5/pgstartup.log
# Log file for pg_upgrade
PGUPLOG=/var/lib/pgsql/$PGMAJORVERSION/pgupgrade.log

lockfile="/var/lock/subsys/${NAME}"
pidfile="/var/run/${NAME}.pid"

# Override defaults from /etc/sysconfig/pgsql if file is present
[ -f /etc/sysconfig/pgsql/${NAME} ] && . /etc/sysconfig/pgsql/${NAME}

@dracic dracic force-pushed the master branch 2 times, most recently from b857b52 to 73af907 Compare August 28, 2019 19:38
@dracic
Copy link
Author

dracic commented Aug 29, 2019

I made a mess with commits, but now it works with CentOS 6 and 7.

@gclough
Copy link
Collaborator

gclough commented Sep 9, 2019

Could you rebase this against master (with #447), as Fedora was killing the build

@dracic
Copy link
Author

dracic commented Oct 8, 2019

Rebase done!

@github-actions
Copy link

This pr has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

@github-actions github-actions bot added the stale label Feb 19, 2024
@github-actions
Copy link

This pr has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

@github-actions github-actions bot closed this Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants