Re: segmentation fault when cassert enabled
| От | Peter Eisentraut |
|---|---|
| Тема | Re: segmentation fault when cassert enabled |
| Дата | |
| Msg-id | c75077cd-a1a7-9a2d-5dc6-4d3d8acfaafa@2ndquadrant.com обсуждение исходный текст |
| Ответ на | Re: segmentation fault when cassert enabled (Jehan-Guillaume de Rorthais <jgdr@dalibo.com>) |
| Ответы |
Re: segmentation fault when cassert enabled
|
| Список | pgsql-hackers |
On 2019-11-05 17:29, Jehan-Guillaume de Rorthais wrote: > My best bet so far is that logicalrep_relmap_invalidate_cb is not called after > the DDL on the subscriber so the relmap cache is not invalidated. So we end up > with slot->tts_tupleDescriptor->natts superior than rel->remoterel->natts in > slot_store_cstrings, leading to the overflow on attrmap and the sigsev. It looks like something like that is happening. But it shouldn't. Different table schemas on publisher and subscriber are well supported, so this must be an edge case of some kind. Please continue investigating. > By the way, I noticed attrmap is declared as AttrNumber * in struct > LogicalRepRelMapEntry, AttrNumber being typedef'd as an int16. However, attrmap > is allocated based on sizeof(int) in logicalrep_rel_open: > > entry->attrmap = palloc(desc->natts * sizeof(int)); > > It doesn't look like a major problem, it just allocates more memory than > needed. Right. I have committed a fix for this. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления: