Skip site navigation (1) Skip section navigation (2)

Re: BUG #1224: Restarting postgres appends extra -D argument

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: David Maggard <drm31415(at)charter(dot)net>,Bugs for PostgreSQL <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #1224: Restarting postgres appends extra -D argument
Date: 2004-08-28 22:03:37
Message-ID: 200408282203.i7SM3ba17314@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Bruce Momjian wrote:
> 
> I can confirm this bug report now.  I see it happens with:
> 
> 	pg_ctl -D /u/pg/data restart
> 
> You have to use '-D' and 'restart' to cause -D to duplicate in
> postmaster.opts on every restart.  It should be fixed because excessive
> restarts could exceed the maximum command length, causing the server not
> to restart.
> 
> The problem was actually introduced here:
> 	
> 	revision 1.31
> 	date: 2003/02/14 22:18:25;  author: momjian;  state: Exp;  lines: +7 -4
> 	Propogate pg_ctl -D to the postmaster as a -D flag for identification by
> 	ps for multiple postmasters, for Kevin Brown.
> 
> It added -D to the command line so 'ps' showed it, rather than just
> passing it via PGDATA.  Of course on restart we should not be adding it
> again.
> 
> I am attaching a patch which fixes the problem by not adding the -D
> display addition when doing a restart.  It is not needed for restart
> because the -D comes from the postmaster.opts file.
> 
> We are packaging 7.4.5 now so I will wait to apply this after the
> release.

Patch applied.  It will appear in 7.4.6.

> Looking at 8.0 CVS, I see we are no longer adding the -D argument to
> postmaster start, meaning 'ps' will not display the -D to distinguish
> multiple postmasters.  Seems I should fix that too.

I have applied the following patch to propogate pg_ctl -D to the
postmaster command line.  This worked in 7.4.X and should continue
working in 8.0.

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

In response to

pgsql-bugs by date

Next:From: Bruce MomjianDate: 2004-08-28 22:55:11
Subject: Re: [PATCHES] BUG #1219: pgxs does not work fully
Previous:From: BrianDate: 2004-08-28 21:35:46
Subject: Update with join ignores where clause - updates all rows

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group