Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1he0Zq-0003IG-2q for pgsql-bugs@arkaria.postgresql.org; Thu, 20 Jun 2019 17:10:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1he0Zp-0005nI-0q for pgsql-bugs@arkaria.postgresql.org; Thu, 20 Jun 2019 17:10:21 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1he0ZP-0001Hx-Lt for pgsql-bugs@lists.postgresql.org; Thu, 20 Jun 2019 17:09:55 +0000 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1he0ZM-0000yR-CJ for pgsql-bugs@lists.postgresql.org; Thu, 20 Jun 2019 17:09:54 +0000 Received: by mail-qt1-x843.google.com with SMTP id h21so3884310qtn.13 for ; Thu, 20 Jun 2019 10:09:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=4F6FQck9+5OotJCCoM5Iqc4nACNeLNa+KZETfF+1qz4=; b=jDsnR/RGpW/tloYfdr3XaF9OJGGVyAtlXc3/Iyi2YMOk58EE3SdCQxR7gwlPR01CPS xyPzbXXHBxSLPqAJPhwo7HmfLA/1Y3nMbv1/WOx7/rX3myr3XhM3x/EFD/HVCjS/cJWq t7mDYVFc2yYwGrva/sU+EfaEpOC78MFA/6xGAlqvAJyMSvMZXH0KDQypqHLg+6ca2q9F yGHANCddLcJsB+39y4YATIKv+1Y/lYMLqZfw3mpFF+3/VnlE2dADYi6ayIUHEGLCzsXE AdPxfHi6Usu86hUwJDYQRQGAkdg9rqOJzhNG2nGJnXCB3uyuqvHVx9e+1c+7g9FmWc2H JIyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=4F6FQck9+5OotJCCoM5Iqc4nACNeLNa+KZETfF+1qz4=; b=Ac5juaq1/vs147ryjz64UT4NCM4+6DgqnUanN1AFDBRXEmY5skLy/xdgzDIiwc8imx BRw9Y94KRBN/Ze4geosTAY3xRdRSQRFzkw7LztIxgySbIjY79kbWc/Q+TNuMgu5lG15g Kx44Ws5ZgNgTub9hzdMIz4BDuKpkrXRp3FEwYvfSAEiQDD7xWyjU0ldDCbxaWd8Z5hAJ VK2DDuknutzMsmqD14EMuop5j6XxHbBRFu24Dn/ZyMng0eLy9J/72/PWUQz+Ejf/+ymy l/Hi20Oj/ytv8et9L8qqxhID2ko+n7XgC05oRdWfwKTCJgmo2xfAhK7Tz8oW359UXF/o gN2Q== X-Gm-Message-State: APjAAAXQfVwPR1TpW7LyUv1fbEOgTAswZaDboLmpHcBU6tHF7E9Dhlhg aTnFfBM1NzIyQ+OqDbWemiDiOmkYA18FsuednevINecC0uO319rtZztArOMNcYTYHr7lOdUZWmV RnUDKNCOSikWobVZfPW6sKV6x6pilDFCne2X+U2FsCo7ggdVzlnucwaDXOHm+CgNEFpEwrBss7o bU6/xx6XdEcOej X-Google-Smtp-Source: APXvYqxYLxSD3WxYU3jklqU28hATM35VD9ZQQGy5scchfuedeL/gDCxse6WSzNJg4b4bBjpNdrzMtA== X-Received: by 2002:a0c:fd64:: with SMTP id k4mr40392852qvs.143.1561050589923; Thu, 20 Jun 2019 10:09:49 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([177.154.139.195]) by smtp.gmail.com with ESMTPSA id b5sm128546qkk.45.2019.06.20.10.09.49 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 20 Jun 2019 10:09:49 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 021BE120999; Thu, 20 Jun 2019 13:09:45 -0400 (-04) Date: Thu, 20 Jun 2019 13:09:45 -0400 From: Alvaro Herrera To: Andrey Borodin Cc: pgsql-bugs@lists.postgresql.org, =?utf-8?B?0JDQvdC90LAg0JrRgNGF0LDQvdCx0LDRgNC+0LLQsA==?= , Dmitriy Sarafannikov Subject: Re: Logging corruption error codes Message-ID: <20190620170945.GA21117@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <25F6C686-6442-4A6B-BAF8-A6F7B84B16DE@yandex-team.ru> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Jun-20, Andrey Borodin wrote: > Hi! > > We are fine-tuning our data corruption monitoring and found out that many corruption cases do not report proper error code. > This makes automatic log analyzer way too smart program. > We think that corruption error codes should be given in cases when B-tree or TOAST do not know how to interpret data. > PFA patch with cases that we have found in logs and consider evidence of corruption. This is not totally insane -- other similar messages such as 'corrupted page pointers' in bufpage.c get the same errcode. I would like to have a separate marking for messages indicating a system-level permanent problem rather than user error ("table/column X does not exist"), retryable condition ("serializability violation"), or resource exhaustion ("out of memory", "too many clients"), but that's probably a separate patch: things like "could not open/read/write file" for a data file, or "xlog flush request XYZ not satisfied", and so on, which also indicate a kind of corruption. As you say, currently we have to have much too smart programs to weed out the serious errors that ought to show up in an alerting system from run-of-the-mill problems. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services