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
Ответ на
Список
Дерево обсуждения
Incorrect messages emitted from pgoutput when using column lists Gunnar Morling <gunnar.morling@googlemail.com>
RE: Incorrect messages emitted from pgoutput when using column lists "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>
Re: Incorrect messages emitted from pgoutput when using column lists Amit Kapila <amit.kapila16@gmail.com>
RE: Incorrect messages emitted from pgoutput when using column lists "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>
Re: Incorrect messages emitted from pgoutput when using column lists Amit Kapila <amit.kapila16@gmail.com>
Re: Incorrect messages emitted from pgoutput when using column lists Michael Paquier <michael@paquier.xyz>
RE: Incorrect messages emitted from pgoutput when using column lists "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>
On Friday, November 25, 2022 10:53 AM Michael Paquier 
> 
> 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
Дата:
От: David E. Wheeler
Дата:
FAQ