Re: [HACKERS] Re: Alter subscription..SET - NOTICE message is comingfor table which is already removed

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [HACKERS] Re: Alter subscription..SET - NOTICE message is comingfor table which is already removed
Дата
Msg-id 9af32974-8787-8486-c2a9-842d073953a2@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Re: Alter subscription..SET - NOTICE message is comingfor table which is already removed  (Masahiko Sawada <sawada.mshk@gmail.com>)
Ответы Re: [HACKERS] Re: Alter subscription..SET - NOTICE message is comingfor table which is already removed  (Masahiko Sawada <sawada.mshk@gmail.com>)
Список pgsql-hackers
On 5/30/17 13:25, Masahiko Sawada wrote:
> I think this cause is that the relation status entry could be deleted
> by ALTER SUBSCRIPTION REFRESH before corresponding table sync worker
> starting. Attached patch fixes issues reported on this thread so far.

I have committed the part of the patch that changes the
SetSubscriptionRelState() calls.

I think there was a mistake in your patch, in that the calls in
LogicalRepSyncTableStart() used true once and false once.  I think all
the calls in tablesync.c should be the same.

(If you look at the patch again, notice that I have changed the
insert_ok argument to update_only, so true and false are flipped.)

I'm not convinced about the change to the GetSubscriptionRelState()
argument.  In the examples given, no tables are removed from any
publications, so I don't see how the claimed situation can happen.  I
would like to see more reproducible examples.

Right now, if the subscription rel state disappears before the sync
worker starts, the error kills the sync worker, so things should
continue working correctly.  Perhaps the error message isn't the best.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] UPDATE of partition key
Следующее
От: Erik Rijkers
Дата:
Сообщение: [HACKERS] logical replication - possible remaining problem