[pgpool-hackers: 3347] Re: MOdifying temp table checking method

Tatsuo Ishii ishii at sraoss.co.jp
Fri Jun 28 15:25:04 JST 2019


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

> Currently checking temp tables is done by inspecting system
> catalog. Moreover it's a session local cache, that means whenever new
> session starts, looking up system catalog must be performed.
> 
> To eliminate the system catalog looking up, I would like to propose
> following method.
> 
> - Trace CREATE TEMP TABLE. If new temp table is created (and
>   committed), memorize it in a list.
> 
> - To know whether it's temp table or not, search the list.
> 
> - Trace DROP TABLE. If a table is dropped (and committed), remove the
>   table from the list.
> 
> - When a transaction aborts, remove tables from the list if any.
> 
> This way, we could completely eliminate system catalog look up, thus
> much faster.
> 
> A down side of the method is, we cannot trace inside functions or
> triggers.
> 
> Consider this, I think we should offer choices to users.  So existing
> boolean "check_temp_table" parameter needs to be changed to;
> 
> "catalog": existing method (catalog lookup, same as check_temp_table = on)
> "trace":   the proposed new way
> "none":    no temp table checking (same as check_temp_table = off)
> 
> Patch attached.
> 
> 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