Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Önder Kalacı <onderkalaci@gmail.com>
From: Önder Kalacı <onderkalaci@gmail.com>
To: Peter Smith <smithpb2250@gmail.com>
Cc: "shiy.fnst@fujitsu.com" <shiy.fnst@fujitsu.com>,
Amit Kapila <amit.kapila16@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-09-01T06:23:00Z
Lists: pgsql-hackers
Hi Peter, Thanks for the reviews! I'll reply to both of your reviews separately. > >> 10. > >> > >> + /* we only need to allocate once */ > >> + if (eq == NULL) > >> + eq = palloc0(sizeof(*eq) * outslot->tts_tupleDescriptor->natts); > >> > >> But shouldn't you also free this 'eq' before the function returns, to > >> prevent leaking memory? > >> > > > > Two notes here. First, this is allocated inside ApplyMessageContext, > which seems to be reset per tuple change. So, that seems like a good > boundary to keep this allocation in memory. > > > > OK, fair enough. Is it worth adding a comment to say that or not? > Yes, sounds good. Added 1 sentence comment, I'll push this along with my other changes on v10. Thanks, Onder
Commits
-
Add the testcases for 89e46da5e5.
- 805b821e77a3 16.0 landed
-
Allow the use of indexes other than PK and REPLICA IDENTITY on the subscriber.
- 89e46da5e511 16.0 landed
-
Rework query relation permission checking
- a61b1f74823c 16.0 cited
-
Generalize ri_RootToPartitionMap to use for non-partition children
- fb958b5da86d 16.0 cited
-
Add wait_for_subscription_sync for TAP tests.
- 0c20dd33db16 16.0 cited
-
Logical replication
- 665d1fad99e7 10.0 cited