Re: Stats sender and 2pc minor problem - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Stats sender and 2pc minor problem
Date
Msg-id 20161014124133.kz4cqhsis2vdt24v@alvherre.pgsql
Whole thread Raw
In response to Re: Stats sender and 2pc minor problem  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Stas Kelvich <s.kelvich@postgrespro.ru> writes:
> > Statistics sender logic during usual commit and two-phase commit do not
> > strictly matches each other and that leads to delta_live_tuples added to
> > n_live_tup in case of truncate in two phase commit.
> 
> Yeah, that code says it's supposed to match AtEOXact_PgStat, but it
> doesn't.

Hmm, oops.

> I pushed this, but without the regression test case, which would have
> failed outright in any test run with max_prepared_transactions = 0.

I agree that that was the right approach.  Thanks for taking care of it!

> I wonder if we could make that better by making the stats collector
> track stats by relfilenode rather than table OID.  It'd be a pretty
> major logic change, though, to serve a corner case.

Hm, that's an idea.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: signal handling in plpython
Next
From: Tom Lane
Date:
Subject: Re: signal handling in plpython