RE: Incorrect messages emitted from pgoutput when using column lists

Поиск
Список
Период
Сортировка
От houzj.fnst@fujitsu.com
Тема RE: Incorrect messages emitted from pgoutput when using column lists
Дата
Msg-id OS0PR01MB57164F0D0219D50774BFBA4994109@OS0PR01MB5716.jpnprd01.prod.outlook.com
обсуждение исходный текст
Ответ на Re: Incorrect messages emitted from pgoutput when using column lists  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-bugs
On Friday, November 25, 2022 10:53 AM Michael Paquier <michael@paquier.xyz>
>
> On Fri, Nov 25, 2022 at 02:46:46AM +0000, houzj.fnst@fujitsu.com wrote:
> > I think the reason is that we didn't filter the column when sending
> > the old tuple in pgoutput. We thought that the old tuple won't include
> > columns that not in RI, but it seems it will still be null values for
> > such columns in the old tuple. So, I think we'd better filter the column for old
> tuple as well.
>
> Isn't that something where you should have at least some coverage with one or
> more regression tests?

Yes, I agree. Since the UPDATE will succeed even if old tuple includes columns
not in the column list, it took me a while to think of another test approach.
In the new version patch[1], I try to use pg_logical_slot_peek_binary_changes() to
get the binary data of UPDATE and test the number of columns in the old tuple.

[1]
https://www.postgresql.org/message-id/OS0PR01MB571658F178388836D116217A94109%40OS0PR01MB5716.jpnprd01.prod.outlook.com

Best regards,
Hou zj



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

Предыдущее
От: "houzj.fnst@fujitsu.com"
Дата:
Сообщение: RE: Incorrect messages emitted from pgoutput when using column lists
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: BUG #17694: In JSONPath expressions, characters between leading $ and dot appear to be ignored