pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Mark more functions parallel-restricted or parallel-unsafe.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Mark more functions parallel-restricted or parallel-unsafe.
@ 2015-10-16 15:51  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Robert Haas @ 2015-10-16 15:51 UTC (permalink / raw)
  To: pgsql-committers

Mark more functions parallel-restricted or parallel-unsafe.

Commit 7aea8e4f2daa4b39ca9d1309a0c4aadb0f7ed81b was overoptimistic
about the degree of safety associated with running various functions
in parallel mode.  Functions that take a table name or OID as an
argument are at least parallel-restricted, because the table might be
temporary, and we currently don't allow parallel workers to touch
temporary tables.  Functions that take a query as an argument are
outright unsafe, because the query could be anything, including a
parallel-unsafe query.

Also, the queue of pending notifications is backend-private, so adding
to it from a worker doesn't behave correctly.  We could fix this by
transferring the worker's queue of pending notifications to the master
during worker cleanup, but that seems like more trouble than it's
worth for now.  In addition to adjusting the pg_proc.h markings, also
add an explicit check for this in async.c.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/816e336f12ecabdc834d4cc31bcf966b2dd323dc

Modified Files
--------------
src/backend/commands/async.c     |    3 +++
src/include/catalog/catversion.h |    2 +-
src/include/catalog/pg_proc.h    |   40 +++++++++++++++++++-------------------
3 files changed, 24 insertions(+), 21 deletions(-)


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


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Mark more functions parallel-restricted.
@ 2017-03-29 15:04  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Robert Haas @ 2017-03-29 15:04 UTC (permalink / raw)
  To: pgsql-committers

Mark more functions parallel-restricted.

Commit 61c2e1a95f94bb904953a6281ce17a18ac38ee6d allowed parallel
query to be used in more places, revealing via buildfarm member
mandrill that several functions intended to be called from triggers
were incorrectly marked parallel-safe rather than parallel-restricted.

Report by Tom Lane.  Patch by Rafia Sabih.  Reviewed by me.

Discussion: http://postgr.es/m/16061.1490479253@sss.pgh.pa.us

Branch
------
master

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

Modified Files
--------------
src/include/catalog/catversion.h |  2 +-
src/include/catalog/pg_proc.h    | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)


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


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2017-03-29 15:04 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-10-16 15:51 pgsql: Mark more functions parallel-restricted or parallel-unsafe. Robert Haas <rhaas@postgresql.org>
2017-03-29 15:04 pgsql: Mark more functions parallel-restricted. Robert Haas <rhaas@postgresql.org>

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