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

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Josh Berkus <josh(at)agliodbs(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Let's drop two obsolete features which are bear-traps for novices
Date: 2014-11-01 19:17:14
Message-ID: 20141101191714.GP17790@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-11-01 15:11:40 -0400, Tom Lane wrote:
> Andres Freund <andres(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2014-11-01 19:32:15 Re: Temp tables, pg_class_temp and AccessExclusiveLocks
Previous Message Tom Lane 2014-11-01 19:11:40 Re: Let's drop two obsolete features which are bear-traps for novices