[pgpool-general: 122] Re: question of pgpool's behavior

Tatsuo Ishii ishii at postgresql.org
Mon Dec 26 16:31:42 JST 2011


> Hi, all
> 
> I'm checking pgpool behavior and documented behavior.
> Mainly, I run regression test included PostgreSQL 9.1.1.
> I have some questions.
> 
> ===================================
> 1. behavior about PREPARE statement
> ===================================
> 
> When I execute PREPARE statement on standby PostgreSQL,
> any response is not back to the client.
> 
> I've executed query espected becoming error like bellow.
>   # PREPARE q4(nonexistenttype) AS select $1;
> 
> Is this same behavior with [pgpool-general: 99] bug ?

No. At least my patch did not solve the problem.

I did some random tests with various versions of pgpool-II and found
that 3.0.0 is ok.  3.0.6 and 3.1.1 are not good. So it seems somewhere
after 3.0.0, pgpool-II has been broken in this regard. Need more
investigation...
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

> =============================================
> 2. behavior about standard_conforming_strings
> =============================================
> 
> When I execute escape strings via pgpool,
> the result is difference from one executed on PostgreSQL.
> before executing the query, I changed 'standard_conforming_strings'
> parameter
> to off.
>   # SET standard_conforming_strings TO off;
> 
> this is the query.
>   # select 'a\\bcd' as f1, 'a\\b\'cd' as f2, 'a\\b\'''cd' as f3, 'abcd\\'
> as f4, 'ab\\\'cd' as f5, '\\\\' as f6;
> 
> ---------------------------------------------------------------------------------
> testdb=# select 'a\\bcd' as f1, 'a\\b\'cd' as f2, 'a\\b\'''cd' as f3,
> 'abcd\\'   as f4, 'ab\\\'cd' as f5, '\\\\' as f6;
> WARNING:  nonstandard use of \\ in a string literal
> LINE 1: select 'a\\bcd' as f1, 'a\\b\'cd' as f2, 'a\\b\'''cd' as f3,...
>                ^
> HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
> WARNING:  nonstandard use of \\ in a string literal
> LINE 1: select 'a\\bcd' as f1, 'a\\b\'cd' as f2, 'a\\b\'''cd' as f3,...
>                                ^
> HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
> WARNING:  nonstandard use of \\ in a string literal
> LINE 1: select 'a\\bcd' as f1, 'a\\b\'cd' as f2, 'a\\b\'''cd' as f3,...
>                                                  ^
> HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
> WARNING:  nonstandard use of \\ in a string literal
> LINE 1: ...bcd' as f1, 'a\\b\'cd' as f2, 'a\\b\'''cd' as f3, 'abcd\\'  ...
>                                                              ^
> HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
> WARNING:  nonstandard use of \\ in a string literal
> LINE 1: ...'cd' as f2, 'a\\b\'''cd' as f3, 'abcd\\'   as f4, 'ab\\\'cd'...
>                                                              ^
> HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
> WARNING:  nonstandard use of \\ in a string literal
> LINE 1: ...'''cd' as f3, 'abcd\\'   as f4, 'ab\\\'cd' as f5, '\\\\' as ...
>                                                              ^
> HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
>   f1   |   f2   |   f3    |  f4   |   f5   | f6
> -------+--------+---------+-------+--------+----
>  a\bcd | a\b'cd | a\b''cd | abcd\ | ab\'cd | \\
> (1 row)
> ---------------------------------------------------------------------------------
> 
> via pgpool, the result is bellow.
> 
> ---------------------------------------------------------------------------------
> testdb=# select 'a\\bcd' as f1, 'a\\b\'cd' as f2, 'a\\b\'''cd' as f3,
> 'abcd\\'   as f4, 'ab\\\'cd' as f5, '\\\\' as f6;
> Invalid command \. Try \? for help.
> ---------------------------------------------------------------------------------
> 
> 
> ========================================
> 3. documentation about DECLARE statement
> ========================================
> current document says like bellow,
> ----
> These queries can be sent to both the primary node and the standby node.
> If load balancing is enabled, these types of queries can be sent to the
> standby node.
> However, if delay_threshold is set and the replication delay is higher
> than delay_threshold, queries are sent to the primary node.
> 
> SELECT not listed above
> COPY TO
> DECLARE, FETCH, CLOSE
> SHOW
> ----
> 
> on the other hand, "Release Note" in Japanese document says that
> pgpool-II 2.2.6 had been changed NOT to do load balancing with
> DECLARE, CLOSE, FETCH and MOVE statements.
> 
> 
> which is rigth ?
> 
> 
> regards,
> -------------------
> Tomonari Katsumata


More information about the pgpool-general mailing list