Обсуждение: BUG #17077: about three parameters in postgresql 13.3

Поиск
Список
Период
Сортировка

BUG #17077: about three parameters in postgresql 13.3

От
PG Bug reporting form
Дата:
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。


Re: BUG #17077: about three parameters in postgresql 13.3

От
"leiyanliang@highgo.com"
Дата:
I want to know: this bug report is a problem or not ?




 
Date: 2021-06-30 14:09
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。
 

Re: BUG #17077: about three parameters in postgresql 13.3

От
Tom Lane
Дата:
"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



Re: BUG #17077: about three parameters in postgresql 13.3

От
Bharath Rupireddy
Дата:
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]. 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] - https://www.postgresql.org/message-id/237342.1620491116%40sss.pgh.pa.us

Regards,
Bharath Rupireddy.



Re: BUG #17077: about three parameters in postgresql 13.3

От
Tom Lane
Дата:
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



Re: BUG #17077: about three parameters in postgresql 13.3

От
Alvaro Herrera
Дата:
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/



Re: BUG #17077: about three parameters in postgresql 13.3

От
Tom Lane
Дата:
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