Re: REL_12_STABLE crashing with assertion failure in ExtractReplicaIdentity

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: REL_12_STABLE crashing with assertion failure in ExtractReplicaIdentity
Дата
Msg-id 14590.1567457355@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: REL_12_STABLE crashing with assertion failure inExtractReplicaIdentity  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> I agree that it ought to be more efficent - but also about as equally
> safe? I.e. if the previous code wasn't safe, the new code wouldn't be
> safe either? As in, we're "just" avoiding the assert, but not increasing
> safety?

Well, the point is that the old code risks performing a relcache load
without holding any lock on the relation.  In practice, given that
we do hold a lock on the parent table, it's probably safe ... but
it's at best bad practice.  It's not too hard to imagine future
optimizations that would allow this to result in a corrupt relcache entry.

I don't believe that there's any equivalent risk in the modified code.

            regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: REL_12_STABLE crashing with assertion failure inExtractReplicaIdentity
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] WAL logging problem in 9.4.3?