Re: parallel mode and parallel contexts

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: parallel mode and parallel contexts
Date: 2015-01-12 19:38:36
Message-ID: CA+TgmoZmkwkDJo85KpPLaL1h4mcQtX_muj2OrXryQr_8SAb0eQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 7, 2015 at 3:54 PM, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> wrote:
> Agreed, I was more concerned with calls to nextval(), which don't seem to be
> prevented in parallel mode?

It looks prevented:

/*
* Forbid this during parallel operation because, to make it work,
* the cooperating backends would need to share the backend-local cached
* sequence information. Currently, we don't support that.
*/
PreventCommandIfParallelMode("nextval()");

> I was more thinking about all the add-on pl's like pl/ruby. But yeah, I
> don't see that there's much we can do if they're not using SPI.

Actually, there is: it's forbidden at the layer of heap_insert(),
heap_update(), heap_delete(). It's hard to imagine anyone trying to
modify the database as a lower level than that.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-01-12 20:03:50 Re: parallel mode and parallel contexts
Previous Message Dean Rasheed 2015-01-12 19:23:33 Re: INSERT ... ON CONFLICT UPDATE and RLS