Quantcast
Channel: Planet PostgreSQL
Viewing all articles
Browse latest Browse all 9761

Andrew Dunstan: How to find what's causing that error

$
0
0
Tom Lane just posted a terrific piece of advice about how to find what's causing an error you don't know the source of, which is worth quoting:
What I would recommend is that you get the data onto a non-production
machine where you can play around a bit more. One thing you could do
then is run a build with debug symbols, attach to the backend process
with gdb, and set a breakpoint at "errfinish". Then provoke the error,
and capture a backtrace from the call to errfinish. That would greatly
narrow things down, though it might not be enough to isolate the bug
immediately.
I normally like to have debuginfo packages installed even on production machines so I can do this sort of thing quickly.

Another thing you can try in a non-production environment is to run your test case against a build with assertions enabled and see if it trips an assertion failure. That's often a quick way of finding where problems are occurring.

Viewing all articles
Browse latest Browse all 9761

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>