Re: Fwd: Default pg_autovacuum config glitches

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: 225680(at)bugs(dot)debian(dot)org, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Fwd: Default pg_autovacuum config glitches
Date: 2004-03-26 20:56:42
Message-ID: 20040326205642.GG20194@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Mar 25, 2004 at 16:08:49 +0100,
Martin Pitt <martin(at)piware(dot)de> wrote:
> Hi PostgreSQL hackers!
>
> A while ago we received the bug report below against pg_autovacuum.
> Since it runs as a daemon, it should detach from its controlling
> terminal by executing sth like
>
> int nullfd = open("/dev/null", O_RDWR);
> dup2(nullfd, 0);
> dup2(nullfd, 1);
> dup2(nullfd, 2);
> if (nullfd != 0 && nullfd != 1 && nullfd != 2)
> close(nullfd);
>
> (taken from syslog-ng which does it properly).

That doesn't look like a good idea. This will prevent any logging to
stdout or stderr.

If you don't want that ability you can redirect the stdin, stdout and
stderr yourself.

>
> Can you do that in the next release?
>
> Thanks in advance and have a nice day!
>
> Martin
>
> ----- Forwarded message from sacrificial-spam-address(at)horizon(dot)com -----
>
> Date: 31 Dec 2003 15:02:22 -0000
> From: sacrificial-spam-address(at)horizon(dot)com
> To: submit(at)bugs(dot)debian(dot)org
> Subject: Default pg_autovacuum config glitches
> X-Spam-Status: No, hits=-3.8 required=4.0 tests=HAS_PACKAGE,NO_REAL_NAME
> autolearn=no
> version=2.60-master.debian.org_2003_11_25-bugs.debian.org_2003_12_29
>
> Package: postgresql
> Version: 7.4.1-1
>
> When /etc/init.d/postgresql is run, pg_autovacuum maintains connections
> to the startup tty on fds 0, 1 and 2. When run from the console (as part
> of (apt-get upgrade), this caused some hiccups to a following getty.
>
> In any case, it's considered bad behaviour on the part of a long-running
> daemon.
>
> (If you feel this is pg_autovacuum's fault rather than the init script's,
> please reassign to postgresql-contrib.)
>
> Thanks!
>
> ----- End forwarded message -----
>
> --
> Martin Pitt Debian GNU/Linux Developer
> martin(at)piware(dot)de mpitt(at)debian(dot)org
> http://www.piware.de http://www.debian.org

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Matthew T. O'Connor 2004-03-27 03:26:55 Re: Fwd: Default pg_autovacuum config glitches
Previous Message Bruno Wolff III 2004-03-26 20:53:17 Re: Fwd: Infinite recursion in function causes DoS