|
1 | 1 | #!/usr/local/bin/perl -w
|
2 | 2 |
|
3 |
| -# $Id: test.pl,v 1.12 2000/03/11 02:57:24 tgl Exp $ |
| 3 | +# $Id: test.pl,v 1.13 2000/11/17 00:24:03 tgl Exp $ |
4 | 4 |
|
5 | 5 | # Before `make install' is performed this script should be runnable with
|
6 | 6 | # `make test'. After `make install' it should work as `perl test.pl'
|
|
260 | 260 | $conn = Pg::connectdb("dbname=$dbmain");
|
261 | 261 | die$conn->errorMessageunless PGRES_CONNECTION_OKeq$conn->status;
|
262 | 262 |
|
| 263 | +# Race condition: it's quite possible that the DROP command will arrive |
| 264 | +# at the new backend before the old backend has finished shutting down, |
| 265 | +# resulting in an error message. |
| 266 | +# There doesn't seem to be any more graceful way around this than to |
| 267 | +# insert a small delay ... |
| 268 | +sleep(1); |
| 269 | + |
263 | 270 | $result =$conn->exec("DROP DATABASE$dbname");
|
264 | 271 | die$conn->errorMessageunless PGRES_COMMAND_OKeq$result->resultStatus;
|
265 | 272 |
|
|