forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf0b0b1d
committed
Tighten TAP tests' tracking of postmaster state some more.
Commits6c4a890 et al. had a couple of deficiencies:* The logic I added to Cluster::start to see if a PID file is presentcould be fooled by a stale PID file left over from a previouspostmaster. To fix, if we're not sure whether we expect to find arunning postmaster or not, validate the PID using "kill 0".* 017_shm.pl has a loop in which it just issues repeated Cluster::startcalls; this will fail if some invocation fails but leaves self->_pidset. Per buildfarm results, the above fix is not enough to make thissafe: we might have "validated" a PID for a postmaster that exitsimmediately after we look. Hence, match each failed start call witha stop call that will get us back to the self->_pid == undef state.Add a fail_ok option to Cluster::stop to make this work.Discussion:https://postgr.es/m/CA+hUKGKV6fOHvfiPt8=dOKzvswjAyLoFoJF1iQXMNpi7+hD1JQ@mail.gmail.com1 parent22d8c25 commitf0b0b1d
2 files changed
+37
-6
lines changedLines changed: 34 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
826 | 826 |
| |
827 | 827 |
| |
828 | 828 |
| |
| 829 | + | |
| 830 | + | |
| 831 | + | |
829 | 832 |
| |
830 | 833 |
| |
831 | 834 |
| |
832 | 835 |
| |
833 |
| - | |
834 |
| - | |
| 836 | + | |
835 | 837 |
| |
836 | 838 |
| |
| 839 | + | |
837 | 840 |
| |
838 |
| - | |
| 841 | + | |
| 842 | + | |
839 | 843 |
| |
840 |
| - | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
841 | 858 |
| |
842 |
| - | |
| 859 | + | |
843 | 860 |
| |
844 | 861 |
| |
845 | 862 |
| |
| |||
1038 | 1055 |
| |
1039 | 1056 |
| |
1040 | 1057 |
| |
1041 |
| - | |
1042 | 1058 |
| |
1043 | 1059 |
| |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
1044 | 1072 |
| |
1045 | 1073 |
| |
1046 | 1074 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
196 | 196 |
| |
197 | 197 |
| |
198 | 198 |
| |
| 199 | + | |
| 200 | + | |
| 201 | + | |
199 | 202 |
| |
200 | 203 |
| |
201 | 204 |
| |
|
0 commit comments
Comments
(0)