Re: BUG #15460: Error while creating index or constraint - Mailing list pgsql-bugs

From Peter Geoghegan
Subject Re: BUG #15460: Error while creating index or constraint
Date
Msg-id CAH2-WzkrO994qdNP9Ai8G16eRNa_UQswzg4=7PdqYEPeJKYruA@mail.gmail.com
Whole thread Raw
In response to Re: BUG #15460: Error while creating index or constraint  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #15460: Error while creating index or constraint
List pgsql-bugs
On Mon, Oct 29, 2018 at 4:51 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> "performsort of -1"?  Seems a bit suspicious.
>
> > This just refers to the leader Tuplesortstate. It isn't suspicious.
> > We follow the convention that worker -1 is the leader within
> > tuplesort.c.
>
> Hmm.  But the sort of "0" has already completed, according to the first
> couple of log lines I quoted.  Why is something still trying to access
> it?  Why is a worker trying to do anything at all with the leader's
> Tuplesortstate?

This is almost certainly because the parallel infrastructure generally
doesn't guarantee that log output will be in order. Even if something
bizarre took place with the temporary files, there is no way that the
worker number in trace_sort would change within a worker. It's an
immutable field within Tuplesortstate, initialized once.

> > trace_sort is a developer option, so this seems fine to me.
>
> That's a poor excuse for ignoring the message style guidelines.
> There are many reasons why even experts could get confused trying
> to follow badly-written messages.

I'll change the trace_sort messages to refer to "worker n" -- that
should bring the trace_sort output in line with our style guidelines.

-- 
Peter Geoghegan


pgsql-bugs by date:

Previous
From: Ádám Maracska
Date:
Subject: Exception is thrown with message: SSL SYSCALL error: No error(0x00000000/0) in case of connection lost
Next
From: Tom Lane
Date:
Subject: Re: BUG #15460: Error while creating index or constraint