Re: logical replication worker accesses catalogs in error context callback
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Zhihong Yu <zyu@yugabyte.com>, Masahiko Sawada <sawada.mshk@gmail.com>, Andres Freund <andres@anarazel.de>,
PostgreSQL-development <pgsql-hackers@postgresql.org>, Peter Eisentraut <peter_e@gmx.net>, Petr Jelinek <petr@2ndquadrant.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2021-02-04T10:30:23Z
Lists: pgsql-hackers
On Wed, Feb 3, 2021 at 4:31 PM Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote: > > On Thu, Jan 28, 2021 at 11:14 AM Amit Kapila <amit.kapila16@gmail.com> wrote: > > > > On Wed, Jan 27, 2021 at 9:38 AM Bharath Rupireddy > > <bharath.rupireddyforpostgres@gmail.com> wrote: > > > > > > On Wed, Jan 27, 2021 at 7:48 AM Zhihong Yu <zyu@yugabyte.com> wrote: > > > > > > Thanks for pointing to the changes in the commit message. I corrected > > > them. Attaching v4 patch set, consider it for further review. > > > > > > > About 0001, have we tried to reproduce the actual bug here which means > > when the error_callback is called we should face some problem? I feel > > with the correct testcase we should hit the Assert > > (Assert(IsTransactionState());) in SearchCatCacheInternal because > > there we expect the transaction to be in a valid state. I understand > > that the transaction is in a broken state at that time but having a > > testcase to hit the actual bug makes it easy to test the fix. > > I have not tried hitting the Assert(IsTransactionState() in > SearchCatCacheInternal. To do that, I need to figure out hitting > "incorrect binary data format in logical replication column" error in > either slot_modify_data or slot_store_data so that we will enter the > error callback slot_store_error_callback and then IsTransactionState() > should return false i.e. txn shouldn't be in TRANS_INPROGRESS. > Even, if you hit that via debugger it will be sufficient or you can write another elog/ereport there to achieve the same. The exact test case to hit that error is not mandatory. -- With Regards, Amit Kapila.
Commits
-
Avoid doing catalog lookups in postgres_fdw's conversion_error_callback.
- bee18616a650 13.4 landed
- bd2e68d0bf94 12.8 landed
- b23ac5aefae4 10.18 landed
- a9460dbf1577 11.13 landed
- 67f925bbd9de 9.6.23 landed
- c7b7311f6177 15.0 landed
- 86d4914210e9 14.0 landed
-
Don't try to print data type names in slot_store_error_callback().
- 63a952167092 14.0 landed
- feff6155734e 12.8 landed
- 7fc97752d566 13.4 landed
- 50371df266d4 15.0 landed
- 32d50b895217 11.13 landed
- 0b5089e8c979 10.18 landed
-
logical replication: fix OID type mapping mechanism
- 24c0a6c64976 11.0 cited
-
Improve sys/catcache performance.
- 141fd1b66ce6 11.0 cited
-
Logical replication
- 665d1fad99e7 10.0 cited