From: | "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com> |
---|---|
To: | 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "'pgsql-hackers(at)lists(dot)postgresql(dot)org'" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | RE: [postgres_fdw] add local pid to fallback_application_name |
Date: | 2021-07-30 03:16:20 |
Message-ID: | TYAPR01MB586606014D3158100AA75783F5EC9@TYAPR01MB5866.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Dear Tom,
Thank you for replying!
> I don't think this is a great idea as-is. People who need to do this
> sort of thing will all have their own ideas of what they need to track
> --- most obviously, it might be appropriate to include the originating
> server's name, else you don't know what machine the PID is for.
I thought this is not big problem because hostname (or IP address) can be
added to log_line_prefix. I added only local-pid because this is the only thing
that cannot be set in the parameter.
> So I think most people with this sort of requirement will be overriding
> the default application name anyway, so we might as well keep the
> default behavior simple.
Yeah, this patch assumed that application_name will be not overridden.
There is an another approach that PID adds to application_name, but it might be stupid.
> What would be better to think about is how to let users specify this
> kind of behavior for themselves. I think it's possible to set
> application_name as part of a foreign server's connection options,
> but at present the result would only be a constant string. Somebody
> who wished the PID to be in there would like to have some sort of
> formatting escape, say "%p" for PID. Extrapolating wildly, maybe we
> could make all the %-codes known to log_line_prefix available here.
I think your argument is better than mine. I will try to implement this approach.
If anyone has another argument please tell me.
Best Regards,
Hayato Kuroda
FUJITSU LIMITED
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2021-07-30 03:52:19 | Re: Skipping logical replication transactions on subscriber side |
Previous Message | David Rowley | 2021-07-30 03:05:30 | Re: Reduce the number of special cases to build contrib modules on windows |