Re: Making the regression tests halt to attach a debugger

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Making the regression tests halt to attach a debugger
Date: 2015-05-18 13:44:22
Message-ID: 9723.1431956662@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Geoghegan <pg(at)heroku(dot)com> writes:
> I came up with a simple approach to conveniently attaching a debugger
> when a bug manifested itself from within the regression tests, by
> patching Postgres. This worked quite well. The backend would look for
> the occurrence of a magical token within each and every query string.

If your approach involves modifying a target query in a regression test,
it really seems unnecessary to do all this. Just insert something like
"select pg_sleep(60)" into the test script before the target query.

A variant is to insert a sleep() in the C code, in someplace you don't
expect will be reached except in the problematic cases.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2015-05-18 14:11:16 Re: Bug in jsonb minus operator
Previous Message Beena Emerson 2015-05-18 13:40:20 Re: Support for N synchronous standby servers - take 2