Re: assertion failure w/extended query protocol

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Peter Geoghegan <peter(at)2ndquadrant(dot)com>
Subject: Re: assertion failure w/extended query protocol
Date: 2012-10-19 22:26:28
Message-ID: 201210200026.32227.andres@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Saturday, October 20, 2012 12:05:15 AM Tom Lane wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > On Fri, Oct 19, 2012 at 2:01 PM, Andres Freund <andres(at)2ndquadrant(dot)com>
wrote:
> >> Btw, do you plan to submit that psql patch at some point? I repeatedly
> >> wished to be able to use the extended protocol without writing code or
> >> misusing pgbench exactly to test stuff like this.
> >
> > I didn't think it would be accepted, but if you think it's useful to
> > have, consider it submitted. If you review the code and it seems OK
> > (or can be fixed to be OK), I'm happy to write some user
> > documentation. I'm not sure it actually handles all the cases right
> > now but perhaps you could have a look.
>
> It's hard to visualize a use for this except for testing purposes, but
> that might be sufficient reason to have it.

Don't really see any other reason either, but that seems to be more than
enough reason for it. Theres quite a bit of code completely untested because
the regression tests only use the simple protocol. Its also really annoying to
write anything in those codepaths because it means you have to write code to
test.
But I am sure you are way much more aware of those pains than I am ;)

> One thing that would be pretty cool is to be able to run the regression
> tests in extended protocol. I hacked that up really quickly with this:

Not sure if we want the entire regression suite in general to run in the
extended protocol but as we easily could run parts of it that way...

> \"%s\" > \"%s\" 2>&1" SYSTEMQUOTE, psqldir ? psqldir : "",
> psqldir ? "/" : "",
> dblist->str,
>
> and tried it, and saw a number of failures. Some of them were readily
> explainable and some were not. It might be worth investigating more
> carefully.

Not that I am volunteering but it sounds like a good idea to have a look
there.

> (such as the current query showing up in pg_cursors --- maybe we should
prevent that?)

I don't really see an argument for preventing that.

Greetings,

Andres
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-10-19 22:37:54 Re: assertion failure w/extended query protocol
Previous Message Andres Freund 2012-10-19 22:13:39 Re: First draft of snapshot snapshot building design document