Re: Bug in StartupSUBTRANS

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in StartupSUBTRANS
Date: 2016-02-09 18:33:00
Message-ID: CANP8+jL9EBT-G3Go8H35Z9XqXnXYPdnr1y3Pna5YMbi3os4Z_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 9 February 2016 at 18:42, Jeff Janes <jeff(dot)janes(at)gmail(dot)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/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-02-09 18:45:04 Re: Bug in StartupSUBTRANS
Previous Message Corey Huinker 2016-02-09 18:32:43 Re: proposal: schema PL session variables