pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix off-by-one error in txid_status().
3+ messages / 1 participants
[nested] [flat]

* pgsql: Fix off-by-one error in txid_status().
@ 2019-03-27 08:47  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Thomas Munro @ 2019-03-27 08:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix off-by-one error in txid_status().

The transaction ID returned by GetNextXidAndEpoch() is in the future,
so we can't attempt to access its status or we might try to read a
CLOG page that doesn't exist.  The > vs >= confusion probably stemmed
from the choice of a variable name containing the word "last" instead
of "next", so fix that too.

Back-patch to 10 where the function arrived.

Author: Thomas Munro
Discussion: https://postgr.es/m/CA%2BhUKG%2Buua_BV5cyfsioKVN2d61Lukg28ECsWTXKvh%3DBtN2DPA%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d2fd7f74ee61f41a3bd5daf2942b72cebd88f346

Modified Files
--------------
src/backend/utils/adt/txid.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Fix off-by-one error in txid_status().
@ 2019-03-27 08:47  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Thomas Munro @ 2019-03-27 08:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix off-by-one error in txid_status().

The transaction ID returned by GetNextXidAndEpoch() is in the future,
so we can't attempt to access its status or we might try to read a
CLOG page that doesn't exist.  The > vs >= confusion probably stemmed
from the choice of a variable name containing the word "last" instead
of "next", so fix that too.

Back-patch to 10 where the function arrived.

Author: Thomas Munro
Discussion: https://postgr.es/m/CA%2BhUKG%2Buua_BV5cyfsioKVN2d61Lukg28ECsWTXKvh%3DBtN2DPA%40mail.gmail.com

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/26d4fda37ea10d146e9d35fca70f817a0bfe300c

Modified Files
--------------
src/backend/utils/adt/txid.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Fix off-by-one error in txid_status().
@ 2019-03-27 08:48  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Thomas Munro @ 2019-03-27 08:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix off-by-one error in txid_status().

The transaction ID returned by GetNextXidAndEpoch() is in the future,
so we can't attempt to access its status or we might try to read a
CLOG page that doesn't exist.  The > vs >= confusion probably stemmed
from the choice of a variable name containing the word "last" instead
of "next", so fix that too.

Back-patch to 10 where the function arrived.

Author: Thomas Munro
Discussion: https://postgr.es/m/CA%2BhUKG%2Buua_BV5cyfsioKVN2d61Lukg28ECsWTXKvh%3DBtN2DPA%40mail.gmail.com

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/339927797c8716ca14261af48eaf815b5ee24907

Modified Files
--------------
src/backend/utils/adt/txid.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2019-03-27 08:48 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-03-27 08:47 pgsql: Fix off-by-one error in txid_status(). Thomas Munro <tmunro@postgresql.org>
2019-03-27 08:47 pgsql: Fix off-by-one error in txid_status(). Thomas Munro <tmunro@postgresql.org>
2019-03-27 08:48 pgsql: Fix off-by-one error in txid_status(). Thomas Munro <tmunro@postgresql.org>

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