- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit353aa01
committed
postgres_fdw: Add regression test for postgres_fdw.application_name GUC.
Commit449ab63 added postgres_fdw.application_name GUC that specifiesa value for application_name configuration parameter used when postgres_fdwestablishes a connection to a foreign server. Also commit6e0cb3dallowed it to include escape sequences. Both commits added the regressiontests for the GUC, but those tests were reverted by commits98dbef9 and5e64ad3 because they were unstable and caused some buildfarm membersto report the failure.This is the third try to add the regression test forpostgres_fdw.application_name GUC.One of issues to make the test unstable was to have usedpostgres_fdw_disconnect_all() to close the existing remote connections.The test expected that the remote connection and its corresponding backendat the remote server disappeared just after postgres_fdw_disconnect_all()was executed, but it could take a bit time for them to disappear.To make sure that they exit, this commit makes the test usepg_terminate_backend() with the timeout at the remote server, instead.If the timeout is set to greater than zero, this function waits untilthey are actually terminated (or until the given time has passed).Another issue was that the test didn't take into consideration the casewhere postgres_fdw.application_name containing some escape sequences wasconverted to the string larger than NAMEDATALEN. In this case it wastruncated to less than NAMEDATALEN when it's passed to the remote server,but the test expected wrongly that full string of application_name wasalways viewable. This commit changes the test so that it can handle that case.Author: Fujii MasaoReviewed-by: Masahiko Sawada, Hayato Kuroda, Kyotaro HoriguchiDiscussion:https://postgr.es/m/3220909.1631054766@sss.pgh.pa.usDiscussion:https://postgr.es/m/20211224.180006.2247635208768233073.horikyota.ntt@gmail.comDiscussion:https://postgr.es/m/e7b61420-a97b-8246-77c4-a0d48fba5a45@oss.nttdata.com1 parent50e1441 commit353aa01
File tree
2 files changed
+86
-0
lines changed- contrib/postgres_fdw
- expected
- sql
2 files changed
+86
-0
lines changedLines changed: 51 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10825 | 10825 |
| |
10826 | 10826 |
| |
10827 | 10827 |
| |
| 10828 | + | |
| 10829 | + | |
| 10830 | + | |
| 10831 | + | |
| 10832 | + | |
| 10833 | + | |
| 10834 | + | |
| 10835 | + | |
| 10836 | + | |
| 10837 | + | |
| 10838 | + | |
| 10839 | + | |
| 10840 | + | |
| 10841 | + | |
| 10842 | + | |
| 10843 | + | |
| 10844 | + | |
| 10845 | + | |
| 10846 | + | |
| 10847 | + | |
| 10848 | + | |
| 10849 | + | |
| 10850 | + | |
| 10851 | + | |
| 10852 | + | |
| 10853 | + | |
| 10854 | + | |
| 10855 | + | |
| 10856 | + | |
| 10857 | + | |
| 10858 | + | |
| 10859 | + | |
| 10860 | + | |
| 10861 | + | |
| 10862 | + | |
| 10863 | + | |
| 10864 | + | |
| 10865 | + | |
| 10866 | + | |
| 10867 | + | |
| 10868 | + | |
| 10869 | + | |
| 10870 | + | |
| 10871 | + | |
| 10872 | + | |
| 10873 | + | |
| 10874 | + | |
| 10875 | + | |
| 10876 | + | |
| 10877 | + | |
| 10878 | + |
Lines changed: 35 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3452 | 3452 |
| |
3453 | 3453 |
| |
3454 | 3454 |
| |
| 3455 | + | |
| 3456 | + | |
| 3457 | + | |
| 3458 | + | |
| 3459 | + | |
| 3460 | + | |
| 3461 | + | |
| 3462 | + | |
| 3463 | + | |
| 3464 | + | |
| 3465 | + | |
| 3466 | + | |
| 3467 | + | |
| 3468 | + | |
| 3469 | + | |
| 3470 | + | |
| 3471 | + | |
| 3472 | + | |
| 3473 | + | |
| 3474 | + | |
| 3475 | + | |
| 3476 | + | |
| 3477 | + | |
| 3478 | + | |
| 3479 | + | |
| 3480 | + | |
| 3481 | + | |
| 3482 | + | |
| 3483 | + | |
| 3484 | + | |
| 3485 | + | |
| 3486 | + | |
| 3487 | + | |
| 3488 | + | |
| 3489 | + |
0 commit comments
Comments
(0)