Re: Autovacuum worker does not set stack_base_ptr - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Autovacuum worker does not set stack_base_ptr
Date
Msg-id CA+TgmoYq5vmsnE+cW4HtOaex1M3m6eOrucbyogbsW868EegzNA@mail.gmail.com
Whole thread Raw
In response to Autovacuum worker does not set stack_base_ptr  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
On Sun, Apr 1, 2012 at 12:31 PM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> Currently, only regular backends set the stack base pointer, for the
> check_stack_depth() mechanism, in PostgresMain. We don't have stack overrun
> protection in auxiliary processes. However, autovacuum workers at least can
> run arbitrary user code, and if that overruns the stack, you get a segfault.

The *Main functions for the various auxiliary processes seem to have a
bad case of cut-and-paste-itis.  Consolidating some of that logic
would help to avoid bugs of this type.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: new group commit behavior not helping?
Next
From: Robert Haas
Date:
Subject: Re: measuring lwlock-related latency spikes