($INBOX_DIR/description missing)help / color / mirror / Atom feed
[PATCH 03/12] psql: Add HIDE_COMPRESSAM for regress testing 48+ messages / 3 participants [nested] [flat]
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH 03/12] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --9Ek0hoCL9XbhcSqy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0004-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --YZ5djTAD1cGYuMQK Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing @ 2021-02-14 02:48 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Justin Pryzby @ 2021-02-14 02:48 UTC (permalink / raw) This avoids churn in regression output, and allows testing with alternate compression AMs. --- doc/src/sgml/ref/psql-ref.sgml | 11 +++++++++++ src/bin/psql/describe.c | 1 + src/bin/psql/help.c | 2 ++ src/bin/psql/settings.h | 1 + src/bin/psql/startup.c | 9 +++++++++ src/test/regress/pg_regress_main.c | 4 ++-- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13c1edfa4d..66dcb1b33b 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -3863,6 +3863,17 @@ bar </listitem> </varlistentry> + <varlistentry> + <term><varname>HIDE_COMPRESSAM</varname></term> + <listitem> + <para> + If this variable is set to <literal>true</literal>, column's + compression access method details are not displayed. This is mainly + useful for regression tests. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><varname>HIDE_TABLEAM</varname></term> <listitem> diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index ba464d463e..b835b0cf76 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1897,6 +1897,7 @@ describeOneTableDetails(const char *schemaname, /* compresssion info */ if (pset.sversion >= 140000 && + !pset.hide_compressam && (tableinfo.relkind == RELKIND_RELATION || tableinfo.relkind == RELKIND_PARTITIONED_TABLE || tableinfo.relkind == RELKIND_MATVIEW)) diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index e44120bf76..a818ee5503 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -375,6 +375,8 @@ helpVariables(unsigned short int pager) " true if last query failed, else false\n")); fprintf(output, _(" FETCH_COUNT\n" " the number of result rows to fetch and display at a time (0 = unlimited)\n")); + fprintf(output, _(" HIDE_COMPRESSAM\n" + " if set, compression access methods are not displayed\n")); fprintf(output, _(" HIDE_TABLEAM\n" " if set, table access methods are not displayed\n")); fprintf(output, _(" HISTCONTROL\n" diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index d65990059d..9755e8eac6 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -134,6 +134,7 @@ typedef struct _psqlSettings bool quiet; bool singleline; bool singlestep; + bool hide_compressam; bool hide_tableam; int fetch_count; int histsize; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 780479c8d7..554b64367d 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -1159,6 +1159,12 @@ show_context_hook(const char *newval) return true; } +static bool +hide_compressam_hook(const char *newval) +{ + return ParseVariableBool(newval, "HIDE_COMPRESSAM", &pset.hide_compressam); +} + static bool hide_tableam_hook(const char *newval) { @@ -1227,6 +1233,9 @@ EstablishVariableSpace(void) SetVariableHooks(pset.vars, "SHOW_CONTEXT", show_context_substitute_hook, show_context_hook); + SetVariableHooks(pset.vars, "HIDE_COMPRESSAM", + bool_substitute_hook, + hide_compressam_hook); SetVariableHooks(pset.vars, "HIDE_TABLEAM", bool_substitute_hook, hide_tableam_hook); diff --git a/src/test/regress/pg_regress_main.c b/src/test/regress/pg_regress_main.c index 8dc4941c24..07fd3f6a4d 100644 --- a/src/test/regress/pg_regress_main.c +++ b/src/test/regress/pg_regress_main.c @@ -78,11 +78,11 @@ psql_start_test(const char *testname, * against different AMs without unnecessary differences. */ offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, - "\"%s%spsql\" -X -a -q -d \"%s\" -v %s < \"%s\" > \"%s\" 2>&1", + "\"%s%spsql\" -X -a -q -d \"%s\" %s < \"%s\" > \"%s\" 2>&1", bindir ? bindir : "", bindir ? "/" : "", dblist->str, - "HIDE_TABLEAM=\"on\"", + "-v HIDE_TABLEAM=on -v HIDE_COMPRESSAM=on", infile, outfile); if (offset >= sizeof(psql_cmd)) -- 2.17.0 --m51xatjYGsM+13rf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v24-0003-Add-default_toast_compression-GUC.patch" ^ permalink raw reply [nested|flat] 48+ messages in thread
* [PATCH] Fix memory leak in memoize for numeric key @ 2023-10-02 08:20 Orlov Aleksej <[email protected]> 2023-10-03 08:51 ` Re: [PATCH] Fix memory leak in memoize for numeric key David Rowley <[email protected]> 0 siblings, 1 reply; 48+ messages in thread From: Orlov Aleksej @ 2023-10-02 08:20 UTC (permalink / raw) To: [email protected] <[email protected]> Hello, all! I found a query which consumes a lot of memory and triggers OOM killer. Memory leak occurs in memoize node for numeric key. Version postgresql is 14.9. The problem is very similar https://www.postgresql.org/message-id/[email protected] I attached to the backend with a debugger and set a breakpoint in AllocSetAlloc (gdb) bt 10 #0 AllocSetAlloc (context=0x5c55086dc2f0, size=12) at aset.c:722 #1 0x00005c5507d886e0 in palloc (size=size@entry=12) at mcxt.c:1082 #2 0x00005c5507890bba in detoast_attr (attr=0x715d5daa04c9) at detoast.c:184 #3 0x00005c5507d62375 in pg_detoast_datum (datum=<optimized out>) at fmgr.c:1725 #4 0x00005c5507cc94ea in hash_numeric (fcinfo=<optimized out>) at numeric.c:2554 #5 0x00005c5507d61570 in FunctionCall1Coll (flinfo=flinfo@entry=0x5c5508b93d00, collation=<optimized out>, arg1=<optimized out>) at fmgr.c:1138 #6 0x00005c5507aadc16 in MemoizeHash_hash (key=0x0, tb=<optimized out>) at nodeMemoize.c:199 #7 0x00005c5507aadf22 in memoize_insert (key=0x0, found=<synthetic pointer>, tb=0x5c5508bb4760) at ../../../src/include/lib/simplehash.h:762 #8 cache_lookup (found=<synthetic pointer>, mstate=0x5c5508b91418) at nodeMemoize.c:519 #9 ExecMemoize (pstate=0x5c5508b91418) at nodeMemoize.c:705 I was able to create reproducible test case on machine with default config and postgresql 14.9: CREATE TABLE table1 ( id numeric(38) NOT NULL, col1 text, CONSTRAINT id2 PRIMARY KEY (id) ); CREATE TABLE table2 ( id numeric(38) NOT NULL, id_table1 numeric(38) NULL, CONSTRAINT id1 PRIMARY KEY (id) ); ALTER TABLE table2 ADD CONSTRAINT constr1 FOREIGN KEY (id_table1) REFERENCES table1(id); INSERT INTO table1 (id, col1) SELECT id::numeric, id::text FROM generate_series(3000000000, 3000000000 + 600000) gs(id); INSERT INTO table2 (id, id_table1) SELECT id::numeric , (select floor(random() * 600000)::numeric + 3000000000)::numeric FROM generate_series(1,600000) gs(id); set max_parallel_workers_per_gather=0; set enable_hashjoin = off; EXPLAIN analyze select sum(q.id_table1) from ( SELECT t2.* FROM table1 t1 JOIN table2 t2 ON t2.id_table1 = t1.id) q; Plan: Aggregate (cost=25744.90..25744.91 rows=1 width=32) (actual time=380.140..380.142 rows=1 loops=1) -> Nested Loop (cost=0.43..24244.90 rows=600000 width=9) (actual time=0.063..310.915 rows=600000 loops=1) -> Seq Scan on table2 t2 (cost=0.00..9244.00 rows=600000 width=9) (actual time=0.009..38.629 rows=600000 loops=1) -> Memoize (cost=0.43..0.47 rows=1 width=8) (actual time=0.000..0.000 rows=1 loops=600000) Cache Key: t2.id_table1 Cache Mode: logical Hits: 599999 Misses: 1 Evictions: 0 Overflows: 0 Memory Usage: 1kB -> Index Only Scan using id2 on table1 t1 (cost=0.42..0.46 rows=1 width=8) (actual time=0.039..0.040 rows=1 loops=1) Index Cond: (id = t2.id_table1) Heap Fetches: 0 Planning Time: 0.445 ms Execution Time: 380.750 ms I've attached memoize_memory_leak_numeric_key.patch to address this. Using test case, here are the memory stats before and after the fix (taken during ExecEndMemoize by using MemoryContextStatsDetail(TopMemoryContext, 100, 1)). Before: ExecutorState: 25209672 total in 15 blocks; 1134432 free (7 chunks); 24075240 used MemoizeHashTable: 8192 total in 1 blocks; 7480 free (1 chunks); 712 used After: ExecutorState: 76616 total in 5 blocks; 1776 free (8 chunks); 74840 used MemoizeHashTable: 8192 total in 1 blocks; 7480 free (1 chunks); 712 used Thanks, Alexei Orlov [email protected], [email protected] Attachments: [application/octet-stream] memoize_memory_leak_numeric_key.patch (750B, ../../[email protected]/2-memoize_memory_leak_numeric_key.patch) download | inline diff: diff --git a/src/backend/executor/nodeMemoize.c b/src/backend/executor/nodeMemoize.c index 8f79a23284..93ca5057e1 100644 --- a/src/backend/executor/nodeMemoize.c +++ b/src/backend/executor/nodeMemoize.c @@ -161,6 +161,10 @@ MemoizeHash_hash(struct memoize_hash *tb, const MemoizeKey *key) TupleTableSlot *pslot = mstate->probeslot; uint32 hashkey = 0; int numkeys = mstate->nkeys; + ExprContext *econtext = mstate->ss.ps.ps_ExprContext; + MemoryContext oldcontext; + + oldcontext = MemoryContextSwitchTo(econtext->ecxt_per_tuple_memory); if (mstate->binary_mode) { @@ -203,6 +207,7 @@ MemoizeHash_hash(struct memoize_hash *tb, const MemoizeKey *key) } } + MemoryContextSwitchTo(oldcontext); return murmurhash32(hashkey); } ^ permalink raw reply [nested|flat] 48+ messages in thread
* Re: [PATCH] Fix memory leak in memoize for numeric key 2023-10-02 08:20 [PATCH] Fix memory leak in memoize for numeric key Orlov Aleksej <[email protected]> @ 2023-10-03 08:51 ` David Rowley <[email protected]> 2023-10-04 08:08 ` RE: [PATCH] Fix memory leak in memoize for numeric key Orlov Aleksej <[email protected]> 0 siblings, 1 reply; 48+ messages in thread From: David Rowley @ 2023-10-03 08:51 UTC (permalink / raw) To: Orlov Aleksej <[email protected]>; +Cc: [email protected] <[email protected]> On Tue, 3 Oct 2023 at 19:38, Orlov Aleksej <[email protected]> wrote: > I found a query which consumes a lot of memory and triggers OOM killer. > Memory leak occurs in memoize node for numeric key. Thanks for the analysis and the patch. > I've attached memoize_memory_leak_numeric_key.patch to address this. Yeah, this is a bug for sure. Looking at ExecHashGetHashValue() for example purposes, I see it's quite careful to call ResetExprContext(econtext) at the top of the function to reset the tuple context. I think the patch might need to go a bit further and also adjust MemoizeHash_equal(). In non-binary mode, we just call ExecQualAndReset() which evaluates the join condition and resets the context. The binary mode code does not do this, so I think we should expand on what you've done and adjust that code too. I've done that in the attached patch. David Attachments: [application/octet-stream] fix_memoize_memory_leak_v2.patch (1.9K, ../../CAApHDvqX=3N0TguBwV-3nRAA5nR_jcvdMwPaTFoMBwjbTsxgOw@mail.gmail.com/2-fix_memoize_memory_leak_v2.patch) download | inline diff: diff --git a/src/backend/executor/nodeMemoize.c b/src/backend/executor/nodeMemoize.c index 94bf479287..1085b3c79d 100644 --- a/src/backend/executor/nodeMemoize.c +++ b/src/backend/executor/nodeMemoize.c @@ -158,10 +158,14 @@ static uint32 MemoizeHash_hash(struct memoize_hash *tb, const MemoizeKey *key) { MemoizeState *mstate = (MemoizeState *) tb->private_data; + ExprContext *econtext = mstate->ss.ps.ps_ExprContext; + MemoryContext oldcontext; TupleTableSlot *pslot = mstate->probeslot; uint32 hashkey = 0; int numkeys = mstate->nkeys; + oldcontext = MemoryContextSwitchTo(econtext->ecxt_per_tuple_memory); + if (mstate->binary_mode) { for (int i = 0; i < numkeys; i++) @@ -203,6 +207,8 @@ MemoizeHash_hash(struct memoize_hash *tb, const MemoizeKey *key) } } + ResetExprContext(econtext); + MemoryContextSwitchTo(oldcontext); return murmurhash32(hashkey); } @@ -226,7 +232,11 @@ MemoizeHash_equal(struct memoize_hash *tb, const MemoizeKey *key1, if (mstate->binary_mode) { + MemoryContext oldcontext; int numkeys = mstate->nkeys; + bool match = true; + + oldcontext = MemoryContextSwitchTo(econtext->ecxt_per_tuple_memory); slot_getallattrs(tslot); slot_getallattrs(pslot); @@ -236,7 +246,10 @@ MemoizeHash_equal(struct memoize_hash *tb, const MemoizeKey *key1, FormData_pg_attribute *attr; if (tslot->tts_isnull[i] != pslot->tts_isnull[i]) - return false; + { + match = false; + break; + } /* both NULL? they're equal */ if (tslot->tts_isnull[i]) @@ -246,9 +259,15 @@ MemoizeHash_equal(struct memoize_hash *tb, const MemoizeKey *key1, attr = &tslot->tts_tupleDescriptor->attrs[i]; if (!datum_image_eq(tslot->tts_values[i], pslot->tts_values[i], attr->attbyval, attr->attlen)) - return false; + { + match = false; + break; + } } - return true; + + ResetExprContext(econtext); + MemoryContextSwitchTo(oldcontext); + return match; } else { ^ permalink raw reply [nested|flat] 48+ messages in thread
* RE: [PATCH] Fix memory leak in memoize for numeric key 2023-10-02 08:20 [PATCH] Fix memory leak in memoize for numeric key Orlov Aleksej <[email protected]> 2023-10-03 08:51 ` Re: [PATCH] Fix memory leak in memoize for numeric key David Rowley <[email protected]> @ 2023-10-04 08:08 ` Orlov Aleksej <[email protected]> 0 siblings, 0 replies; 48+ messages in thread From: Orlov Aleksej @ 2023-10-04 08:08 UTC (permalink / raw) To: David Rowley <[email protected]>; +Cc: [email protected] <[email protected]> I've finished testing the patch. I confirm that the patch solves the problem and works just as fast. Thanks, Alexey Orlov. ^ permalink raw reply [nested|flat] 48+ messages in thread
end of thread, other threads:[~2023-10-04 08:08 UTC | newest] Thread overview: 48+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH 03/12] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 2/7] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2021-02-14 02:48 [PATCH v24 02/10] psql: Add HIDE_COMPRESSAM for regress testing Justin Pryzby <[email protected]> 2023-10-02 08:20 [PATCH] Fix memory leak in memoize for numeric key Orlov Aleksej <[email protected]> 2023-10-03 08:51 ` Re: [PATCH] Fix memory leak in memoize for numeric key David Rowley <[email protected]> 2023-10-04 08:08 ` RE: [PATCH] Fix memory leak in memoize for numeric key Orlov Aleksej <[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