Dear Amit,
Thanks for the comment.
> + if (!replica_identity_table)
> + replica_identity_table = replica_identity_create(ApplyContext,
> + REPLICA_IDENTITY_INITIAL_SIZE,
> + NULL);
>
> We can add some comments why we create this in ApplyContext. BTW, can
> we consider a separate ParallelApplyContext for this though I am not
> sure if that will be really helpful. Do you have any thoughts on the
> same?
I did not separate the context because it can work as-is. However, dividing
context allows tracking the growth of hash table easily by using
pg_log_backend_memory_contexts() or MemoryContextStats() (via gdb). Now new memory context
is used.
New version would be posted soon.
Best regards,
Hayato Kuroda
FUJITSU LIMITED