[pgpool-general: 8883] Re: Prepared statements over pgpool ?

Charly Koza cka at f4-group.com
Mon Jul 10 18:59:03 JST 2023


After some thoughts, #011 is a syslog artefact representing the "tabs" 
character

and I forgot to give the query from the osm2pgsql source for reference, 
so here it is :

     sql.prepare_fw_dep_lookups =
         "PREPARE mark_rels_by_node(int8) AS"
         "  SELECT id FROM {schema}\"{prefix}_rels\""
         "    WHERE parts && ARRAY[$1]"
         "      AND parts[1:way_off] && ARRAY[$1];\n"
         "PREPARE mark_rels_by_way(int8) AS"
         "  SELECT id FROM {schema}\"{prefix}_rels\""
         "    WHERE parts && ARRAY[$1]"
         "      AND parts[way_off+1:rel_off] && ARRAY[$1];\n";

It should be noted though that there are no tabs here O_o

Le 10/07/2023 à 10:43, Charly Koza a écrit :
> I have no idea what that is, I thought it was added by pgpool :D
>
> From osm2pgsql source 
> https://github.com/openstreetmap/osm2pgsql/blob/60e3e5c1b05b31c66e725c2737b3adc69d869ba5/src/middle-pgsql.cpp#L1423
>
> Both mark_rels_by_node and mark_rels_by_way prepared statements are in 
> the same string, so probably sent as a single query.
>
> Le 10/07/2023 à 01:55, Tatsuo Ishii a écrit :
>>>> Here are the logs (limited to id 29, to avoid cluttering, however all
>>>> the 29 logs are here)
>>> [snip]
>>>
>>> Thanks. I will look into this.
>> I found an interesting log line:
>>
>> Jul  5 12:19:38 bigjaja pgpool[29]: [89-3] #011PREPARE
>> mark_rels_by_way(int8) AS  SELECT id FROM "planet_osm_rels" WHERE
>> parts && ARRAY[$1]      AND parts[way_off+1:rel_off] && ARRAY[$1];
>> Jul  5 12:19:38 bigjaja pgpool[29]: [89-4] #011"
>>
>> What's this? It looks like different from other log lines.  Is it
>> possible that pgpool did not recognize this as a query? If so,
>> prepared statement mark_rels_by_way was not recognized by pgpool and
>> it is reasonable that pgpool complains this:
>>
>> Jul  5 12:19:38 bigjaja pgpool[29]: [95-2] 2023-07-05 12:19:38.966:
>> osm2pgsql pid 29: DETAIL:  cannot get parse message "mark_rels_by_way"
>>
>> Best reagards,
>> -- 
>> Tatsuo Ishii
>> SRA OSS LLC
>> English: http://www.sraoss.co.jp/index_en/
>> Japanese:http://www.sraoss.co.jp
>> _______________________________________________
>> pgpool-general mailing list
>> pgpool-general at pgpool.net
>> http://www.pgpool.net/mailman/listinfo/pgpool-general
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general



More information about the pgpool-general mailing list