Re: logical decoding bug when mapped relation with toast contents isrewritten repeatedly

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: logical decoding bug when mapped relation with toast contents isrewritten repeatedly
Дата
Msg-id 20180921024124.bz6hdrpbmlsnwspz@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: logical decoding bug when mapped relation with toast contents isrewritten repeatedly  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список pgsql-hackers
Hi,

On 2018-09-14 16:13:46 +0200, Tomas Vondra wrote:
> > 
> > I suspect the proper fix would be to have a new HEAP_INSERT_NO_LOGICAL
> > option, and specify that in raw_heap_insert() iff
> > RelationIsLogicallyLogged(state->rs_old_rel) or something like that.
> > 
> > Attached is a *prototype* patch of that approach.  Without the code
> > level changes the addition to test_decoding's rewrite.sql trigger the
> > bug, after it they're fixed.
> > 
> > 
> > The only reason the scenario I was debugging hit this was that there was
> > a cluster wide VACUUM FULL a couple times a day, and replication was
> > several hours behind due to slow network / receiving side.
> > 
> > 
> > Now I'm having a beer outside.

> Yeah, that seems like a bad idea. That error already caught a couple of
> bugs (including da10d6a8a9 and this one), and I have a hunch those are
> not the last ones.

One problem with this is that that means upgrading won't fix an existing
instance of the problem, but turning the ERROR into a WARNING would. I
personally think that's *NOT* enough justification for relaxing the
error, given that recreating the slot would fix the issue, but I see how
other people can reasonably differ.  I can't really see a reasonably
complex approach that solves the issue in a "cake but have it too"
way...


> After discarding 30 theories? Have two.

I will neither confirm nor deny. ;)


Greetings,

Andres Freund


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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Strange failure in LWLock on skink in REL9_5_STABLE
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Strange failure in LWLock on skink in REL9_5_STABLE