Re: [HACKERS] pgbench -C -M prepared gives an error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: Tatsuo Ishii <ishii(at)postgresql(dot)org>, tharakan(at)gmail(dot)com, PostgreSQL Bugs List <pgsql-bugs(at)postgresql(dot)org>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] pgbench -C -M prepared gives an error
Date: 2016-03-17 13:14:58
Message-ID: 24777.1458220498@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> writes:
>>> Is a connection per transaction really a sane case to consider?

>> Yes, I would think. This case reveals the connection overhead. We
>> already are able to handle the simple query cases. Why not for
>> extended query cases?

> Probably it can be made to work, but it is much less useful to prepare a
> statement which is known to be needed just once, so I think it would be
> fine to simply forbid "-M prepared" and "-C" together.

It's certainly a bug that the combination of the switches doesn't work,
and I already fixed it (47211af17a). My question was more towards
whether -C is a useful benchmarking option at all. I cannot imagine
a situation in which, if someone said "I'm doing only one transaction per
session, and I have a performance problem", I would not answer "yes,
and you just explained why".

What I found out when I looked into it was that pgbench had simply failed
to consider *at all* whether it needed to reset any state when dropping a
connection and replacing it with a new one. That's a really fundamental
problem, even if the only symptom we've found so far is "-M prepared" not
working. And it's been there since -C was invented, AFAICT. The fact
that the bug went undetected this long says a lot about the amount of
real-world use the switch gets. So I think it's fair to consider whether
we should not eliminate a whole class of future bugs by removing a switch
that gets no use.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2016-03-17 13:20:14 Re: [HACKERS] pgbench -C -M prepared gives an error
Previous Message Fabien COELHO 2016-03-17 07:57:24 Re: [BUGS] pgbench -C -M prepared gives an error

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2016-03-17 13:15:18 Re: Odd system-column handling in postgres_fdw join pushdown patch
Previous Message David Rowley 2016-03-17 13:11:09 Re: Parallel Aggregate