Re: Postgres log file

From: Steve Francis <sfrancis(at)logicmonitor(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Postgres log file
Date: 2010-10-15 18:15:37
Message-ID: 4CB89A49.80208@logicmonitor.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-performance

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On Linux at least - not sure about Windows - deleting a file does
not remove it from the file system until there are no more processes
holding the file open.<br>
So while postgres holds the file open, it can keep writing to it
happily.<br>
You won't be able to see the file in the directory, and the space
won't be freed. You can find such things with the "find"command by
looking for files with a link count of zero.<br>
<br>
<br>
On 10/15/2010 11:03 AM, Jessica Richard wrote:
<blockquote cite="mid:165713(dot)55278(dot)qm(at)web111313(dot)mail(dot)gq1(dot)yahoo(dot)com"
type="cite">
<style type="text/css"><!-- DIV {margin:0px;} --></style>
<div style="font-family: times new roman,new york,times,serif;
font-size: 12pt;">I am curious about this scenario:<br>
<br>
What is going to happen when a server is running and the
Postgres log file is accidentally deleted or renamed?&nbsp; The
server will have no place to write its log entries obviously..
what else?.<br>
<br>
Is there any way to check within Postgres what the current log
name (with a particular time stamp when rotated last time) is so
that a file with a correct&nbsp; matching name can be manually
created?<br>
<br>
For this situation, what is the proper way to get the server to
write to a new log file without having to bounce the Postgres
server itself?<br>
<br>
Thanks!<br>
<br>
<br>
</div>
<br>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<style type="text/css">.sig, .sig a, .sig td { font: 12px Arial; color: DarkBlue; white-space: nowrap; vertical-align: top; text-align: left; }.sig img { border: 0pt none; }.sig a { font: 11px Arial; }.sig .back { color: rgb(255, 255, 255); background-color: DarkBlue; text-decoration: none; }.sig .right { text-align: right; }.sig .border { border: 1px solid DarkBlue; margin: 5px; border-collapse: collapse; }.sig .bottom { vertical-align: bottom; }.sig p { clear: both; margin: 2px; }</style>
<div class="sig">
<table class="border">
<tbody>
<tr>
<td class="back">&nbsp;<b>Steve Francis</b></td>
<td class="back" style="width: 30px;"><br>
</td>
<td class="back" style="text-align: right;"><b>LogicMonitor
LLC</b></td>
</tr>
<tr>
<td><br>
</td>
<td><br>
</td>
<td class="right"><br>
</td>
</tr>
<tr>
<td class="bottom"><a class="moz-txt-link-abbreviated" href="mailto:sfrancis(at)logicmonitor(dot)com">sfrancis(at)logicmonitor(dot)com</a><br>
Monitoring Made Easy<br>
<a target="_blank" href="http://www.logicmonitor.com">www.logicmonitor.com</a></td>
<td><br>
</td>
<td class="bottom" style="text-align: right;"> Ph: 1 888
41 LOGIC x500<br>
Ph: 1 805 698 0770</td>
</tr>
</tbody>
</table>
<p>&nbsp; <br>
</p>
</div>
</div>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 3.4 KB

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Igor Neyman 2010-10-15 18:54:11 Re: oracle to psql migration - slow query in postgres
Previous Message Tony Capobianco 2010-10-15 18:13:49 Re: oracle to psql migration - slow query in postgres

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2010-10-15 18:29:27 Re: Index scan / Index cond limitation or ?
Previous Message Tony Capobianco 2010-10-15 18:13:49 Re: oracle to psql migration - slow query in postgres