From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | er(at)xs4all(dot)nl |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: TRAP: FailedAssertion("HaveRegisteredOrActiveSnapshot()", File: "toast_internals.c", Line: 670, PID: 19403) |
Date: | 2022-03-29 09:10:11 |
Message-ID: | 20220329.181011.1401235917653600685.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Tue, 29 Mar 2022 17:06:21 +0900 (JST), Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> wrote in
> At Mon, 28 Mar 2022 18:36:46 +0900 (JST), Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> wrote in
> Then, I found that portal->holdSnapshot is that. I came up with the
> attached. It does the follows:
>
> 1. Teach PlannedStmtRequiresSnapshot() to return true for FetchStmt.
>
> 2. Use holdSnapshot in RunFromStore if any.
>
>
> The rerpducer is reduced to as small as the following.
>
> CREATE TABLE t (a text);
> INSERT INTO t VALUES('some random text');
> BEGIN;
> DECLARE c CURSOR FOR SELECT * FROM t;
> FETCH ALL IN c;
>
> But I haven't come up with a reasonable way to generate the 'some
> random text' yet.
I gave up and took a straightforward way to generate one.
I don't like that it uses a fixed length for the random text, but
anyway it works for now...
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
v1-0001-Appropriately-set-snapshot-on-cursor-fetch.patch | text/x-patch | 3.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2022-03-29 09:11:54 | Re: logical replication empty transactions |
Previous Message | houzj.fnst@fujitsu.com | 2022-03-29 08:35:11 | RE: logical replication empty transactions |