Re: Let's drop two obsolete features which are bear-traps for novices

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Let's drop two obsolete features which are bear-traps for novices
Дата
Msg-id 20141101191714.GP17790@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: Let's drop two obsolete features which are bear-traps for novices  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Let's drop two obsolete features which are bear-traps for novices  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2014-11-01 15:11:40 -0400, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
> > One argument in that direction imo is HS. We certainly would just
> > generally ignore unlogged indexes for querying while InRecovery, right?
> > Because otherwise HS would become pretty useless. And I think it'd be
> > pretty wierd if things worked on HS and not on the primary (or the HS
> > after promotion).
> 
> I don't see how HS has anything to do with this discussion.  We would
> certainly have the index marked as unlogged in the catalogs, and we
> would therefore not use it while InRecovery.

Consider:
SELECT * FROM tbl WHERE active AND value = $1;
that can be satisfied by two indexes. One on (value), and an unlogged
index on (value) WHERE active. While in HS only the logged one will be
used.  But if we don't silently ignore invalid unlogged indexes, hell
will break loose after promition because suddenly the predicated index
will be used in plans.

Greetings,

Andres Freund

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



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Let's drop two obsolete features which are bear-traps for novices
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Temp tables, pg_class_temp and AccessExclusiveLocks