Re: enhance pg_log_backend_memory_contexts() to log memory contexts of auxiliary processes

Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>

From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
To: vignesh C <vignesh21@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, torikoshia <torikoshia@oss.nttdata.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-11-28T13:44:49Z
Lists: pgsql-hackers

Attachments

On Sun, Nov 28, 2021 at 5:21 PM vignesh C <vignesh21@gmail.com> wrote:
> Thanks for the updated patch, one comment:
> 1)  The function can be indented similar to other functions in the same file:
> +CREATE FUNCTION memcxt_get_proc_pid(text)
> +RETURNS int
> +LANGUAGE SQL
> +AS 'SELECT pid FROM pg_stat_activity WHERE backend_type = $1';
>
> Something like:
> +CREATE FUNCTION memcxt_get_proc_pid(text)
> +  RETURNS int
> +  LANGUAGE SQL
> +  AS 'SELECT pid FROM pg_stat_activity WHERE backend_type = $1';

Done. PSA v6 patch.

Regards,
Bharath Rupireddy.

Commits

  1. Enhance pg_log_backend_memory_contexts() for auxiliary processes.