| From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Amit Kapila <akapila(at)postgresql(dot)org>, pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: pgsql: Allow multiple xacts during table sync in logical replication. |
| Date: | 2021-02-13 01:17:35 |
| Message-ID: | CAA4eK1Km3NsEK-6rS+H8JBcY15AhOG3rYuSGZ5GZphZfoSju1A@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
On Sat, Feb 13, 2021 at 4:20 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Don't do that. Quite aside from the inconsistency, this is pretty
> darn unsafe coding technique, because there is exactly nothing
> guaranteeing that the caller passes a buffer of the length the
> function expects.
>
> I'm not real sure that you could expect a compiler warning for that
> even if you'd put the length declaration where callers could see it.
> So personally I'd avoid hard-wiring NAMEDATALEN into this API at all,
> and have the caller pass sizeof(its buffer) instead.
>
Thanks for pointing it out. I'll look into this. BTW, how one can
check such reports, do one need to check all make logs for buildfarm
members?
--
With Regards,
Amit Kapila.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2021-02-13 02:27:07 | Re: pgsql: Allow multiple xacts during table sync in logical replication. |
| Previous Message | Tom Lane | 2021-02-12 22:55:00 | Re: Detecting pointer misalignment (was Re: pgsql: Implementation of subscripting for jsonb) |