Fabien COELHO <coe...@cri.ensmp.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
Sent via pgsql-hackers mailing list (firstname.lastname@example.org)
To make changes to your subscription: