Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dz8MW-0007FS-Bh for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Oct 2017 21:34:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dz8MV-0005aA-Ug for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Oct 2017 21:34:51 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dz8MU-0005Z4-UT for pgsql-hackers@postgresql.org; Mon, 02 Oct 2017 21:34:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dz8MS-00050X-FX for pgsql-hackers@postgresql.org; Mon, 02 Oct 2017 21:34:49 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v92LYgA0000666; Mon, 2 Oct 2017 17:34:42 -0400 From: Tom Lane To: Andres Freund cc: Andreas Seltenreich , pgsql-hackers@postgresql.org, Alvaro Herrera , Michael Paquier Subject: Re: [sqlsmith] stuck spinlock in pg_stat_get_wal_receiver after OOM In-reply-to: <20171002213215.4e3iwt7oh5wdjqm2@alap3.anarazel.de> References: <87h8vhtgj2.fsf@ansel.ydns.eu> <20171002210805.x4lxxmarluen6rfg@alap3.anarazel.de> <459.1506979825@sss.pgh.pa.us> <20171002213215.4e3iwt7oh5wdjqm2@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 02 Oct 2017 14:32:15 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <664.1506980082.1@sss.pgh.pa.us> Date: Mon, 02 Oct 2017 17:34:42 -0400 Message-ID: <665.1506980082@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Andres Freund writes: > On 2017-10-02 17:30:25 -0400, Tom Lane wrote: >> Or replace the spinlock with an LWLock? > That'd probably be a good idea, but I'm loathe to do so in the back > branches. Not at this callsite, but some others, there's some potential > for contention. If this is the only problem then I'd agree we should stick to a spinlock (I assume the strings in question can't be very long). I was thinking more about what to do if we find other violations that are harder to fix. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers