Tencent / TBase

TBase is an enterprise-level distributed HTAP database. Through a single database cluster to provide users with highly consistent distributed database services and high-performance data warehouse services, a set of integrated enterprise-level solutions is formed.
Other
1.38k stars 261 forks source link

Reason of "01000: prepared statement leak: Statement tt_dn_in_p_4_a5d2_40b_5a181806 still referenced" #87

Closed yazun closed 3 weeks ago

yazun commented 3 years ago

We also see millions of leak warning as below, that we do not experience in XL

PrintPreparedStmtLeakWarning, resowner.c:1433
01000: prepared statement leak: Statement tt_dn_in_p_4_a5d2_40b_5a181806 still referenced#0122020-12-11 09:19:48 CET [41792,coord(42450,506)]:xid[1676515-823/0] [518-1] user=dr3_ops_cs36,db=surveys,client=192.168.168.156,query=PostgreSQL JDBC Driver,

What is this leak related to? - normally connections are long lived so it's surprising to see.

JennyJennyChen commented 3 years ago

because some modules may expect that their resources were all released already if the transaction or portal finished normally. If so it is reasonable to give a warning (NOT an error) should any unreleased resources be present. Later will released resources.

dafoerx commented 3 years ago

We also see millions of leak warning as below, that we do not experience in XL

PrintPreparedStmtLeakWarning, resowner.c:1433
01000: prepared statement leak: Statement tt_dn_in_p_4_a5d2_40b_5a181806 still referenced#0122020-12-11 09:19:48 CET [41792,coord(42450,506)]:xid[1676515-823/0] [518-1] user=dr3_ops_cs36,db=surveys,client=192.168.168.156,query=PostgreSQL JDBC Driver,

What is this leak related to? - normally connections are long lived so it's surprising to see.

Hello, could you provide a repeat use case of this problem, let me check?