Re: pgsql: Allow multiple xacts during table sync in logical replication.
От | Tom Lane |
---|---|
Тема | Re: pgsql: Allow multiple xacts during table sync in logical replication. |
Дата | |
Msg-id | 1610789.1613170207@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: pgsql: Allow multiple xacts during table sync in logical replication. (Amit Kapila <amit.kapila16@gmail.com>) |
Ответы |
Re: pgsql: Allow multiple xacts during table sync in logical replication.
|
Список | pgsql-committers |
Various buildfarm members are complaining about this patch, eg caiman | 2021-02-12 15:00:19 | tablesync.c:885:70: warning: argument 3 of type 'char[64]' with mismatched bound [-Warray-parameter=] caiman | 2021-02-12 15:00:19 | tablesync.c:904:72: warning: argument 3 of type 'char[64]' with mismatched bound [-Warray-parameter=] That's because of the inconsistency between extern void ReplicationOriginNameForTablesync(Oid suboid, Oid relid, char *originname); and void ReplicationOriginNameForTablesync(Oid suboid, Oid relid, char originname[NAMEDATALEN]) 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. regards, tom lane
В списке pgsql-committers по дате отправления: