[pgpool-hackers: 3473] White/black function list for query cache
Tatsuo Ishii
ishii at sraoss.co.jp
Fri Dec 6 11:31:02 JST 2019
>From our mantis bug tracker: https://www.pgpool.net/mantisbt/view.php?id=560
> The problem is that pgpool doesn't cache the query results of any
> non-immutable function, including stable ones, while postgrest heavqily
> depends on the json-related functions to process and produce the
> results. Quite a few json functions are marked as stable, e.g.,
> array_to_json, json_agg, json_build_array, json_build_object,
> json_object_agg, json_populate_record, json_to_record, etc.. Hence any
> result produced by postgrest is not cachable.
The reason why Pgpool-II does not cache SELECT results including
stable functions is, their results may be changed while Pgpool-II does
not notice it. Example:
SELECT pg_conf_load_time();
To have more opportunity to cache results of SELECT using stable
functions, I think having White/black function list in addition to
existing white_memqcache_table_list and black_memqcache_table_list for
query cache is a great idea.
If there's no objection, I am going to implement this for upcoming
Pgpool-II 4.2.
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-hackers
mailing list