Re: Bug in StartupSUBTRANS - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Bug in StartupSUBTRANS
Date
Msg-id CANP8+jL9EBT-G3Go8H35Z9XqXnXYPdnr1y3Pna5YMbi3os4Z_Q@mail.gmail.com
Whole thread Raw
In response to Bug in StartupSUBTRANS  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: Bug in StartupSUBTRANS
Re: Bug in StartupSUBTRANS
List pgsql-hackers
On 9 February 2016 at 18:42, Jeff Janes <jeff.janes@gmail.com> wrote:
While testing the crash resilience of the recent 2-part-commit
improvements, I've run into a problem where sometimes after a crash
the recovery process creates zeroed files in pg_subtrans until it
exhausts all disk space.

Not sure which patch you're talking about there (2-part-commit).
 
Looking at the code, it looks like it does not anticipate that the xid
might wrap around, meaning startPage/endPage might also wrap around.
But obviously should not do so at int_max but rather at some much
smaller other value.

Hmm, looks like the != part attempted to wrap, but just didn't get it right.

Your patch looks right to me, so I will commit, barring objections... with backpatch. Likely to 9.0, AFAICS.

--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-hackers by date:

Previous
From: Corey Huinker
Date:
Subject: Re: proposal: schema PL session variables
Next
From: Tom Lane
Date:
Subject: Re: Bug in StartupSUBTRANS