[pgpool-general: 4184] Re: documentation bug?

Pablo Sanchez pablo at blueoakdb.com
Wed Nov 11 02:34:26 JST 2015


[ Comments below, in-line ]


On 11/10/2015 12:14 AM, Yugo Nagata wrote:
> Hi Pablo,

Hi Yugo,

> On Mon, 9 Nov 2015 15:35:33 -0500
> Pablo Sanchez <pablo at blueoakdb.com> wrote:
>
>>
>> I believe the documentation should read TRUE, not FALSE.
>
> Do you mean the correct statement is:
>
> "when the JDBC driver's 'autocommit' option is set to **TRUE**,
> it wraps all queries around a 'BEGIN' and 'COMMIT"?
>
> This is wrong.  When autocommit is true, the query is sent without BEGIN
> and committed implicitly if this isn't in a transaction block.[1][2]
>
> [1] http://www.postgresql.org/docs/9.4/static/sql-begin.htm
> [2] https://docs.oracle.com/javase/tutorial/jdbc/basics/transactions.html#disable_auto_commit

 From [2] it states 'The way to allow two or more statements to be
grouped into a transaction is to disable the auto-commit mode.'

It provides the example of setting the property to *FALSE* to
accomplish this ability.

Below is the excerpt from the manual:

    The way to allow two or more statements to be grouped into a
    transaction is to disable the auto-commit mode. This is
    demonstrated in the following code, where con is an active
    connection:

    con.setAutoCommit(false);

To me this means this PGPool text should be written ...

::: From :::
http://www.pgpool.net/docs/latest/pgpool-en.html#condition_for_load_balance

Note: the JDBC driver has an autocommit option. If the autocommit is
       *false*, the JDBC driver sends "BEGIN" and "COMMIT" by itself. In 
this
       case the same restriction above regarding load balancing will be
       applied.

::: To :::

Note: the JDBC driver has an autocommit option. If the autocommit is
       *true*, the JDBC driver sends "BEGIN" and "COMMIT" by itself. In this
       case the same restriction above regarding load balancing will be
       applied.

Cheers,
--
Pablo Sanchez - Blueoak Database Engineering, Inc
Ph:    819.459.1926         Blog:  http://pablo-blog.blueoakdb.com
iNum:  883.5100.0990.1054


More information about the pgpool-general mailing list