Re: Let's drop two obsolete features which are bear-traps for novices
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
От:
Michael Banck <michael.banck@credativ.de>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Kevin Grittner <kgrittn@ymail.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Kevin Grittner <kgrittn@ymail.com>
Дата:
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>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Andres Freund <andres@2ndquadrant.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Andres Freund <andres@2ndquadrant.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Andres Freund <andres@2ndquadrant.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Andres Freund <andres@2ndquadrant.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Andres Freund <andres@2ndquadrant.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Andres Freund <andres@2ndquadrant.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Andres Freund <andres@2ndquadrant.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Andres Freund <andres@2ndquadrant.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Andres Freund <andres@2ndquadrant.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Andres Freund <andres@2ndquadrant.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Andres Freund <andres@2ndquadrant.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Andres Freund <andres@2ndquadrant.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
David Fetter <david@fetter.org>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Alvaro Herrera <alvherre@2ndquadrant.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Tatsuo Ishii <ishii@postgresql.org>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
David Fetter <david@fetter.org>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
"ktm@rice.edu" <ktm@rice.edu>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
David Fetter <david@fetter.org>
Дата:
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>
Дата:
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>
Дата:
Let's drop two obsolete features which are bear-traps for novices
От:
Josh Berkus <josh@agliodbs.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Josh Berkus <josh@agliodbs.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Josh Berkus <josh@agliodbs.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Jim Nasby <Jim.Nasby@BlueTreble.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Jim Nasby <Jim.Nasby@BlueTreble.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Josh Berkus <josh@agliodbs.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Craig Ringer <craig@2ndquadrant.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Andreas Karlsson <andreas@proxel.se>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Josh Berkus <josh@agliodbs.com>
Дата:
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>
Дата:
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>
Дата:
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>
Дата:
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>
Дата:
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>
Дата:
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>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Albe Laurenz <laurenz.albe@wien.gv.at>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Amit Langote <amitlangote09@gmail.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
David Rowley <dgrowleyml@gmail.com>
Дата:
On Sun, Nov 2, 2014 at 12:59 PM, Josh Berkus <josh@agliodbs.com> wrote:
All,
While there's argument about hash indexes, it looks like nobody minds if
the MONEY type goes bye-bye. So, time for a patch ...
Will the patch move the feature to a contrib module?
Or will our release notes state that all MONEY columns must be changed to an appropriate NUMERIC type pre-upgrade?
Regards
David Rowley
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Michael Paquier <michael.paquier@gmail.com>
Дата:
On Sun, Nov 2, 2014 at 2:30 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
There is as well another way: finally support WAL-logging for hash indexes.
--
In the case of hash indexes, because we still have to have the hash
opclasses in core, there's no way that it could be pushed out as an
extension module even if we otherwise had full support for AMs as
extensions. So what I hear you proposing is "let's break this so
thoroughly that it *can't* be fixed". I'm not on board with that.
I think the WARNING will do just fine to discourage novices who are
not familiar with the state of the hash AM. In the meantime, we
could push forward with the idea of making hash indexes automatically
unlogged, so that recovering from a crash wouldn't be quite so messy/
dangerous.
--
Michael
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Feng Tian <ftian@vitessedata.com>
Дата:
Hi,
This is Feng from Vitesse. Performance different between Money and Numeric is *HUGE*. For TPCH Q1, the performance difference is 5x for stock postgres, and ~20x for vitesse.
Stock postgres, for my laptop, TPCH 1G, Q1, use money type ~ 9s, use Numeric (15, 2) is ~53s.
Kevin,
test=# do $$ begin perform sum('10000.01'::numeric) from generate_series(1,10000000); end; $$;
This may not reflect the difference of the two data type. One aggregate is not where most of the time is spent. TPCH Q1 has many more computing.
On Mon, Nov 3, 2014 at 4:54 AM, Michael Banck <michael.banck@credativ.de> wrote:
Am Sonntag, den 02.11.2014, 12:41 -0500 schrieb Tom Lane:
> BTW, after reflecting a bit more I'm less than convinced that this
> datatype is completely useless. Even if you prefer to store currency
> values in numeric columns, casting to or from money provides a way to
> accept or emit values in whatever monetary format the LC_MONETARY locale
> setting specifies. That seems like a useful feature, and it's one you
> could not easily duplicate using to_char/to_number (not to mention that
> those functions aren't without major shortcomings of their own).
As an additional datapoint, Vitesse Data changed the DB schema from
NUMERIC to MONEY for their TPCH benchmark for performance reasons: "The
modification to data types is easy to understand -- money and double
types are faster than Numeric (and no one on this planet has a bank
account that overflows the money type, not any time soon)."[1] And
"Replaced NUMERIC fields representing currency with MONEY"[2].
Not sure whether they modified/optimized PostgreSQL with respect to the
MONEY data type and/or how much performance that gained, so CCing CK Tan
as well.
Michael
[1] http://vitesse-timing-on.blogspot.de/2014/10/running-tpch-on-postgresql-part-1.html
[2] http://vitessedata.com/benchmark/
--
Michael Banck
Projektleiter / Berater
Tel.: +49 (2161) 4643-171
Fax: +49 (2161) 4643-100
Email: michael.banck@credativ.de
credativ GmbH, HRB Mönchengladbach 12080
USt-ID-Nummer: DE204566209
Hohenzollernstr. 133, 41061 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Merlin Moncure <mmoncure@gmail.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Jaime Casanova <jaime@2ndquadrant.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
CK Tan <cktan@vitessedata.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Peter Geoghegan <pg@heroku.com>
Дата:
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Jeff Janes <jeff.janes@gmail.com>
Дата:
On Sat, Nov 1, 2014 at 10:26 AM, Andres Freund <andres@2ndquadrant.com> wrote:
On 2014-11-01 10:18:03 -0700, Josh Berkus wrote:
> On 10/31/2014 03:07 PM, Tom Lane wrote:
> > I don't care one way or the other about the money type, but I will defend
> > hash indexes, especially seeing that we've already added a pretty
> > in-your-face warning as of 9.5:
> >
> > regression=# create table foo(f1 int);
> > CREATE TABLE
> > regression=# create index on foo using hash (f1);
> > WARNING: hash indexes are not WAL-logged and their use is discouraged
> > CREATE INDEX
>
> Yes, and I'm arguing that is the wrong decision. If hash indexes are
> "discouraged", then they shouldn't be in core in the first place.
Last time we discussed it there were people (IIRC Andrew was one of
them) commenting that they use hash indexes *precisely* because they're
not WAL logged and that they can live with the dangers that creates. I
don't think that's sufficient justification for introducing the feature
at all. But it's nothing new that removing a feature has to fit quite
different criteria than adding one.
So, by that argument we could remove hash indexes once we have unlogged
indexes on logged tables. But then there's no need to remove them
anymore...
I would object to removing hash indexes as long as the alternative way to index oversized value is to write all my SQL to look like:
select count(*) from foo where substr(x,1,2700)=substr($1,1,2700) and x=$1
Now, if the planner were smart enough to realize that x=$1 implies substr(x,1,2700)=substr($1,1,2700), that might be a different matter. But it is not.
Or, if there were a way to create a view on foo which would do this implication automatically, but again as far as I know there is not a way to do that either.
Cheers,
Jeff
Re: Let's drop two obsolete features which are bear-traps for novices
От:
Eric Ridge <eebbrr@gmail.com>
Дата:
On Fri, Oct 31, 2014 at 6:07 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
I don't know if/when that will happen as such, but Simon was making noises
about writing code to treat hash indexes as unlogged automatically, which
would more or less fix the worst risks. That's not just a special case
for hash indexes, but any index AM that lacks WAL support, as third-party
AMs might well do.
As someone writing a 3rd-party AM, literally right this moment, do you have a link to that thread? While I follow this list fairly closely I don't remember seeing this. I'd love to understand the thoughts around handling extension-based AMs.
eric