Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1os0BG-00024l-P0 for pgsql-general@arkaria.postgresql.org; Mon, 07 Nov 2022 11:20:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1os0AH-0000oK-Gd for pgsql-general@arkaria.postgresql.org; Mon, 07 Nov 2022 11:19:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1os0AG-0000o0-Us for pgsql-general@lists.postgresql.org; Mon, 07 Nov 2022 11:19:41 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1os0AE-0000z1-Mu for pgsql-general@postgresql.org; Mon, 07 Nov 2022 11:19:40 +0000 Received: by mail-ej1-x62d.google.com with SMTP id d26so29101760eje.10 for ; Mon, 07 Nov 2022 03:19:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=dcJgKhQT/4ruiEfuG+mPxGWTZrU+fHxohXP/4UAkhUk=; b=z1rS0FyZNpS0xIxxxm4+KQZ9YgaCwPuF5XspEQWNAM0dwDPS/oPIMkqrs+1gaXmlf5 31aqXzjZ7QsZrBK3DKu4O5QznHW8ZjM7TxDoF4ol6fPNZRz1Y4TToIUNrLUvIaiXG7An aDlmr//DUvysNn2NwtTatUECKRryChptpX24Qc0Y+kVR2MedPwqXW+9CG0ImXFlJu+fq PP5Ht5yFUwHkNJyhMnSsIKVn1fHTszp5Y/eQlbZyAL5qfBuYXDISB5qGEyR/Zp+OPVE9 4csjx9oIcFb590LLhEF9y65Gq3ozCdpFuU7RUWSNSyCUbEWQWFsY2VsSYGoyd/gv1dY0 ERDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=dcJgKhQT/4ruiEfuG+mPxGWTZrU+fHxohXP/4UAkhUk=; b=BngkxUYMHAoFPAwnngS00s4UtxjP4djBYhFe6CY9R74B2i//nj7yWrv53HCxWmuMst V27RFYSJFzSsLkb8dD21imtnwsDroQn2VibxndiYSU4LdfqZsmkKnrKNdd3ECVRLx3Zc DEtT+6CDm0VOoOmFK8DZjlhy6p14PEmFjSF4RCK9kwlTQRwikDtG9HRDWqRdgu1NNl7G 1hkc0gBUf/zRIcmaB1kU5GEnOQgTKuZPfF3/OIEQBmC4OjBpc/SEx1IaUv1iScLwK2aX G9vEOj2sHYu2HGEYYju4qb9xgWRyomokF9G4Sq0g3TN5m/qxZub9QxHsa6GyKGqHzRiP vmjg== X-Gm-Message-State: ACrzQf0QzVsOhzDgq5j9UOJMudCzhRyliuScWk/iZ3s8R/S+I/mV8wgg JIYxVWHb8kKzQaOJZVIMrtMtLOWy1UixJQ== X-Google-Smtp-Source: AMsMyM7jbtR3/eYlrPVQ2VufN2dBeCgL09N4VkWmc50ijF2ZpVmlPmTCp9xjuyVFIWqozVBU5yZrwQ== X-Received: by 2002:a17:906:9bc4:b0:7aa:9184:d95d with SMTP id de4-20020a1709069bc400b007aa9184d95dmr47424501ejc.349.1667819976593; Mon, 07 Nov 2022 03:19:36 -0800 (PST) Received: from localhost.localdomain ([2001:871:5e:e963:e936:a2ab:de92:e13c]) by smtp.gmail.com with ESMTPSA id fq32-20020a1709069da000b0078de26f66b9sm3250806ejc.114.2022.11.07.03.19.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 03:19:36 -0800 (PST) Message-ID: <0fb331d6fa4743a89070e092c62020ffee3020a5.camel@cybertec.at> Subject: Re: server process (PID 2964738) was terminated by signal 11: Segmentation fault From: Laurenz Albe To: Stefan Froehlich , pgsql-general@postgresql.org Date: Mon, 07 Nov 2022 12:19:35 +0100 In-Reply-To: <20221107101716.GA20949@static.231.150.9.176.clients.your-server.de> References: <20221106111820.GA26442@static.231.150.9.176.clients.your-server.de> <3007238.1667743988@sss.pgh.pa.us> <20221106143544.GA4940@static.231.150.9.176.clients.your-server.de> <3010779.1667746112@sss.pgh.pa.us> <20221107101716.GA20949@static.231.150.9.176.clients.your-server.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2022-11-07 at 11:17 +0100, Stefan Froehlich wrote: > On Sun, Nov 06, 2022 at 09:48:32AM -0500, Tom Lane wrote: > > Stefan Froehlich writes: > > > > # create extension amcheck; > > > > # select oid, relname from pg_class where relname ='faultytablename_pkey'; > > > > [returns oid 537203] > > > > # select bt_index_check(537203, true); > > > > server closed the connection unexpectedly > > > Another idea is to try using contrib/pageinspect to examine each > > page of the table.  Its output is just gobbledegook to most > > people, but there's a good chance it'd fail visibly on the > > corrupted page(s). > > Fortunately I was able to identify a window of 100 records (out of > 25 mio.) containing all the errors. After deleting and re-inserting > those records everything seems to be ok (at least, pg_dump and > "reindex database" work without errors). Don't continue to work with that cluster even if everything seems OK now. "pg_dumpall" and restore to a new cluster on good hardware. > I suspect a bad RAM module to be the root of the problems. We'll > see. > > Side question: If it is possible to simply delete and create such > records is it necessary that the server *core* *dumps*? There could > be a switch adding additional safety (at the cost of performance) > which would make troubleshooting not only much faster but > non-invasive for the other databases on the same server as well. Crashing is never nice. On the other hand, adding checks and error messages for conditions that are always true in a correct block cost performance. I can't tell about your specific case, but a build of PostgreSQL --enable-cassert has assitional checks in the code. That will still crash, but the log will show what condition was violated. Yours, Laurenz Albe