($INBOX_DIR/description missing)
help / color / mirror / Atom feedReplication & recovery_min_apply_delay
28+ messages / 5 participants
[nested] [flat]
* Replication & recovery_min_apply_delay
@ 2019-01-30 12:04 Konstantin Knizhnik <[email protected]>
0 siblings, 1 reply; 28+ messages in thread
From: Konstantin Knizhnik @ 2019-01-30 12:04 UTC (permalink / raw)
To: pgsql-hackers
Hi hackers,
One of our customers was faced with the following problem:
he has setup physical primary-slave replication but for some reasons
specified very large (~12 hours)
recovery_min_apply_delay. I do not know precise reasons for such large
gap between master and replica.
But everything works normally until replica is restarted. Then it starts
to apply WAL, comes to the point where record timestamp is less then 12
hours older
and ... suspends recovery. No WAL receiver is launched and so nobody is
fetching changes from master.
It may cause master's WAL space overflow (if there is replication slot)
and loose of data in case of master crash.
Looks like the right behavior is to be able launch WAL receiver before
replica reaches end of WAL.
For example, we can launch it before going to sleep in recoveryApplyDelay.
We need to specify start LSN for WAL sender. I didn't find better
solution except iterating WAL until I reach the last valid record.
I attach small patch which implements this approach.
I wonder if it can be considered as acceptable solution of the problem
or there can be some better approach?
--
Konstantin Knizhnik
Postgres Professional:http://www.postgrespro.com
The Russian Postgres Company
Attachments:
[text/x-patch] wal_apply_delay.patch (2.7K, ../../[email protected]/2-wal_apply_delay.patch)
download | inline diff:
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 2ab7d80..ef6433f 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -802,6 +802,7 @@ static XLogSource readSource = 0; /* XLOG_FROM_* code */
*/
static XLogSource currentSource = 0; /* XLOG_FROM_* code */
static bool lastSourceFailed = false;
+static bool stopOnError = false;
typedef struct XLogPageReadPrivate
{
@@ -3971,6 +3972,49 @@ RemoveOldXlogFiles(XLogSegNo segno, XLogRecPtr RedoRecPtr, XLogRecPtr endptr)
}
/*
+ * Find latest WAL LSN
+ */
+static XLogRecPtr
+GetLastLSN(XLogRecPtr lsn)
+{
+ XLogReaderState *xlogreader;
+ char *errormsg;
+ XLogPageReadPrivate private;
+ MemSet(&private, 0, sizeof(XLogPageReadPrivate));
+
+ xlogreader = XLogReaderAllocate(wal_segment_size, &XLogPageRead, &private);
+
+ stopOnError = true;
+ while (XLogReadRecord(xlogreader, lsn, &errormsg) != NULL)
+ {
+ lsn = InvalidXLogRecPtr;
+ }
+ stopOnError = false;
+ lsn = xlogreader->EndRecPtr;
+ XLogReaderFree(xlogreader);
+
+ return lsn;
+}
+
+/*
+ * Launch WalReceiver starting from last LSN if not started yet.
+ */
+static void
+StartWalRcv(XLogRecPtr currLsn)
+{
+ if (!WalRcvStreaming() && PrimaryConnInfo && strcmp(PrimaryConnInfo, "") != 0)
+ {
+ XLogRecPtr lastLSN = GetLastLSN(currLsn);
+ if (lastLSN != InvalidXLogRecPtr)
+ {
+ curFileTLI = ThisTimeLineID;
+ RequestXLogStreaming(ThisTimeLineID, lastLSN, PrimaryConnInfo,
+ PrimarySlotName);
+ }
+ }
+}
+
+/*
* Remove WAL files that are not part of the given timeline's history.
*
* This is called during recovery, whenever we switch to follow a new
@@ -6004,6 +6048,12 @@ recoveryApplyDelay(XLogReaderState *record)
if (secs <= 0 && microsecs <= 0)
return false;
+ /*
+ * Start WAL receiver if not started yet, to avoid WALs overflow at primary node
+ * or large gap between primary and replica when apply delay is specified.
+ */
+ StartWalRcv(record->EndRecPtr);
+
while (true)
{
ResetLatch(&XLogCtl->recoveryWakeupLatch);
@@ -11821,6 +11871,13 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess,
return false;
/*
+ * If WAL receiver was altery started because of apply delay,
+ * thre restart it.
+ */
+ if (WalRcvStreaming())
+ ShutdownWalRcv();
+
+ /*
* If primary_conninfo is set, launch walreceiver to try
* to stream the missing WAL.
*
@@ -11990,6 +12047,9 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess,
if (readFile >= 0)
return true; /* success! */
+ if (stopOnError)
+ return false;
+
/*
* Nope, not found in archive or pg_wal.
*/
^ permalink raw reply [nested|flat] 28+ messages in thread
* Re: Replication & recovery_min_apply_delay
@ 2019-01-30 14:32 Alvaro Herrera <[email protected]>
parent: Konstantin Knizhnik <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Alvaro Herrera @ 2019-01-30 14:32 UTC (permalink / raw)
To: Konstantin Knizhnik <[email protected]>; +Cc: pgsql-hackers
Hi
On 2019-Jan-30, Konstantin Knizhnik wrote:
> One of our customers was faced with the following problem: he has
> setup physical primary-slave replication but for some reasons
> specified very large (~12 hours) recovery_min_apply_delay.
We also came across this exact same problem some time ago. It's pretty
nasty. I wrote a quick TAP reproducer, attached (needed a quick patch
for PostgresNode itself too.)
I tried several failed strategies:
1. setting lastSourceFailed just before sleeping for apply delay, with
the idea that for the next fetch we would try stream. But this
doesn't work because WaitForWalToBecomeAvailable is not executed.
2. split WaitForWalToBecomeAvailable in two pieces, so that we can call
the first half in the restore loop. But this causes 1s of wait
between segments (error recovery) and we never actually catch up.
What back then I thought was the *real* solution but I didn't get around
to implementing is the idea you describe to start a walreceiver at an
earlier point.
> I wonder if it can be considered as acceptable solution of the problem or
> there can be some better approach?
I didn't find one.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* [PATCH 3/4] Use correct 'statistics kind' in a couple places
@ 2021-03-07 00:38 Tomas Vondra <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Tomas Vondra @ 2021-03-07 00:38 UTC (permalink / raw)
A couple places used 'statistic kind' which is inconsistent, so use
'statistics kind' consistently.
---
doc/src/sgml/catalogs.sgml | 2 +-
src/backend/statistics/dependencies.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/statistics/mcv.c | 2 +-
src/backend/statistics/mvdistinct.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index b1de6d0674..64601d6b24 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7358,7 +7358,7 @@ SCRAM-SHA-256$<replaceable><iteration count></replaceable>:<replaceable>&l
<structfield>stxkind</structfield> <type>char[]</type>
</para>
<para>
- An array containing codes for the enabled statistic kinds;
+ An array containing codes for the enabled statistics kinds;
valid values are:
<literal>d</literal> for n-distinct statistics,
<literal>f</literal> for functional dependency statistics, and
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index f6e399b192..eac9285165 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -639,7 +639,7 @@ statext_dependencies_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxddependencies, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_dependencies_deserialize(DatumGetByteaPP(deps));
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index a030ea3653..8c05e10d0c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -64,7 +64,7 @@ typedef struct StatExtEntry
char *schema; /* statistics object's schema */
char *name; /* statistics object's name */
Bitmapset *columns; /* attribute numbers covered by the object */
- List *types; /* 'char' list of enabled statistic kinds */
+ List *types; /* 'char' list of enabled statistics kinds */
int stattarget; /* statistics target (-1 for default) */
} StatExtEntry;
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index abbc1f1ba8..8335dff241 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -570,7 +570,7 @@ statext_mcv_load(Oid mvoid)
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_DEPENDENCIES, mvoid);
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
diff --git a/src/backend/statistics/mvdistinct.c b/src/backend/statistics/mvdistinct.c
index 9ef21debb6..e08c001e3f 100644
--- a/src/backend/statistics/mvdistinct.c
+++ b/src/backend/statistics/mvdistinct.c
@@ -153,7 +153,7 @@ statext_ndistinct_load(Oid mvoid)
Anum_pg_statistic_ext_data_stxdndistinct, &isnull);
if (isnull)
elog(ERROR,
- "requested statistic kind \"%c\" is not yet built for statistics object %u",
+ "requested statistics kind \"%c\" is not yet built for statistics object %u",
STATS_EXT_NDISTINCT, mvoid);
result = statext_ndistinct_deserialize(DatumGetByteaPP(ndist));
--
2.26.2
--------------BCA1373AE29B32B57608F4EE
Content-Type: text/x-patch; charset=UTF-8;
name="0004-Extended-statistics-on-expressions-20210307.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-Extended-statistics-on-expressions-20210307.patch"
^ permalink raw reply [nested|flat] 28+ messages in thread
* Re: replace strtok()
@ 2024-06-18 11:43 Ranier Vilela <[email protected]>
0 siblings, 1 reply; 28+ messages in thread
From: Ranier Vilela @ 2024-06-18 11:43 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; +Cc: pgsql-hackers
Em ter., 18 de jun. de 2024 às 04:18, Peter Eisentraut <[email protected]>
escreveu:
> Under the topic of getting rid of thread-unsafe functions in the backend
> [0], here is a patch series to deal with strtok().
>
> Of course, strtok() is famously not thread-safe and can be replaced by
> strtok_r(). But it also has the wrong semantics in some cases, because
> it considers adjacent delimiters to be one delimiter. So if you parse
>
> SCRAM-SHA-256$<iterations>:<salt>$<storedkey>:<serverkey>
>
> with strtok(), then
>
> SCRAM-SHA-256$$<iterations>::<salt>$$<storedkey>::<serverkey>
>
> parses just the same. In many cases, this is arguably wrong and could
> hide mistakes.
>
> So I'm suggesting to use strsep() in those places. strsep() is
> nonstandard but widely available.
>
> There are a few places where strtok() has the right semantics, such as
> parsing tokens separated by whitespace. For those, I'm using strtok_r().
>
> A reviewer job here would be to check whether I made that distinction
> correctly in each case.
>
> On the portability side, I'm including a port/ replacement for strsep()
> and some workaround to get strtok_r() for Windows. I have included
> these here as separate patches for clarity.
>
+1 For making the code thread-safe.
But I would like to see more const char * where this is possible.
For example, in pg_locale.c
IMO, the token variable can be const char *.
At least strchr expects a const char * as the first parameter.
I found another implementation of strsep, it seems lighter to me.
I will attach it for consideration, however, I have not done any testing.
best regards,
Ranier Vilela
/* strsep.h
*
* Provides the 4.4BSD strsep(3) function for those that don't have it.
*
* Copyright 2011 Michael Thomas Greer
* Distributed under the Boost Software License, Version 1.0.
* ( See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt )
*
* Including this file modifies the std namespace in C++.
*
* Don't include this file if your compiler provides the strsep function in <string.h>.
* Make sure your build process tests for this and behaves accordingly!
*
*/
#include <string.h>
char *
strsep(char **stringp, const char *delim)
{
char *result;
if ((stringp == NULL) || (*stringp == NULL))
return NULL;
result = *stringp;
while(**stringp && !(strchr(delim, **stringp)))
++*stringp;
if (**stringp)
*(*stringp)++ = '\0';
else
*stringp = NULL;
return result;
}
Attachments:
[text/plain] strsep.c (885B, ../../CAEudQApMiHHpx_GA96B8RMWpJ42CEYD4MjtvJpfj7cXrjn8i=Q@mail.gmail.com/3-strsep.c)
download | inline:
/* strsep.h
*
* Provides the 4.4BSD strsep(3) function for those that don't have it.
*
* Copyright 2011 Michael Thomas Greer
* Distributed under the Boost Software License, Version 1.0.
* ( See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt )
*
* Including this file modifies the std namespace in C++.
*
* Don't include this file if your compiler provides the strsep function in <string.h>.
* Make sure your build process tests for this and behaves accordingly!
*
*/
#include <string.h>
char *
strsep(char **stringp, const char *delim)
{
char *result;
if ((stringp == NULL) || (*stringp == NULL))
return NULL;
result = *stringp;
while(**stringp && !(strchr(delim, **stringp)))
++*stringp;
if (**stringp)
*(*stringp)++ = '\0';
else
*stringp = NULL;
return result;
}
^ permalink raw reply [nested|flat] 28+ messages in thread
* Re: replace strtok()
@ 2024-06-22 15:04 Peter Eisentraut <[email protected]>
parent: Ranier Vilela <[email protected]>
0 siblings, 0 replies; 28+ messages in thread
From: Peter Eisentraut @ 2024-06-22 15:04 UTC (permalink / raw)
To: Ranier Vilela <[email protected]>; +Cc: pgsql-hackers
On 18.06.24 13:43, Ranier Vilela wrote:
> But I would like to see more const char * where this is possible.
>
> For example, in pg_locale.c
> IMO, the token variable can be const char *.
>
> At least strchr expects a const char * as the first parameter.
This would not be future-proof. In C23, if you pass a const char * into
strchr(), you also get a const char * as a result. And in this case, we
do write into the area pointed to by the result. So with a const char
*token, this whole thing would not compile cleanly under C23.
> I found another implementation of strsep, it seems lighter to me.
> I will attach it for consideration, however, I have not done any testing.
Yeah, surely there are many possible implementations. I'm thinking,
since we already took other str*() functions from OpenBSD, it makes
sense to do this here as well, so we have only one source to deal with.
^ permalink raw reply [nested|flat] 28+ messages in thread
end of thread, other threads:[~2024-06-22 15:04 UTC | newest]
Thread overview: 28+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-01-30 12:04 Replication & recovery_min_apply_delay Konstantin Knizhnik <[email protected]>
2019-01-30 14:32 ` Alvaro Herrera <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2021-03-07 00:38 [PATCH 3/4] Use correct 'statistics kind' in a couple places Tomas Vondra <[email protected]>
2024-06-18 11:43 Re: replace strtok() Ranier Vilela <[email protected]>
2024-06-22 15:04 ` Re: replace strtok() Peter Eisentraut <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox