Re: Adding per backend commit and rollback counters

Поиск
Список
Период
Сортировка
От Kuba Knysiak
Тема Re: Adding per backend commit and rollback counters
Дата
Msg-id 177490195327.942.4612952714548351097.pgcf@coridan.postgresql.org
обсуждение исходный текст
Ответ на Re: Adding per backend commit and rollback counters  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Ответы Re: Adding per backend commit and rollback counters
Список 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 по дате отправления: