| 155 | = Using with regression tests = |
| 156 | |
| 157 | Sometimes there is a crash during regression tests. |
| 158 | |
| 159 | When running "make test", a number of things happen, including creating some test files and creating the "postgis_reg" database and loading the working tree postgis into it. Then, tests are run. It would be difficult to replicate all of this in a script to run gdb. |
| 160 | |
| 161 | Instead, the recommended approach is to first run "make test", to cause all the setup to happen. Then, identify the first failing test, as debugging anything after the first failure is far less likely to be useful. Connect as "psql -d postgis_reg", and get the pid and attach gdb as above. |
| 162 | |
| 163 | Then, e.g. |
| 164 | |
| 165 | {{{ |
| 166 | \i regress/core/geography.sql |
| 167 | }}} |
| 168 | }}} |
| 169 | |