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 1qdnFe-004kzn-F5 for pgsql-general@arkaria.postgresql.org; Wed, 06 Sep 2023 07:47:02 +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 1qdnFb-007o4w-Te for pgsql-general@arkaria.postgresql.org; Wed, 06 Sep 2023 07:46: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 1qdnFb-007o4m-Hm for pgsql-general@lists.postgresql.org; Wed, 06 Sep 2023 07:46:59 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qdnFX-003MxZ-Qu for pgsql-general@lists.postgresql.org; Wed, 06 Sep 2023 07:46:58 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-401d10e3e54so32038555e9.2 for ; Wed, 06 Sep 2023 00:46:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693986413; x=1694591213; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:date:to:reply-to :from:subject:message-id:from:to:cc:subject:date:message-id:reply-to; bh=KWuMeaXEfhMt/XVEDfFC4WeyK8ftnAqWR08+iwN5x+0=; b=DcLiv2WpFfM4jhCtk8ZSZ5wCFoPqQh/R8Q/fIKkvtruBNUzS+M7qBCARtaqWdMc3Oc sGAPMWOdMa9BxE1SlHVUW91eFqmAe1AdEux4MrlW1iMDqooqlZkE+0a7uy9G6GuFdWmq Rnd8YIrCefFi0TwKBEUyU76UJN0GTu2xfNwZQRUrxKW7U2uxI8wyugQWfWNYX3kN6bux Q9u3nItAAYv7dpScUhx7YaLeVQZvPGdiZUFHb4s2l1X5n9H3ROHkCRh49eMnHSiy68ML UhqTiBocWDOdLs6bpLvjux23zZJeaB8n/ehoOKo3ZuPzHP6s4sMdKzLyCCdzxwxRRSxG 6xzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693986413; x=1694591213; h=mime-version:user-agent:content-transfer-encoding:date:to:reply-to :from:subject:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=KWuMeaXEfhMt/XVEDfFC4WeyK8ftnAqWR08+iwN5x+0=; b=AOSmByax7VL4gLRtfgJt1SxViUJk+apfkBh4MsuBQCglMKKEJzPinjoLmNmVzz48TR 87DXotdTDG1iPnS62sQSUV8k7NjXPbpqmDBpYkggah/6KMkCjgWbmeupb1DgnwTey9FJ 6wPhtvPjSSgcHCUw6uueiyNuUQecehyAVQh618ezhB+kMYtPMTN26QgwRSeJHbw2HoGq p9fdjuqrEhUYlwhpYsuMNW0jZpg+mIjYe3VF0zzVWh/NtwMrjZjbA1UIZKeXArdG6asi cZJ7w3gCM1K0/px62QeabBtO6CWmqXRCb1qrCjtPLvytRC/rTNTmhy97kKaRkUPx4T4X lr2w== X-Gm-Message-State: AOJu0YwGEPZt2udngT3sSH/f1QF1l6dO7Wi2HfudHeelb1cj8jsR+ed3 AH4krczZFct1YN4QlAEwXv9CwK//cpE= X-Google-Smtp-Source: AGHT+IG3h3w7jxDy3W91GImho2H8qUuOpOYgc8XNemv3hP5tTxTFziB4jDaHDwDFbSQ/cb4yvsET4w== X-Received: by 2002:a05:600c:218b:b0:402:906:1e87 with SMTP id e11-20020a05600c218b00b0040209061e87mr1633496wme.31.1693986413129; Wed, 06 Sep 2023 00:46:53 -0700 (PDT) Received: from ?IPv6:2a01:50a0:1047:130::a696? ([2a01:50a0:aa:0:185:40:248:10]) by smtp.gmail.com with ESMTPSA id m9-20020a7bcb89000000b003fe29f6b61bsm18868702wmi.46.2023.09.06.00.46.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Sep 2023 00:46:52 -0700 (PDT) Message-ID: <959e9b03415d2ac683d67059f74d0377f64b03f4.camel@gmail.com> Subject: running ANALYZE results in => duplicate key value violates unique constraint "pg_statistic_relid_att_inh_index" From: Torsten Krah Reply-To: krah.tm@gmail.com To: pgsql-general@lists.postgresql.org Date: Wed, 06 Sep 2023 09:46:52 +0200 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, 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 and one of my nightly jobs reported that error yesterday when running an "ANALYZE": FEHLER: doppelter Schl=C3=BCsselwert verletzt Unique-Constraint =C2=BBpg_st= atistic_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_relid_= att_inh_index" > DETAIL: Key (starelid, staattnum, stainherit)=3D(2609, 4, f) already exi= sts. 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. thanks for insights :) kind regards Torsten