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

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: chris(dot)travers(at)adjust(dot)com
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Funny hang on PostgreSQL 10 during parallel index scan on slave
Date: 2018-09-05 15:27:16
Message-ID: CAEepm=3NdsKbVqD9BNq3g0U5KeKX8_vqLQ8nfrGvxEco+CEWJA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 5, 2018 at 8:23 AM Chris Travers <chris(dot)travers(at)adjust(dot)com> 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 sends a sigusr1, sleeps 5m, and sends another sigusr1 etc.
> 4. The sigusr1 aborts the system call, which is then retried.
> 5. Because the system call takes more than 5ms, we end up in an endless loop

Do you mean this loop in dsm_impl_posix_resize() is getting
interrupted constantly and never completing?

/* We may get interrupted, if so just retry. */
do
{
rc = posix_fallocate(fd, 0, size);
} while (rc == EINTR);

--
Thomas Munro
http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-09-05 15:49:36 Re: Out arguments name of "pg_identify_object_as_address" function in 9.5.14 and 11beta3
Previous Message Bossart, Nathan 2018-09-05 15:24:21 Re: Add SKIP LOCKED to VACUUM and ANALYZE