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

From Andres Freund
Subject Re: Let's drop two obsolete features which are bear-traps for novices
Date
Msg-id 20141101191714.GP17790@awork2.anarazel.de
Whole thread Raw
In response to Re: Let's drop two obsolete features which are bear-traps for novices  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Let's drop two obsolete features which are bear-traps for novices  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Let's drop two obsolete features which are bear-traps for novices
Next
From: Pavel Stehule
Date:
Subject: Re: Temp tables, pg_class_temp and AccessExclusiveLocks