Re: Cleanup: remove unused fields from nodes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Cleanup: remove unused fields from nodes
Дата
Msg-id 3069708.1713800470@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Cleanup: remove unused fields from nodes  (Matthias van de Meent <boekewurm+postgres@gmail.com>)
Ответы Re: Cleanup: remove unused fields from nodes  (Matthias van de Meent <boekewurm+postgres@gmail.com>)
Список pgsql-hackers
Matthias van de Meent <boekewurm+postgres@gmail.com> writes:
> 0001 removes two old fields that are not in use anywhere anymore, but
> at some point these were used.

+1.  They're not being initialized, so they're useless and confusing.

> 0002/0004 remove fields in ExecRowMark which were added for FDWs to
> use, but there are no FDWs which use this: I could only find two FDWs
> who implement RefetchForeignRow, one being BlackHoleFDW, and the other
> a no-op implementation in kafka_fdw [0]. We also don't seem to have
> any testing on this feature.

I'm kind of down on removing either of these.  ermExtra is explicitly
intended for extensions to use, and just because we haven't found any
users doesn't mean there aren't any, or might not be next week.
Similarly, ermActive seems like it's at least potentially useful:
is there another way for onlookers to discover that state?

> 0003 drops the input_finfo field on the new JsonExprState struct. It
> wasn't read anywhere, so keeping it around makes little sense IMO.

+1.  The adjacent input_fcinfo field has this info if anyone needs it.

> 0005 drops field DeallocateStmt.isall: the value of the field is
> implied by !name, and that field was used as such.

Seems reasonable.

I think it would be a good idea to push 0003 for v17, just so nobody
grows an unnecessary dependency on that field.  0001 and 0005 could
be left for v18, but on the other hand they're so trivial that it
could also be sensible to just push them to get them out of the way.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: vignesh C
Дата:
Сообщение: Re: subscription/026_stats test is intermittently slow?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: slightly misleading Error message in guc.c