回复: unrecognized configuration parameter "plpgsql.check_asserts"

Started by Walkeralmost 5 years ago4 messages
#1Walker
failaway@qq.com

Hi, Pavel

Thanks for your comments. 

To get rid of --enable-cassert while configuring, debug_assertions is shown as off. In this case, ASSERT statement also can't be used, right?

when enable --enable-cassert, can we use plpgsql.check_asserts to control ASSERT statement, and how? 

thanks
walker

------------------ 原始邮件 ------------------
发件人: "Pavel Stehule" <pavel.stehule@gmail.com&gt;;
发送时间:&nbsp;2021年3月12日(星期五) 晚上7:11
收件人:&nbsp;"Walker"<failaway@qq.com&gt;;
抄送:&nbsp;"pgsql-hackers"<pgsql-hackers@lists.postgresql.org&gt;;
主题:&nbsp;Re: unrecognized configuration parameter "plpgsql.check_asserts"

pá 12. 3. 2021 v&nbsp;11:54 odesílatel Walker <failaway@qq.com&gt; napsal:

Hi, hackers

Due to configure with parameter --enable-cassert, the debug_assertions is on by default, as follows:
postgres=# show debug_assertions;
debug_assertions
-------------------
on

Because of pgbench performance testing, I need to disable the assert function. Following the doc below, I tried to set plpgsql.check_asserts to off to disable assert function.
https://www.postgresql.org/docs/13/plpgsql-errors-and-messages.html

However, it prompts the following error, not sure if I missed something, any thoughts about it?
postgres=# alter system set plpgsql.check_asserts = off;
EORROR:&nbsp;unrecognized configuration parameter "plpgsql.check_asserts"

you cannot disable debug_assertions. It is possible just by configure, and make

plpgsql.check_asserts controls evaluation of plpgsql statement ASSERT

Pavel

env:
PG: 13.2
OS: redhat 7.4 3.10.0-693.17.1.e17.x86_64
configure parameter: --enable-coverage --enable-tap-tests --enable-cassert --enable-debug --enable-nls --with-perl --with-python --with-tcl --with-openssl --with-ldap --with-libxml --with-libxslt --with-uuid=e2fs --with-segsize=10 --with-wal-blocksize=16 --with-llvm LLVM_CONFIG=xxx CLANG=xxx

thanks
walker

#2Pavel Stehule
pavel.stehule@gmail.com
In reply to: Walker (#1)
Re: unrecognized configuration parameter "plpgsql.check_asserts"

pá 12. 3. 2021 v 13:13 odesílatel Walker <failaway@qq.com> napsal:

Hi, Pavel

Thanks for your comments.

To get rid of --enable-cassert while configuring, debug_assertions is
shown as off. In this case, ASSERT statement also can't be used, right?

no - debug assertions and plpgsql assertions are two absolutely independent
features.

--enable-cessart enables C assertions, and then needs postgres's source
code compilation. It is designed and used by Postgres's core developers.

plpgsql's ASSERT is user space feature, and can be enabled or disabled how
it is necessary by plpgsql.check_assert.

Show quoted text

when enable --enable-cassert, can we use plpgsql.check_asserts to control
ASSERT statement, and how?

thanks
walker

------------------ 原始邮件 ------------------
*发件人:* "Pavel Stehule" <pavel.stehule@gmail.com>;
*发送时间:* 2021年3月12日(星期五) 晚上7:11
*收件人:* "Walker"<failaway@qq.com>;
*抄送:* "pgsql-hackers"<pgsql-hackers@lists.postgresql.org>;
*主题:* Re: unrecognized configuration parameter "plpgsql.check_asserts"

pá 12. 3. 2021 v 11:54 odesílatel Walker <failaway@qq.com> napsal:

Hi, hackers

Due to configure with parameter --enable-cassert, the debug_assertions is
on by default, as follows:
postgres=# show debug_assertions;
debug_assertions
-------------------
on

Because of pgbench performance testing, I need to disable the assert
function. Following the doc below, I tried to set plpgsql.check_asserts to
off to disable assert function.
https://www.postgresql.org/docs/13/plpgsql-errors-and-messages.html

However, it prompts the following error, not sure if I missed something,
any thoughts about it?
postgres=# alter system set plpgsql.check_asserts = off;
EORROR: unrecognized configuration parameter "plpgsql.check_asserts"

you cannot disable debug_assertions. It is possible just by configure, and
make

plpgsql.check_asserts controls evaluation of plpgsql statement ASSERT

Pavel

env:
PG: 13.2
OS: redhat 7.4 3.10.0-693.17.1.e17.x86_64
configure parameter: --enable-coverage --enable-tap-tests
--enable-cassert --enable-debug --enable-nls --with-perl --with-python
--with-tcl --with-openssl --with-ldap --with-libxml --with-libxslt
--with-uuid=e2fs --with-segsize=10 --with-wal-blocksize=16 --with-llvm
LLVM_CONFIG=xxx CLANG=xxx

thanks
walker

#3Julien Rouhaud
rjuju123@gmail.com
In reply to: Walker (#1)
Re: 回复: unrecognized configuration parameter "plpgsql.check_asserts"

On Fri, Mar 12, 2021 at 08:12:53PM +0800, Walker wrote:

To get rid of --enable-cassert while configuring, debug_assertions is shown as off. In this case, ASSERT statement also can't be used, right?

No, those are two different things. plpgsql ASSERT are only controlled by
plpgsql.check_asserts configuration option, whether the server were compiled
with or without --enable-cassert.

#4Walker
failaway@qq.com
In reply to: Julien Rouhaud (#3)
Re: 回复: unrecognized configuration parameter "plpgsql.check_asserts"

thanks Julien &amp; Pavel

it's crystal clear now. thanks again for your kindly help&nbsp;

thanks
walker

------------------&nbsp;Original&nbsp;------------------
From: "Julien Rouhaud" <rjuju123@gmail.com&gt;;
Date:&nbsp;Fri, Mar 12, 2021 08:27 PM
To:&nbsp;"Walker"<failaway@qq.com&gt;;
Cc:&nbsp;"Pavel Stehule"<pavel.stehule@gmail.com&gt;;"pgsql-hackers"<pgsql-hackers@lists.postgresql.org&gt;;
Subject:&nbsp;Re: 回复: unrecognized configuration parameter "plpgsql.check_asserts"

On Fri, Mar 12, 2021 at 08:12:53PM +0800, Walker wrote:
&gt; To get rid of --enable-cassert while configuring, debug_assertions is shown as off. In this case, ASSERT statement also can't be used, right?

No, those are two different things.&nbsp; plpgsql ASSERT are only controlled by
plpgsql.check_asserts configuration option, whether the server were compiled
with or without --enable-cassert.