Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nZOLm-0005FO-7Q for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Mar 2022 02:46:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nZOLk-0005EO-1m for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Mar 2022 02:46:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nZOLj-0005E0-NU for pgsql-hackers@lists.postgresql.org; Wed, 30 Mar 2022 02:46:19 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nZOLh-0003IF-Di for pgsql-hackers@lists.postgresql.org; Wed, 30 Mar 2022 02:46:18 +0000 Received: by mail-pl1-x635.google.com with SMTP id p17so19298331plo.9 for ; Tue, 29 Mar 2022 19:46:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:message-id:to:cc:subject:from:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=yTJeLomwHxvA417zSrjScH+au1MmgbC1GB0zS9FA9ck=; b=XrW26Sp/KtUQYDTC/JL3cEnpgZVIFwyI1FxoLIy752SwOnXtl8/QtDXl4yoNOZnsuu JUfjUWg6i6ndttby/oC69Y31wNYmIAPtT3kL3kGSVKaUyMwKV6rCHTGAnBYKBm/OoF7L 0WMrS8+iwh01oRdr0JwRNtQrtlvgj1vrxoPbJElP/pRfnXeB67/NFsnURz+AGRqv4n1x xa38I7OW1hTy2ZmO1Em7W4IML0tuzdzjespdxSP6kk85ZoIAJhOm/2c9gmJh6CUx6SHw bZZkZ5mVcL5sqc7xSoVgC+Pbao/y3s22EQVeQYmHv0PO4df/YH6RbZomtpEUi7x84GSM jwZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:to:cc:subject:from:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=yTJeLomwHxvA417zSrjScH+au1MmgbC1GB0zS9FA9ck=; b=QRJNyTJ58FL/qsVKOxctt0VFeyjsvq4kB1pAdAJUlo0qAjE2PzZVWhHaH/w8Kym5u9 Pu8/bx/6mKklMMlCKtZED9vV6+g3GYIiNCbud3ZhR7eGs9W0lcrZlK1ob2CYNy5CGIWc sP9BpiiTPy4td22rmHfeWUmLNzs4w6KAp0Wmn9BHEYIPF/ptQE6yMItXpQJrWz63iA6s MwP6olaSYogDek6lYpkXOOQzbfwZ56Bvb3V6jEQ0RWucSNTiYD742YR2Va07qOta4Y0c Lp3l64EQrQjtPtSPrnWBjeJxnSrDnEASfkhV0+weQGKWZe0ouKdL6kQxNKbcMYawhMGs mP0w== X-Gm-Message-State: AOAM532yvWkQpkeNLHtK8UMhof2w5vVNgdp7nT47szhdN8fZN4qyN/JM fbs3XVxHUAE5GLOv33EcBgQ= X-Google-Smtp-Source: ABdhPJza51oJuSqDbFyTsd+XeUIopz1bdrmQo8g+mCBdkC30zDOr1fKRLwwz1c8P5bPgJPIiVgKKlA== X-Received: by 2002:a17:90a:5913:b0:1c7:2b71:65d8 with SMTP id k19-20020a17090a591300b001c72b7165d8mr2424878pji.87.1648608376239; Tue, 29 Mar 2022 19:46:16 -0700 (PDT) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id kk11-20020a17090b4a0b00b001c73933d803sm4540793pjb.10.2022.03.29.19.46.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 29 Mar 2022 19:46:15 -0700 (PDT) Date: Wed, 30 Mar 2022 11:46:13 +0900 (JST) Message-Id: <20220330.114613.1177577626285014184.horikyota.ntt@gmail.com> To: er@xs4all.nl Cc: boekewurm+postgres@gmail.com, pgsql-hackers@lists.postgresql.org Subject: Re: TRAP: FailedAssertion("HaveRegisteredOrActiveSnapshot()", File: "toast_internals.c", Line: 670, PID: 19403) From: Kyotaro Horiguchi In-Reply-To: <20220330.100617.1491348930290941094.horikyota.ntt@gmail.com> References: <20220330.100617.1491348930290941094.horikyota.ntt@gmail.com> User-Agent: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk At Wed, 30 Mar 2022 10:06:17 +0900 (JST), Kyotaro Horiguchi wrote in > At Tue, 29 Mar 2022 13:29:15 +0200, Erik Rijkers wrote in > > Op 29-03-2022 om 12:50 schreef Matthias van de Meent: > > > An shorter (?) reproducer might be the following, which forces any > > > value for 'a' to be toasted and thus triggering the check in > > > init_toast_snapshot regardless of value length: > > > CREATE TABLE t (a text); > > > ALTER TABLE t ALTER COLUMN a SET STORAGE EXTERNAL; > > > INSERT INTO t VALUES ('toast'); > > > BEGIN; > > > DECLARE c CURSOR FOR SELECT * FROM t; > > > FETCH ALL IN c; > > Yeah, unfortunately I tried that first and saw it didn't work. And it > still doesn't for me. With such a short text pg_detoast_datum_pakced > doesn't call detoast_attr. Actually it is VARATT_IS_1B. (@master) > > I think I'm missing something here. I'm going to examine around. Hmm. Strange. My memory tells that I did the same thing before.. I thought that it is somewhat related to compression since repeat('x', 4096) didin't seem working at that time, but it worked this time. Maybe I was confused between extended and external.. But, in the first place the *fix* has been found to be wrong. I'm going to search for the right fix.. regards. -- Kyotaro Horiguchi NTT Open Source Software Center