pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #19842: pg_restore_extended_stats() rejects a faithful pg_dump of ANALYZE-produced range expression statisti
10+ messages / 3 participants
[nested] [flat]
Commits from this thread:
2026-11-13 87524d0dd8 adc471e8ec Allow empty arrays of values in pg_restore_extended_stats()
2026-11-13 13eb56409f 3700d84c15 Lift range_bounds_histogram requirement in pg_restore_extended_stats()
* BUG #19842: pg_restore_extended_stats() rejects a faithful pg_dump of ANALYZE-produced range expression statisti
@ 2026-11-07 04:22 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 10+ messages in thread
From: PG Bug reporting form @ 2026-11-07 04:22 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: 303677365@qq.com
The following bug has been logged on the website:
Bug reference: 19842
Logged by: chunling qin
Email address: 303677365@qq.com
PostgreSQL version: 19rc1
Operating system: Linux x86_64; platform-independent (reproduced on
Description:
**Description:**
When an extended-statistics object has an expression of a range/multirange
type, and fewer than 2 non-empty range values are sampled by ANALYZE (a
2-row table, or a column where most ranges are empty),
`compute_range_stats()` still produces a statistics slot whose only range
field is `range_empty_frac`. This is legal and intentional:
`pg_stats_ext_exprs` exposes it, and `pg_dump --statistics-only` therefore
emits a `pg_restore_extended_stats()` call whose `exprs` JSON contains only
`range_empty_frac` (no `range_length_histogram`, no
`range_bounds_histogram`).
The restore side rejects exactly this input with a WARNING (and returns
false), so on restore/pg_upgrade the expression statistics are silently
lost. The planner then has no `range_empty_frac` and wrongfully assumes "no
empty ranges", producing wrong selectivity/row estimates.
By the rule established by the statistics-import series (commit 142fd8ff13d
and its series — "the source and the target should hold the same stats data
after restore"), a restore function must accept the statistics that ANALYZE
itself can produce; this is a case that series does not cover.
**Reproduction (self-contained SQL; verified on master):**
```sql
-- source side: 2-row table, range expression with < 2 non-empty values
DROP TABLE IF EXISTS t;
CREATE TABLE t (id int, r int4range);
INSERT INTO t VALUES (1, int4range(1,5)), (2, 'empty'::int4range);
CREATE STATISTICS stx ON (r * int4range(1,10)) FROM t;
ANALYZE t;
-- ANALYZE legitimately produced ONLY range_empty_frac (0.5):
SELECT e.range_length_histogram, e.range_empty_frac,
e.range_bounds_histogram
FROM pg_stats_ext_exprs e
WHERE e.statistics_name='stx' AND NOT e.inherited;
-- (NULL) | 0.5 | (NULL)
-- what pg_dump --statistics-only emits for this object (replayed verbatim):
SELECT
pg_catalog.pg_clear_extended_stats('public','t','public','stx',false);
SELECT * FROM pg_catalog.pg_restore_extended_stats(
'version', '200000'::integer,
'schemaname', 'public',
'relname', 't',
'statistics_schemaname', 'public',
'statistics_name', 'stx',
'inherited', 'f'::boolean,
'exprs', '[{"avg_width": "13","null_frac": "0","n_distinct": "-1",
"range_empty_frac": "0.5"}]'::jsonb
);
-- WARNING: ... (rejected, returns false; restore continues, statistics
lost)
-- after restore: the statistics are gone (expected: range_empty_frac =
0.5):
SELECT e.range_length_histogram, e.range_empty_frac,
e.range_bounds_histogram
FROM pg_stats_ext_exprs e
WHERE e.statistics_name='stx' AND NOT e.inherited;
-- (NULL) | (NULL) | (NULL) <- lost
```
**Actual results:** `pg_restore_extended_stats()` raises a WARNING and
returns false for the exact `exprs` JSON that pg_dump emits from this legal
ANALYZE output; the restored cluster has no `range_empty_frac`.
**Expected behavior:** the restore function should accept a stats slot whose
only range field is `range_empty_frac` (equivalently: treat missing
histogram arrays the same way `compute_range_stats()` does — an empty array
means "no histogram"), restoring `range_empty_frac = 0.5`.
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: BUG #19842: pg_restore_extended_stats() rejects a faithful pg_dump of ANALYZE-produced range expression statisti
@ 2026-11-09 05:28 Michael Paquier <michael@paquier.xyz>
parent: PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 10+ messages in thread
From: Michael Paquier @ 2026-11-09 05:28 UTC (permalink / raw)
To: 303677365@qq.com; pgsql-bugs@lists.postgresql.org; +Cc: Corey Huinker <corey.huinker@gmail.com>
On Sat, Nov 07, 2026 at 04:22:06AM +0000, PG Bug reporting form wrote:
> When an extended-statistics object has an expression of a range/multirange
> type, and fewer than 2 non-empty range values are sampled by ANALYZE (a
> 2-row table, or a column where most ranges are empty),
> `compute_range_stats()` still produces a statistics slot whose only range
> field is `range_empty_frac`. This is legal and intentional:
> `pg_stats_ext_exprs` exposes it, and `pg_dump --statistics-only` therefore
> emits a `pg_restore_extended_stats()` call whose `exprs` JSON contains only
> `range_empty_frac` (no `range_length_histogram`, no
> `range_bounds_histogram`).
>
> The restore side rejects exactly this input with a WARNING (and returns
> false), so on restore/pg_upgrade the expression statistics are silently
> lost. The planner then has no `range_empty_frac` and wrongfully assumes "no
> empty ranges", producing wrong selectivity/row estimates.
You are not mentioning the attribute case, that exists down to v18:
CREATE TABLE promo (id int, valid int4range);
INSERT INTO promo
SELECT i, CASE WHEN i = 1 THEN int4range(1, 100) ELSE 'empty' END
FROM generate_series(1, 10000) i;
ANALYZE promo;
SELECT range_length_histogram, range_empty_frac, range_bounds_histogram
FROM pg_stats WHERE tablename = 'promo' AND attname = 'valid';
This generates the following dump data:
SELECT * FROM pg_catalog.pg_restore_attribute_stats(
'version', '200000'::integer,
'schemaname', 'public',
'relname', 'promo',
'attname', 'valid',
'inherited', 'f'::boolean,
'null_frac', '0'::real,
'avg_width', '6'::integer,
'n_distinct', '-1'::real,
'range_length_histogram', '{}'::text,
'range_empty_frac', '0.9999'::real);
And once a restore is attempted:
WARNING: 22023: "range_length_histogram" must be a one-dimensional
array
LOCATION: statatt_build_stavalues, stat_utils.c:627
pg_restore_attribute_stats
----------------------------
f
(1 row)
Hence the extstats case has just been copy-pasting the same rule as
previously, because we have the same 1-dimensional array requirement.
In order to do something about that, we would need to allow a case in
the restore paths where empty arrays are OK on an option-basis. That
means touching array_in_safe() and statatt_build_stavalues(), or
change their interfaces. Invasive, but after seeing 261f89a976bf I
am afraid that we have to fix that especially for the MCEs.
range_bounds_histogram should be mostly esoteric in this case, no?
Still it seems good to make consistent choices across the board,
especially as the range bound histograms require the same fixes.
Corey, what's your take?
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: BUG #19842: pg_restore_extended_stats() rejects a faithful pg_dump of ANALYZE-produced range expression statisti
@ 2026-11-10 03:49 Corey Huinker <corey.huinker@gmail.com>
parent: Michael Paquier <michael@paquier.xyz>
0 siblings, 1 reply; 10+ messages in thread
From: Corey Huinker @ 2026-11-10 03:49 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; +Cc: 303677365@qq.com; pgsql-bugs@lists.postgresql.org
>
> Hence the extstats case has just been copy-pasting the same rule as
> previously, because we have the same 1-dimensional array requirement.
>
> In order to do something about that, we would need to allow a case in
> the restore paths where empty arrays are OK on an option-basis. That
> means touching array_in_safe() and statatt_build_stavalues(), or
> change their interfaces. Invasive, but after seeing 261f89a976bf I
> am afraid that we have to fix that especially for the MCEs.
> range_bounds_histogram should be mostly esoteric in this case, no?
> Still it seems good to make consistent choices across the board,
> especially as the range bound histograms require the same fixes.
>
> Corey, what's your take?
>
Just seeing your reply now, but I also got drawn to 261f89a976bf not making
the same (stats->numvalues[k] > 0) to (stats->stavalues[k] != NULL) change
for extstats as was made for attrstats.
In addition, we need to complete decouple found/notfound checks for
range_bounds_histogram from the other two, as all of those "must be paired"
checks are for things that share a stakind.
I'll toy around with some workarounds for the '{}' case and get back to you.
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: BUG #19842: pg_restore_extended_stats() rejects a faithful pg_dump of ANALYZE-produced range expression statisti
@ 2026-11-10 03:52 Michael Paquier <michael@paquier.xyz>
parent: Corey Huinker <corey.huinker@gmail.com>
0 siblings, 1 reply; 10+ messages in thread
From: Michael Paquier @ 2026-11-10 03:52 UTC (permalink / raw)
To: Corey Huinker <corey.huinker@gmail.com>; +Cc: 303677365@qq.com; pgsql-bugs@lists.postgresql.org
On Mon, Nov 09, 2026 at 10:49:38PM -0500, Corey Huinker wrote:
> Just seeing your reply now, but I also got drawn to 261f89a976bf not making
> the same (stats->numvalues[k] > 0) to (stats->stavalues[k] != NULL) change
> for extstats as was made for attrstats.
Yeah, we need to fix that first, I think..
> In addition, we need to complete decouple found/notfound checks for
> range_bounds_histogram from the other two, as all of those "must be paired"
> checks are for things that share a stakind.
>
> I'll toy around with some workarounds for the '{}' case and get back to you.
Okay, thanks. I'll probably tackle some more issues that are assigned
to my head first, which should take a couple of days.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: BUG #19842: pg_restore_extended_stats() rejects a faithful pg_dump of ANALYZE-produced range expression statisti
@ 2026-11-11 01:54 Corey Huinker <corey.huinker@gmail.com>
parent: Michael Paquier <michael@paquier.xyz>
0 siblings, 2 replies; 10+ messages in thread
From: Corey Huinker @ 2026-11-11 01:54 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; +Cc: 303677365@qq.com; pgsql-bugs@lists.postgresql.org
>
> Okay, thanks. I'll probably tackle some more issues that are assigned
> to my head first, which should take a couple of days.
> --
> Michael
>
This bug has the same root cause as bug #19857, but because that one deals
exclusively with attribute stats it needs to be backported to 18 as well,
so I kept that separate.
0001 - Same bugfix proposed for #19587
0002 - Decoupling range_bounds_histogram from checks against
range_length_histogram and range_empty_frac
0003 - The extended stats equivalent of 0001
Attachments: download all (3 files, .tar.gz)
v2-0001-Allow-empty-arrays-as-input-for-pg_restore_attrib.patch (text/x-patch, 7.0K) download
From 6cca2e003c1e43d4b3369e8802c116cc89691fed Mon Sep 17 00:00:00 2001
From: Corey Huinker <corey.huinker@gmail.com>
Date: Tue, 10 Nov 2026 16:14:56 -0500
Subject: [PATCH v2 1/3] Allow empty arrays as input for
pg_restore_attribute_stats.
The attribute statistic code required that most_common_vals and
most_common_freqs arrays, among others, must be one dimensional, which
ruled out the possiblity of empty arrays.
This fix relaxes that requirement to allow for empty arrays , and then
makes all array length tests aware that an empty array has no
dimensions. Currently these checks only happen for most_common_vals and
most_common_freqs, as those two arrays must have the same length. All
other usages have no such requirement.
This was reported on its own in Bug #19857, which was recognized as
being the same problem as Bug #19842. This fix is provided on its own
because it needs to be backported to 18, whereas 19857 only needs to be
backported to 19.
Reported-by: Atish Prakash <125atishprak@gmail.com>
Reported-by: chunling qin <303677365@qq.com>
Author: Corey Huinker <corey.huinker@gmail.com>
Discussion: https://postgr.es/m/19842-6e808a09ff4b75d2@postgresql.org
Discussion: https://postgr.es/m/19857-6e808a09ff4b75d2@postgresql.org
Bug: #19842
Bug: #19857
Backpatch-through: 18
---
src/backend/statistics/attribute_stats.c | 4 +-
src/backend/statistics/stat_utils.c | 8 ++--
src/test/regress/expected/stats_import.out | 52 +++++++++++++++++++++-
src/test/regress/sql/stats_import.sql | 31 +++++++++++++
4 files changed, 88 insertions(+), 7 deletions(-)
diff --git a/src/backend/statistics/attribute_stats.c b/src/backend/statistics/attribute_stats.c
index f4bb846e88f..027b90b8ea7 100644
--- a/src/backend/statistics/attribute_stats.c
+++ b/src/backend/statistics/attribute_stats.c
@@ -405,8 +405,8 @@ attribute_statistics_update_internal(Oid reloid,
{
ArrayType *vals_arr = DatumGetArrayTypeP(stavalues);
ArrayType *nums_arr = DatumGetArrayTypeP(stanumbers);
- int nvals = ARR_DIMS(vals_arr)[0];
- int nnums = ARR_DIMS(nums_arr)[0];
+ int nvals = (ARR_NDIM(vals_arr) > 0) ? ARR_DIMS(vals_arr)[0] : 0;
+ int nnums = (ARR_NDIM(nums_arr) > 0) ? ARR_DIMS(nums_arr)[0] : 0;
if (nvals != nnums)
{
diff --git a/src/backend/statistics/stat_utils.c b/src/backend/statistics/stat_utils.c
index e8117ede407..7929a6b6827 100644
--- a/src/backend/statistics/stat_utils.c
+++ b/src/backend/statistics/stat_utils.c
@@ -64,7 +64,7 @@ stats_check_required_arg(FunctionCallInfo fcinfo,
/*
* Check that argument is either NULL or a one dimensional array with no
- * NULLs.
+ * NULLs, or an empty array.
*
* If a problem is found, emit a WARNING, and return false. Otherwise return
* true.
@@ -81,7 +81,7 @@ stats_check_arg_array(FunctionCallInfo fcinfo,
arr = DatumGetArrayTypeP(PG_GETARG_DATUM(argnum));
- if (ARR_NDIM(arr) != 1)
+ if (ARR_NDIM(arr) > 1)
{
ereport(WARNING,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
@@ -622,11 +622,11 @@ statatt_build_stavalues(const char *staname, FmgrInfo *array_in, Datum d, Oid ty
pfree(s);
- if (ARR_NDIM(DatumGetArrayTypeP(result)) != 1)
+ if (ARR_NDIM(DatumGetArrayTypeP(result)) > 1)
{
ereport(WARNING,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("\"%s\" must be a one-dimensional array", staname)));
+ errmsg("\"%s\" must be a one-dimensional array or empty", staname)));
*ok = false;
return (Datum) 0;
}
diff --git a/src/test/regress/expected/stats_import.out b/src/test/regress/expected/stats_import.out
index 60a0f20b488..8f91dc3a70d 100644
--- a/src/test/regress/expected/stats_import.out
+++ b/src/test/regress/expected/stats_import.out
@@ -967,7 +967,7 @@ SELECT pg_catalog.pg_restore_attribute_stats(
'most_common_vals', '{{2,1},{3,4}}'::text,
'most_common_freqs', '{0.3,0.25,0.05,0.04}'::real[]
);
-WARNING: "most_common_vals" must be a one-dimensional array
+WARNING: "most_common_vals" must be a one-dimensional array or empty
pg_restore_attribute_stats
----------------------------
f
@@ -4324,6 +4324,56 @@ SELECT count(*) FROM pg_statistic s
0
(1 row)
+-- Bug #19842/#19857
+SELECT * FROM pg_catalog.pg_restore_attribute_stats(
+ 'schemaname', 'stats_import',
+ 'relname', 'test',
+ 'attname', 'arange',
+ 'inherited', 'f'::boolean,
+ 'range_length_histogram', '{}'::text,
+ 'range_empty_frac', '1'::real);
+ pg_restore_attribute_stats
+----------------------------
+ t
+(1 row)
+
+-- Bug #19842/#19857 - one empty mismatch
+SELECT pg_catalog.pg_restore_attribute_stats(
+ 'schemaname', 'stats_import',
+ 'relname', 'test',
+ 'attname', 'id',
+ 'inherited', false::boolean,
+ 'most_common_vals', '{1,3}'::text,
+ 'most_common_freqs', '{}'::real[]);
+WARNING: could not parse "most_common_vals": incorrect number of elements (same as "most_common_freqs" required)
+ pg_restore_attribute_stats
+----------------------------
+ f
+(1 row)
+
+-- Bug #19842/#19857 - both empty
+SELECT pg_catalog.pg_restore_attribute_stats(
+ 'schemaname', 'stats_import',
+ 'relname', 'test',
+ 'attname', 'id',
+ 'inherited', false::boolean,
+ 'most_common_vals', '{}'::text,
+ 'most_common_freqs', '{}'::real[]);
+ pg_restore_attribute_stats
+----------------------------
+ t
+(1 row)
+
+SELECT most_common_vals, most_common_freqs
+FROM pg_stats
+WHERE schemaname = 'stats_import'
+AND tablename = 'test'
+AND attname = 'id';
+ most_common_vals | most_common_freqs
+------------------+-------------------
+ {} | {}
+(1 row)
+
DROP SCHEMA stats_import CASCADE;
NOTICE: drop cascades to 39 other objects
DETAIL: drop cascades to view stats_import.pg_stats_stable
diff --git a/src/test/regress/sql/stats_import.sql b/src/test/regress/sql/stats_import.sql
index e537a9d6f67..5bcd86288bf 100644
--- a/src/test/regress/sql/stats_import.sql
+++ b/src/test/regress/sql/stats_import.sql
@@ -3063,4 +3063,35 @@ SELECT count(*) FROM pg_statistic s
AND a.attnum = s.staattnum
AND NOT a.attisdropped);
+-- Bug #19842/#19857
+SELECT * FROM pg_catalog.pg_restore_attribute_stats(
+ 'schemaname', 'stats_import',
+ 'relname', 'test',
+ 'attname', 'arange',
+ 'inherited', 'f'::boolean,
+ 'range_length_histogram', '{}'::text,
+ 'range_empty_frac', '1'::real);
+-- Bug #19842/#19857 - one empty mismatch
+SELECT pg_catalog.pg_restore_attribute_stats(
+ 'schemaname', 'stats_import',
+ 'relname', 'test',
+ 'attname', 'id',
+ 'inherited', false::boolean,
+ 'most_common_vals', '{1,3}'::text,
+ 'most_common_freqs', '{}'::real[]);
+-- Bug #19842/#19857 - both empty
+SELECT pg_catalog.pg_restore_attribute_stats(
+ 'schemaname', 'stats_import',
+ 'relname', 'test',
+ 'attname', 'id',
+ 'inherited', false::boolean,
+ 'most_common_vals', '{}'::text,
+ 'most_common_freqs', '{}'::real[]);
+
+SELECT most_common_vals, most_common_freqs
+FROM pg_stats
+WHERE schemaname = 'stats_import'
+AND tablename = 'test'
+AND attname = 'id';
+
DROP SCHEMA stats_import CASCADE;
base-commit: 952bab8b74d40fcfd25e1949865c3907e676504e
--
2.56.0
v2-0002-Decouple-range_bounds_histogram-requirement-from-.patch (text/x-patch, 9.0K) download
From dadb1c35b53d1e2c4cfb1253288c7d3aa5d3a2d6 Mon Sep 17 00:00:00 2001
From: Corey Huinker <corey.huinker@gmail.com>
Date: Tue, 10 Nov 2026 12:48:51 -0500
Subject: [PATCH v2 2/3] Decouple range_bounds_histogram requirement from
REF+RLH pair.
The extended stats code required range_bounds_histogram,
range_length_histogram, and range_empty_frac to all be set or all be
not found or NULL. That was incorrect, the real pair is range_empty_frac
and range_length_histogram because they share a stakind while
range_bounds_histogram has its own stakind and thus occupies its own
stakind/stavalues/stanumbers slot.
While it is unlikely that a well-formed extended statistic would have
one of the stakinds but not the other, this check is to block impossible
statistics, not unwise ones.
This was discovered during an investigation of Bug #19842, but is not
a direct component of that bug.
Reported-by: chunling qin <303677365@qq.com>
Reported-by: Corey Huinker <corey.huinker@gmail.com>
Discussion: https://postgr.es/m/19842-ca042326dd2430a4@postgresql.org
Bug: #19842
Backpatch-through: 19
---
src/backend/statistics/extended_stats_funcs.c | 20 ++++-------
src/test/regress/expected/stats_import.out | 33 +++++--------------
src/test/regress/sql/stats_import.sql | 18 +++-------
3 files changed, 20 insertions(+), 51 deletions(-)
diff --git a/src/backend/statistics/extended_stats_funcs.c b/src/backend/statistics/extended_stats_funcs.c
index e6fe3ecd00a..020d64086ce 100644
--- a/src/backend/statistics/extended_stats_funcs.c
+++ b/src/backend/statistics/extended_stats_funcs.c
@@ -1196,10 +1196,10 @@ import_pg_statistic(Relation pgsd, JsonbContainer *cont,
goto pg_statistic_error;
/*
- * There are two arg pairs, MCV+MCF and MCEV+MCEF. Both values must
- * either be found or not be found. Any disagreement is a warning. Once
- * we have ruled out disagreeing pairs, we can use either found flag as a
- * proxy for the other.
+ * There are three arg pairs, MCV+MCF, MCEV+MCEF, and RLH+REF. Both
+ * values must either be found or not be found. Any disagreement is a
+ * warning. Once we have ruled out disagreeing pairs, we can use either
+ * found flag as a proxy for the other.
*/
if (found[MOST_COMMON_VALS_ELEM] != found[MOST_COMMON_FREQS_ELEM])
{
@@ -1224,21 +1224,15 @@ import_pg_statistic(Relation pgsd, JsonbContainer *cont,
goto pg_statistic_error;
}
- /*
- * Range types may expect three values to be set. All three of them must
- * either be found or not be found. Any disagreement is a warning.
- */
- if (found[RANGE_LENGTH_HISTOGRAM_ELEM] != found[RANGE_EMPTY_FRAC_ELEM] ||
- found[RANGE_LENGTH_HISTOGRAM_ELEM] != found[RANGE_BOUNDS_HISTOGRAM_ELEM])
+ if (found[RANGE_LENGTH_HISTOGRAM_ELEM] != found[RANGE_EMPTY_FRAC_ELEM])
{
ereport(WARNING,
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("could not parse \"%s\": invalid element in expression %d",
argname, exprnum),
- errhint("\"%s\", \"%s\", and \"%s\" must be all either strings or all nulls.",
+ errhint("\"%s\" and \"%s\" must be both either strings or nulls.",
extexprargname[RANGE_LENGTH_HISTOGRAM_ELEM],
- extexprargname[RANGE_EMPTY_FRAC_ELEM],
- extexprargname[RANGE_BOUNDS_HISTOGRAM_ELEM]));
+ extexprargname[RANGE_EMPTY_FRAC_ELEM]));
goto pg_statistic_error;
}
diff --git a/src/test/regress/expected/stats_import.out b/src/test/regress/expected/stats_import.out
index 8f91dc3a70d..466582d364b 100644
--- a/src/test/regress/expected/stats_import.out
+++ b/src/test/regress/expected/stats_import.out
@@ -2785,6 +2785,7 @@ CREATE STATISTICS stats_import.test_mr_stat_clone
FROM stats_import.test_mr_clone;
-- Check for invalid value combinations for range types.
-- Only range_bounds_histogram (other two missing)
+-- this is ok per bug 19842
SELECT pg_catalog.pg_restore_extended_stats(
'schemaname', 'stats_import',
'relname', 'test_mr',
@@ -2792,30 +2793,12 @@ SELECT pg_catalog.pg_restore_extended_stats(
'statistics_name', 'test_mr_stat',
'inherited', false,
'exprs', '[{"range_bounds_histogram": "{\"[1,10200)\",\"[11,10200)\"}"}]'::jsonb);
-WARNING: could not parse "exprs": invalid element in expression -1
-HINT: "range_length_histogram", "range_empty_frac", and "range_bounds_histogram" must be all either strings or all nulls.
pg_restore_extended_stats
---------------------------
- f
+ t
(1 row)
--- Only range_length_histogram and range_empty_frac
--- (range_bounds_histogram missing)
-SELECT pg_catalog.pg_restore_extended_stats(
- 'schemaname', 'stats_import',
- 'relname', 'test_mr',
- 'statistics_schemaname', 'stats_import',
- 'statistics_name', 'test_mr_stat',
- 'inherited', false,
- 'exprs', '[{"range_length_histogram": "{10179,10189}", "range_empty_frac": "0"}]'::jsonb);
-WARNING: could not parse "exprs": invalid element in expression -1
-HINT: "range_length_histogram", "range_empty_frac", and "range_bounds_histogram" must be all either strings or all nulls.
- pg_restore_extended_stats
----------------------------
- f
-(1 row)
-
--- Only range_bounds_histogram and range_empty_frac
+-- Only range_empty_frac
-- (range_length_histogram missing)
SELECT pg_catalog.pg_restore_extended_stats(
'schemaname', 'stats_import',
@@ -2823,15 +2806,15 @@ SELECT pg_catalog.pg_restore_extended_stats(
'statistics_schemaname', 'stats_import',
'statistics_name', 'test_mr_stat',
'inherited', false,
- 'exprs', '[{"range_bounds_histogram": "{\"[1,10200)\"}", "range_empty_frac": "0"}]'::jsonb);
+ 'exprs', '[{"range_empty_frac": "0"}]'::jsonb);
WARNING: could not parse "exprs": invalid element in expression -1
-HINT: "range_length_histogram", "range_empty_frac", and "range_bounds_histogram" must be all either strings or all nulls.
+HINT: "range_length_histogram" and "range_empty_frac" must be both either strings or nulls.
pg_restore_extended_stats
---------------------------
f
(1 row)
--- Only range_bounds_histogram and range_length_histogram
+-- Only range_length_histogram
-- (range_empty_frac missing)
SELECT pg_catalog.pg_restore_extended_stats(
'schemaname', 'stats_import',
@@ -2839,9 +2822,9 @@ SELECT pg_catalog.pg_restore_extended_stats(
'statistics_schemaname', 'stats_import',
'statistics_name', 'test_mr_stat',
'inherited', false,
- 'exprs', '[{"range_bounds_histogram": "{\"[1,10200)\"}", "range_length_histogram": "{10179}"}]'::jsonb);
+ 'exprs', '[{"range_length_histogram": "{10179}"}]'::jsonb);
WARNING: could not parse "exprs": invalid element in expression -1
-HINT: "range_length_histogram", "range_empty_frac", and "range_bounds_histogram" must be all either strings or all nulls.
+HINT: "range_length_histogram" and "range_empty_frac" must be both either strings or nulls.
pg_restore_extended_stats
---------------------------
f
diff --git a/src/test/regress/sql/stats_import.sql b/src/test/regress/sql/stats_import.sql
index 5bcd86288bf..5d71acf106b 100644
--- a/src/test/regress/sql/stats_import.sql
+++ b/src/test/regress/sql/stats_import.sql
@@ -2015,6 +2015,7 @@ CREATE STATISTICS stats_import.test_mr_stat_clone
-- Check for invalid value combinations for range types.
-- Only range_bounds_histogram (other two missing)
+-- this is ok per bug 19842
SELECT pg_catalog.pg_restore_extended_stats(
'schemaname', 'stats_import',
'relname', 'test_mr',
@@ -2022,16 +2023,7 @@ SELECT pg_catalog.pg_restore_extended_stats(
'statistics_name', 'test_mr_stat',
'inherited', false,
'exprs', '[{"range_bounds_histogram": "{\"[1,10200)\",\"[11,10200)\"}"}]'::jsonb);
--- Only range_length_histogram and range_empty_frac
--- (range_bounds_histogram missing)
-SELECT pg_catalog.pg_restore_extended_stats(
- 'schemaname', 'stats_import',
- 'relname', 'test_mr',
- 'statistics_schemaname', 'stats_import',
- 'statistics_name', 'test_mr_stat',
- 'inherited', false,
- 'exprs', '[{"range_length_histogram": "{10179,10189}", "range_empty_frac": "0"}]'::jsonb);
--- Only range_bounds_histogram and range_empty_frac
+-- Only range_empty_frac
-- (range_length_histogram missing)
SELECT pg_catalog.pg_restore_extended_stats(
'schemaname', 'stats_import',
@@ -2039,8 +2031,8 @@ SELECT pg_catalog.pg_restore_extended_stats(
'statistics_schemaname', 'stats_import',
'statistics_name', 'test_mr_stat',
'inherited', false,
- 'exprs', '[{"range_bounds_histogram": "{\"[1,10200)\"}", "range_empty_frac": "0"}]'::jsonb);
--- Only range_bounds_histogram and range_length_histogram
+ 'exprs', '[{"range_empty_frac": "0"}]'::jsonb);
+-- Only range_length_histogram
-- (range_empty_frac missing)
SELECT pg_catalog.pg_restore_extended_stats(
'schemaname', 'stats_import',
@@ -2048,7 +2040,7 @@ SELECT pg_catalog.pg_restore_extended_stats(
'statistics_schemaname', 'stats_import',
'statistics_name', 'test_mr_stat',
'inherited', false,
- 'exprs', '[{"range_bounds_histogram": "{\"[1,10200)\"}", "range_length_histogram": "{10179}"}]'::jsonb);
+ 'exprs', '[{"range_length_histogram": "{10179}"}]'::jsonb);
-- warn: range bounds histogram with unsorted elements
SELECT pg_catalog.pg_restore_extended_stats(
'schemaname', 'stats_import',
--
2.56.0
v2-0003-Allow-empty-arrays-as-input-for-pg_restore_extend.patch (text/x-patch, 6.9K) download
From e3231bfb71b9796570c3858a9b0a8e593435d345 Mon Sep 17 00:00:00 2001
From: Corey Huinker <corey.huinker@gmail.com>
Date: Tue, 10 Nov 2026 20:32:11 -0500
Subject: [PATCH v2 3/3] Allow empty arrays as input for
pg_restore_extended_stats.
Fix the case where a pg_restore_extended_stats call with parameters
derived from existing statistics derived via pg_dump cannot be
re-imported back into the table.
It is possible for the statistics for range_length_histogram in an
extended statistics expression to be an empty array. Empty arrays are
considered to have 0 dimensions, which runs afoul of existing checks
that expect exactly one dimension, thus preventing the otherwise
legitimate statistics from being imported.
This fix relaxes the case to allow 0 or 1 dimensional arrays to be
constructed, and further adds checks for emptiness when trying to
determine the number of items in an array.
Reported-by: chunling qin <303677365@qq.com>
Author: Corey Huinker <corey.huinker@gmail.com>
Discussion: https://postgr.es/m/19842-ca042326dd2430a4@postgresql.org
Bug: #19842
Backpatch-through: 19
---
src/backend/statistics/extended_stats_funcs.c | 8 +--
src/test/regress/expected/stats_import.out | 55 ++++++++++++++++++-
src/test/regress/sql/stats_import.sql | 43 +++++++++++++++
3 files changed, 101 insertions(+), 5 deletions(-)
diff --git a/src/backend/statistics/extended_stats_funcs.c b/src/backend/statistics/extended_stats_funcs.c
index 020d64086ce..219ce1963f0 100644
--- a/src/backend/statistics/extended_stats_funcs.c
+++ b/src/backend/statistics/extended_stats_funcs.c
@@ -1096,11 +1096,11 @@ array_in_safe(FmgrInfo *array_in, const char *s, Oid typid, int32 typmod,
return (Datum) 0;
}
- if (ARR_NDIM(DatumGetArrayTypeP(result)) != 1)
+ if (ARR_NDIM(DatumGetArrayTypeP(result)) > 1)
{
ereport(WARNING,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("could not import element \"%s\" in expression %d: must be a one-dimensional array",
+ errmsg("could not import element \"%s\" in expression %d: must be a one-dimensional array or empty",
element_name, exprnum)));
return (Datum) 0;
}
@@ -1369,8 +1369,8 @@ import_pg_statistic(Relation pgsd, JsonbContainer *cont,
{
ArrayType *vals_arr = DatumGetArrayTypeP(stavalues);
ArrayType *nums_arr = DatumGetArrayTypeP(stanumbers);
- int nvals = ARR_DIMS(vals_arr)[0];
- int nnums = ARR_DIMS(nums_arr)[0];
+ int nvals = (ARR_NDIM(vals_arr) > 0) ? ARR_DIMS(vals_arr)[0] : 0;
+ int nnums = (ARR_NDIM(nums_arr) > 0) ? ARR_DIMS(nums_arr)[0] : 0;
if (nvals != nnums)
{
diff --git a/src/test/regress/expected/stats_import.out b/src/test/regress/expected/stats_import.out
index 466582d364b..f15ef2e864b 100644
--- a/src/test/regress/expected/stats_import.out
+++ b/src/test/regress/expected/stats_import.out
@@ -3246,7 +3246,7 @@ SELECT pg_catalog.pg_restore_extended_stats(
{ "most_common_vals": "{{1,2},{3,4}}", "most_common_freqs": "{0.3,0.25,0.05,0.04}" },
{ "most_common_vals": "{2}", "most_common_freqs": "{0.5}" }
]'::jsonb);
-WARNING: could not import element "most_common_vals" in expression -1: must be a one-dimensional array
+WARNING: could not import element "most_common_vals" in expression -1: must be a one-dimensional array or empty
pg_restore_extended_stats
---------------------------
f
@@ -4357,6 +4357,59 @@ AND attname = 'id';
{} | {}
(1 row)
+-- BUG #19842
+TRUNCATE TABLE stats_import.test;
+INSERT INTO stats_import.test(id, arange)
+VALUES (1, int4range(1,5)), (2, 'empty'::int4range);
+CREATE STATISTICS stats_import.range_stat ON (arange * int4range(1,10))
+FROM stats_import.test;
+ANALYZE stats_import.test;
+SELECT * FROM pg_catalog.pg_restore_extended_stats(
+ 'schemaname', 'stats_import',
+ 'relname', 'test',
+ 'statistics_schemaname', 'stats_import',
+ 'statistics_name', 'range_stat',
+ 'inherited', 'f'::boolean,
+ 'exprs', '[{"avg_width": "13","null_frac": "0","n_distinct": "-1",
+ "range_empty_frac": "0.5"}]'::jsonb
+);
+WARNING: could not parse "exprs": invalid element in expression -1
+HINT: "range_length_histogram" and "range_empty_frac" must be both either strings or nulls.
+ pg_restore_extended_stats
+---------------------------
+ f
+(1 row)
+
+SELECT * FROM pg_catalog.pg_restore_extended_stats(
+ 'schemaname', 'stats_import',
+ 'relname', 'test',
+ 'statistics_schemaname', 'stats_import',
+ 'statistics_name', 'range_stat',
+ 'inherited', 'f'::boolean,
+ 'exprs', '[{"avg_width": "13","null_frac": "0","n_distinct": "-1",
+ "range_length_histogram": "{}", "range_empty_frac": "0.5"}]'::jsonb
+);
+ pg_restore_extended_stats
+---------------------------
+ t
+(1 row)
+
+SELECT * FROM pg_catalog.pg_restore_attribute_stats(
+ 'schemaname', 'stats_import',
+ 'relname', 'test',
+ 'attname', 'arange',
+ 'inherited', 'f'::boolean,
+ 'null_frac', '0'::real,
+ 'avg_width', '10'::integer,
+ 'n_distinct', '-1'::real,
+ 'range_length_histogram', '{}'::text,
+ 'range_empty_frac', '0.5'::real
+);
+ pg_restore_attribute_stats
+----------------------------
+ t
+(1 row)
+
DROP SCHEMA stats_import CASCADE;
NOTICE: drop cascades to 39 other objects
DETAIL: drop cascades to view stats_import.pg_stats_stable
diff --git a/src/test/regress/sql/stats_import.sql b/src/test/regress/sql/stats_import.sql
index 5d71acf106b..a64cf421240 100644
--- a/src/test/regress/sql/stats_import.sql
+++ b/src/test/regress/sql/stats_import.sql
@@ -3086,4 +3086,47 @@ WHERE schemaname = 'stats_import'
AND tablename = 'test'
AND attname = 'id';
+-- BUG #19842
+TRUNCATE TABLE stats_import.test;
+
+INSERT INTO stats_import.test(id, arange)
+VALUES (1, int4range(1,5)), (2, 'empty'::int4range);
+
+CREATE STATISTICS stats_import.range_stat ON (arange * int4range(1,10))
+FROM stats_import.test;
+
+ANALYZE stats_import.test;
+
+SELECT * FROM pg_catalog.pg_restore_extended_stats(
+ 'schemaname', 'stats_import',
+ 'relname', 'test',
+ 'statistics_schemaname', 'stats_import',
+ 'statistics_name', 'range_stat',
+ 'inherited', 'f'::boolean,
+ 'exprs', '[{"avg_width": "13","null_frac": "0","n_distinct": "-1",
+ "range_empty_frac": "0.5"}]'::jsonb
+);
+
+SELECT * FROM pg_catalog.pg_restore_extended_stats(
+ 'schemaname', 'stats_import',
+ 'relname', 'test',
+ 'statistics_schemaname', 'stats_import',
+ 'statistics_name', 'range_stat',
+ 'inherited', 'f'::boolean,
+ 'exprs', '[{"avg_width": "13","null_frac": "0","n_distinct": "-1",
+ "range_length_histogram": "{}", "range_empty_frac": "0.5"}]'::jsonb
+);
+
+SELECT * FROM pg_catalog.pg_restore_attribute_stats(
+ 'schemaname', 'stats_import',
+ 'relname', 'test',
+ 'attname', 'arange',
+ 'inherited', 'f'::boolean,
+ 'null_frac', '0'::real,
+ 'avg_width', '10'::integer,
+ 'n_distinct', '-1'::real,
+ 'range_length_histogram', '{}'::text,
+ 'range_empty_frac', '0.5'::real
+);
+
DROP SCHEMA stats_import CASCADE;
--
2.56.0
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: BUG #19842: pg_restore_extended_stats() rejects a faithful pg_dump of ANALYZE-produced range expression statisti
@ 2026-11-11 06:34 Michael Paquier <michael@paquier.xyz>
parent: Corey Huinker <corey.huinker@gmail.com>
1 sibling, 0 replies; 10+ messages in thread
From: Michael Paquier @ 2026-11-11 06:34 UTC (permalink / raw)
To: Corey Huinker <corey.huinker@gmail.com>; +Cc: 303677365@qq.com; pgsql-bugs@lists.postgresql.org
On Tue, Nov 10, 2026 at 08:54:33PM -0500, Corey Huinker wrote:
> This bug has the same root cause as bug #19857, but because that one deals
> exclusively with attribute stats it needs to be backported to 18 as well,
> so I kept that separate.
>
> 0001 - Same bugfix proposed for #19587
> 0002 - Decoupling range_bounds_histogram from checks against
> range_length_histogram and range_empty_frac
> 0003 - The extended stats equivalent of 0001
Let's do things in order, and discuss about 0001 first. And I have a
few things to say about it.. But let's see that on the other thread.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: BUG #19842: pg_restore_extended_stats() rejects a faithful pg_dump of ANALYZE-produced range expression statisti
@ 2026-11-12 01:34 Michael Paquier <michael@paquier.xyz>
parent: Corey Huinker <corey.huinker@gmail.com>
1 sibling, 1 reply; 10+ messages in thread
From: Michael Paquier @ 2026-11-12 01:34 UTC (permalink / raw)
To: Corey Huinker <corey.huinker@gmail.com>; +Cc: 303677365@qq.com; pgsql-bugs@lists.postgresql.org
On Tue, Nov 10, 2026 at 08:54:33PM -0500, Corey Huinker wrote:
> 0003 - The extended stats equivalent of 0001
Corey, could you rebase this one on HEAD, or reshape it according to
2656f664616d? That would help..
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: BUG #19842: pg_restore_extended_stats() rejects a faithful pg_dump of ANALYZE-produced range expression statisti
@ 2026-11-12 21:07 Corey Huinker <corey.huinker@gmail.com>
parent: Michael Paquier <michael@paquier.xyz>
0 siblings, 1 reply; 10+ messages in thread
From: Corey Huinker @ 2026-11-12 21:07 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; +Cc: 303677365@qq.com; pgsql-bugs@lists.postgresql.org
On Wed, Nov 11, 2026 at 8:34 PM Michael Paquier <michael@paquier.xyz> wrote:
> On Tue, Nov 10, 2026 at 08:54:33PM -0500, Corey Huinker wrote:
> > 0003 - The extended stats equivalent of 0001
>
> Corey, could you rebase this one on HEAD, or reshape it according to
> 2656f664616d? That would help..
> --
> Michael
>
The v1 0001 patch is now gone as, that was replaced by 2656f664616d.
0001 -
Decoupling range_bounds_histogram. No changes since last patchset where it
was number 0002.
0002 -
Fix to pg_dump to handle NULL values in range_length_histogram and
most_common_elems when their corresponding stanumbers field is not null.
I was able to test this against 18, however I [1] was not able to
synthesize data such that an extended statistics object on 18 that had
expression stats with a NULL most_common_elems and NOT NULL
most_common_elem_freqs. I asked Claude to try to do it as well, and it too
was not able to.
0003 -
This has the same goals as the original 0003, but using the methods laid
out in 2656f664616d.
Attachments: download all (3 files, .tar.gz)
v19842.2-0001-Decouple-range_bounds_histogram-requirement.patch (text/x-patch, 9.0K) download
From 86c567881a20221d48881b31c5b7e0201354b354 Mon Sep 17 00:00:00 2001
From: Corey Huinker <corey.huinker@gmail.com>
Date: Tue, 10 Nov 2026 12:48:51 -0500
Subject: [PATCH v19842.2 1/3] Decouple range_bounds_histogram requirement from
REF+RLH pair.
The extended stats code required range_bounds_histogram,
range_length_histogram, and range_empty_frac to all be set or all be
not found or NULL. That was incorrect, the real pair is range_empty_frac
and range_length_histogram because they share a stakind while
range_bounds_histogram has its own stakind and thus occupies its own
stakind/stavalues/stanumbers slot.
While it is unlikely that a well-formed extended statistic would have
one of the stakinds but not the other, this check is to block impossible
statistics, not unwise ones.
This was discovered during an investigation of Bug #19842, but is not
a direct component of that bug.
Reported-by: chunling qin <303677365@qq.com>
Reported-by: Corey Huinker <corey.huinker@gmail.com>
Discussion: https://postgr.es/m/19842-ca042326dd2430a4@postgresql.org
Bug: #19842
Backpatch-through: 19
---
src/backend/statistics/extended_stats_funcs.c | 20 ++++-------
src/test/regress/expected/stats_import.out | 33 +++++--------------
src/test/regress/sql/stats_import.sql | 18 +++-------
3 files changed, 20 insertions(+), 51 deletions(-)
diff --git a/src/backend/statistics/extended_stats_funcs.c b/src/backend/statistics/extended_stats_funcs.c
index e6fe3ecd00a..020d64086ce 100644
--- a/src/backend/statistics/extended_stats_funcs.c
+++ b/src/backend/statistics/extended_stats_funcs.c
@@ -1196,10 +1196,10 @@ import_pg_statistic(Relation pgsd, JsonbContainer *cont,
goto pg_statistic_error;
/*
- * There are two arg pairs, MCV+MCF and MCEV+MCEF. Both values must
- * either be found or not be found. Any disagreement is a warning. Once
- * we have ruled out disagreeing pairs, we can use either found flag as a
- * proxy for the other.
+ * There are three arg pairs, MCV+MCF, MCEV+MCEF, and RLH+REF. Both
+ * values must either be found or not be found. Any disagreement is a
+ * warning. Once we have ruled out disagreeing pairs, we can use either
+ * found flag as a proxy for the other.
*/
if (found[MOST_COMMON_VALS_ELEM] != found[MOST_COMMON_FREQS_ELEM])
{
@@ -1224,21 +1224,15 @@ import_pg_statistic(Relation pgsd, JsonbContainer *cont,
goto pg_statistic_error;
}
- /*
- * Range types may expect three values to be set. All three of them must
- * either be found or not be found. Any disagreement is a warning.
- */
- if (found[RANGE_LENGTH_HISTOGRAM_ELEM] != found[RANGE_EMPTY_FRAC_ELEM] ||
- found[RANGE_LENGTH_HISTOGRAM_ELEM] != found[RANGE_BOUNDS_HISTOGRAM_ELEM])
+ if (found[RANGE_LENGTH_HISTOGRAM_ELEM] != found[RANGE_EMPTY_FRAC_ELEM])
{
ereport(WARNING,
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("could not parse \"%s\": invalid element in expression %d",
argname, exprnum),
- errhint("\"%s\", \"%s\", and \"%s\" must be all either strings or all nulls.",
+ errhint("\"%s\" and \"%s\" must be both either strings or nulls.",
extexprargname[RANGE_LENGTH_HISTOGRAM_ELEM],
- extexprargname[RANGE_EMPTY_FRAC_ELEM],
- extexprargname[RANGE_BOUNDS_HISTOGRAM_ELEM]));
+ extexprargname[RANGE_EMPTY_FRAC_ELEM]));
goto pg_statistic_error;
}
diff --git a/src/test/regress/expected/stats_import.out b/src/test/regress/expected/stats_import.out
index e46310fefe5..bbd32fc19a5 100644
--- a/src/test/regress/expected/stats_import.out
+++ b/src/test/regress/expected/stats_import.out
@@ -2785,6 +2785,7 @@ CREATE STATISTICS stats_import.test_mr_stat_clone
FROM stats_import.test_mr_clone;
-- Check for invalid value combinations for range types.
-- Only range_bounds_histogram (other two missing)
+-- this is ok per bug 19842
SELECT pg_catalog.pg_restore_extended_stats(
'schemaname', 'stats_import',
'relname', 'test_mr',
@@ -2792,30 +2793,12 @@ SELECT pg_catalog.pg_restore_extended_stats(
'statistics_name', 'test_mr_stat',
'inherited', false,
'exprs', '[{"range_bounds_histogram": "{\"[1,10200)\",\"[11,10200)\"}"}]'::jsonb);
-WARNING: could not parse "exprs": invalid element in expression -1
-HINT: "range_length_histogram", "range_empty_frac", and "range_bounds_histogram" must be all either strings or all nulls.
pg_restore_extended_stats
---------------------------
- f
+ t
(1 row)
--- Only range_length_histogram and range_empty_frac
--- (range_bounds_histogram missing)
-SELECT pg_catalog.pg_restore_extended_stats(
- 'schemaname', 'stats_import',
- 'relname', 'test_mr',
- 'statistics_schemaname', 'stats_import',
- 'statistics_name', 'test_mr_stat',
- 'inherited', false,
- 'exprs', '[{"range_length_histogram": "{10179,10189}", "range_empty_frac": "0"}]'::jsonb);
-WARNING: could not parse "exprs": invalid element in expression -1
-HINT: "range_length_histogram", "range_empty_frac", and "range_bounds_histogram" must be all either strings or all nulls.
- pg_restore_extended_stats
----------------------------
- f
-(1 row)
-
--- Only range_bounds_histogram and range_empty_frac
+-- Only range_empty_frac
-- (range_length_histogram missing)
SELECT pg_catalog.pg_restore_extended_stats(
'schemaname', 'stats_import',
@@ -2823,15 +2806,15 @@ SELECT pg_catalog.pg_restore_extended_stats(
'statistics_schemaname', 'stats_import',
'statistics_name', 'test_mr_stat',
'inherited', false,
- 'exprs', '[{"range_bounds_histogram": "{\"[1,10200)\"}", "range_empty_frac": "0"}]'::jsonb);
+ 'exprs', '[{"range_empty_frac": "0"}]'::jsonb);
WARNING: could not parse "exprs": invalid element in expression -1
-HINT: "range_length_histogram", "range_empty_frac", and "range_bounds_histogram" must be all either strings or all nulls.
+HINT: "range_length_histogram" and "range_empty_frac" must be both either strings or nulls.
pg_restore_extended_stats
---------------------------
f
(1 row)
--- Only range_bounds_histogram and range_length_histogram
+-- Only range_length_histogram
-- (range_empty_frac missing)
SELECT pg_catalog.pg_restore_extended_stats(
'schemaname', 'stats_import',
@@ -2839,9 +2822,9 @@ SELECT pg_catalog.pg_restore_extended_stats(
'statistics_schemaname', 'stats_import',
'statistics_name', 'test_mr_stat',
'inherited', false,
- 'exprs', '[{"range_bounds_histogram": "{\"[1,10200)\"}", "range_length_histogram": "{10179}"}]'::jsonb);
+ 'exprs', '[{"range_length_histogram": "{10179}"}]'::jsonb);
WARNING: could not parse "exprs": invalid element in expression -1
-HINT: "range_length_histogram", "range_empty_frac", and "range_bounds_histogram" must be all either strings or all nulls.
+HINT: "range_length_histogram" and "range_empty_frac" must be both either strings or nulls.
pg_restore_extended_stats
---------------------------
f
diff --git a/src/test/regress/sql/stats_import.sql b/src/test/regress/sql/stats_import.sql
index 22690503ede..161673d3480 100644
--- a/src/test/regress/sql/stats_import.sql
+++ b/src/test/regress/sql/stats_import.sql
@@ -2015,6 +2015,7 @@ CREATE STATISTICS stats_import.test_mr_stat_clone
-- Check for invalid value combinations for range types.
-- Only range_bounds_histogram (other two missing)
+-- this is ok per bug 19842
SELECT pg_catalog.pg_restore_extended_stats(
'schemaname', 'stats_import',
'relname', 'test_mr',
@@ -2022,16 +2023,7 @@ SELECT pg_catalog.pg_restore_extended_stats(
'statistics_name', 'test_mr_stat',
'inherited', false,
'exprs', '[{"range_bounds_histogram": "{\"[1,10200)\",\"[11,10200)\"}"}]'::jsonb);
--- Only range_length_histogram and range_empty_frac
--- (range_bounds_histogram missing)
-SELECT pg_catalog.pg_restore_extended_stats(
- 'schemaname', 'stats_import',
- 'relname', 'test_mr',
- 'statistics_schemaname', 'stats_import',
- 'statistics_name', 'test_mr_stat',
- 'inherited', false,
- 'exprs', '[{"range_length_histogram": "{10179,10189}", "range_empty_frac": "0"}]'::jsonb);
--- Only range_bounds_histogram and range_empty_frac
+-- Only range_empty_frac
-- (range_length_histogram missing)
SELECT pg_catalog.pg_restore_extended_stats(
'schemaname', 'stats_import',
@@ -2039,8 +2031,8 @@ SELECT pg_catalog.pg_restore_extended_stats(
'statistics_schemaname', 'stats_import',
'statistics_name', 'test_mr_stat',
'inherited', false,
- 'exprs', '[{"range_bounds_histogram": "{\"[1,10200)\"}", "range_empty_frac": "0"}]'::jsonb);
--- Only range_bounds_histogram and range_length_histogram
+ 'exprs', '[{"range_empty_frac": "0"}]'::jsonb);
+-- Only range_length_histogram
-- (range_empty_frac missing)
SELECT pg_catalog.pg_restore_extended_stats(
'schemaname', 'stats_import',
@@ -2048,7 +2040,7 @@ SELECT pg_catalog.pg_restore_extended_stats(
'statistics_schemaname', 'stats_import',
'statistics_name', 'test_mr_stat',
'inherited', false,
- 'exprs', '[{"range_bounds_histogram": "{\"[1,10200)\"}", "range_length_histogram": "{10179}"}]'::jsonb);
+ 'exprs', '[{"range_length_histogram": "{10179}"}]'::jsonb);
-- warn: range bounds histogram with unsorted elements
SELECT pg_catalog.pg_restore_extended_stats(
'schemaname', 'stats_import',
base-commit: c13c414c6e018fcbd9fa6e36e778a852c76a1562
--
2.56.0
v19842.2-0002-pg_dump-Map-mismatched-NULL-values-arrays-t.patch (text/x-patch, 4.4K) download
From 9012ae141def2e4698d43692acf07a8178d55233 Mon Sep 17 00:00:00 2001
From: Corey Huinker <corey.huinker@gmail.com>
Date: Thu, 12 Nov 2026 13:23:26 -0500
Subject: [PATCH v19842.2 2/3] pg_dump: Map mismatched-NULL values arrays to
empty array.
As reported in two bugs, in versions prior to v19 it is possible for
range_length_histogram to be NULL when range_empty_frac is NOT NULL and
for most_common_elems to be NULL when most_common_freqs is NOT NULL.
This is solved in v19 where the NULL values are now empty arrays, so
pg_dump must make the same mapping when exporting stats from earlier
versions.
Bug: #19842
Reported-by: chunling qin <303677365@qq.com>
Discussion: https://postgr.es/m/19842-6e808a09ff4b75d2@postgresql.org
Bug: #19857
Reported-by: Atish Prakash <125atishprak@gmail.com>
Discussion: https://postgr.es/m/19857-6e808a09ff4b75d2@postgresql.org
Author: Corey Huinker <corey.huinker@gmail.com>
Backpatch-through: 19
---
src/bin/pg_dump/pg_dump.c | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index a3f38f3b886..dbb49506f83 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -11341,6 +11341,13 @@ dumpRelationStats_dumper(Archive *fout, const void *userArg, const TocEntry *te)
pg_fatal("could not find index attname \"%s\"", attname);
}
+ /*
+ * Prior to v19, range_length_histogram and most_common_elems could
+ * have a NULL value while corresponding stanumbers field
+ * (range_empty_frac and most_common_elem_freqs, respectively) had a
+ * NOT NULL value. Those values are represented as an empty array
+ * going forward.
+ */
if (!PQgetisnull(res, rownum, i_inherited))
appendNamedArgument(out, fout, "inherited", "boolean",
PQgetvalue(res, rownum, i_inherited));
@@ -11368,6 +11375,8 @@ dumpRelationStats_dumper(Archive *fout, const void *userArg, const TocEntry *te)
if (!PQgetisnull(res, rownum, i_most_common_elems))
appendNamedArgument(out, fout, "most_common_elems", "text",
PQgetvalue(res, rownum, i_most_common_elems));
+ else if (fout->remoteVersion < 190000 && !PQgetisnull(res, rownum, i_most_common_elem_freqs))
+ appendNamedArgument(out, fout, "most_common_elems", "text", "{}");
if (!PQgetisnull(res, rownum, i_most_common_elem_freqs))
appendNamedArgument(out, fout, "most_common_elem_freqs", "real[]",
PQgetvalue(res, rownum, i_most_common_elem_freqs));
@@ -11379,6 +11388,8 @@ dumpRelationStats_dumper(Archive *fout, const void *userArg, const TocEntry *te)
if (!PQgetisnull(res, rownum, i_range_length_histogram))
appendNamedArgument(out, fout, "range_length_histogram", "text",
PQgetvalue(res, rownum, i_range_length_histogram));
+ else if (fout->remoteVersion < 190000 && !PQgetisnull(res, rownum, i_range_empty_frac))
+ appendNamedArgument(out, fout, "range_length_histogram", "text", "{}");
if (!PQgetisnull(res, rownum, i_range_empty_frac))
appendNamedArgument(out, fout, "range_empty_frac", "real",
PQgetvalue(res, rownum, i_range_empty_frac));
@@ -18718,7 +18729,27 @@ dumpStatisticsExtStats(Archive *fout, const StatsExtInfo *statsextinfo)
" 'most_common_freqs', ee.most_common_freqs::text, "
" 'histogram_bounds', ee.histogram_bounds::text, "
" 'correlation', ee.correlation::text, "
- " 'most_common_elems', ee.most_common_elems::text, "
+ " 'most_common_elems', ");
+
+ /*
+ * In versions prior to v19, most_common_elems could be NULL when
+ * most_common_elem_freqs was NOT NULL. In such cases the NULL
+ * value should be replaced with the empty array "{}".
+ *
+ * The field range_length_histogram was not yet present in
+ * pg_stats_ext_exprs until v19, otherwise it would have had the
+ * same issue.
+ */
+ if (fout->remoteVersion >= 190000)
+ appendPQExpBufferStr(pq, "ee.most_common_elems::text, ");
+ else
+ appendPQExpBufferStr(pq, "CASE "
+ " WHEN ee.most_common_elem_freqs IS NOT NULL "
+ " THEN coalesce(ee.most_common_elems::text, '{}'::text) "
+ " ELSE ee.most_common_elems::text "
+ "END, ");
+
+ appendPQExpBufferStr(pq,
" 'most_common_elem_freqs', ee.most_common_elem_freqs::text, "
" 'elem_count_histogram', ee.elem_count_histogram::text");
--
2.56.0
v19842.2-0003-Allow-empty-arrays-of-values-in-pg_restore_.patch (text/x-patch, 9.2K) download
From efec3efc13771d31a258e3c6170df1f6717cf915 Mon Sep 17 00:00:00 2001
From: Corey Huinker <corey.huinker@gmail.com>
Date: Thu, 12 Nov 2026 15:50:46 -0500
Subject: [PATCH v19842.2 3/3] Allow empty arrays of values in
pg_restore_extended_stats().
ANALYZE can store an empty array of values for range_length_histogram
and most_common_elems, which pg_dump emits as '{}', since 261f89a976b.
These were rejected by pg_restore_extended_stats(), as an empty array
has no dimensions, and the statistics were lost after a dump/restore or
an upgrade *from* v19 or HEAD. Empty arrays are not possible for these
two properties in v18 and older versions.
This is essentially adapting 2656f664616d to work on extended stats,
where the underlying functions are similar.
Reported-by: chunling qin <303677365@qq.com>
Author: Michael Paquier <michael@paquier.xyz>
Author: Corey Huinker <corey.huinker@gmail.com>
Discussion: https://postgr.es/m/19842-ca042326dd2430a4@postgresql.org
Bug: #19842
Backpatch-through: 19
---
src/backend/statistics/extended_stats_funcs.c | 39 ++++++++++++-------
src/test/regress/expected/stats_import.out | 37 ++++++++++++++++++
src/test/regress/sql/stats_import.sql | 31 +++++++++++++++
3 files changed, 92 insertions(+), 15 deletions(-)
diff --git a/src/backend/statistics/extended_stats_funcs.c b/src/backend/statistics/extended_stats_funcs.c
index 020d64086ce..798c8fc1d29 100644
--- a/src/backend/statistics/extended_stats_funcs.c
+++ b/src/backend/statistics/extended_stats_funcs.c
@@ -166,7 +166,7 @@ static bool key_in_expr_argnames(JsonbValue *key);
static bool check_all_expr_argnames_valid(JsonbContainer *cont, AttrNumber exprnum);
static Datum array_in_safe(FmgrInfo *array_in, const char *s, Oid typid,
int32 typmod, AttrNumber exprnum,
- const char *element_name, bool *ok);
+ const char *element_name, bool allow_empty, bool *ok);
static Datum import_pg_statistic(Relation pgsd, JsonbContainer *cont,
AttrNumber exprnum, FmgrInfo *array_in_fn,
Oid typid, int32 typmod, Oid typcoll,
@@ -1063,9 +1063,11 @@ jbv_to_infunc_datum(JsonbValue *jval, PGFunction func, AttrNumber exprnum,
*/
static Datum
array_in_safe(FmgrInfo *array_in, const char *s, Oid typid, int32 typmod,
- AttrNumber exprnum, const char *element_name, bool *ok)
+ AttrNumber exprnum, const char *element_name, bool allow_empty,
+ bool *ok)
{
Datum result;
+ int ndim;
ErrorSaveContext escontext = {
.type = T_ErrorSaveContext,
@@ -1096,12 +1098,19 @@ array_in_safe(FmgrInfo *array_in, const char *s, Oid typid, int32 typmod,
return (Datum) 0;
}
- if (ARR_NDIM(DatumGetArrayTypeP(result)) != 1)
+ ndim = ARR_NDIM(DatumGetArrayTypeP(result));
+ if (ndim != 1 && !(allow_empty && ndim == 0))
{
- ereport(WARNING,
- (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("could not import element \"%s\" in expression %d: must be a one-dimensional array",
- element_name, exprnum)));
+ if (allow_empty)
+ ereport(WARNING,
+ (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
+ errmsg("could not import element \"%s\" in expression %d: must be an empty or one-dimensional array",
+ element_name, exprnum)));
+ else
+ ereport(WARNING,
+ (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
+ errmsg("could not import element \"%s\" in expression %d: must be a one-dimensional array",
+ element_name, exprnum)));
return (Datum) 0;
}
@@ -1354,14 +1363,14 @@ import_pg_statistic(Relation pgsd, JsonbContainer *cont,
s = jbv_string_get_cstr(&val[MOST_COMMON_VALS_ELEM]);
stavalues = array_in_safe(array_in_fn, s, typid, typmod, exprnum,
extexprargname[MOST_COMMON_VALS_ELEM],
- &val_ok);
+ false, &val_ok);
pfree(s);
s = jbv_string_get_cstr(&val[MOST_COMMON_FREQS_ELEM]);
stanumbers = array_in_safe(array_in_fn, s, FLOAT4OID, -1, exprnum,
extexprargname[MOST_COMMON_FREQS_ELEM],
- &num_ok);
+ false, &num_ok);
pfree(s);
/* Only set the slot if both datums have been built */
@@ -1400,7 +1409,7 @@ import_pg_statistic(Relation pgsd, JsonbContainer *cont,
stavalues = array_in_safe(array_in_fn, s, typid, typmod, exprnum,
extexprargname[HISTOGRAM_BOUNDS_ELEM],
- &val_ok);
+ false, &val_ok);
pfree(s);
if (val_ok)
@@ -1444,14 +1453,14 @@ import_pg_statistic(Relation pgsd, JsonbContainer *cont,
s = jbv_string_get_cstr(&val[MOST_COMMON_ELEMS_ELEM]);
stavalues = array_in_safe(array_in_fn, s, elemtypid, typmod, exprnum,
extexprargname[MOST_COMMON_ELEMS_ELEM],
- &val_ok);
+ true, &val_ok);
pfree(s);
s = jbv_string_get_cstr(&val[MOST_COMMON_ELEM_FREQS_ELEM]);
stanumbers = array_in_safe(array_in_fn, s, FLOAT4OID, -1, exprnum,
extexprargname[MOST_COMMON_ELEM_FREQS_ELEM],
- &num_ok);
+ false, &num_ok);
pfree(s);
/* Only set the slot if both datums have been built */
@@ -1474,7 +1483,7 @@ import_pg_statistic(Relation pgsd, JsonbContainer *cont,
s = jbv_string_get_cstr(&val[ELEM_COUNT_HISTOGRAM_ELEM]);
stanumbers = array_in_safe(array_in_fn, s, FLOAT4OID, -1, exprnum,
extexprargname[ELEM_COUNT_HISTOGRAM_ELEM],
- &num_ok);
+ false, &num_ok);
pfree(s);
if (num_ok)
@@ -1503,7 +1512,7 @@ import_pg_statistic(Relation pgsd, JsonbContainer *cont,
stavalues = array_in_safe(array_in_fn, s, rtypid, typmod, exprnum,
extexprargname[RANGE_BOUNDS_HISTOGRAM_ELEM],
- &val_ok);
+ false, &val_ok);
if (val_ok && statatt_check_bounds_histogram(stavalues))
statatt_set_slot(values, nulls, replaces,
@@ -1536,7 +1545,7 @@ import_pg_statistic(Relation pgsd, JsonbContainer *cont,
s = jbv_string_get_cstr(&val[RANGE_LENGTH_HISTOGRAM_ELEM]);
stavalues = array_in_safe(array_in_fn, s, FLOAT8OID, -1, exprnum,
extexprargname[RANGE_LENGTH_HISTOGRAM_ELEM],
- &val_ok);
+ true, &val_ok);
if (val_ok)
statatt_set_slot(values, nulls, replaces,
diff --git a/src/test/regress/expected/stats_import.out b/src/test/regress/expected/stats_import.out
index bbd32fc19a5..25f69c329d0 100644
--- a/src/test/regress/expected/stats_import.out
+++ b/src/test/regress/expected/stats_import.out
@@ -4388,6 +4388,43 @@ WARNING: "most_common_elems" must be an empty or one-dimensional array
f
(1 row)
+-- BUG #19842
+TRUNCATE TABLE stats_import.test;
+INSERT INTO stats_import.test(id, arange)
+VALUES (1, int4range(1,5)), (2, 'empty'::int4range);
+CREATE STATISTICS stats_import.range_stat ON (arange * int4range(1,10))
+FROM stats_import.test;
+ANALYZE stats_import.test;
+SELECT * FROM pg_catalog.pg_restore_extended_stats(
+ 'schemaname', 'stats_import',
+ 'relname', 'test',
+ 'statistics_schemaname', 'stats_import',
+ 'statistics_name', 'range_stat',
+ 'inherited', 'f'::boolean,
+ 'exprs', '[{"avg_width": "13","null_frac": "0","n_distinct": "-1",
+ "range_empty_frac": "0.5"}]'::jsonb
+);
+WARNING: could not parse "exprs": invalid element in expression -1
+HINT: "range_length_histogram" and "range_empty_frac" must be both either strings or nulls.
+ pg_restore_extended_stats
+---------------------------
+ f
+(1 row)
+
+SELECT * FROM pg_catalog.pg_restore_extended_stats(
+ 'schemaname', 'stats_import',
+ 'relname', 'test',
+ 'statistics_schemaname', 'stats_import',
+ 'statistics_name', 'range_stat',
+ 'inherited', 'f'::boolean,
+ 'exprs', '[{"avg_width": "13","null_frac": "0","n_distinct": "-1",
+ "range_length_histogram": "{}", "range_empty_frac": "0.5"}]'::jsonb
+);
+ pg_restore_extended_stats
+---------------------------
+ t
+(1 row)
+
DROP SCHEMA stats_import CASCADE;
NOTICE: drop cascades to 39 other objects
DETAIL: drop cascades to view stats_import.pg_stats_stable
diff --git a/src/test/regress/sql/stats_import.sql b/src/test/regress/sql/stats_import.sql
index 161673d3480..9c99f0d62ff 100644
--- a/src/test/regress/sql/stats_import.sql
+++ b/src/test/regress/sql/stats_import.sql
@@ -3103,4 +3103,35 @@ SELECT pg_catalog.pg_restore_attribute_stats(
'most_common_elems', '{{one},{two}}'::text,
'most_common_elem_freqs', '{0.1,0.1,0.1,0.1,0}'::real[]);
+-- BUG #19842
+TRUNCATE TABLE stats_import.test;
+
+INSERT INTO stats_import.test(id, arange)
+VALUES (1, int4range(1,5)), (2, 'empty'::int4range);
+
+CREATE STATISTICS stats_import.range_stat ON (arange * int4range(1,10))
+FROM stats_import.test;
+
+ANALYZE stats_import.test;
+
+SELECT * FROM pg_catalog.pg_restore_extended_stats(
+ 'schemaname', 'stats_import',
+ 'relname', 'test',
+ 'statistics_schemaname', 'stats_import',
+ 'statistics_name', 'range_stat',
+ 'inherited', 'f'::boolean,
+ 'exprs', '[{"avg_width": "13","null_frac": "0","n_distinct": "-1",
+ "range_empty_frac": "0.5"}]'::jsonb
+);
+
+SELECT * FROM pg_catalog.pg_restore_extended_stats(
+ 'schemaname', 'stats_import',
+ 'relname', 'test',
+ 'statistics_schemaname', 'stats_import',
+ 'statistics_name', 'range_stat',
+ 'inherited', 'f'::boolean,
+ 'exprs', '[{"avg_width": "13","null_frac": "0","n_distinct": "-1",
+ "range_length_histogram": "{}", "range_empty_frac": "0.5"}]'::jsonb
+);
+
DROP SCHEMA stats_import CASCADE;
--
2.56.0
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: BUG #19842: pg_restore_extended_stats() rejects a faithful pg_dump of ANALYZE-produced range expression statisti
@ 2026-11-13 06:02 Michael Paquier <michael@paquier.xyz>
parent: Corey Huinker <corey.huinker@gmail.com>
0 siblings, 1 reply; 10+ messages in thread
From: Michael Paquier @ 2026-11-13 06:02 UTC (permalink / raw)
To: Corey Huinker <corey.huinker@gmail.com>; +Cc: 303677365@qq.com; pgsql-bugs@lists.postgresql.org
On Thu, Nov 12, 2026 at 04:07:54PM -0500, Corey Huinker wrote:
> 0001 -
> Decoupling range_bounds_histogram. No changes since last patchset where it
> was number 0002.
Ah, I see what you are getting at here. Without this part a portion
of 0003 is actually moot, and the reason where there is no point to
check for range_bounds_histogram in parallel of range_length_histogram
and range_empty_frac is that they use a different stats slot.
Tweaked a few things here, and applied down to v19.
> 0002 -
>
> Fix to pg_dump to handle NULL values in range_length_histogram and
> most_common_elems when their corresponding stanumbers field is not null.
>
> I was able to test this against 18, however I [1] was not able to
> synthesize data such that an extended statistics object on 18 that had
> expression stats with a NULL most_common_elems and NOT NULL
> most_common_elem_freqs. I asked Claude to try to do it as well, and it too
> was not able to.
I have not been able to process this one today, unfortunately. I had
to choose what to do, and picked up the most important matters based
on their priority.
> 0003 -
> This has the same goals as the original 0003, but using the methods laid
> out in 2656f664616d.
While the code changes were fine, to allow for empty arrays like in
2656f664616d, the tests were bundled at the bottom of
stats_import.sql. We have already sections of the tests that check
similar patterns, so I have just moved the whole in sections that are
more adapted for this goal. Applied also this one, after some edits.
Should we also include a test where empty arrays are allowed but we
have a multi-dimension array in input? I have refrained from doing so
to not complicate more the patch and there were enough tests to check
for the basics in terms of v19. Your patch did not do that, either.
0001 and 0003 were by far the most urgent items to handle for v19 (and
actually the less risky ones). Without 0002 for the moment, it still
means that we could miss some stats at dump/restore due to the
NULL/empty change introduced in v19 when upgrading from v17/18, but at
least we are clear for any future moves, or when doing a dump from
v19.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: BUG #19842: pg_restore_extended_stats() rejects a faithful pg_dump of ANALYZE-produced range expression statisti
@ 2026-11-13 16:07 Corey Huinker <corey.huinker@gmail.com>
parent: Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 10+ messages in thread
From: Corey Huinker @ 2026-11-13 16:07 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; +Cc: 303677365@qq.com; pgsql-bugs@lists.postgresql.org
>
> 0001 and 0003 were by far the most urgent items to handle for v19 (and
> actually the less risky ones). Without 0002 for the moment, it still
> means that we could miss some stats at dump/restore due to the
> NULL/empty change introduced in v19 when upgrading from v17/18, but at
> least we are clear for any future moves, or when doing a dump from
> v19.
I agree with your prioritization - 0002 can wait a bit.
^ permalink raw reply [nested|flat] 10+ messages in thread
end of thread, other threads:[~2026-11-13 16:07 UTC | newest]
Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-11-07 04:22 BUG #19842: pg_restore_extended_stats() rejects a faithful pg_dump of ANALYZE-produced range expression statisti PG Bug reporting form <noreply@postgresql.org>
2026-11-09 05:28 ` Michael Paquier <michael@paquier.xyz>
2026-11-10 03:49 ` Corey Huinker <corey.huinker@gmail.com>
2026-11-10 03:52 ` Michael Paquier <michael@paquier.xyz>
2026-11-11 01:54 ` Corey Huinker <corey.huinker@gmail.com>
2026-11-11 06:34 ` Michael Paquier <michael@paquier.xyz>
2026-11-12 01:34 ` Michael Paquier <michael@paquier.xyz>
2026-11-12 21:07 ` Corey Huinker <corey.huinker@gmail.com>
2026-11-13 06:02 ` Michael Paquier <michael@paquier.xyz>
2026-11-13 16:07 ` Corey Huinker <corey.huinker@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