[pgpool-general: 5972] Re: pgpool load balancing problem

Tatsuo Ishii ishii at sraoss.co.jp
Mon Mar 5 05:40:33 JST 2018


The file hasn't been changed since 3.7.2. So you can safely ignore the
warning.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

> Hi,
> I succeeded to download and install the new version. However I'm getting
> the next error during installation :
> gcc -DHAVE_CONFIG_H -DDEFAULT_CONFIGDIR=\"/PostgreSQL/pgpool-3.7.2/etc\"
> -DHEALTHCHECK_OPTS=0 -I. -I../src/include  -D_GNU_SOURCE -I /usr/include
>  -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations
> -fno-strict-aliasing -c -o query_cache/pool_memqcache.o
> query_cache/pool_memqcache.c
> query_cache/pool_memqcache.c: In function
> ג€˜pool_fetch_from_memory_cacheג€™:
> query_cache/pool_memqcache.c:4043:25: warning: ג€˜qcacheג€™ may be used
> uninitialized in this function [-Wmaybe-uninitialized]
>    memcpy(&tmplen, qcache+i, sizeof(tmplen));
>                          ^
> query_cache/pool_memqcache.c:610:8: note: ג€˜qcacheג€™ was declared here
>   char *qcache;
>         ^
> 
> 2018-03-04 15:40 GMT+02:00 Mariel Cherkassky <mariel.cherkassky at gmail.com>:
> 
>> I downloaded it, but should I copy those files to the original pool
>> directory(the current pool directory that has the bug) or I should replace
>> it and compile and all over again ?
>>
>>
>> 2018-03-04 15:32 GMT+02:00 Mariel Cherkassky <mariel.cherkassky at gmail.com>
>> :
>>
>>> Is the link you specified in the end of your comment is the 3.7.2 version
>>> without the bug ?
>>>
>>> 2018-03-02 1:10 GMT+02:00 Tatsuo Ishii <ishii at sraoss.co.jp>:
>>>
>>>> So you are surely bitten by the bug in 3.7.2.
>>>>
>>>> In other message you failed to incomporate the patch. Maybe executing
>>>> "make clean" before compiling helps you.
>>>>
>>>> If you are not familiar with patching, you could obtain whole source
>>>> code from:
>>>> https://git.postgresql.org/gitweb/?p=pgpool2.git;a=shortlog;
>>>> h=refs/heads/V3_7_STABLE
>>>>
>>>> In this window the top most row is the latest entry for 3.7.x. You hit
>>>> "snapshot" link to get the source code tar ball (.tgz).
>>>>
>>>> Current direct link to the tar ball is:
>>>> https://git.postgresql.org/gitweb/?p=pgpool2.git;a=snapshot;
>>>> h=8593af680d9c575c23a823489ecfa693749811f3;sf=tgz
>>>>
>>>> Another workaround is, swapping the entry for node 0 and node 1 in
>>>> your pgpool.conf.
>>>>
>>>> Best regards,
>>>> --
>>>> Tatsuo Ishii
>>>> SRA OSS, Inc. Japan
>>>> English: http://www.sraoss.co.jp/index_en.php
>>>> Japanese:http://www.sraoss.co.jp
>>>>
>>>> > pool_version
>>>> >
>>>> > ----------------------
>>>> >
>>>> > 3.7.2 (amefuriboshi)
>>>> >
>>>> > (1 row)
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > psql -d postgres -U postgres -h 127.0.0.1  -p 9999 -c "show
>>>> pool_nodes";
>>>> >
>>>> >
>>>> >
>>>> > node_id |    hostname     | port | status | lb_weight |  role   |
>>>> > select_cnt | load_balance_node | replication_delay
>>>> >
>>>> > ---------+-----------------+------+--------+-----------+----
>>>> -----+------------+-------------------+-------------------
>>>> >
>>>> > 0       | pg1 | 5432 | up     | 0.333333  | standby | 22565      |
>>>> > true              | 0
>>>> >
>>>> > 1       | pg2 | 5432 | up     | 0.333333  | primary | 10416      |
>>>> > false             | 0
>>>> >
>>>> > 2       | pg3 | 5432 | up     | 0.333333  | standby | 7686       |
>>>> > false             | 0
>>>> >
>>>> > (3 rows)
>>>> >
>>>> >
>>>> > 2018-03-01 6:23 GMT+02:00 Tatsuo Ishii <ishii at sraoss.co.jp>:
>>>> >
>>>> >> > I found a problem that had a big impact on our servers. I'm using
>>>> pgpool
>>>> >> as
>>>> >> > a load balancer and pool connections manager. When a user tries to
>>>> run a
>>>> >> > select query it redirects the query to the slave. If the user tries
>>>> after
>>>> >> > that to run dml or ddl command he get error :
>>>> >> >
>>>> >> > ERROR: cannot execute CREATE TABLE in a read-only transaction
>>>> >> > SQL state: 25006
>>>> >> >
>>>> >> > Is there any way to solve this issue ? It means that once the pool
>>>> >> > redirected your session to the slaves you cant run any ddl/dml
>>>> actions ..
>>>> >>
>>>> >> Normaly Pgpool-II redirects any ddl/dml query to primary.  Can you
>>>> >> show me following query results? I would like to confirm your problem.
>>>> >>
>>>> >> show pool_version;
>>>> >> show pool_nodes;
>>>> >>
>>>> >> Best regards,
>>>> >> --
>>>> >> Tatsuo Ishii
>>>> >> SRA OSS, Inc. Japan
>>>> >> English: http://www.sraoss.co.jp/index_en.php
>>>> >> Japanese:http://www.sraoss.co.jp
>>>> >>
>>>>
>>>
>>>


More information about the pgpool-general mailing list