From: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
---|---|
To: | Dmitry Dolgov <9erthalion6(at)gmail(dot)com> |
Cc: | artem(dot)anisimov(dot)255(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org, Teodor Sigaev <teodor(at)sigaev(dot)ru>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
Subject: | Re: BUG #17949: Adding an index introduces serialisation anomalies. |
Date: | 2023-06-22 10:02:19 |
Message-ID: | CA+hUKGJKTCGShnj0ZRhHsmOuHtZ-udZu8jN+GJ2-7YCSGnDYzg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Wed, Jun 21, 2023 at 9:04 PM Dmitry Dolgov <9erthalion6(at)gmail(dot)com> wrote:
> Now the reading transaction actually does PredicateLockPage on the
> metabuffer inside scanPendingInsert, but strangely enough it doesn't
> lock anything because the SerializationNeededForRead condition is false.
> I'm trying to verify if it's somehow a part of the issue, or something
> is broken on my side.
Maybe you were confused by the presence of non-SSI transactions in the
repro (eg the transaction that sets up the index)?
To answer my own earlier question, the conflict-in check for posting
trees is hidden in getFindLeafPage(..., true, ...).
I spent some more time trying to grok this today. FTR it reproduces
faster without the extra tuple that repro I posted inserts after
TRUNCATE (the point of that was to find out whether it was an
empty-to-non-empty transition). I still don't know what's wrong but I
am beginning to suspect the "fast" code. It seems as though, under
high concurrency, we sometimes don't scan a recently inserted
(invisible to our snapshot, but needed for SSI checks) tuple, but I
don't yet know why.
From | Date | Subject | |
---|---|---|---|
Next Message | PG Bug reporting form | 2023-06-22 10:26:30 | BUG #17989: ERROR: could not open file "pg_logical/snapshots/6-1E182808.snap": Permission denied |
Previous Message | Heikki Linnakangas | 2023-06-22 07:26:27 | Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG |