Re: Resetting spilled txn statistics in pg_stat_replication - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Resetting spilled txn statistics in pg_stat_replication
Date
Msg-id 3408925.1602561305@sss.pgh.pa.us
Whole thread Raw
In response to Re: Resetting spilled txn statistics in pg_stat_replication  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Resetting spilled txn statistics in pg_stat_replication  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
Amit Kapila <amit.kapila16@gmail.com> writes:
> I have pushed this but it failed in one of the BF. See
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=florican&dt=2020-10-13%2003%3A07%3A25
> The failure is shown below and I am analyzing it. See, if you can
> provide any insights.

It's not very clear what spill_count actually counts (and the
documentation sure does nothing to clarify that), but if it has anything
to do with WAL volume, the explanation might be that florican is 32-bit.
All the animals that have passed that test so far are 64-bit.

> The reason for this problem could be that there is some transaction
> (say by autovacuum) which happened interleaved with this transaction
> and committed before this one.

I can believe that idea too, but would it not have resulted in a
diff in spill_txns as well?

In short, I'm not real convinced that a stable result is possible in this
test.  Maybe you should just test for spill_txns and spill_count being
positive.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Resetting spilled txn statistics in pg_stat_replication
Next
From: Amit Kapila
Date:
Subject: Re: Resetting spilled txn statistics in pg_stat_replication