Closed ppetrov91 closed 5 years ago
Seems great to me. rjuju ?
Indeed, good catch!
Minor nitpicking, could you use tab instead of spaces for the indentation, and remove the trailing whitespace?
Hello!
Thank you for your reply. Yes, I'll do that
Thanks a lot!
Thank you!
Kudos guys this project is amazing ;-)
Hello, team
From postgres 11 there is opportunity to specify background worker type by filling bgw_type in BackgroundWorker structure. If bgw_type is empty string then we copy bgw_name into bgw_type. But in _PG_init BackgroundWorker structure is not fully initialized, so it can be garbage in bgw_type field. And this garbage will be shown in backend_type column in pg_stat_activity. We can bypass it by setting bgw_type. We can also use memset to zero BackgroundWorker structure. Then bgw_name value will be copied into bgw_type