pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <dgrowleyml@gmail.com>
To: 贾耀 <yaojia_0809@163.com>
Cc: pgsql-bugs <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #19372: Scan operator maybe output unnecessary columns to the upper-layer operators
Date: Thu, 8 Jan 2026 16:02:33 +1300
Message-ID: <CAApHDvrDJ=bA0dTrcUs92Eg_gXO2DudjVJryiKLHR007L9SJhw@mail.gmail.com> (raw)
In-Reply-To: <41083d45.8a126.19b9809c368.Coremail.yaojia_0809@163.com>
References: <19372-4692c7e7044c10ef@postgresql.org>
	<CAApHDvqaxvdvwe1ZZrTjRZsrkpzEtKq8QyPAmLH24rCP887ToQ@mail.gmail.com>
	<41083d45.8a126.19b9809c368.Coremail.yaojia_0809@163.com>

On Wed, 7 Jan 2026 at 23:39, 贾耀 <yaojia_0809@163.com> wrote:

> I debugged the behavior of the statement using gdb, part of stack is:
> #0 create_scan_plan
> #1 create_plan_recurse
> #2 create_projection_plan
> #3 create_plan_recurse
> #4 create_agg_plan
> ...
> I think the point is flags in create_plan.
> In frame 4, it give the flags CP_LABLE_TLIST; so use_physical_tlist of
> create_projection_plan return true in frame 2, and give the flags 0; so
> use_physical_tlist of create_scan_plan return true in frame 0, and build
> tlist with build_physical_tlist rather than build_path_tlist.
> build_physical_tlist will build all columns of table, build_path_tlist will
> build necessary columns with best_path's path target.
>
> If I force it to go through build_path_tlist, I can get the simplified
> output of seqscan(just hjid and rjid)
>
> So, it's a bug about flags? Will you fix it?


I've already mentioned, the current behaviour is intentional. So there are
no changes to be made.

By all means, try your flag hack locally and see if performance is better
or worse.

David

view thread (3+ messages)

Message-ID: <CAApHDvrDJ=bA0dTrcUs92Eg_gXO2DudjVJryiKLHR007L9SJhw@mail.gmail.com>
Permalink:  ../CAApHDvrDJ=bA0dTrcUs92Eg_gXO2DudjVJryiKLHR007L9SJhw@mail.gmail.com/
Also on:    postgresql.org/message-id/CAApHDvrDJ=bA0dTrcUs92Eg_gXO2DudjVJryiKLHR007L9SJhw@mail.gmail.com

 · 

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-bugs@postgresql.org
  Cc: dgrowleyml@gmail.com, yaojia_0809@163.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #19372: Scan operator maybe output unnecessary columns to the upper-layer operators
  In-Reply-To: <CAApHDvrDJ=bA0dTrcUs92Eg_gXO2DudjVJryiKLHR007L9SJhw@mail.gmail.com>

* 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