mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-20 12:53:22 +02:00
postgres_fdw.application_name relies on MyProcPort to define the data that should be added to escape sequences %u (user name) or %d (database name). However this code could be run in processes that lack a MyProcPort, like an autovacuum process, causing crashes. The code generating the application name is made more flexible with this commit, so as it now generates no data for %u and %d if MyProcPort is missing, and a simple "unknown" if MyProcPort exists, but the expected fields are not set. Reported-by: Alexander Lakhin Author: Kyotaro Horiguchi, Michael Paquier Reviewed-by: Hayato Kuroda, Masahiko Sawada Discussion: https://postgr.es/m/17789-8b31c5a4672b74d9@postgresql.org Backpatch-through: 15 |
||
---|---|---|
.. | ||
expected | ||
sql | ||
.gitignore | ||
connection.c | ||
deparse.c | ||
Makefile | ||
option.c | ||
postgres_fdw--1.0--1.1.sql | ||
postgres_fdw--1.0.sql | ||
postgres_fdw.c | ||
postgres_fdw.control | ||
postgres_fdw.h | ||
shippable.c |