Re: [HACKERS] Weaker shmem interlock w/o postmaster.pid

From: Noah Misch <noah(at)leadboat(dot)com>
To: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Weaker shmem interlock w/o postmaster.pid
Date: 2018-12-03 00:41:06
Message-ID: 20181203004106.GA2860387@rfd.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 29, 2018 at 10:51:40PM -0800, Noah Misch wrote:
> On Thu, Nov 29, 2018 at 01:10:57PM +0100, Dmitry Dolgov wrote:
> > As a side note, with this patch recovery tests are failing now on 016_shm.pl
> >
> > # Failed test 'detected live backend via shared memory'
> > # at t/016_shm.pl line 87.
> > # '2018-11-28 13:08:08.504 UTC [21924] LOG:
> > listening on Unix socket "/tmp/yV2oDNcG8e/gnat/.s.PGSQL.512"
> > # 2018-11-28 13:08:08.512 UTC [21925] LOG: database system was
> > interrupted; last known up at 2018-11-28 13:08:08 UTC
> > # 2018-11-28 13:08:08.512 UTC [21925] LOG: database system was not
> > properly shut down; automatic recovery in progress
> > # 2018-11-28 13:08:08.512 UTC [21925] LOG: invalid record length at
> > 0/165FEF8: wanted 24, got 0
> > # 2018-11-28 13:08:08.512 UTC [21925] LOG: redo is not required
> > # 2018-11-28 13:08:08.516 UTC [21924] LOG: database system is ready
> > to accept connections
> > # '
> > # doesn't match '(?^:pre-existing shared memory block)'
>
> Thanks for the report. Since commit cfdf4dc made pg_sleep() react to
> postmaster death, the test will need a different way to stall a backend. This
> doesn't affect non-test code, and the test still passes against cfdf4dc^ and
> against REL_11_STABLE. I've queued a task to update the test code, but review
> can proceed in parallel.

Here's a version fixing that test for post-cfdf4dc backends.

Attachment Content-Type Size
ipcrm-hint-v1.patch text/plain 816 bytes
PGSharedMemoryCreate-safety-v2.patch text/plain 34.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-12-03 00:41:43 Re: Commitfest 2018-11
Previous Message Michael Paquier 2018-12-03 00:38:32 Re: Add extension options to control TAP and isolation tests