[Pgpool-general] read_kind_from_backend: 1 th kind C does not match with master or majority connection kind D

Tatsuo Ishii ishii at sraoss.co.jp
Wed Oct 28 00:25:02 UTC 2009


> Tatsuo,
>   thank you for your help. Below is what I saw. It looks like both tables are empty. Below that I did a more general search and the tables still look similar. Any suggestions on how I might get additional information, say a log of all queries pgpool dispatches to the DBs and what pgpool sees as their results?
[snip]

If there's no difference between two DBs at this point, I think
i10_hts table might had been different "temporarily" from each other
on db01 and db02.

This could happen under heavy load. Here is a scenario:
(S1 denotes a session to pgpool, S2 denotes another session to
pgpool).

precondition: i10_hts has n rows on

S1: start a transaction on db01
S2: start a transaction on db02
S1: INSERT someting to i10_hts on db01
S1: INSERT someting to i10_hts on db01
S2: SELECT to i10_hts on db01 and get n rows
S1: commit the transaction on db02
S2: SELECT to i10_hts on db02 and get *n+1* rows. triggers kind
	mismatch error!
S1: commit the transaction on db01. at this point i10_hts on db01 and
	db02 both has n+1 rows

One of the solutions to this is to load balance SELECT.

You said you do not use load balance because your SELECT query
includes NEXVAL? pgpool treats SELECT which has NEXTVAL or SETVAL in
the target list(for example, "SELECT nextval") specially (do not load
balance even if load balance mode is set). Does this help you?
--
Tatsuo Ishii
SRA OSS, Inc. Japan


More information about the Pgpool-general mailing list