pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Andres Freund <andres@anarazel.de>
Cc: Alexandre Garcia <alexandre@vmfarms.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: postgresql 9.6 - cannot freeze committed xmax
Date: Thu, 1 Mar 2018 14:40:10 -0300
Message-ID: <20180301174010.vqrjlps5stz6opzd@alvherre.pgsql> (raw)
In-Reply-To: <20180228234944.hjastb2mqr7rdnw5@alap3.anarazel.de>

Andres Freund wrote:

> Wonder if this a big enough fix? Isn't the bug "one layer up"? We
> shouldn't do the TransactionIdPrecedes() calls in the surrounding block,
> in the first place, right? Right now we could very well hit both
> ERROR: found xmax %u from before relfrozenxid %u
> and
> ERROR: cannot freeze committed xmax %u
> and freeze_xmax, totally_frozen will be wrong.  I think that's largely
> harmless, but we should fix it nonetheless, and inspect other relevant
> sites.

Hmm ...

After reading the 9.2 code, I don't think so.  These values must
absolutely be still within the freeze limits.  The version pre-pgupgrade
should have replaced the xmax with InvalidTransactionId as soon as the
tuple was freezable.

In fact, I checked 9.2's code and heap_tuple_needs_freeze tests "if xmax
not a multi and < cutoff_xid"; and in that case heap_freeze_tuple does
change the value to 0.

I hope I'm not misunderstanding what you mean.

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




view thread (16+ messages)  latest in thread

Message-ID: <20180301174010.vqrjlps5stz6opzd@alvherre.pgsql>
Permalink:  ../20180301174010.vqrjlps5stz6opzd@alvherre.pgsql/
Also on:    postgresql.org/message-id/20180301174010.vqrjlps5stz6opzd@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: alvherre@alvh.no-ip.org, andres@anarazel.de, alexandre@vmfarms.com
  Subject: Re: postgresql 9.6 - cannot freeze committed xmax
  In-Reply-To: <20180301174010.vqrjlps5stz6opzd@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox