[COMMITTERS] pgsql: Try to improve readability of recovery/t/009_twophase.pl test.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема [COMMITTERS] pgsql: Try to improve readability of recovery/t/009_twophase.pl test.
Дата
Msg-id E1dRkWt-0002ED-8L@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Try to improve readability of recovery/t/009_twophase.pl test.

The original coding here was very confusing, because it named the
two servers it set up "master" and "slave" even though it swapped
their replication roles multiple times.  At any given point in the
script it was very unobvious whether "$node_master" actually referred
to the server named "master" or the other one.  Instead, pick arbitrary
names for the two servers --- I used "london" and "paris" --- and
distinguish those permanent names from the nonce references $cur_master
and $cur_slave.  Add logging to help distinguish which is which at
any given point.  Also, use distinct data and transaction names to
make all the prepared transactions easily distinguishable in the
postmaster logs.  (There was one place where we intentionally tested
that the server could cope with re-use of a transaction name, but
it seems like one place is sufficient for that purpose.)

Also, add checks at the end to make sure that all the transactions
that were supposed to be committed did survive.

Discussion: https://postgr.es/m/28238.1499010855@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4e15387d2d9d4045efd1a7b3634e5922774139fd

Modified Files
--------------
src/test/recovery/t/009_twophase.pl | 353 +++++++++++++++++++++++-------------
1 file changed, 225 insertions(+), 128 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: [COMMITTERS] pgsql: Improve TAP test function PostgresNode::poll_query_until().
Следующее
От: Tom Lane
Дата:
Сообщение: [COMMITTERS] pgsql: Fix bug in PostgresNode::query_hash's split() call.