Re: [PATCH] pgbench: new feature allowing to launch shell commands

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [PATCH] pgbench: new feature allowing to launch shell commands
Дата
Msg-id c64c5f8b0909161756k3dafd04ah8915301f2defff6c@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] pgbench: new feature allowing to launch shell commands  (Dan Colish <dan@unencrypted.org>)
Ответы Re: [PATCH] pgbench: new feature allowing to launch shell commands  (Dan Colish <dan@unencrypted.org>)
Список pgsql-hackers
Hi all,

Sorry for my late reply.
There is no other update for this patch since the 13th of August, at least until today. The new patch is attached
By the way I worked on the comments that Dan and Gabriel pointed out.
I added a check on system such as to prevent an error from this side.
By the way, I noticed that the way return values are managed in doCustom and in process_commands is different. Such as to make an homogeneous code, return values are managed the same way in both functions in the patch, explaining why I did not return a specific value when file commands are treated in doCustom.

Here is also as wanted a simple transaction that permits to use this function:
\set nbranches :scale
\set naccounts 100000 * :scale
\setrandom aid 1 :naccounts
\setrandom bid 1 :nbranches
\setrandom delta -5000 5000
\setrandom txidrand 0 10000
START TRANSACTION;
UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid;
SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid;
PREPARE TRANSACTION ':txidrand';
\shell ls -ll $PGDATA/pg_twophase
COMMIT PREPARED ':txidrand';

The shell command I use here permits to scan the 2PC state files written in pg_twophase.
You will notice that in this case files have a size of 540B. Also please do not forget to set PGDATA.

The new functionnality proposed here is just for analysis purposes. Even if it decreased the performance of pgbench, it is interesting to have a simple benchmark that permits to analyse precisely the system while transaction are being run.

Regards,

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Feedback on getting rid of VACUUM FULL
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Feedback on getting rid of VACUUM FULL