On 2024/07/04 0:14, Fujii Masao wrote:
> I'm not sure if these are bugs. However, to prevent confusion from
> these odd pg_stat_activity entries, I suggest the following changes:
>
> 1. Modify ProcessCatchupInterrupt() and RemoveTempRelationsCallback()
> to reset stmtStartTimestamp (timestamp of the last query
> executed) to 0
> before starting the transaction. This way, during the transaction,
> records with state="idle" and xact_start=NULL would be observed.
>
> 2. Update exec_describe_statement_message() and
> exec_describe_portal_message()
> to change the state to "active," similar to exec_simple_query().
> This would result in records with state="active" and
> xact_start="current timestamp"
> during those operations.
Attached patch does these things. I will register it into the next CF.
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION