[pgpool-general: 5457] Re: Backslash problem with pgpool

Tatsuo Ishii ishii at sraoss.co.jp
Fri May 12 18:07:41 JST 2017


> Hello,
> 
> I have a problem with pgpool, i’m using pgpool 3.5.6 
> I have to insert a json and I have some problems with the inserted data.
> 
> When i’m using pgpool backslash are backslashed, i don’t have the problem with a standard postgres
> 
> Example :
> 
>  INSERT INTO table (layer)
>                 VALUES ('{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates »:[XXXXX,XXXXXXX]},"properties":{"author":"client","image_url":"https:\/\/upload.domain.tld\/get\/img_0320-4.jpg","timestamp_add":1493730108}},{"type":"Feature","geometry":{"type":"Point","coordinates":[XXXXX,XXXXXXX]},"properties":{"author":"client","image_url":"https:\/\/upload.domain.tld\/get\/img_0320-4.jpg","timestamp_add":1493730184}}]}’);
> 
> If the data are inserted directly in postgres :
> https:\/\/upload.domain.tld\/get\/img_0320-4.jpg
> 
> But with pgpool :
> 
> https:\\/\\/upload.domain.tld\\/get\\/img_0320-4.jpg

Interesting. Since ordinary text types do not behave like that
(behaves same as PostgreSQL), I guess there's a problem with parsing
JSON syntax. I will dig into this.

> My global configuration :
> 
> connection_cache = on
> reset_query_list = 'ABORT; DISCARD ALL'
> replication_mode = on
> replicate_select = off
> insert_lock = on
> lobj_lock_table = ''
> replication_stop_on_mismatch = on
> failover_if_affected_tuples_mismatch = on
> load_balance_mode = on
> ignore_leading_white_space = on
> white_function_list = ''
> black_function_list = 'nextval,setval,AddGeometryColumn'
> 
> I don’t know if my second problem have the same origin, but if i’m using more than 2 servers on Pgpool, when i’m running some insert queries, one server of the pool is excluded (King mismatch)
> Will I forget an option?

I believe that is not relevant to the JSON problem. Is there any
reason to use replication mode? If your PostgreSQL is 9.0 or later,
you can use streaming replication, which I recommend to use.

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