Re: Temporary tables versus wraparound... again - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Temporary tables versus wraparound... again
Date
Msg-id CAM-w4HOJ-vk6eZM4+FN7dDgzgmJbhQpgqHs4+Def547OLvdNUA@mail.gmail.com
Whole thread Raw
In response to Re: Temporary tables versus wraparound... again  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: Temporary tables versus wraparound... again  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
On Wed, 29 Mar 2023 at 17:48, Justin Pryzby <pryzby@telsasoft.com> wrote:
>
> The patch still occasionally fails its tests under freebsd.
> https://cirrus-ci.com/github/postgresql-cfbot/postgresql/commitfest/42/3358

So on the one hand, I don't think the plan is to actually commit the
tests. They're very specific to one bit of internal implementation and
they're the kind of test that makes maintaining the test suite a pain
and patches to cause false positives. They're only in the patch I
posted at all to demonstrate that the code was actually running at all
and having the desired effect.

That said I would be a lot more sanguine about this failure if I had
any theory for *why* it would fail. And on FreeBSD specifically which
is even stranger.

Afaict the relfrozenxid should always be our own transaction when the
table is created and then again our own new transaction when the table
is truncated. And neither the INSERT nor the ANALYZE should be
touching relfrozenxid, nor should it be possible autovacuum is
interfering given it's a temp table (and we're attached to the
schema). And none of this should be platform dependent.

I wonder if some other test is behaving differently on FreeBSD and
leaving behind a prepared transaction or a zombie session in some idle
state or something like that? Is there anything (aside from
autovacuum) connecting or running in the background in the test
environment that could be creating a transaction id and holding back
snapshot xmin?


-- 
greg



pgsql-hackers by date:

Previous
From: "Koshi Shibagaki (Fujitsu)"
Date:
Subject: Fix code comment in postgres_fdw.c
Next
From: Masahiko Sawada
Date:
Subject: Re: Should vacuum process config file reload more often