Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gJ2BO-0000ZK-Sc for pgsql-general@arkaria.postgresql.org; Sat, 03 Nov 2018 20:06:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gJ2BM-0000NY-QB for pgsql-general@arkaria.postgresql.org; Sat, 03 Nov 2018 20:06:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gJ2BM-0000Ms-Fy for pgsql-general@lists.postgresql.org; Sat, 03 Nov 2018 20:06:08 +0000 Received: from mail-ot1-x336.google.com ([2607:f8b0:4864:20::336]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gJ2BK-0007sG-Ef for pgsql-general@lists.postgresql.org; Sat, 03 Nov 2018 20:06:08 +0000 Received: by mail-ot1-x336.google.com with SMTP id g10so4605632otl.12 for ; Sat, 03 Nov 2018 13:06:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=6lY+WWAhSbU9Uwr/GuAugcJc6Znt5WrZErKnVzkvb0s=; b=G5oS4RLFMg/sjDbOKaVlCp0mm4qnb/hFXG7YTZhZLKnNs2t1mmm5Z2FMiyfu1usu3y JD0IN1oI81+jUxmFF/xjBo1SqMkWqB5x2GaiqTZNeCKarChQFHhG34zw1ln1ge/x7lBS qsdiEAPeW/tIvJPFu3UefPfWR9+obfJISgOVn3f37X70CoDOzXC7uqmmg5uh5xyIQSxW oc8of8J2gZ+jWuvRMIV3rfjKHGTqmMwq7ZP475ynyEKTq00I0fIbD6EyYNC1Rkl4XDWA blBPPmXWYjvDLEqJ9DAcbJTPKoG1fIJi5GFhxVN285UmwTnU6o1x/uotIlrU1ynz3kPp tEQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=6lY+WWAhSbU9Uwr/GuAugcJc6Znt5WrZErKnVzkvb0s=; b=e/Bg0q7Nom2jK4YR5rzyeE5HaPhf1qCCutvZyTq/336fcbHBma6ppBvTlP4gFgXnRt EEaeb67Fby9U0rFmFCHX9Lvsf14Cvv4hwpkH6YylcZU33N+70s2oc3t71OHWxn67fr/S r7djxg5vOllJZPALwzY9WlzxvTiywJz6ok64o8c6o0dLhJ4Ux8nxUMOi/Ir9PGtrnfac 9BnHVwnVBQuB+QiKjukB5Z78nlLy4EsofbhWxV+ucLeM9ngjIAlcZ5ZY20JOabpedUey mNRFqScl72RgPqT5KweUZIETeCEdiD+fER2igV6YBB6ICbKxwKdd7mVMeXIAbHXB2bhi OZdg== X-Gm-Message-State: AGRZ1gLGB4Ad+bNhe7qVKjrftKBn2av3S22n/DV1ZmTgtimkeVF/vEpd CyAvolfHemfwmkTU9juxV0AGDWCN X-Google-Smtp-Source: AJdET5fRv3GuashnKCi3dlNccexPXUHS4vCCWV0TsIy4x/frZiY5br3blfifMr4xQ9Udgk/oK4vkyA== X-Received: by 2002:a9d:14e:: with SMTP id 72mr10401758otu.54.1541275564450; Sat, 03 Nov 2018 13:06:04 -0700 (PDT) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id 2-v6sm9000889oig.17.2018.11.03.13.06.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Nov 2018 13:06:03 -0700 (PDT) Subject: Re: backend crash on DELETE, reproducible locally To: pgsql-general@lists.postgresql.org References: <20181101160007.GJ2954@hermes.hilbert.loc> <20181101152723.zq2dtcgntmcmr4br@alvherre.pgsql> <18072.1541087036@sss.pgh.pa.us> <32192.1541217418@sss.pgh.pa.us> <4kp.XAMr.3k5V4ORoB1t.1RtVIt@seznam.cz> From: Ron Message-ID: Date: Sat, 3 Nov 2018 15:06:02 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <4kp.XAMr.3k5V4ORoB1t.1RtVIt@seznam.cz> Content-Type: multipart/alternative; boundary="------------E5C29B0472EF72867B9286B9" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------E5C29B0472EF72867B9286B9 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 11/03/2018 02:19 PM, obouda@email.cz wrote: > Hello, > > we reached the exactly same problem after upgrading to PostgreSQL 11 - the > server crashed on a DELETE statement with a trigger.We also observed an > AFTER DELETE trigger receiving NULL values in OLD. Now I see the problem > seems to be solved (theoretically). Unfortunately, we are not able to > build the server with the patch, so we cannot confirm that. However, when > we just copied the database (within the same server), the same DELETE > executed on the copy with no problems. > > I would like to ask, however: could the same problemarise from an UPDATE > statement (also on a table with an AFTER trigger), or would that be > another bug (technical details below)? > As the bug causes our production servers segfault several times a day, > we'd like to solve the problem as soon as possible. Do I understand it > correctly that if we dump and restore the database, the bug should not > occur (until the next ALTER TABLE ADD COLUMN - which we'll avoid until the > patch is released)? You can dump that single table, truncate the table (presuming no FKs) and then restore it. -- Angular momentum makes the world go 'round. --------------E5C29B0472EF72867B9286B9 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit On 11/03/2018 02:19 PM, obouda@email.cz wrote:
Hello,

we reached the exactly same problem after upgrading to PostgreSQL 11 - the server crashed on a DELETE statement with a trigger. We also observed an AFTER DELETE trigger receiving NULL values in OLD. Now I see the problem seems to be solved (theoretically). Unfortunately, we are not able to build the server with the patch, so we cannot confirm that. However, when we just copied the database (within the same server), the same DELETE executed on the copy with no problems.

I would like to ask, however: could the same problem arise from an UPDATE statement (also on a table with an AFTER trigger), or would that be another bug (technical details below)?
As the bug causes our production servers segfault several times a day, we'd like to solve the problem as soon as possible. Do I understand it correctly that if we dump and restore the database, the bug should not occur (until the next ALTER TABLE ADD COLUMN - which we'll avoid until the patch is released)?

You can dump that single table, truncate the table (presuming no FKs) and then restore it.

--
Angular momentum makes the world go 'round.
--------------E5C29B0472EF72867B9286B9--