[PATCH] Log crashed backend's query v2

From: Marti Raudsepp <marti(at)juffo(dot)org>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: [PATCH] Log crashed backend's query v2
Date: 2011-09-27 22:19:08
Message-ID: CABRT9RAKsELfNQ08kC+gitC1mBRD7_0hzLhj2bz_3MCp4wziFQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Sep 24, 2011 at 22:57, Marti Raudsepp <marti(at)juffo(dot)org> wrote:
> However, I now realize that it does make sense to write a separate
> simpler function for the crashed backend case with no
> vbeentry->st_changecount check loops, no checkUser, etc. That would be
> more robust and easier to review.

I implemented this now, but I'm not convinced anymore that it's the
right way to go. I'm duplicating some amount of code that could be
subject to bitrot in the future since this code path won't be
excercised often. But I'll let the reviewers decide.

Is there a sane way to regression-test backend crashes?

> I propsed replacing non-ASCII characters with '?' earlier.

This is also in. I created a new function in
backend/utils/adt/ascii.c. It didn't quite fit in because all other
functions in this file are dealing with Datums, but I couldn't find a
better place.

(I'm still not sure what "adt" means)

Regards,
Marti

Attachment Content-Type Size
log-crashed-query-v2.patch text/x-patch 8.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-09-27 22:30:58 Re: contrib/sepgsql regression tests are a no-go
Previous Message Robert Haas 2011-09-27 22:18:17 Re: contrib/sepgsql regression tests are a no-go