Re: [BUG]Update Toast data failure in logical replication
Dilip Kumar <dilipbalaut@gmail.com>
From: Dilip Kumar <dilipbalaut@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Euler Taveira <euler@eulerto.com>, Michael Paquier <michael@paquier.xyz>, Alvaro Herrera <alvherre@alvh.no-ip.org>,
Petr Jelinek <petr.jelinek@enterprisedb.com>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>, Tomas Vondra <tomas.vondra@enterprisedb.com>,
Andres Freund <andres@anarazel.de>, Kuntal Ghosh <kuntalghosh.2007@gmail.com>, "tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-01-28T06:46:33Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
WAL log unchanged toasted replica identity key attributes.
- 5e01001ffb38 15.0 landed
- b5e060473273 10.21 landed
- 1cd5802ac69a 11.16 landed
- ce349cf176e2 12.11 landed
- caa231be97df 13.7 landed
- 04645bbcae72 14.3 landed
-
Add new wal_level, logical, sufficient for logical decoding.
- e55704d8b2fe 9.4.0 cited
-
Add the notion of REPLICA IDENTITY for a table.
- 07cacba983ef 9.4.0 cited
Attachments
- v5-0002-WAL-log-unchanged-toasted-eplica-identity-key-att.patch (text/x-patch) patch v5-0002
- v5-0001-Code-refactoring-for-the-next-patch.patch (text/x-patch) patch v5-0001
On Tue, Jan 25, 2022 at 11:59 AM Amit Kapila <amit.kapila16@gmail.com> wrote: > > On Tue, Jan 25, 2022 at 12:26 AM Euler Taveira <euler@eulerto.com> wrote: > > > > I am not sure if your proposal is much different compared to v4 or how > much it improves the situation? I see you didn't consider > 'check_external_attr' parameter and I think that is important to know > if the key has any external toast value. Overall, I see your point > that the change of APIs looks a bit ugly. But, I guess that is more > due to their names and current purpose. I think it could be better if > we bring all the code of heap_tuple_attr_equals in its only caller > HeapDetermineModifiedColumns or at least part of the code where we get > attr value and can determine whether the value is stored externally. > Then change name of HeapDetermineModifiedColumns to > HeapDetermineColumnsInfo with additional parameters. I think the best way is to do some refactoring and renaming of the function, because as part of HeapDetermineModifiedColumns we are already processing the tuple so we can not put extra overhead of reprocessing it again. In short I like the idea of renaming the HeapDetermineModifiedColumns and moving part of heap_tuple_attr_equals code into the caller. Here is the patch set for the same. I have divided it into two patches which can eventually be merged, 0001- for refactoring 0002- does the actual work. -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com