Re: Assert failure in get_baserel_parampathinfo with lateral UNION ALL - Mailing list pgsql-hackers

From Richard Guo
Subject Re: Assert failure in get_baserel_parampathinfo with lateral UNION ALL
Date
Msg-id CAMbWs4_DBQyZRaphH3F0ks7C5SkEOuAQ4GX1nCAU9C728PyHYw@mail.gmail.com
Whole thread
In response to Re: Assert failure in get_baserel_parampathinfo with lateral UNION ALL  (wenhui qiu <qiuwenhuifx@gmail.com>)
List pgsql-hackers
On Mon, Sep 21, 2026 at 3:30 PM wenhui qiu <qiuwenhuifx@gmail.com> wrote:
>> One thing I may be missing, though: after replacing `rinfo->clause_relids`, should we also update
`rinfo->num_base_rels`?

Good point.  I think we should do that.  And it seems that commit
03107b4ed was sloppy about updating num_base_rels.  On master the
problematic RestrictInfo has stale num_base_rels:

   :num_base_rels 2
   :clause_relids (b 1 2 3 8)

I'm a little surprised that that hasn't caused problems so far.

- Richard



pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: Parallel autovacuum: DROP DATABASE WITH (FORCE) fails on the parallel workers
Next
From: Michael Paquier
Date:
Subject: Re: Direct TOAST v2, faster, smaller and no migration needed