[HACKERS] Re: [BUGS] Problem in using pgbench's --connect(-C) and --rate=rate(-Rrate) options together.

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема [HACKERS] Re: [BUGS] Problem in using pgbench's --connect(-C) and --rate=rate(-Rrate) options together.
Дата
Msg-id alpine.DEB.2.20.1701252057440.2871@lancre
обсуждение исходный текст
Ответы [HACKERS] Re: [BUGS] Problem in using pgbench's --connect(-C) and--rate=rate(-R rate) options together.  (David Steele <david@pgmasters.net>)
Re: [HACKERS] Re: [BUGS] Problem in using pgbench's --connect(-C) and--rate=rate(-R rate) options together.  (Teodor Sigaev <teodor@sigaev.ru>)
Список pgsql-hackers
Repost from bugs.

-- 
Fabien.

---------- Forwarded message ----------
Date: Wed, 25 Jan 2017 18:59:45 +0100 (CET)
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: nuko yokohama <nuko.yokohama@gmail.com>
Cc: PostgreSQL Bugs List <pgsql-bugs@postgresql.org>
Subject: Re: [BUGS] Problem in using pgbench's --connect(-C) and --rate=rate(-R
     rate) options together.


>> It operates normally when only the -C option or only the -R option is 
>> specified.
>> 
>> In the PostgreSQL document, It is not described that "these two options can 
>> not be specified at the same time ". Is this a problem of pgbench?
> 
> Yes, indeed there is. Thanks for the report. Option -C is seldom used and 
> tested.

The problem is already fixed in head. Looking at git log, it was unclear to 
guess which change fixed that... After another reading, I got it in one, it has 
been fixed by Heikki restructuring patch 
12788ae49e1933f463bc59a6efe46c4a01701b76 which has no vocation to be 
backpatched to prior versions...

The bug is that prior to --rate doCustom was always disconnect/reconnect 
without exiting, but with rate it returns if it has to wait. However threadRun 
test whether there is a connection before recalling doCustom, so it was never 
called.

This is exactly the kind of unmanageable state combination that refactoring has 
cleaned up.

Attached a small patch which fixes the issue, I think, in 9.6.
Fixing it raised another issue wrt to some stats under -C, that I fixed as 
well.

-- 
Fabien.
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] lseek/read/write overhead becomes visible at scale ..
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: [HACKERS] pg_ls_dir & friends still have a hard-coded superuser check