pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Don't use bgw_main even to specify in-core bgworker entrypoints.
Date: Sat, 01 Apr 2017 00:52:54 +0000
Message-ID: <E1cu7Hi-0001UA-5O@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Don't use bgw_main even to specify in-core bgworker entrypoints.

On EXEC_BACKEND builds, this can fail if ASLR is in use.

Backpatch to 9.5.  On master, completely remove the bgw_main field
completely, since there is no situation in which it is safe for an
EXEC_BACKEND build.  On 9.6 and 9.5, leave the field intact to avoid
breaking things for third-party code that doesn't care about working
under EXEC_BACKEND.  Prior to 9.5, there are no in-core bgworker
entrypoints.

Petr Jelinek, reviewed by me.

Discussion: http://postgr.es/m/09d8ad33-4287-a09b-a77f-77f8761adb5e@2ndquadrant.com

Branch
------
REL9_6_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/9b6e8d8f86acde571d967f85c8b8ae695a3ddba8

Modified Files
--------------
src/backend/access/transam/parallel.c    |  7 +--
src/backend/postmaster/bgworker.c        | 76 ++++++++++++++++++++++++++------
src/include/access/parallel.h            |  2 +
src/test/modules/worker_spi/worker_spi.c |  6 ++-
4 files changed, 73 insertions(+), 18 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (3+ messages)  latest in thread

Message-ID: <E1cu7Hi-0001UA-5O@gemulon.postgresql.org>
Permalink:  ../E1cu7Hi-0001UA-5O@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1cu7Hi-0001UA-5O@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: rhaas@postgresql.org
  Subject: Re: pgsql: Don't use bgw_main even to specify in-core bgworker entrypoints.
  In-Reply-To: <E1cu7Hi-0001UA-5O@gemulon.postgresql.org>
  References: <E1cu7Hi-0001UA-5O@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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