Hi, While reviewing progress reporting for COPY command patches [1], a point on using pgstat_progress_update_multi_param instead of pgstat_progress_update_param wherever possible was suggested in [1]. We could do multiple param updates at once with a single API than doing each param update separately. The advantages are - 1) reducing few function calls making the code look cleaner 2) atomically updating multiple parameters at once within a single backend write critical section i.e. incrementing st_changecount at once in a critical section instead of doing it for each param separately.
Attached is a patch that replaces some subsequent multiple update_param calls with a single update_multi_param. Thoughts? [1] - https://www.postgresql.org/message-id/CALj2ACXQrFM%2BDSN9xr%3D%2ByRotBufnC_xgG-FQ6VXAUZRPihZAew%40mail.gmail.com With Regards, Bharath Rupireddy. EnterpriseDB: http://www.enterprisedb.com
v1-0001-Update-multiple-progress-params-at-once.patch
Description: Binary data