-
Notifications
You must be signed in to change notification settings - Fork 96
Open
Description
Hi,
I met an issue as below:
-
environment
pgpool 4.6.2 with three backend nodes, one primary and two standby(weight: 0:1:1).
-
reproduce steps
- start pgpool
- create table t1(id1 int,id2 int);
- select * from t1; //this query will be routed to standby node
- drop table t1;
- create temp table t1(id1 int,id2 int);
- select * from t1; //this query will be routed to standby node and execute failed.
-
analyze
- in step 3. this query is routed to standby, that's OK. During the process, pgpool will check if 't1' is an temp table, since this is the first time do this query, there is no result in local cache and shared cache, so pgpool will first do query from backend and save the result to shared cached and local cache, 't1' is marked as a non-temporary table.
- when drop t1 and re-create t1 as a temp table, pgpool will call discard_temp_table_relcache() to clear local cache, but not clear shared cache.
- in step 6, do query "select * from t1;" , pgpgool will check if 't1' is temp table, can not get result from local cache, but can get the result from shared cache, result is 't1' is not an temp table , so routed to standby and execute failed.
-
concern
so do we have any mechanism to avoid this? I know we can set expire time, but it won't take effect in a timely manner.
in addition, unlog table,function maybe have same issue.
thanks~
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels