segmentation fault using currtid and partitioned tables

Jaime Casanova <jaime.casanova@2ndquadrant.com>

From: Jaime Casanova <jaime.casanova@2ndquadrant.com>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2020-04-05T08:18:50Z
Lists: pgsql-hackers

Attachments

Hi,

Another one caught by sqlsmith, on the regression database run this
query (using any non-partitioned table works fine):

"""
select currtid('pagg_tab'::regclass::oid, '(0,156)'::tid) >= '(1,158)'::tid;
"""

This works on 11 (well it gives an error because the file doesn't
exists) but crash the server on 12+

attached the stack trace from master

-- 
Jaime Casanova                      www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Commits

  1. Fix use-after-release mistake in currtid() and currtid2() for views

  2. Fix crashes with currtid() and currtid2()