Re: log_filename

From: Ahtesham Karajgi <ahteshamkarajgi(at)gmail(dot)com>
To: basti <mailinglist(at)unix-solution(dot)de>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: log_filename
Date: 2017-07-18 08:31:31
Message-ID: CANBvhbCKPEtDpBAMbiRDJWu2ajy7z41MKiQQSax=6RYrYGKUWA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Add the version in the log_filename itself.

Below is the test case.

naveed=# show log_filename ;
log_filename
--------------------------------
postgresql-%Y-%m-%d_%H%M%S.log
(1 row)

naveed=# select pg_reload_conf();
pg_reload_conf
----------------
t
(1 row)

naveed=# show log_filename ;
log_filename
------------------------------------
postgresql-9.5-%Y-%m-%d_%H%M%S.log
(1 row)

test=# \q
[postgres(at)localhost ~]$
[postgres(at)localhost ~]$ ls -lrth /usr/local/pgsql/data/pg_log | tail -2
-rw-------. 1 postgres postgres 3.3K Jul 18 01:25
postgresql-2017-07-18_000000.log
-rw-------. 1 postgres postgres 4.1K Jul 18 01:27
postgresql-9.5-2017-07-18_012530.log
[postgres(at)localhost ~]$

On Tue, Jul 18, 2017 at 1:50 PM, basti <mailinglist(at)unix-solution(dot)de> wrote:

> Hello,
> in my postgres.conf i use
>
> log_filename = 'postgresql-%Y-%m-%d.log'
> this results in Logfiles named "postgresql-2017-07-14.log"
>
> Is there a way to create logfiles
> "postgresql-<version_number>-2017-07-14.log"
>
> Best Regards,
> Basti
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Walter Nordmann 2017-07-18 08:36:29 Re: log_filename
Previous Message basti 2017-07-18 08:20:37 log_filename