pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #18375: requested statistics kind "f" is not yet built for statistics object 16722
5+ messages / 4 participants
[nested] [flat]
* BUG #18375: requested statistics kind "f" is not yet built for statistics object 16722
@ 2024-03-04 07:19 PG Bug reporting form <noreply@postgresql.org>
2024-03-04 17:11 ` Re: BUG #18375: requested statistics kind "f" is not yet built for statistics object 16722 Tom Lane <tgl@sss.pgh.pa.us>
2024-03-05 00:35 ` Re: BUG #18375: requested statistics kind "f" is not yet built for statistics object 16722 David Rowley <dgrowleyml@gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: PG Bug reporting form @ 2024-03-04 07:19 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: horst.reiterer@fabasoft.com
The following bug has been logged on the website:
Bug reference: 18375
Logged by: Horst Reiterer
Email address: horst.reiterer@fabasoft.com
PostgreSQL version: 15.6
Operating system: AlmaLinux release 9.3 x86_64
Description:
Since upgrading from 15.5 to 15.6, the following error occurs once during a
test run:
requested statistics kind "f" is not yet built for statistics object
16722
mcv.c:577 statext_mcv_load
Statement: DELETE FROM test WHERE (col3 IN
(501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,51]
Definitions:
CREATE TABLE test (
col1 bigint NOT NULL,
col2 bigint NOT NULL,
col3 integer NOT NULL,
col4 integer NOT NULL,
col5 character varying(254) NOT NULL
);
CREATE UNIQUE INDEX index1 ON test USING btree (col1, col2, col3, col4);
CREATE INDEX index2 ON test USING btree (col2, upper((col5)::text)
varchar_pattern_ops, col3, col1);
CREATE STATISTICS stat1 (mcv) ON col2, col3 FROM test;
CREATE STATISTICS stat2 (mcv) ON col2, col3, upper(col5::text) FROM test;
CREATE STATISTICS stat3 (mcv) ON col1, col2, col3 FROM test;
CREATE STATISTICS stat4 (mcv) ON col1, col2, col3, upper(col5::text) FROM
test;
Before 15.6, we haven't see this error. Unfortunately, I cannot reproduce
the issue with a minimal test case. Interestingly, the error states that
statistics for kind "f" are not yet built. If I'm not mistaken, "f"
corresponds to STATS_EXT_DEPENDENCIES, which we're not using anywhere in the
installation.
This particular PostgreSQL installation is used in an automated test
environment with default settings except for cursor_tuple_fraction = 1.0,
max_prepared_transactions = 100, and higher memory settings / resource
limits. The database itself was not upgraded from 15.5 to 15.6, it was
created with 15.6. The table/indexes/statistics were created before starting
tests and the time between table creation and the error occurrence was
around 19 minutes. We don't trigger analyze explicitely during this run.
My understanding is that this particular error represents an internal
inconsistency and cannot be caused by our particular statistics definitions.
Is this a known issue?
Cheers,
Horst Reiterer
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #18375: requested statistics kind "f" is not yet built for statistics object 16722
2024-03-04 07:19 BUG #18375: requested statistics kind "f" is not yet built for statistics object 16722 PG Bug reporting form <noreply@postgresql.org>
@ 2024-03-04 17:11 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 5+ messages in thread
From: Tom Lane @ 2024-03-04 17:11 UTC (permalink / raw)
To: horst.reiterer@fabasoft.com; +Cc: pgsql-bugs@lists.postgresql.org
PG Bug reporting form <noreply@postgresql.org> writes:
> Since upgrading from 15.5 to 15.6, the following error occurs once during a
> test run:
> requested statistics kind "f" is not yet built for statistics object
> 16722
> mcv.c:577 statext_mcv_load
> Statement: DELETE FROM test WHERE (col3 IN
> (501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,51]
I could not reproduce this on the basis of the supplied information.
Can you put together a self-contained test case, that is a SQL script
that reproduces the failure starting from an empty database?
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #18375: requested statistics kind "f" is not yet built for statistics object 16722
2024-03-04 07:19 BUG #18375: requested statistics kind "f" is not yet built for statistics object 16722 PG Bug reporting form <noreply@postgresql.org>
@ 2024-03-05 00:35 ` David Rowley <dgrowleyml@gmail.com>
2024-03-05 01:09 ` Re: BUG #18375: requested statistics kind "f" is not yet built for statistics object 16722 Richard Guo <guofenglinux@gmail.com>
1 sibling, 1 reply; 5+ messages in thread
From: David Rowley @ 2024-03-05 00:35 UTC (permalink / raw)
To: horst.reiterer@fabasoft.com; pgsql-bugs@lists.postgresql.org
On Tue, 5 Mar 2024 at 04:03, PG Bug reporting form
<noreply@postgresql.org> wrote:
> Before 15.6, we haven't see this error. Unfortunately, I cannot reproduce
> the issue with a minimal test case. Interestingly, the error states that
> statistics for kind "f" are not yet built. If I'm not mistaken, "f"
> corresponds to STATS_EXT_DEPENDENCIES, which we're not using anywhere in the
> installation.
I'd say that's a mistake in the ERROR message and unrelated to the
wider problem you're seeing.
I see there's another one in statext_expressions_load() too. The
attached fixes both.
David
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index 749e99d53a..5d7bdc9d12 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -2440,7 +2440,7 @@ statext_expressions_load(Oid stxoid, bool inh, int idx)
if (isnull)
elog(ERROR,
"requested statistics kind \"%c\" is not yet built for statistics object %u",
- STATS_EXT_DEPENDENCIES, stxoid);
+ STATS_EXT_EXPRESSIONS, stxoid);
eah = DatumGetExpandedArray(value);
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index 2b5ad434f7..b0e9aead84 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -572,7 +572,7 @@ statext_mcv_load(Oid mvoid, bool inh)
if (isnull)
elog(ERROR,
"requested statistics kind \"%c\" is not yet built for statistics object %u",
- STATS_EXT_DEPENDENCIES, mvoid);
+ STATS_EXT_MCV, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
Attachments:
[text/plain] fix_copy_pasto_in_ext_stats_error_msg.patch (1009B, ../../CAApHDvqSVo5Jd=-kKGQLjsJfN8oxF=q3PwRmwKZJSLG5+rdEzA@mail.gmail.com/2-fix_copy_pasto_in_ext_stats_error_msg.patch)
download | inline diff:
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index 749e99d53a..5d7bdc9d12 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -2440,7 +2440,7 @@ statext_expressions_load(Oid stxoid, bool inh, int idx)
if (isnull)
elog(ERROR,
"requested statistics kind \"%c\" is not yet built for statistics object %u",
- STATS_EXT_DEPENDENCIES, stxoid);
+ STATS_EXT_EXPRESSIONS, stxoid);
eah = DatumGetExpandedArray(value);
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index 2b5ad434f7..b0e9aead84 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -572,7 +572,7 @@ statext_mcv_load(Oid mvoid, bool inh)
if (isnull)
elog(ERROR,
"requested statistics kind \"%c\" is not yet built for statistics object %u",
- STATS_EXT_DEPENDENCIES, mvoid);
+ STATS_EXT_MCV, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #18375: requested statistics kind "f" is not yet built for statistics object 16722
2024-03-04 07:19 BUG #18375: requested statistics kind "f" is not yet built for statistics object 16722 PG Bug reporting form <noreply@postgresql.org>
2024-03-05 00:35 ` Re: BUG #18375: requested statistics kind "f" is not yet built for statistics object 16722 David Rowley <dgrowleyml@gmail.com>
@ 2024-03-05 01:09 ` Richard Guo <guofenglinux@gmail.com>
2024-03-05 03:20 ` Re: BUG #18375: requested statistics kind "f" is not yet built for statistics object 16722 David Rowley <dgrowleyml@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Richard Guo @ 2024-03-05 01:09 UTC (permalink / raw)
To: David Rowley <dgrowleyml@gmail.com>; +Cc: horst.reiterer@fabasoft.com; pgsql-bugs@lists.postgresql.org
On Tue, Mar 5, 2024 at 8:35 AM David Rowley <dgrowleyml@gmail.com> wrote:
> On Tue, 5 Mar 2024 at 04:03, PG Bug reporting form
> <noreply@postgresql.org> wrote:
> > Before 15.6, we haven't see this error. Unfortunately, I cannot reproduce
> > the issue with a minimal test case. Interestingly, the error states that
> > statistics for kind "f" are not yet built. If I'm not mistaken, "f"
> > corresponds to STATS_EXT_DEPENDENCIES, which we're not using anywhere in
> the
> > installation.
>
> I'd say that's a mistake in the ERROR message and unrelated to the
> wider problem you're seeing.
>
> I see there's another one in statext_expressions_load() too. The
> attached fixes both.
Nice catch. Looking at other statext_XXX_load functions and we're good
there.
Thanks
Richard
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #18375: requested statistics kind "f" is not yet built for statistics object 16722
2024-03-04 07:19 BUG #18375: requested statistics kind "f" is not yet built for statistics object 16722 PG Bug reporting form <noreply@postgresql.org>
2024-03-05 00:35 ` Re: BUG #18375: requested statistics kind "f" is not yet built for statistics object 16722 David Rowley <dgrowleyml@gmail.com>
2024-03-05 01:09 ` Re: BUG #18375: requested statistics kind "f" is not yet built for statistics object 16722 Richard Guo <guofenglinux@gmail.com>
@ 2024-03-05 03:20 ` David Rowley <dgrowleyml@gmail.com>
0 siblings, 0 replies; 5+ messages in thread
From: David Rowley @ 2024-03-05 03:20 UTC (permalink / raw)
To: Richard Guo <guofenglinux@gmail.com>; +Cc: horst.reiterer@fabasoft.com; pgsql-bugs@lists.postgresql.org
On Tue, 5 Mar 2024 at 14:10, Richard Guo <guofenglinux@gmail.com> wrote:
> Nice catch. Looking at other statext_XXX_load functions and we're good
> there.
I've pushed the fix for the incorrect stats kind in the error messages.
David
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2024-03-05 03:20 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-03-04 07:19 BUG #18375: requested statistics kind "f" is not yet built for statistics object 16722 PG Bug reporting form <noreply@postgresql.org>
2024-03-04 17:11 ` Tom Lane <tgl@sss.pgh.pa.us>
2024-03-05 00:35 ` David Rowley <dgrowleyml@gmail.com>
2024-03-05 01:09 ` Richard Guo <guofenglinux@gmail.com>
2024-03-05 03:20 ` David Rowley <dgrowleyml@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox