- Notifications
You must be signed in to change notification settings - Fork5k
Commit4fdbf9a
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 parent3500ccc commit4fdbf9a
File tree
2 files changed
+37
-6
lines changed- src/test
- perl/PostgreSQL/Test
- recovery/t
2 files changed
+37
-6
lines changedLines changed: 34 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
896 | 896 |
| |
897 | 897 |
| |
898 | 898 |
| |
| 899 | + | |
| 900 | + | |
| 901 | + | |
899 | 902 |
| |
900 | 903 |
| |
901 | 904 |
| |
902 | 905 |
| |
903 |
| - | |
904 |
| - | |
| 906 | + | |
905 | 907 |
| |
906 | 908 |
| |
| 909 | + | |
907 | 910 |
| |
908 | 911 |
| |
909 | 912 |
| |
910 | 913 |
| |
911 |
| - | |
| 914 | + | |
| 915 | + | |
912 | 916 |
| |
913 |
| - | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
914 | 931 |
| |
915 |
| - | |
| 932 | + | |
916 | 933 |
| |
917 | 934 |
| |
918 | 935 |
| |
| |||
1142 | 1159 |
| |
1143 | 1160 |
| |
1144 | 1161 |
| |
1145 |
| - | |
1146 | 1162 |
| |
1147 | 1163 |
| |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
1148 | 1176 |
| |
1149 | 1177 |
| |
1150 | 1178 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
207 | 207 |
| |
208 | 208 |
| |
209 | 209 |
| |
| 210 | + | |
| 211 | + | |
| 212 | + | |
210 | 213 |
| |
211 | 214 |
| |
212 | 215 |
| |
|
0 commit comments
Comments
(0)