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 1hdNHT-0000xa-0v for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Jun 2019 23:12:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hdNHR-0005JV-Tc for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Jun 2019 23:12:45 +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 1hdNHR-0005JO-HX for pgsql-hackers@lists.postgresql.org; Tue, 18 Jun 2019 23:12:45 +0000 Received: from mail-io1-xd2f.google.com ([2607:f8b0:4864:20::d2f]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hdNHK-0000JQ-IG for pgsql-hackers@postgresql.org; Tue, 18 Jun 2019 23:12:45 +0000 Received: by mail-io1-xd2f.google.com with SMTP id e5so33879328iok.4 for ; Tue, 18 Jun 2019 16:12:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=DAfnndAeFXc0ge6PgIEqaR5QMSBOYgMoaicvk85yuOw=; b=agOS6EZpuP6/jKeFSApQ8DAwBR0i/ydWjssIge6vLOBpaqgfpr7NObNKeS0N0C+fcr GIKTzOp2/kwBB+m6yZDQ2nnrctpbZYLt9E9jK1NPvmnVf3FGz9UhfSsKUOEgYE1e5SbV mztvqbFtuXz4VrGuhF7GpADHnzQXYzSUlNCSby7/M5bQ3KWQv1sDwSHr3Nt2ZUFRZROG iTGeevoZYMtT4BPE2ElmoJ8AvYjQYC8xgKD8KbwlzqI0tvA3Y4zH3+OPPXFzpyDHsI0E veMclEJyOhrNVABmTc3wPptU7Z8zf7vgBe7SikR3fwcrzV1O0PdLvyMWFN8oqDPpxNJK dwTg== 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:subject:message-id:mime-version :content-disposition:user-agent; bh=DAfnndAeFXc0ge6PgIEqaR5QMSBOYgMoaicvk85yuOw=; b=FPC5ZGofqnlqa+nEhcqVi94d4Rm22c0A9Irlf47T9Xs4EPw0b+IqNjd1DcrNxAE3bp yPoX8/8w+i8EhFYmdOzek4Q8StrP2nqLZxKXKM2V1R+nG5iaOkELFHyzy2nHqLOGAO9R sCP1BSyhcaLVPnfWn9o+1r4o5U4cxZYlQtV1p59V9bzBC7LkAYiUF7QPeth/D7C6AHoG 0V72L0usV3vv3iYtJ949W20hKHbQi90hirRP2xjn2yEMo58NVAOp5g5RqVEaVGWMjQOh IzJ/i0XgpfHqTu58beobKqdPcAQ2rEZdMnJdAggOCFDfKE3MIkW7JfPRP4AMMsVJqjIR NH+w== X-Gm-Message-State: APjAAAV7Rm5VzIhWv5JrKcPBMQZc31RN623xQwaEjzJX2dd5N9364/TX yHx6jj9Jlknxwu4dglh9b7i2JkPy6dg= X-Google-Smtp-Source: APXvYqzhsSlhzshjWRcy5ypOkybFwe6iEwURdu0228uphADH3uYP0GoDgBNCn4Xn97REvh5q1PBvNg== X-Received: by 2002:a5d:884d:: with SMTP id t13mr6364682ios.233.1560899555729; Tue, 18 Jun 2019 16:12:35 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id k9sm15078738ion.28.2019.06.18.16.12.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jun 2019 16:12:35 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id E42E3800A33; Tue, 18 Jun 2019 18:12:33 -0500 (CDT) Date: Tue, 18 Jun 2019 18:12:33 -0500 From: Justin Pryzby To: pgsql-hackers@postgresql.org Subject: ANALYZE: ERROR: tuple already updated by self Message-ID: <20190618231233.GA27470@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk A customers DB crashed due to OOM. While investigating the issue in our report, I created MV stats, which causes this error: ts=# CREATE STATISTICS sectors_stats (dependencies) ON site_id,sect_id FROM sectors; CREATE STATISTICS ts=# ANALYZE sectors; ERROR: XX000: tuple already updated by self LOCATION: simple_heap_update, heapam.c:4613 The issue goes away if I drop the stats object and comes back if I recreate it. We're running 11.3 ; most of the (very few) reports from this error are from almost 10+ years ago, running pg7.3 like. I've taken a couple steps to resolve the issue (vacuum full and then reindex pg_statistic and its toast and the target table, which doesn't have a toast). I'm guessing the issue is with pg_statistic_ext, which I haven't touched. Next step seems to be to truncate pg_statistic{,ext} and re-analyze the DB. Does anyone want debugging/diagnostic info before I do that ? Justin