pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Marko Tiikkaja <marko@joh.to>
Cc: Andres Freund <andres@anarazel.de>
Cc: Andrew Fletcher <andy@prestigedigital.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #15324: Non-deterministic behaviour from parallelised sub-query
Date: Mon, 20 Aug 2018 09:29:26 -0400
Message-ID: <19350.1534771766@sss.pgh.pa.us> (raw)
In-Reply-To: <CAA4eK1JBc67MjYjo2EXwNiyUuoFqwcR4zeSyGt6zS2F0MpJABA@mail.gmail.com>
References: <CAL9smLBPZJOUWjHKgZOQaDO5FK+AkkX61BT06mpSfiNz4wdtgw@mail.gmail.com>
	<21038.1534181205@sss.pgh.pa.us>
	<CAA4eK1+1yszJgG3WBnMrRAEsBymH871c3O8UQtq3iif=siOc0g@mail.gmail.com>
	<CAL9smLAnfPJCDUUG4ckX2iznj53V7VSMsYefzZieN93YxTNOcw@mail.gmail.com>
	<CAA4eK1J-_LxN5hc6ikh=vZ4vr6Yt6eFM57gMHkFzBCRTo791Bg@mail.gmail.com>
	<CAL9smLDj9Nwm0yzShEGjfNfkNc+NzCHmHwNXFOkwp74Oj3r84g@mail.gmail.com>
	<CAA4eK1LUQX0HR_9TieA0DYpYcWFjGT-CPJ9E+HV4OnzusFY8VQ@mail.gmail.com>
	<CAL9smLD+d+Bi1tvA8og5J+ZrW2E-yuyL1w4k2CdX3Fxb-vWDOQ@mail.gmail.com>
	<390.1534261450@sss.pgh.pa.us>
	<CAA4eK1+6U0fOLMdMMk-iMC-6RSM+70p-9YqCVnWTEBH=V73Agg@mail.gmail.com>
	<20180815111006.GB3326@tamriel.snowman.net>
	<CAA4eK1JqimRvJt5=nuukG+hXGA0P2tD=D0ewYrO4u0ig_TTacg@mail.gmail.com>
	<CAA4eK1JyvN1dnBRJeor6LT2sjcjoyq8eb0N6pZ2fOZRrdZe3ow@mail.gmail.com>
	<CAA4eK1JBc67MjYjo2EXwNiyUuoFqwcR4zeSyGt6zS2F0MpJABA@mail.gmail.com>

Amit Kapila <amit.kapila16@gmail.com> writes:
> On Mon, Aug 20, 2018 at 4:20 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>> On Thu, Aug 16, 2018 at 9:25 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> On Wed, Aug 15, 2018 at 4:40 PM, Stephen Frost <sfrost@snowman.net> wrote:
>>> (b) Consider the presence of any window function calculation as
>>> parallel-restricted operation.

>> For this, we need to mark all the window functions like row_number,
>> rank, dense_rank, etc as parallel-restricted.   Additionally, we also
>> need to detect the presence of aggregate functions that act as window
>> functions (when an OVER clause follows the call).   Attached patch
>> treat_window_func_calc_parallel_restricted_v1 implements the fix.

> As this patch changes the catalog contents, we need to bump catalog
> version number.  However, I have left it for later once we get a
> review and or testing of the patch.

Sounds to me like you're using the wrong approach.  I would just consider
any Agg or WindowFunc node as parallel-restricted regardless of the
function it references.

			regards, tom lane




view thread (38+ messages)  latest in thread

Message-ID: <19350.1534771766@sss.pgh.pa.us>
Permalink:  ../19350.1534771766@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19350.1534771766@sss.pgh.pa.us

 · 

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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, amit.kapila16@gmail.com, sfrost@snowman.net, marko@joh.to, andres@anarazel.de, andy@prestigedigital.com
  Subject: Re: BUG #15324: Non-deterministic behaviour from parallelised sub-query
  In-Reply-To: <19350.1534771766@sss.pgh.pa.us>
  References: <CAL9smLBPZJOUWjHKgZOQaDO5FK+AkkX61BT06mpSfiNz4wdtgw@mail.gmail.com> <21038.1534181205@sss.pgh.pa.us> <CAA4eK1+1yszJgG3WBnMrRAEsBymH871c3O8UQtq3iif=siOc0g@mail.gmail.com> <CAL9smLAnfPJCDUUG4ckX2iznj53V7VSMsYefzZieN93YxTNOcw@mail.gmail.com> <CAA4eK1J-_LxN5hc6ikh=vZ4vr6Yt6eFM57gMHkFzBCRTo791Bg@mail.gmail.com> <CAL9smLDj9Nwm0yzShEGjfNfkNc+NzCHmHwNXFOkwp74Oj3r84g@mail.gmail.com> <CAA4eK1LUQX0HR_9TieA0DYpYcWFjGT-CPJ9E+HV4OnzusFY8VQ@mail.gmail.com> <CAL9smLD+d+Bi1tvA8og5J+ZrW2E-yuyL1w4k2CdX3Fxb-vWDOQ@mail.gmail.com> <390.1534261450@sss.pgh.pa.us> <CAA4eK1+6U0fOLMdMMk-iMC-6RSM+70p-9YqCVnWTEBH=V73Agg@mail.gmail.com> <20180815111006.GB3326@tamriel.snowman.net> <CAA4eK1JqimRvJt5=nuukG+hXGA0P2tD=D0ewYrO4u0ig_TTacg@mail.gmail.com> <CAA4eK1JyvN1dnBRJeor6LT2sjcjoyq8eb0N6pZ2fOZRrdZe3ow@mail.gmail.com> <CAA4eK1JBc67MjYjo2EXwNiyUuoFqwcR4zeSyGt6zS2F0MpJABA@mail.gmail.com> <19350.1534771766@sss.pgh.pa.us>

* 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