Re: Adding per backend commit and rollback counters - Mailing list pgsql-hackers

From Kuba Knysiak
Subject Re: Adding per backend commit and rollback counters
Date
Msg-id 177490195327.942.4612952714548351097.pgcf@coridan.postgresql.org
Whole thread Raw
In response to Re: Adding per backend commit and rollback counters  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Responses Re: Adding per backend commit and rollback counters
List pgsql-hackers
Hello,
after reviewing the patch together with Miłosz, we found the following:

- In pgstatfuncs.c, we call pgstat_fetch_stat_backend_by_pid(beentry->st_procpid, NULL) for each backend row. That path
acquiresProcArrayLock via BackendPidGetProc(), so this repeats lock acquisition for every row. We could simplify this
andavoid taking the lock altogether by fetching directly with pgstat_fetch_stat_backend(local_beentry->proc_number).
 

Also, shouldn't this patch bump catversion? 

Regards,
Kuba

The new status of this patch is: Waiting on Author

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Better shared data structure management and resizable shared data structures
Next
From: Pavel Stehule
Date:
Subject: Re: WIP - xmlvalidate implementation from TODO list