public inbox for [email protected]
help / color / mirror / Atom feedpgbouncer logrotate configuration
5+ messages / 3 participants
[nested] [flat]
* pgbouncer logrotate configuration
@ 2015-05-12 14:44 Peter Eisentraut <[email protected]>
0 siblings, 1 reply; 5+ messages in thread
From: Peter Eisentraut @ 2015-05-12 14:44 UTC (permalink / raw)
To: pgsql-pkg-yum
The pgbouncer logrotate configuration seems a bit contradictory:
/var/log/pgbouncer.log {
missingok
notifempty
sharedscripts
copytruncate
create 0640 pgbouncer pgbouncer
nodateext
postrotate
/bin/kill -HUP `cat /var/run/pgbouncer/pgbouncer.pid
2>/dev/null` 2> /dev/null || true
endscript
}
"create" is ignored if "copytruncate" is used. And having a postrotate
script to send a HUP signal is also pointless if copytruncate is used.
We need to decide on one way to do it: either copytruncate, or rename
and SIGHUP.
It also seems to me that this might be a bit simpler if we created a
subdirectory /var/log/pgbouncer/ for all the log files. Then we
wouldn't have the permissions issues that the "create" directory is
attempting to solve.
Comments?
--
Sent via pgsql-pkg-yum mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-yum
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgbouncer logrotate configuration
@ 2015-05-12 21:24 Devrim Gündüz <[email protected]>
parent: Peter Eisentraut <[email protected]>
0 siblings, 1 reply; 5+ messages in thread
From: Devrim Gündüz @ 2015-05-12 21:24 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; +Cc: pgsql-pkg-yum
Hi,
On Tue, 2015-05-12 at 10:44 -0400, Peter Eisentraut wrote:
> The pgbouncer logrotate configuration seems a bit contradictory:
>
> /var/log/pgbouncer.log {
> missingok
> notifempty
> sharedscripts
> copytruncate
> create 0640 pgbouncer pgbouncer
> nodateext
> postrotate
> /bin/kill -HUP `cat /var/run/pgbouncer/pgbouncer.pid
> 2>/dev/null` 2> /dev/null || true
> endscript
> }
>
> "create" is ignored if "copytruncate" is used. And having a postrotate
> script to send a HUP signal is also pointless if copytruncate is used.
> We need to decide on one way to do it: either copytruncate, or rename
> and SIGHUP.
>
> It also seems to me that this might be a bit simpler if we created a
> subdirectory /var/log/pgbouncer/ for all the log files. Then we
> wouldn't have the permissions issues that the "create" directory is
> attempting to solve.
Just committed a fix for this. Can you please pull 9.4 tree and see
whether all problems you reported have been fixed or not? I can push the
packages tomorrow or so.
Regards,
--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR
Attachments:
[application/pgp-signature] signature.asc (819B, 2-signature.asc)
download
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgbouncer logrotate configuration
@ 2015-05-13 20:55 Peter Eisentraut <[email protected]>
parent: Devrim Gündüz <[email protected]>
0 siblings, 1 reply; 5+ messages in thread
From: Peter Eisentraut @ 2015-05-13 20:55 UTC (permalink / raw)
To: Devrim Gündüz <[email protected]>; +Cc: pgsql-pkg-yum
On 5/12/15 5:24 PM, Devrim Gündüz wrote:
>
> Hi,
>
> On Tue, 2015-05-12 at 10:44 -0400, Peter Eisentraut wrote:
>> The pgbouncer logrotate configuration seems a bit contradictory:
>>
>> /var/log/pgbouncer.log {
>> missingok
>> notifempty
>> sharedscripts
>> copytruncate
>> create 0640 pgbouncer pgbouncer
>> nodateext
>> postrotate
>> /bin/kill -HUP `cat /var/run/pgbouncer/pgbouncer.pid
>> 2>/dev/null` 2> /dev/null || true
>> endscript
>> }
>>
>> "create" is ignored if "copytruncate" is used. And having a postrotate
>> script to send a HUP signal is also pointless if copytruncate is used.
>> We need to decide on one way to do it: either copytruncate, or rename
>> and SIGHUP.
>>
>> It also seems to me that this might be a bit simpler if we created a
>> subdirectory /var/log/pgbouncer/ for all the log files. Then we
>> wouldn't have the permissions issues that the "create" directory is
>> attempting to solve.
>
> Just committed a fix for this. Can you please pull 9.4 tree and see
> whether all problems you reported have been fixed or not? I can push the
> packages tomorrow or so.
I haven't tested it, but I think the currently committed logrotate file
won't work at all, because *both* the copytruncate the the postrotate
script were removed. You need to keep at least one.
Also, I think the /var/log/pgbouncer/ directory needs to be created
somewhere in the spec file.
--
Sent via pgsql-pkg-yum mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-yum
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgbouncer logrotate configuration
@ 2015-09-22 18:51 Peter Eisentraut <[email protected]>
parent: Peter Eisentraut <[email protected]>
0 siblings, 1 reply; 5+ messages in thread
From: Peter Eisentraut @ 2015-09-22 18:51 UTC (permalink / raw)
To: Devrim Gündüz <[email protected]>; +Cc: pgsql-pkg-yum
On 5/13/15 4:55 PM, Peter Eisentraut wrote:
> On 5/12/15 5:24 PM, Devrim Gündüz wrote:
>>
>> Hi,
>>
>> On Tue, 2015-05-12 at 10:44 -0400, Peter Eisentraut wrote:
>>> The pgbouncer logrotate configuration seems a bit contradictory:
>>>
>>> /var/log/pgbouncer.log {
>>> missingok
>>> notifempty
>>> sharedscripts
>>> copytruncate
>>> create 0640 pgbouncer pgbouncer
>>> nodateext
>>> postrotate
>>> /bin/kill -HUP `cat /var/run/pgbouncer/pgbouncer.pid
>>> 2>/dev/null` 2> /dev/null || true
>>> endscript
>>> }
>>>
>>> "create" is ignored if "copytruncate" is used. And having a postrotate
>>> script to send a HUP signal is also pointless if copytruncate is used.
>>> We need to decide on one way to do it: either copytruncate, or rename
>>> and SIGHUP.
>>>
>>> It also seems to me that this might be a bit simpler if we created a
>>> subdirectory /var/log/pgbouncer/ for all the log files. Then we
>>> wouldn't have the permissions issues that the "create" directory is
>>> attempting to solve.
>>
>> Just committed a fix for this. Can you please pull 9.4 tree and see
>> whether all problems you reported have been fixed or not? I can push the
>> packages tomorrow or so.
>
> I haven't tested it, but I think the currently committed logrotate file
> won't work at all, because *both* the copytruncate the the postrotate
> script were removed. You need to keep at least one.
>
> Also, I think the /var/log/pgbouncer/ directory needs to be created
> somewhere in the spec file.
This is still not fixed.
--
Sent via pgsql-pkg-yum mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-yum
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgbouncer logrotate configuration
@ 2015-09-22 20:35 Devrim GÜNDÜZ <[email protected]>
parent: Peter Eisentraut <[email protected]>
0 siblings, 0 replies; 5+ messages in thread
From: Devrim GÜNDÜZ @ 2015-09-22 20:35 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; +Cc: pgsql-pkg-yum
Hi Peter,
On Tue, 2015-09-22 at 14:51 -0400, Peter Eisentraut wrote:
> This is still not fixed.
Peter, can you please do me a favor and send a patch against this?
http://git.postgresql.org/gitweb/?p=pgrpms.git;a=blob;f=rpm/redhat/9.5/
pgbouncer/F
-22/pgbouncer.logrotate;h=7936a71f3e3c409f9b20d0b9164d98930907cb0a;hb=5
7904b139f4362524ec969dac9b52b8ee2ce35d1
Regards,
--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR
--
Sent via pgsql-pkg-yum mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-yum
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2015-09-22 20:35 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-05-12 14:44 pgbouncer logrotate configuration Peter Eisentraut <[email protected]>
2015-05-12 21:24 ` Devrim Gündüz <[email protected]>
2015-05-13 20:55 ` Peter Eisentraut <[email protected]>
2015-09-22 18:51 ` Peter Eisentraut <[email protected]>
2015-09-22 20:35 ` Devrim GÜNDÜZ <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox