aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeModifyTable.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-02-21 20:01:43 +0900
committerMichael Paquier <michael@paquier.xyz>2023-02-21 20:01:43 +0900
commit8427ce4c379ee3774b8a9aca13ca7f4bfb76ba85 (patch)
treeb4200b49621e13beebe2b4638fe06bdc31048e12 /src/backend/executor/nodeModifyTable.c
parent038f586d5f1d90c6ed58544a068696bb81a4e12e (diff)
downloadpostgresql-8427ce4c379ee3774b8a9aca13ca7f4bfb76ba85.tar.gz
postgresql-8427ce4c379ee3774b8a9aca13ca7f4bfb76ba85.zip
Fix handling of escape sequences in postgres_fdw.application_name
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
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
0 files changed, 0 insertions, 0 deletions