From: | Önder Kalacı <onderkalaci(at)gmail(dot)com> |
---|---|
To: | Peter Smith <smithpb2250(at)gmail(dot)com> |
Cc: | "shiy(dot)fnst(at)fujitsu(dot)com" <shiy(dot)fnst(at)fujitsu(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher |
Date: | 2022-09-01 06:23:00 |
Message-ID: | CACawEhUg=rAM6n53R6Bsd4pVz49rp9aKJ_+cZveAB5gNL5cSrg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Önder Kalacı | 2022-09-01 06:23:11 | Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher |
Previous Message | Etsuro Fujita | 2022-09-01 06:18:38 | struct Trigger definition in trigger.sgml |