Re: Funny hang on PostgreSQL 10 during parallel index scan on slave

2018-09-06 Thread Chris Travers
As a status note, the above patch has not been run through pg_indent and while I have run make check-world on linux (passed) and a non-Linux system (which failed both with and without my patch) I will be making one more small revision before final submission unless anyone thinks I need to change ap

Re: Funny hang on PostgreSQL 10 during parallel index scan on slave

2018-09-06 Thread Chris Travers
On Thu, Sep 6, 2018 at 1:31 PM Chris Travers wrote: > > > On Thu, Sep 6, 2018 at 11:08 AM Chris Travers > wrote: > >> Ok, so here's my current patch (work in progress). I have not run tests >> yet, and finding a way to add a test case is virtually impossible though I >> expect we will find ways

Re: Funny hang on PostgreSQL 10 during parallel index scan on slave

2018-09-06 Thread Chris Travers
On Thu, Sep 6, 2018 at 11:08 AM Chris Travers wrote: > Ok, so here's my current patch (work in progress). I have not run tests > yet, and finding a way to add a test case is virtually impossible though I > expect we will find ways of using gdb to confirm local fix later. > > After careful code r

Re: Funny hang on PostgreSQL 10 during parallel index scan on slave

2018-09-06 Thread Chris Travers
Ok, so here's my current patch (work in progress). I have not run tests yet, and finding a way to add a test case is virtually impossible though I expect we will find ways of using gdb to confirm local fix later. After careful code review, I settled on the following approach which seemed to be th

Re: Funny hang on PostgreSQL 10 during parallel index scan on slave

2018-09-05 Thread Thomas Munro
On Wed, Sep 5, 2018 at 10:13 AM Chris Travers wrote: > On Wed, Sep 5, 2018 at 6:55 PM Andres Freund wrote: >> > On Wed, Sep 5, 2018 at 6:40 PM Chris Travers >> > wrote: >> > >> Do you mean this loop in dsm_impl_posix_resize() is getting >> > >> interrupted constantly and never completing? >> > >

Re: Funny hang on PostgreSQL 10 during parallel index scan on slave

2018-09-05 Thread Chris Travers
On Wed, Sep 5, 2018 at 6:55 PM Andres Freund wrote: > Hi, > > On 2018-09-05 18:48:44 +0200, Chris Travers wrote: > > Will submit a patch here shortly. Thanks! Should we do for master and > > 10? Or 9.6 too? > > Please don't top-post on this list. This needs to be done in all > branches where

Re: Funny hang on PostgreSQL 10 during parallel index scan on slave

2018-09-05 Thread Andres Freund
Hi, On 2018-09-05 18:48:44 +0200, Chris Travers wrote: > Will submit a patch here shortly. Thanks! Should we do for master and > 10? Or 9.6 too? Please don't top-post on this list. This needs to be done in all branches where the posix_fallocate call is present. > > Yep, Maybe we should chec

Re: Funny hang on PostgreSQL 10 during parallel index scan on slave

2018-09-05 Thread Thomas Munro
On Wed, Sep 5, 2018 at 9:49 AM Chris Travers wrote: > > Will submit a patch here shortly. Thanks! Should we do for master and 10? > Or 9.6 too? > > On Wed, Sep 5, 2018 at 6:40 PM Chris Travers wrote: >> >> Yep, Maybe we should check for signals there. Yeah, it seems reasonable to check for

Re: Funny hang on PostgreSQL 10 during parallel index scan on slave

2018-09-05 Thread Chris Travers
Will submit a patch here shortly. Thanks! Should we do for master and 10? Or 9.6 too? On Wed, Sep 5, 2018 at 6:40 PM Chris Travers wrote: > Yep, Maybe we should check for signals there. > > On Wed, Sep 5, 2018 at 5:27 PM Thomas Munro > wrote: > >> On Wed, Sep 5, 2018 at 8:23 AM Chris Traver

Re: Funny hang on PostgreSQL 10 during parallel index scan on slave

2018-09-05 Thread Chris Travers
Yep, Maybe we should check for signals there. On Wed, Sep 5, 2018 at 5:27 PM Thomas Munro wrote: > On Wed, Sep 5, 2018 at 8:23 AM Chris Travers > wrote: > > 1. The query is in a parallel index scan or similar > > 2. A process is executing a parallel plan and allocating a significant > chunk

Re: Funny hang on PostgreSQL 10 during parallel index scan on slave

2018-09-05 Thread Thomas Munro
On Wed, Sep 5, 2018 at 8:23 AM Chris Travers wrote: > 1. The query is in a parallel index scan or similar > 2. A process is executing a parallel plan and allocating a significant chunk > of memory (2MB for example) in dynamic shared memory. > 3. The startup process goes into a loop where it se