BUG #17077: about three parameters in postgresql 13.3

Started by PG Bug reporting formalmost 5 years ago7 messagesbugs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following bug has been logged on the website:

Bug reference: 17077
Logged by: yanliang lei
Email address: leiyanliang@highgo.com
PostgreSQL version: 13.3
Operating system: CentOS7.6
Description:

Three parameters are
'transaction_deferrable','transaction_isolation','transaction_read_only'。

in the following sql statement,there are three
parameters('transaction_deferrable','transaction_isolation','transaction_read_only')

[pg133@VM-0-8-centos ~]$ psql -d postgres
psql (13.3)
Type "help" for help.

postgres=# select * from pg_settings where name in
('transaction_deferrable','transaction_isolation','transaction_read_only');
name | setting | unit |
category |
short_desc |
extra_desc | c
ontext | vartype | source | min_val | max_val |
enumvals | boot_val | reset_val
| sourcefile | sourceline | pending_restart
------------------------+----------------+------+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+------------+--
-------+---------+----------+---------+---------+----------------------------------------------------------------------+----------------+----------------+------------+------------+-----------------
transaction_deferrable | off | | Client Connection Defaults
/ Statement Behavior | Whether to defer a read-only serializable transaction
until it can be executed with no possible serialization failures. |
| u
ser | bool | override | | |
| off | off
| | | f
transaction_isolation | read committed | | Client Connection Defaults
/ Statement Behavior | Sets the current transaction's isolation level.
|
| u
ser | enum | override | | | {serializable,"repeatable
read","read committed","read uncommitted"} | read committed | read committed
| | | f
transaction_read_only | off | | Client Connection Defaults
/ Statement Behavior | Sets the current transaction's read-only status.
|
| u
ser | bool | override | | |
| off | off
| | | f
(3 rows)

postgres=#

in the
https://www.postgresql.org/docs/current/runtime-config-client.html#RUNTIME-CONFIG-CLIENT-STATEMENT

there is no description about these three parameters。

#2leiyanliang@highgo.com
leiyanliang@highgo.com
In reply to: PG Bug reporting form (#1)
Re: BUG #17077: about three parameters in postgresql 13.3

I want to know: this bug report is a problem or not ?

From: PG Bug reporting form
Date: 2021-06-30 14:09
To: pgsql-bugs@lists.postgresql.org
CC: leiyanliang@highgo.com
Subject: BUG #17077: about three parameters in postgresql 13.3
The following bug has been logged on the website:

Bug reference: 17077
Logged by: yanliang lei
Email address: leiyanliang@highgo.com
PostgreSQL version: 13.3
Operating system: CentOS7.6
Description:

Three parameters are
'transaction_deferrable','transaction_isolation','transaction_read_only'。

in the following sql statement,there are three
parameters('transaction_deferrable','transaction_isolation','transaction_read_only')

[pg133@VM-0-8-centos ~]$ psql -d postgres
psql (13.3)
Type "help" for help.

postgres=# select * from pg_settings where name in
('transaction_deferrable','transaction_isolation','transaction_read_only');
name | setting | unit |
category |
short_desc |
extra_desc | c
ontext | vartype | source | min_val | max_val |
enumvals | boot_val | reset_val
| sourcefile | sourceline | pending_restart
------------------------+----------------+------+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+------------+--
-------+---------+----------+---------+---------+----------------------------------------------------------------------+----------------+----------------+------------+------------+-----------------
transaction_deferrable | off | | Client Connection Defaults
/ Statement Behavior | Whether to defer a read-only serializable transaction
until it can be executed with no possible serialization failures. |
| u
ser | bool | override | | |
| off | off
| | | f
transaction_isolation | read committed | | Client Connection Defaults
/ Statement Behavior | Sets the current transaction's isolation level.
|
| u
ser | enum | override | | | {serializable,"repeatable
read","read committed","read uncommitted"} | read committed | read committed
| | | f
transaction_read_only | off | | Client Connection Defaults
/ Statement Behavior | Sets the current transaction's read-only status.
|
| u
ser | bool | override | | |
| off | off
| | | f
(3 rows)

postgres=#

in the
https://www.postgresql.org/docs/current/runtime-config-client.html#RUNTIME-CONFIG-CLIENT-STATEMENT

there is no description about these three parameters。

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: leiyanliang@highgo.com (#2)
Re: BUG #17077: about three parameters in postgresql 13.3

"leiyanliang@highgo.com" <leiyanliang@highgo.com> writes:

I want to know: this bug report is a problem or not ?

The code is operating as designed. It does seem odd that there's no
mention of these variables in the documentation, though.

regards, tom lane

#4Bharath Rupireddy
bharath.rupireddyforpostgres@gmail.com
In reply to: Tom Lane (#3)
Re: BUG #17077: about three parameters in postgresql 13.3

On Sat, Jul 17, 2021 at 7:50 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

"leiyanliang@highgo.com" <leiyanliang@highgo.com> writes:

I want to know: this bug report is a problem or not ?

The code is operating as designed. It does seem odd that there's no
mention of these variables in the documentation, though.

I think the point that the 3 GUCs have no explanation in the docs but
still show up in the pg_settings was discussed at [1]/messages/by-id/237342.1620491116@sss.pgh.pa.us. There, we
wanted to add GUC_NO_SHOW_ALL for 3 of them. I still would prefer it
because the 3 GUCs will only be used internally(?).

[1]: /messages/by-id/237342.1620491116@sss.pgh.pa.us

Regards,
Bharath Rupireddy.

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bharath Rupireddy (#4)
Re: BUG #17077: about three parameters in postgresql 13.3

Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> writes:

On Sat, Jul 17, 2021 at 7:50 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

The code is operating as designed. It does seem odd that there's no
mention of these variables in the documentation, though.

I think the point that the 3 GUCs have no explanation in the docs but
still show up in the pg_settings was discussed at [1]. There, we
wanted to add GUC_NO_SHOW_ALL for 3 of them. I still would prefer it
because the 3 GUCs will only be used internally(?).

I've concluded that we should just document them (and am working
on that right now). It's certainly true that there is a use-case
for reading them: libpq does "SHOW transaction_read_only", for
example. And since we've gone to the trouble of making SET of one
of these equivalent to SET TRANSACTION, we should probably just
document that it is.

regards, tom lane

#6Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Tom Lane (#5)
Re: BUG #17077: about three parameters in postgresql 13.3

On 2021-Jul-17, Tom Lane wrote:

I've concluded that we should just document them (and am working
on that right now). It's certainly true that there is a use-case
for reading them: libpq does "SHOW transaction_read_only", for
example. And since we've gone to the trouble of making SET of one
of these equivalent to SET TRANSACTION, we should probably just
document that it is.

Maybe include "SET NAMES" while at it? It drove me crazy when I found
out that was accepted, last year.

--
Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/

#7Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alvaro Herrera (#6)
Re: BUG #17077: about three parameters in postgresql 13.3

Alvaro Herrera <alvherre@alvh.no-ip.org> writes:

Maybe include "SET NAMES" while at it? It drove me crazy when I found
out that was accepted, last year.

That is documented, but only on the SET page, because there isn't a GUC
by that name.

regards, tom lane