473,408 Members | 2,839 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

postmaster and logrotate

Hi, everybody!

I was wonderring if there is a way to make logrotate work with postgres
logs?
More precisely, the question is - is there any way to tell a running
postmaster process to reopen its log file?
I tried kill -HUP ... but that doesn't seem to do anything...

Is there just no way to do what I want?

Thanks!

Dima
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #1
2 5081
Dima Tkach wrote:
Hi, everybody!

I was wonderring if there is a way to make logrotate work with postgres
logs?
More precisely, the question is - is there any way to tell a running
postmaster process to reopen its log file?
I tried kill -HUP ... but that doesn't seem to do anything...

Is there just no way to do what I want?


Docs say pipe into logrotate:

http://developer.postgresql.org/docs...intenance.html

--
Bruce Momjian | http://candle.pha.pa.us
pg***@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 12 '05 #2
Il lun, 2003-12-22 alle 19:40, Dima Tkach ha scritto:
Hi, everybody!

I was wonderring if there is a way to make logrotate work with postgres
logs?
More precisely, the question is - is there any way to tell a running
postmaster process to reopen its log file?
I tried kill -HUP ... but that doesn't seem to do anything...

Is there just no way to do what I want?

Thanks!

Dima


In /etc/logrotate.d create a file named i.e. postgres with more or less
the following contents:

/var/log/postgres.log {
weekly
missingok
rotate 4
copytruncate
compress
delaycompress
notifempty
}

Pls notate the 'copytruncate' option which enables the routing of the
output of syslogd to a new file.

Claudio

--
Claudio Succa
PERTEL - Torino - Italy
+39-011-437.4141
http://www.pertel.it
http://www.uniassist.it

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mike | last post by:
Hi, In my web form, which registers email addresses, my php script does some email validation, but people still mistype email addresses which are in a valid format but don't exist. PHP tries to...
5
by: Chris Webster | last post by:
I have one process which writes a single float into 300 columns once per second. I then run 4 process, from remote computers, to query a small subset of the latest row. I have even commented...
2
by: Andy Harrison | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Could anyone explain about the max_connections in postgres? We ran into the connection limit on one of our production servers. One reason is that we have...
2
by: Dima Tkach | last post by:
Hi, everybody! I was wonderring if there is a way to make logrotate work with postgres logs? More precisely, the question is - is there any way to tell a running postmaster process to reopen...
0
by: Melanie Bergeron | last post by:
Hi all! I have a big problem installing postmaster as a service under Windows XP with cygwin. I already installed postgresql on 2 machines without problems but this machine really seem to don't...
1
by: Joe Maldonado | last post by:
Hello all! when asking postgres to aggregate totals accross 4.5 or so Million records. The visible effect is that the postmaster will grow to the 3GB process limit and die without a core :(. I...
1
by: Durai raj | last post by:
Hello All, After starting the postmaster, I just entered in database like: $ psql test Welcome to psql 7.4.2, the PostgreSQL interactive terminal. Type: \copyright for distribution terms
8
by: Thomas Hallgren | last post by:
I'm writing a small test harness. I have two threads. One that starts the postmaster and another that does all the testing and finally stops the postmaster with a pg_ctl stop. At present, the...
2
by: Ying Lu | last post by:
Hello all, I met a problem about cannot start postmaster. The situation I met is that I was running postmaster, but because of the server closed all my konsole. As a result, I did not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.