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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Attachment Content-Type Size
unknown_filename text/plain 2.5 KB

In response to

Browse pgsql-bugs by date

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