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 1ruA92-0033eQ-V9 for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Apr 2024 12:00:09 +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 1ruA91-003xC4-I1 for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Apr 2024 12:00:07 +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 1ruA91-003xBv-7l for pgsql-bugs@lists.postgresql.org; Tue, 09 Apr 2024 12:00:07 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1ruA8y-0000v1-11 for pgsql-bugs@lists.postgresql.org; Tue, 09 Apr 2024 12:00:06 +0000 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-516d2b9cd69so4920820e87.2 for ; Tue, 09 Apr 2024 05:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712664002; x=1713268802; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:cc:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=AeWXhJseB/R5i33DXKOoaAlGrZN3dMnyjbWDZWiwETY=; b=CeBBQTMV/LduNljpioBP+F63EIqJKDhi0BqRWsvCejdBEuM6ScUozj3AsA9buUkr/m wrWjXz941CfNH4OkBGGZIHYmJNl+R/wskh/LEi34J1v6FedofS/LlhEva3ZvCzIIDxYZ sf26MRc5iQD3fqJEzyZ664sNBypzhUiSJwE/vyhVRLQliynM72dWmiTvrWYpDO063mkw 8PIBgf8hGEuKTr0uLoqRxK31o6jFNK5j6jJLoTPgPZfbdeBwHZQrgvS1L1bihDc/C2zB 0oIaPKDhAHNf+x+n4BuP3uevQIGCYjiFvE/MfWzdgc+olqhpw1cMjFRoqkOmoWVKwfEv OMjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712664002; x=1713268802; h=content-transfer-encoding:in-reply-to:cc:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AeWXhJseB/R5i33DXKOoaAlGrZN3dMnyjbWDZWiwETY=; b=ancC10e0Ix26SuHFsOiQnt/NJ7+wyAEnGMDVTrhcTTKmvLiAncXNzrNT9YZKHtZ79f ildnwu41CHaWY6wzz0w/WbSdJWK3H/rmNmZQlnV2FuK+vWrUKt6cZs29jZnxFx8pYH0K 62mkouP84DiHdPvZiRk/RP1QzsV0RYXe/oyuf0cwaSz6vIN/Dq8+dGYzd3aKC50SwRfw GbpZOasSPbVD6THzok+38pAmsSc04tuJOpnPN/7RdQVF59cUsWyUJd267x+uflbCpnma Q7lXS0jVHTerT7NWlzPGGKHe/qBCR6hJORyidFJ7kvWBbprUitIqVTxzgmVvNZf6m2gZ ZM3w== X-Forwarded-Encrypted: i=1; AJvYcCUJzXlYpZ2TdlXFiSepbClKroxtJcsrIrdBCHbnuwWfW43ioq7mZ8jv0/gbMlge1jvgC4L/mTyHZd71oP6yvMfjWQyV9gGMtH2IecyXphdo X-Gm-Message-State: AOJu0Yzxy797Bf278ixHMBZZkumrkV0fjUMqoC3pqu6R+3/cKEqXWYn4 /xBpwZfTYw9CSmyXxN8s1proMFwrSCJ6TZVpbn8mLopl1vX7ZnMc X-Google-Smtp-Source: AGHT+IEDI06BIV5tSr5+oailFLOBnMtQKUgTo92Qf9ucVRbH/9MHL1f6pPz/yqyWskDGD36Tsw7BZg== X-Received: by 2002:a05:6512:12c8:b0:517:b2b:6ca7 with SMTP id p8-20020a05651212c800b005170b2b6ca7mr4516822lfg.59.1712664002379; Tue, 09 Apr 2024 05:00:02 -0700 (PDT) Received: from [1.0.0.7] ([91.185.79.145]) by smtp.gmail.com with ESMTPSA id p20-20020a056512313400b00515b5edfda8sm1510528lfd.73.2024.04.09.05.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Apr 2024 05:00:01 -0700 (PDT) Message-ID: <2a203fd8-e9c8-5f5d-40f8-707848905a1a@gmail.com> Date: Tue, 9 Apr 2024 15:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: BUG #17821: Assertion failed in heap_update() due to heap pruning Content-Language: en-US From: Alexander Lakhin To: Melanie Plageman , Heikki Linnakangas References: <17821-dd8c334263399284@postgresql.org> <13d30799-0107-6502-c81c-39ff5f1e7eb0@gmail.com> <25c3399b-58a3-d727-7f97-93394fd1afa9@gmail.com> Cc: Andres Freund , pgsql-bugs@lists.postgresql.org In-Reply-To: <25c3399b-58a3-d727-7f97-93394fd1afa9@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello, 07.10.2023 11:00, Alexander Lakhin wrote: > > I've encountered another case of that assertion failure (this time with pg_statistic): That second case is not reproduced anymore, after ad98fb142, but the first is still actual. I also discovered another one, with pg_subscription: echo " CREATE ROLE su SUPERUSER; CREATE SUBSCRIPTION sub CONNECTION 'dbname=nonexisting'   PUBLICATION pub WITH (connect = false); " | psql for ((i=1;i<=20;i++)); do   echo "iteration $i"   for ((k=1;k<=100;k++)); do     for ((j=1;j<=200;j++)); do echo " ALTER SUBSCRIPTION sub SET (synchronous_commit = false);     "; done | psql >/dev/null 2>&1 &     for ((j=1;j<=200;j++)); do echo " ALTER SUBSCRIPTION sub OWNER TO su; ALTER SUBSCRIPTION sub SET (slot_name = NONE);     "; done | psql >/dev/null 2>&1 &     wait   done   grep 'TRAP:' server.log && break; done This script fails for me as below: ... iteration 5 TRAP: failed Assert("ItemIdIsNormal(lp)"), File: "heapam.c", Line: 3296, PID: 388093 (sed 's/minfree = Max(minfree, BLCKSZ \/ 10)/minfree = Max(minfree, BLCKSZ \/1)/' -i src/backend/access/heap/pruneheap.c is highly recommended for reproducing) Melanie and Heikki, as you have been working on pruning over the recent months, perhaps this defect could be of interest to you... Best regards, Alexander