forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit52a1022
committed
Uniformly identify the target host in libpq connection failure reports.
Prefix "could not connect to host-or-socket-path:" to all connectionfailure cases that occur after the socket() call, and remove thead-hoc server identity data that was appended to a few of thesemessages. This should produce much more intelligible error reportsin multiple-target-host situations, especially for error cases thatare off the beaten track to any degree (because none of those providedany server identity info).As an example of the change, formerly a connection attempt with a badport number such as "psql -p 12345 -h localhost,/tmp" might producepsql: error: could not connect to server: Connection refused Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 12345?could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 12345?could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.12345"?Now it looks likepsql: error: could not connect to host "localhost" (::1), port 12345: Connection refused Is the server running on that host and accepting TCP/IP connections?could not connect to host "localhost" (127.0.0.1), port 12345: Connection refused Is the server running on that host and accepting TCP/IP connections?could not connect to socket "/tmp/.s.PGSQL.12345": No such file or directory Is the server running locally and accepting connections on that socket?This requires adjusting a couple of regression tests to allow forvariation in the contents of a connection failure message.Discussion:https://postgr.es/m/BN6PR05MB3492948E4FD76C156E747E8BC9160@BN6PR05MB3492.namprd05.prod.outlook.com1 parent800d93f commit52a1022
File tree
3 files changed
+62
-65
lines changed- src
- bin/pg_dump/t
- interfaces
- ecpg/test/expected
- libpq
3 files changed
+62
-65
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3460 | 3460 | | |
3461 | 3461 | | |
3462 | 3462 | | |
3463 | | - | |
| 3463 | + | |
3464 | 3464 | | |
3465 | 3465 | | |
3466 | 3466 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1669 | 1669 | | |
1670 | 1670 | | |
1671 | 1671 | | |
1672 | | - | |
1673 | | - | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
1674 | 1678 | | |
1675 | 1679 | | |
1676 | 1680 | | |
1677 | | - | |
| 1681 | + | |
1678 | 1682 | | |
1679 | | - | |
1680 | | - | |
1681 | 1683 | | |
1682 | 1684 | | |
1683 | 1685 | | |
| |||
1688 | 1690 | | |
1689 | 1691 | | |
1690 | 1692 | | |
1691 | | - | |
1692 | | - | |
1693 | | - | |
1694 | | - | |
| 1693 | + | |
1695 | 1694 | | |
1696 | 1695 | | |
1697 | 1696 | | |
1698 | 1697 | | |
1699 | 1698 | | |
1700 | | - | |
1701 | 1699 | | |
1702 | 1700 | | |
1703 | 1701 | | |
1704 | | - | |
1705 | | - | |
1706 | | - | |
1707 | | - | |
1708 | | - | |
1709 | | - | |
1710 | 1702 | | |
1711 | 1703 | | |
1712 | 1704 | | |
| |||
1722 | 1714 | | |
1723 | 1715 | | |
1724 | 1716 | | |
1725 | | - | |
| 1717 | + | |
1726 | 1718 | | |
1727 | 1719 | | |
1728 | | - | |
1729 | | - | |
1730 | | - | |
1731 | | - | |
| 1720 | + | |
1732 | 1721 | | |
1733 | 1722 | | |
1734 | 1723 | | |
1735 | 1724 | | |
1736 | | - | |
1737 | | - | |
1738 | | - | |
1739 | | - | |
| 1725 | + | |
1740 | 1726 | | |
1741 | 1727 | | |
1742 | 1728 | | |
1743 | 1729 | | |
1744 | 1730 | | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
1745 | 1757 | | |
1746 | 1758 | | |
1747 | 1759 | | |
| |||
2476 | 2488 | | |
2477 | 2489 | | |
2478 | 2490 | | |
2479 | | - | |
| 2491 | + | |
2480 | 2492 | | |
2481 | 2493 | | |
2482 | 2494 | | |
2483 | 2495 | | |
2484 | | - | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
2485 | 2500 | | |
2486 | 2501 | | |
2487 | 2502 | | |
2488 | 2503 | | |
2489 | 2504 | | |
2490 | | - | |
2491 | 2505 | | |
2492 | | - | |
| 2506 | + | |
2493 | 2507 | | |
2494 | 2508 | | |
2495 | | - | |
2496 | | - | |
2497 | | - | |
2498 | | - | |
2499 | | - | |
| 2509 | + | |
2500 | 2510 | | |
2501 | 2511 | | |
2502 | 2512 | | |
| 2513 | + | |
| 2514 | + | |
2503 | 2515 | | |
2504 | 2516 | | |
2505 | 2517 | | |
| |||
2512 | 2524 | | |
2513 | 2525 | | |
2514 | 2526 | | |
| 2527 | + | |
2515 | 2528 | | |
2516 | 2529 | | |
2517 | | - | |
| 2530 | + | |
2518 | 2531 | | |
2519 | 2532 | | |
2520 | 2533 | | |
| 2534 | + | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + | |
| 2538 | + | |
| 2539 | + | |
| 2540 | + | |
2521 | 2541 | | |
2522 | 2542 | | |
2523 | 2543 | | |
| |||
3608 | 3628 | | |
3609 | 3629 | | |
3610 | 3630 | | |
3611 | | - | |
3612 | | - | |
3613 | | - | |
3614 | 3631 | | |
3615 | 3632 | | |
3616 | 3633 | | |
| |||
3634 | 3651 | | |
3635 | 3652 | | |
3636 | 3653 | | |
3637 | | - | |
3638 | | - | |
3639 | | - | |
3640 | | - | |
3641 | | - | |
3642 | | - | |
3643 | | - | |
3644 | | - | |
3645 | | - | |
3646 | | - | |
3647 | | - | |
3648 | | - | |
3649 | | - | |
| 3654 | + | |
| 3655 | + | |
3650 | 3656 | | |
3651 | 3657 | | |
3652 | 3658 | | |
| |||
3679 | 3685 | | |
3680 | 3686 | | |
3681 | 3687 | | |
3682 | | - | |
3683 | | - | |
3684 | | - | |
3685 | | - | |
3686 | | - | |
3687 | | - | |
3688 | | - | |
3689 | | - | |
3690 | | - | |
3691 | | - | |
3692 | | - | |
| 3688 | + | |
| 3689 | + | |
3693 | 3690 | | |
3694 | 3691 | | |
3695 | 3692 | | |
| |||
0 commit comments
Comments
(0)