Re: Noob Hints on testing and debugging? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Noob Hints on testing and debugging?
Date
Msg-id 14299.1205307494@sss.pgh.pa.us
Whole thread Raw
In response to Noob Hints on testing and debugging?  (James Mansion <james@mansionfamily.plus.com>)
Responses Re: Noob Hints on testing and debugging?
List pgsql-hackers
James Mansion <james@mansionfamily.plus.com> writes:
> Are there any hints and tips anywhere on practical issues for testing 
> and debugging changes to a backend?

hackers-list archives has a thread or three...

> (eg how to run it up and feed it SQL ideally without running a 
> postmaster and execing a back end)

Why would you consider that "ideal"?  Such a scenario would have
approximately zip to do with the real-world environment your patch
would face.

What I usually do is fire up a normal psql session and then attach to
the backend process with gdb in another window.  The only cases where
this isn't very useful is where you are trying to debug failure in very
early session startup.  There are some badly-documented options such as
-W that can help even in that kind of situation.

> I'm using VS2008 on XP by choice, and I'd like to investigate supporting 
> something closely related to
> the Firebird 2.1 trigger on transaction commmit and rollback.

Is there any sanity at all in a trigger-on-rollback?  Exactly what would
you expect it to be able to accomplish that anyone else could see after
the transaction has rolled back?  (And no, trigger on commit isn't very
much saner.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: James Mansion
Date:
Subject: Noob Hints on testing and debugging?
Next
From: Martijn van Oosterhout
Date:
Subject: Re: [NOVICE] encoding problems