Re: [HACKERS] Handling dropped attributes in pglogical_proto

2016-09-29 Thread Craig Ringer
On 29 September 2016 at 12:53, Petr Jelinek wrote: > On 29/09/16 05:33, Michael Paquier wrote: >> On Wed, Sep 28, 2016 at 11:25 PM, Konstantin Knizhnik >> wrote: >>> But if table was just altered and some attribute was removed from the table, >>>

Re: [HACKERS] Handling dropped attributes in pglogical_proto

2016-09-28 Thread Petr Jelinek
On 29/09/16 05:33, Michael Paquier wrote: > On Wed, Sep 28, 2016 at 11:25 PM, Konstantin Knizhnik > wrote: >> But if table was just altered and some attribute was removed from the table, >> then rel->natts can be greater than natts. > > This is part of pglogical, so

Re: [HACKERS] Handling dropped attributes in pglogical_proto

2016-09-28 Thread Michael Paquier
On Wed, Sep 28, 2016 at 11:25 PM, Konstantin Knizhnik wrote: > But if table was just altered and some attribute was removed from the table, > then rel->natts can be greater than natts. This is part of pglogical, so you may want to reply on the dedicated thread or send

[HACKERS] Handling dropped attributes in pglogical_proto

2016-09-28 Thread Konstantin Knizhnik
Hi, pglogical_read_tuple from pglogical_proto.c contains the following code: natts = pq_getmsgint(in, 2); if (rel->natts != natts) elog(ERROR, "tuple natts mismatch, %u vs %u", rel->natts, natts); But if table was just altered and some attribute was removed