Re: [HACKERS] PATCH: multivariate histograms and MCV lists
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Dilger <hornschnorter@gmail.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>,
Adrien Nayrat <adrien.nayrat@dalibo.com>,
Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2017-11-26T02:35:35Z
Lists: pgsql-hackers
Mark Dilger <hornschnorter@gmail.com> writes: >> On Nov 25, 2017, at 3:33 PM, Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote: >> I might be missing something, but why would ereport be more appropriate >> than elog? Ultimately, there's not much difference between elog(ERROR) >> and ereport(ERROR) - both will cause a failure. The core technical differences are (1) an ereport message is exposed for translation, normally, while an elog is not; and (2) with ereport you can set the errcode, whereas with elog it's always going to be XX000 (ERRCODE_INTERNAL_ERROR). > I understand project policy to allow elog for error conditions that will be reported > in "can't happen" type situations, similar to how an Assert would be used. For > conditions that can happen through (mis)use by the user, ereport is appropriate. The project policy about this is basically that elog should only be used for things that are legitimately "internal errors", ie not user-facing. If there's a deterministic way for a user to trigger the error, or if it can reasonably be expected to occur during normal operation, it should definitely have an ereport (and a non-default errcode). regards, tom lane
Commits
-
Convert pre-existing stats_ext tests to new style
- dbb984128ebf 12.0 landed
-
Add support for multivariate MCV lists
- 7300a699502f 12.0 landed
-
Improve ANALYZE's strategy for finding MCVs.
- b5db1d93d2a6 11.0 cited
-
Clone extended stats in CREATE TABLE (LIKE INCLUDING ALL)
- 5564c1181548 11.0 cited
-
Try again to fix accumulation of parallel worker instrumentation.
- 8526bcb2df76 11.0 cited
-
Adjust psql \d query to avoid use of @> operator.
- 471d55859c11 11.0 cited
-
Message style fixes
- 821fb8cdbf70 11.0 cited
-
Add security checks to selectivity estimation functions
- e2d4ef8de869 10.0 cited