Re: Parallel safety of CURRENT_* family - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Parallel safety of CURRENT_* family
Date
Msg-id 14911.1480627621@sss.pgh.pa.us
Whole thread Raw
In response to Re: Parallel safety of CURRENT_* family  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Parallel safety of CURRENT_* family  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Dec 1, 2016 at 3:46 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> but it doesn't:
>> 
>> regression=# select distinct transaction_timestamp() from tenk1;
>> transaction_timestamp
>> -------------------------------
>> 2016-12-01 15:44:12.839417-05
>> (1 row)
>> 
>> How is that happening?

> Because the table is so small, the leader probably finishes running
> the whole plan before the workers finish starting up.

Good try, but EXPLAIN ANALYZE says that the workers are processing
some of the rows.  Also, I see the same behavior with a much larger
test table.

> You can see the problem like this, though:

Yeah, I didn't have any doubt that it was real.  Still don't know
why my test case isn't doing what I expected, though.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Wrong order of tests in findDependentObjects()
Next
From: Tom Lane
Date:
Subject: Re: Mail thread references in commits