pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Tatsuo Ishii <ishii@postgresql.org>
Cc: tharakan@gmail.com
Cc: PostgreSQL Bugs List <pgsql-bugs@postgresql.org>
Cc: PostgreSQL Developers <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] pgbench -C -M prepared gives an error
Date: Thu, 17 Mar 2016 09:14:58 -0400
Message-ID: <24777.1458220498@sss.pgh.pa.us> (raw)
In-Reply-To: <alpine.DEB.2.10.1603170853230.22499@sto>
References: <CAEP4nAwqG-XufE95gpCs2dpxmV7579c3AWjgEpW=xAE7+44_cw@mail.gmail.com>
	<20160317.103830.1233779880042690680.t-ishii@sraoss.co.jp>
	<1563.1458181806@sss.pgh.pa.us>
	<20160317.114321.169671826955986940.t-ishii@sraoss.co.jp>
	<alpine.DEB.2.10.1603170853230.22499@sto>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Fabien COELHO <coelho@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-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (9+ messages)  latest in thread

Message-ID: <24777.1458220498@sss.pgh.pa.us>
Permalink:  ../24777.1458220498@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/24777.1458220498@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, coelho@cri.ensmp.fr, ishii@postgresql.org, tharakan@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: [HACKERS] pgbench -C -M prepared gives an error
  In-Reply-To: <24777.1458220498@sss.pgh.pa.us>
  References: <CAEP4nAwqG-XufE95gpCs2dpxmV7579c3AWjgEpW=xAE7+44_cw@mail.gmail.com> <20160317.103830.1233779880042690680.t-ishii@sraoss.co.jp> <1563.1458181806@sss.pgh.pa.us> <20160317.114321.169671826955986940.t-ishii@sraoss.co.jp> <alpine.DEB.2.10.1603170853230.22499@sto> <24777.1458220498@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox