pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Logfile removal
3+ messages / 3 participants
[nested] [flat]

* Logfile removal
@ 2003-05-21 05:34  A.Bhuvaneswaran <bhuvansql@myrealbox.com>
  0 siblings, 2 replies; 3+ messages in thread

From: A.Bhuvaneswaran @ 2003-05-21 05:34 UTC (permalink / raw)
  To: pgsql-admin

Hi,

I have run postmaster with -l option. When postmaster is running, i have
removed the logfile accidentally. I am unable to restart postmaster now
due to various other reasons.  Do i have to recreate the logfile? What are
all the problems the removal of logfile would create? 

TIA.

regards, 
bhuvaneswaran




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Logfile removal
@ 2003-05-21 11:08  Andrew Sullivan <andrew@libertyrms.info>
  parent: A.Bhuvaneswaran <bhuvansql@myrealbox.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Andrew Sullivan @ 2003-05-21 11:08 UTC (permalink / raw)
  To: pgsql-admin

On Wed, May 21, 2003 at 11:04:39AM +0530, A.Bhuvaneswaran wrote:

> I have run postmaster with -l option. When postmaster is running, i have
> removed the logfile accidentally. 

Define "logfile".  Do you mean the pg_xlog?  If no, then your
start-up script will presumably create the log file for you when you
re-start.  If yes, however, then. . .

> I am unable to restart postmaster now
> due to various other reasons.  

. . .it's not only other reasons.  You'll need to run pg_resetxlog. 
Keep in mind that you are likely to have a mess on your hands
afterwards.  In particular, there may be inconsistencies in your
data.  Read the relevant docs.

A

-- 
----
Andrew Sullivan                         204-4141 Yonge Street
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Logfile removal
@ 2003-05-21 14:25  Tom Lane <tgl@sss.pgh.pa.us>
  parent: A.Bhuvaneswaran <bhuvansql@myrealbox.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2003-05-21 14:25 UTC (permalink / raw)
  To: A.Bhuvaneswaran <bhuvansql@myrealbox.com>; +Cc: pgsql-admin

"A.Bhuvaneswaran" <bhuvansql@myrealbox.com> writes:
> I have run postmaster with -l option. When postmaster is running, i have
> removed the logfile accidentally.

You mean the -l logfile (postmaster's stderr)?  This is harmless except
that you won't have any way to look at the logfile.

> I am unable to restart postmaster now due to various other reasons.

The only way to start seeing the entries again is to restart the
postmaster, so I'd counsel doing that as soon as feasible.

What's actually happened is that the logfile is still on your disk (and
growing all the time...) but there is no link left to it in your
filesystem.  The kernel knows the file is still referenced by the open
filetable entry held by the postmaster, so it won't delete the file till
the postmaster quits.  But you have no way to get at it.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2003-05-21 14:25 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-05-21 05:34 Logfile removal A.Bhuvaneswaran <bhuvansql@myrealbox.com>
2003-05-21 11:08 ` Andrew Sullivan <andrew@libertyrms.info>
2003-05-21 14:25 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox