forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4828a80
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 parent3168073 commit4828a80
2 files changed
+37
-6
lines changedLines changed: 34 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
831 | 831 |
| |
832 | 832 |
| |
833 | 833 |
| |
| 834 | + | |
| 835 | + | |
| 836 | + | |
834 | 837 |
| |
835 | 838 |
| |
836 | 839 |
| |
837 | 840 |
| |
838 |
| - | |
839 |
| - | |
| 841 | + | |
840 | 842 |
| |
841 | 843 |
| |
| 844 | + | |
842 | 845 |
| |
843 |
| - | |
| 846 | + | |
| 847 | + | |
844 | 848 |
| |
845 |
| - | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
846 | 863 |
| |
847 |
| - | |
| 864 | + | |
848 | 865 |
| |
849 | 866 |
| |
850 | 867 |
| |
| |||
1066 | 1083 |
| |
1067 | 1084 |
| |
1068 | 1085 |
| |
1069 |
| - | |
1070 | 1086 |
| |
1071 | 1087 |
| |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
1072 | 1100 |
| |
1073 | 1101 |
| |
1074 | 1102 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
204 | 204 |
| |
205 | 205 |
| |
206 | 206 |
| |
| 207 | + | |
| 208 | + | |
| 209 | + | |
207 | 210 |
| |
208 | 211 |
| |
209 | 212 |
| |
|
0 commit comments
Comments
(0)