[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#45588: closed ([PATCH] services: postgresql: Log from pg_ctl.)
From: |
GNU bug Tracking System |
Subject: |
bug#45588: closed ([PATCH] services: postgresql: Log from pg_ctl.) |
Date: |
Mon, 22 Feb 2021 22:32:02 +0000 |
Your message dated Mon, 22 Feb 2021 22:30:58 +0000
with message-id <878s7fn3a5.fsf@cbaines.net>
and subject line Re: [bug#45588] [PATCH] services: postgresql: Log from pg_ctl.
has caused the debbugs.gnu.org bug report #45588,
regarding [PATCH] services: postgresql: Log from pg_ctl.
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)
--
45588: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=45588
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message ---
Subject: |
[PATCH] services: postgresql: Log from pg_ctl. |
Date: |
Fri, 1 Jan 2021 10:10:15 +0000 |
pg_ctl will output errors when starting PostgreSQL, for example about errors
in the configuration file. Without getting pg_ctl to log to a file, I'm not
sure how to find those errors.
* gnu/services/databases.scm (postgresql-activation): Create
/var/log/postgresql.
(postgresql-shepherd-service): Pass --log=/var/log/postgresql/pg_ctl to
pg_ctl.
---
gnu/services/databases.scm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index d2dc5f0da8..479a3c56f7 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -205,6 +205,10 @@ host all all ::1/128 md5"))
(mkdir-p #$data-directory)
(chown #$data-directory (passwd:uid user) (passwd:gid user))
+ ;; Create log directory
+ (mkdir-p "/var/log/postgresql")
+ (chown "/var/log/postgresql" (passwd:uid user) (passwd:gid user))
+
;; Drop privileges and init state directory in a new
;; process. Wait for it to finish before proceeding.
(match (primitive-fork)
@@ -247,6 +251,7 @@ host all all ::1/128 md5"))
(setgid (passwd:gid user))
(setuid (passwd:uid user))
(execl pg_ctl pg_ctl "-D" #$data-directory "-o" options
+ "--log=/var/log/postgresql/pg_ctl"
mode)))))))
(pid-file (in-vicinity data-directory "postmaster.pid"))
(action (lambda args
--
2.29.2
--- End Message ---
--- Begin Message ---
Subject: |
Re: [bug#45588] [PATCH] services: postgresql: Log from pg_ctl. |
Date: |
Mon, 22 Feb 2021 22:30:58 +0000 |
User-agent: |
mu4e 1.4.14; emacs 27.1 |
Christopher Baines <mail@cbaines.net> writes:
> pg_ctl will output errors when starting PostgreSQL, for example about errors
> in the configuration file. Without getting pg_ctl to log to a file, I'm not
> sure how to find those errors.
>
> * gnu/services/databases.scm (postgresql-activation): Create
> /var/log/postgresql.
> (postgresql-shepherd-service): Pass --log=/var/log/postgresql/pg_ctl to
> pg_ctl.
> ---
> gnu/services/databases.scm | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
> index d2dc5f0da8..479a3c56f7 100644
> --- a/gnu/services/databases.scm
> +++ b/gnu/services/databases.scm
> @@ -205,6 +205,10 @@ host all all ::1/128 md5"))
> (mkdir-p #$data-directory)
> (chown #$data-directory (passwd:uid user) (passwd:gid user))
>
> + ;; Create log directory
> + (mkdir-p "/var/log/postgresql")
> + (chown "/var/log/postgresql" (passwd:uid user) (passwd:gid user))
> +
> ;; Drop privileges and init state directory in a new
> ;; process. Wait for it to finish before proceeding.
> (match (primitive-fork)
> @@ -247,6 +251,7 @@ host all all ::1/128 md5"))
> (setgid (passwd:gid user))
> (setuid (passwd:uid user))
> (execl pg_ctl pg_ctl "-D" #$data-directory "-o"
> options
> + "--log=/var/log/postgresql/pg_ctl"
> mode)))))))
> (pid-file (in-vicinity data-directory "postmaster.pid"))
> (action (lambda args
This conflicts with
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=fe4b8823505c3271fc3eacaa93c30a5cec078739
--- End Message ---
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#45588: closed ([PATCH] services: postgresql: Log from pg_ctl.),
GNU bug Tracking System <=