RE: Incorrect messages emitted from pgoutput when using column lists
Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com>
From: "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Gunnar Morling <gunnar.morling@googlemail.com>, "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>
Date: 2022-11-27T12:42:51Z
Lists: 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
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix incorrect output from pgoutput when using column lists.
- ebf87c019c04 15.2 landed
- 40b1491357a4 16.0 landed