Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qdpPB-004ruJ-AZ for pgsql-general@arkaria.postgresql.org; Wed, 06 Sep 2023 10:05:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qdpPA-00934X-49 for pgsql-general@arkaria.postgresql.org; Wed, 06 Sep 2023 10:04:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qdpP9-00934H-Jq for pgsql-general@lists.postgresql.org; Wed, 06 Sep 2023 10:04:59 +0000 Received: from mout-u-107.mailbox.org ([2001:67c:2050:101:465::107]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qdpP5-003ORd-V3 for pgsql-general@lists.postgresql.org; Wed, 06 Sep 2023 10:04:58 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4RgdJy4fv8z9sV0; Wed, 6 Sep 2023 12:04:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ewie.name; s=MBO0001; t=1693994690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k+oMzCnDU/T9xWGIA3GSh4vy+5d1KNx45LJ/+FzrUSY=; b=bxfRbuIXK78FcHDQCTEF8NcZfx+R0dtb/2SvMqT7+oFfPd9EpaUNjMJOkp9WPReOuREFOB 0NYEZY1//l/Kn5YehlOFflifPYNu3w4HpXQx1upznh/biik9kJQd0fwB00uzqSJPOego8T LnVyMPVxpV6LH+UgXLk5mgefUb7XNGxQanaQb3adtPmjg9oGuDeqadGjGosXCL3gLTe1Rv Mk2wHuZxtBTUat5eTStmnmyAq8jWHtbBLmOzZTPvpevqjQlTc4igWEaijXkOoVmmC7lqBl rNRVdIijkJsaaCRzRLXFQZaC4SuJKPXSsPknK4RkAljf871fifery161L74Tvg== Date: Wed, 6 Sep 2023 12:04:50 +0200 (CEST) From: Erik Wienhold To: krah.tm@gmail.com, pgsql-general@lists.postgresql.org Message-ID: <267004756.331292.1693994690228@office.mailbox.org> In-Reply-To: <959e9b03415d2ac683d67059f74d0377f64b03f4.camel@gmail.com> References: <959e9b03415d2ac683d67059f74d0377f64b03f4.camel@gmail.com> Subject: Re: running ANALYZE results in => duplicate key value violates unique constraint "pg_statistic_relid_att_inh_index" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Priority: 3 Importance: Normal List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 06/09/2023 09:46 CEST Torsten Krah wrote: > I am running that one (official docker image) > > PostgreSQL 13.11 (Debian 13.11-1.pgdg110+1) on x86_64-pc-linux-gnu, > compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit Have you also tried with 13.12? > and one of my nightly jobs reported that error yesterday when running > an "ANALYZE": > > FEHLER: doppelter Schl=C3=BCsselwert verletzt Unique-Constraint =C2=BBpg_= statistic_relid_att_inh_index=C2=AB > Detail: Schl=C3=BCssel =C2=BB(starelid, staattnum, stainherit)=3D(2609,= 4, f)=C2=AB existiert bereits. > > which should translate to something like: > > ERROR: duplicate key value violates unique constraint "pg_statistic_reli= d_att_inh_index" > > DETAIL: Key (starelid, staattnum, stainherit)=3D(2609, 4, f) already e= xists. > > Anyone an idea what's wrong? > > Maybe (not?) related but sometimes the analyze does fail with: > > ERROR: attempted to delete invisible tuple > > > Both errors are only happening here and there - so I don't have a > reproducer, but still I am curious what is wrong here with me running > an "ANALYZE" after my data import. Does the unique constraint violation always occur for the same row? OID 26= 09 is pg_description. -- Erik