[pgpool-hackers: 2343] nodemap in send_to_where()

Tatsuo Ishii ishii at sraoss.co.jp
Wed May 17 15:42:38 JST 2017


Currently send_to_where() searches "nodemap" which includes NodeTag
corresponding to statement type. This search is only used to check if
the statement is known to Pgpool-II. If it's unknown, send_to_where()
returns POOL_PRIMARY suggesting that the statement should be sent to
the primary node.

My question is, do we need the "nodemap" at all? After the statement
is found in the nodemap, tons of if else if... are followed and actual
decisions are made in the if else if statements. So unknown statements
can be found if we add "else" after that even if we don't have the
nodemap. The only advantage of nodemap is, finding unknown statements
is faster. However usually such a statement is rarely found because
while porting the lastest PostgreSQL parser, the nodemap is
maintained. Removing the nodemap will somewhat mitigate the work.

Can we remove the nodemap?

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