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

From: Chris Travers <chris(dot)travers(at)adjust(dot)com>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Funny hang on PostgreSQL 10 during parallel index scan on slave
Date: 2018-09-06 13:30:39
Message-ID: CAN-RpxAu+C=HqBnk7=-vQ_h_Yq-Ni8CLC1a=SVVxQYq0zh-Yrw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 approaches.

Currently, all code paths that hit the resize call the relevant functions
with an ERROR elevel. So running CHECK_FOR_INTERRUPTS after the initial
cleanup is currently safe, but the surrounding function doesn't guarantee
safety so I don't think it is a good idea to raise exceptions there.

In above patch I test for whether the level is ERROR and check for
interrupts when that is true. However as a colleague pointed out to me, if
anyone ever calls this with FATAL or PANIC as the desired error level, that
would not be safe so I will be checking for whether the level is equal to
or greater than ERROR.

We will also go through a manual test using a debugger to try to test the
behavior in these cases and make sure the patch actually resolves our
problem.

Assuming no objections here and that the manual test works, you can expect
a formal submission in the next couple of days.

>
> --
> Best Regards,
> Chris Travers
> Head of Database
>
> Tel: +49 162 9037 210 | Skype: einhverfr | www.adjust.com
> Saarbrücker Straße 37a, 10405 Berlin
>
>

--
Best Regards,
Chris Travers
Head of Database

Tel: +49 162 9037 210 | Skype: einhverfr | www.adjust.com
Saarbrücker Straße 37a, 10405 Berlin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-09-06 13:38:03 Re: pgsql: Allow extensions to install built as well as unbuilt headers.
Previous Message Surafel Temesgen 2018-09-06 13:18:32 Re: Add --include-table-data-where option to pg_dump, to export only a subset of table data