Re: [HACKERS] Different table schema in logical replication crashes

Поиск
Список
Период
Сортировка
От Petr Jelinek
Тема Re: [HACKERS] Different table schema in logical replication crashes
Дата
Msg-id b5c84e08-6533-ab09-19e4-0452f1b5ead4@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Different table schema in logical replication crashes  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers

On 14/04/17 17:33, Peter Eisentraut wrote:
> On 4/14/17 08:49, Petr Jelinek wrote:
>>> Are we prepared to support different schemas in v10? Or should we
>>> disallow it for v10 and add a TODO?
>>>
>>
>> Ah nuts, yes it's supposed to be supported, we seem to not initialize
>> cstate->range_table in tablesync which causes this bug. The CopyState
>> struct is private to copy.c so we can't easily set cstate->range_table
>> externally. I wonder if tablesync should just construct CopyStmt instead
>> of calling the lower level API.
> 
> Maybe pass the range_table to BeginCopyFrom so that it can write it into
> cstate?
> 

That would work. The reason why I am thinking of creating CopyStmt
instead is that to create the range_table, we'll basically have to
duplicate the code from DoCopy verbatim. Obviously making CopyStmt isn't
without troubles either as it would have to newly support the callback
input.

--  Petr Jelinek                  http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training &
Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] [pgsql-www] Small issue in online devel documentationbuild
Следующее
От: Jaime Casanova
Дата:
Сообщение: Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)