forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8427ce4
committed
Fix handling of escape sequences in postgres_fdw.application_name
postgres_fdw.application_name relies on MyProcPort to define the datathat should be added to escape sequences %u (user name) or %d (databasename). However this code could be run in processes that lack aMyProcPort, like an autovacuum process, causing crashes.The code generating the application name is made more flexible with thiscommit, so as it now generates no data for %u and %d if MyProcPort ismissing, and a simple "unknown" if MyProcPort exists, but the expectedfields are not set.Reported-by: Alexander LakhinAuthor: Kyotaro Horiguchi, Michael PaquierReviewed-by: Hayato Kuroda, Masahiko SawadaDiscussion:https://postgr.es/m/17789-8b31c5a4672b74d9@postgresql.orgBackpatch-through: 151 parent038f586 commit8427ce4
1 file changed
+18
-4
lines changedLines changed: 18 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
485 | 485 |
| |
486 | 486 |
| |
487 | 487 |
| |
488 |
| - | |
489 |
| - | |
490 | 488 |
| |
491 | 489 |
| |
492 | 490 |
| |
| |||
522 | 520 |
| |
523 | 521 |
| |
524 | 522 |
| |
525 |
| - | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
526 | 532 |
| |
527 | 533 |
| |
528 | 534 |
| |
529 | 535 |
| |
530 | 536 |
| |
531 |
| - | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
532 | 546 |
| |
533 | 547 |
| |
534 | 548 |
| |
|
0 commit comments
Comments
(0)