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 1naCeT-0001IT-8B for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Apr 2022 08:29:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1naCeS-0007vB-4I for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Apr 2022 08:29:00 +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 1naCeR-0007v1-Pa for pgsql-hackers@lists.postgresql.org; Fri, 01 Apr 2022 08:28:59 +0000 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1naCeO-0004lY-2y for pgsql-hackers@lists.postgresql.org; Fri, 01 Apr 2022 08:28:58 +0000 Received: by mail-pg1-x532.google.com with SMTP id b130so1849620pga.13 for ; Fri, 01 Apr 2022 01:28:56 -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=Pu8bo2Rn4V+CD4BrhOwhNidZ+FoFwJLQG99k7Nogd68=; b=ZxZCtHBZXciISiB2IHSRpv5h5bQpqbtKJ3I5uP+tLroupEoKsa7vNWdKV2vjf2it84 oxI4r42aurdL4SEygeyWJrdor7IaUPB4LbmZnAIX9bMzOKp94QEXoLt0ZSeoodzyomNc rxYMYHRViavrVyN5O0tScG/f8aVYqKC8yyfgWOrImmhhy3P+FFC23ja7dr/css1n8NxP 5Y4v9MbZPBegOeaR+k2DVrgIzu9WN6WOym/T/al75hEUfQIVS3nhXF5zS7DlhzmQBOZc zZtxHaZB1yN3ud1nuEOXIkoPlPlXqKtlD0kkmuH+KgU3euJ7pHPL5TkDuYeCgPiMaCCi BP9w== 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=Pu8bo2Rn4V+CD4BrhOwhNidZ+FoFwJLQG99k7Nogd68=; b=w/CiWtumlKoXVU9RUaUjcUOM7H+IbfnjnZfM+0hNvtZXYajCSLufyfxdVOYn9VeAFX fvN+6mGNgvGG5FqCvhADs2afAwniZx9uLqeINxwUE7F5SyTmHnsosYzPYrfd53umXfWe BfApQsnB4X3JOs7OxNjHOKya5vGu9UPI0qYmVm5ubKovhCuEhbDOehNHwTkmC9fveU3N PCCGG6vcDZj3IiOTpgjwEcYFSfIEL/qQvIMqxbqKr0H2Bu6cUhyBlljzl9A/pgEiFiOU hHBYJld4LREvhfWA7G/L8MaftcBJci3AgdPE6t9oDRAeAgm4L/ZTf0ebI1J/xDsdA5g3 +Acw== X-Gm-Message-State: AOAM5312KN0PTV4R4HGXSkhTk4hi1Q3pSmyYaXkJI553Wuxrg7eaZTXC X6j10buZxZVIQroLQdRdK6c= X-Google-Smtp-Source: ABdhPJzgDvPuN1SkKnLIgw+fuEjRtbwcb3D3YShsk6xGMxQqqlVErBSkJ+Ap5MRmCdqAOSsvPyi7eg== X-Received: by 2002:a63:2248:0:b0:382:1b3e:6336 with SMTP id t8-20020a632248000000b003821b3e6336mr13804581pgm.271.1648801735120; Fri, 01 Apr 2022 01:28:55 -0700 (PDT) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id q7-20020a17090a178700b001c97d3614e5sm1594348pja.33.2022.04.01.01.28.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 01 Apr 2022 01:28:54 -0700 (PDT) Date: Fri, 01 Apr 2022 17:28:52 +0900 (JST) Message-Id: <20220401.172852.1154281926306406898.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.175824.936439875658680065.horikyota.ntt@gmail.com> References: <20220330.100617.1491348930290941094.horikyota.ntt@gmail.com> <20220330.114613.1177577626285014184.horikyota.ntt@gmail.com> <20220330.175824.936439875658680065.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 17:58:24 +0900 (JST), Kyotaro Horiguchi wrote in > At Wed, 30 Mar 2022 11:46:13 +0900 (JST), Kyotaro Horiguchi wrote in > > But, in the first place the *fix* has been found to be wrong. I'm > > going to search for the right fix.. > > FETCH uses the snapshot at DECLARE. So anyhow I needed to set the > queryDesk's snapshot used in PortalRunSelect to the FETCH's portal's > holdSnapshot. What I did in this version is: By the way, this is, given that the added check in init_toast_snapshot is valid, a long-standing "bug", which at least back to 12. I'm not sure what to do for this. 1. ignore the check for certain cases? 2. apply any fix only to master and call it a day. 14 and earlier doesn't have the assertion check so they don't complain. 3. apply a fix to all affected versions. regards. -- Kyotaro Horiguchi NTT Open Source Software Center