Thread

Commits

  1. Doc: document the current-transaction-modes GUCs.

  1. BUG #17077: about three parameters in postgresql 13.3

    The Post Office <noreply@postgresql.org> — 2021-06-30T06:09:48Z

    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。
    
    
  2. Re: BUG #17077: about three parameters in postgresql 13.3

    leiyanliang@highgo.com <leiyanliang@highgo.com> — 2021-07-17T04:40:25Z

    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。
     
    
  3. Re: BUG #17077: about three parameters in postgresql 13.3

    Tom Lane <tgl@sss.pgh.pa.us> — 2021-07-17T14:20:24Z

    "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
    
    
    
    
  4. Re: BUG #17077: about three parameters in postgresql 13.3

    Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> — 2021-07-17T14:50:39Z

    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.
    
    
    
    
  5. Re: BUG #17077: about three parameters in postgresql 13.3

    Tom Lane <tgl@sss.pgh.pa.us> — 2021-07-17T15:04:14Z

    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
    
    
    
    
  6. Re: BUG #17077: about three parameters in postgresql 13.3

    Alvaro Herrera <alvherre@alvh.no-ip.org> — 2021-07-17T17:24:08Z

    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/
    
    
    
    
  7. Re: BUG #17077: about three parameters in postgresql 13.3

    Tom Lane <tgl@sss.pgh.pa.us> — 2021-07-17T19:21:39Z

    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