pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Finnerty <jfinnert@amazon.com>
To: pgsql-general@postgresql.org
Subject: Re: Whan is it safe to mark a function PARALLEL SAFE?
Date: Mon, 9 Sep 2019 05:42:41 -0700 (MST)
Message-ID: <1568032961628-0.post@n3.nabble.com> (raw)
In-Reply-To: <CAH2-WzmO2xg1G80HnBQjZ-YquowQxDR=dXLRynExdgLu3bfxTg@mail.gmail.com>
References: <1567906652523-0.post@n3.nabble.com>
	<24375.1567970828@sss.pgh.pa.us>
	<CAH2-WzmO2xg1G80HnBQjZ-YquowQxDR=dXLRynExdgLu3bfxTg@mail.gmail.com>

The scenario is a STABLE function that calls out to an AWS service that
charges micro pennies per row, so periodically inserting
CHECK_FOR_INTERRUPTS() should be able to prevent charges from accumulating
for a  statement that has already failed in another parallel worker.

I think it's safe to declare such functions as PARALLEL SAFE.  Thank you!



-----
Jim Finnerty, AWS, Amazon Aurora PostgreSQL
--
Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html





view thread (4+ messages)

Message-ID: <1568032961628-0.post@n3.nabble.com>
Permalink:  ../1568032961628-0.post@n3.nabble.com/
Also on:    postgresql.org/message-id/1568032961628-0.post@n3.nabble.com

 · 

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-general@postgresql.org
  Cc: jfinnert@amazon.com
  Subject: Re: Whan is it safe to mark a function PARALLEL SAFE?
  In-Reply-To: <1568032961628-0.post@n3.nabble.com>
  References: <1567906652523-0.post@n3.nabble.com> <24375.1567970828@sss.pgh.pa.us> <CAH2-WzmO2xg1G80HnBQjZ-YquowQxDR=dXLRynExdgLu3bfxTg@mail.gmail.com> <1568032961628-0.post@n3.nabble.com>

* 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