Re: [PATCH] Allow multiple recursive self-references

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Denis Hirn <denis(dot)hirn(at)uni-tuebingen(dot)de>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pantelis Theodosiou <ypercube(at)gmail(dot)com>, David Fetter <david(at)fetter(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Zhihong Yu <zyu(at)yugabyte(dot)com>
Subject: Re: [PATCH] Allow multiple recursive self-references
Date: 2022-01-04 14:24:54
Message-ID: 044064f2-071d-4bf8-2ea9-19f88a85ce7f@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have some separate questions on the executor changes. Basically, this
seems the right direction, but I wonder if some things could be clarified.

I wonder why in ExecWorkTableScan() and ExecReScanWorkTableScan() you
call tuplestore_copy_read_pointer() instead of just
tuplestore_select_read_pointer(). What is the special role of read
pointer 0 that you are copying. Before your changes, it was just the
implicit read pointer, but now that we have several, it would be good to
explain their relationship.

Also, the comment you deleted says "Therefore, we don't need a private
read pointer for the tuplestore, nor do we need to tell
tuplestore_gettupleslot to copy." You addressed the first part with the
read pointer handling, but what about the second part? The
tuplestore_gettupleslot() call in WorkTableScanNext() still has
copy=false. Is this an oversight, or did you determine that copying is
still not necessary?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua Brindle 2022-01-04 14:35:31 Re: CREATEROLE and role ownership hierarchies
Previous Message Peter Eisentraut 2022-01-04 14:18:30 Re: [PATCH] Allow multiple recursive self-references