|
PostgreSQL Source Code git master
|
#include "postgres_fe.h"#include <sys/select.h>#include <sys/time.h>#include "datatype/timestamp.h"#include "isolationtester.h"#include "libpq-fe.h"#include "pg_getopt.h"#include "pqexpbuffer.h"
Go to the source code of this file.
Data Structures | |
| struct | IsoConnInfo |
Macros | |
| #define | PREP_WAITING "isolationtester_waiting" |
| #define | STEP_NONBLOCK 0x1 /* return as soon as cmd waits for a lock */ |
| #define | STEP_RETRY 0x2 /* this is a retry of a previously-waiting cmd */ |
Typedefs | |
| typedef struct IsoConnInfo | IsoConnInfo |
Variables | |
| static IsoConnInfo * | conns = NULL |
| static int | nconns = 0 |
| static bool | any_new_notice = false |
| static int64 | max_step_wait = 360 * USECS_PER_SEC |
| #define PREP_WAITING "isolationtester_waiting" |
Definition at line 19 of file isolationtester.c.
Definition at line 60 of file isolationtester.c.
Definition at line 61 of file isolationtester.c.
Definition at line 1139 of file isolationtester.c.
Referenced by main().
Definition at line 252 of file isolationtester.c.
References PermutationStepBlocker::blocktype, fb(), fprintf, free, i, j, name, Session::nsteps, Permutation::nsteps, pg_malloc(), PSB_ONCE, qsort, Step::session, PermutationStepBlocker::step, step_bsearch_cmp(), step_qsort_cmp(), PermutationStepBlocker::stepname, Session::steps, and Permutation::steps.
Referenced by main().
Definition at line 77 of file isolationtester.c.
References conn, conns, i, nconns, and PQfinish().
Referenced by main().
Definition at line 1126 of file isolationtester.c.
References any_new_notice, arg, fb(), and printf.
Referenced by main().
Definition at line 87 of file isolationtester.c.
References appendPQExpBuffer(), appendPQExpBufferStr(), IsoConnInfo::backend_pid, IsoConnInfo::backend_pid_str, blackholeNoticeProcessor(), check_testspec(), conn, IsoConnInfo::conn, CONNECTION_OK, conns, disconnect_atexit(), EXIT_FAILURE, fb(), fprintf, getopt(), i, initPQExpBuffer(), isotesterNoticeProcessor(), max_step_wait, nconns, optind, parseresult, pg_malloc0(), PGRES_COMMAND_OK, PGRES_TUPLES_OK, PQbackendPID(), PQclear, PQconnectdb(), PQerrorMessage(), PQexecParams(), PQprepare(), PQresultStatus, PQsetNoticeProcessor(), PQstatus(), PREP_WAITING, printf, psprintf(), run_testspec(), IsoConnInfo::sessionname, spec_yyparse(), termPQExpBuffer(), and USECS_PER_SEC.
Definition at line 1113 of file isolationtester.c.
References _PQprintOpt::align, fb(), _PQprintOpt::fieldSep, _PQprintOpt::header, and PQprint().
Referenced by run_permutation(), and try_complete_step().
Definition at line 406 of file isolationtester.c.
References fb(), free, i, pg_malloc(), pg_malloc0(), and run_all_permutations_recurse().
Referenced by run_testspec().
|
static |
Definition at line 446 of file isolationtester.c.
References fb(), i, PermutationStep::name, run_all_permutations_recurse(), run_permutation(), and PermutationStep::step.
Referenced by run_all_permutations(), and run_all_permutations_recurse().
Definition at line 486 of file isolationtester.c.
References fb(), i, Permutation::nsteps, run_permutation(), and Permutation::steps.
Referenced by run_testspec().
|
static |
Definition at line 520 of file isolationtester.c.
References PermutationStepBlocker::blocktype, conn, conns, fb(), fprintf, free, gettimeofday(), i, j, max_step_wait, name, Step::name, nconns, PermutationStepBlocker::num_notices, pg_malloc(), PGRES_COMMAND_OK, PGRES_TUPLES_OK, PQclear, PQerrorMessage(), PQexec(), PQresultStatus, PQsendQuery(), printf, printResultSet(), PSB_NUM_NOTICES, Step::session, Step::sql, start_time, PermutationStepBlocker::step, STEP_NONBLOCK, STEP_RETRY, PermutationStepBlocker::target_notices, IsoConnInfo::total_notices, try_complete_step(), try_complete_steps(), USECS_PER_SEC, and waiting.
Referenced by run_all_permutations_recurse(), and run_named_permutations().
Definition at line 394 of file isolationtester.c.
References fb(), run_all_permutations(), and run_named_permutations().
Referenced by main().
Definition at line 508 of file isolationtester.c.
References a, b, fb(), and Step::name.
Referenced by check_testspec().
|
static |
Definition at line 1080 of file isolationtester.c.
References PermutationStepBlocker::blocktype, conns, fb(), i, PSB_NUM_NOTICES, PSB_ONCE, PSB_OTHER_STEP, Step::session, PermutationStepBlocker::step, and PermutationStepBlocker::target_notices.
Referenced by try_complete_step().
|
static |
Definition at line 818 of file isolationtester.c.
References IsoConnInfo::backend_pid, IsoConnInfo::backend_pid_str, PermutationStepBlocker::blocktype, conn, conns, EINTR, fb(), fprintf, gettimeofday(), i, max_step_wait, Step::name, PG_DIAG_MESSAGE_PRIMARY, PG_DIAG_SEVERITY, PGRES_COMMAND_OK, PGRES_EMPTY_QUERY, PGRES_FATAL_ERROR, PGRES_TUPLES_OK, PQcancelBlocking(), PQcancelCreate(), PQcancelErrorMessage(), PQcancelFinish(), PQclear, PQconsumeInput(), PQerrorMessage(), PQexecPrepared(), PQfreemem(), PQgetResult, PQgetvalue, PQisBusy(), PQnotifies(), PQntuples, PQresStatus(), PQresultErrorField, PQresultErrorMessage, PQresultStatus, PQsocket(), PREP_WAITING, printf, printResultSet(), PSB_ONCE, select, Step::session, IsoConnInfo::sessionname, snprintf, Step::sql, start_time, step_has_blocker(), STEP_NONBLOCK, STEP_RETRY, USECS_PER_SEC, and waiting.
Referenced by run_permutation(), and try_complete_steps().
|
static |
Definition at line 755 of file isolationtester.c.
References any_new_notice, fb(), try_complete_step(), and waiting.
Referenced by run_permutation().
Definition at line 44 of file isolationtester.c.
Referenced by isotesterNoticeProcessor(), and try_complete_steps().
|
static |
Definition at line 40 of file isolationtester.c.
Referenced by describeRoles(), disconnect_atexit(), main(), run_permutation(), step_has_blocker(), and try_complete_step().
|
static |
Definition at line 47 of file isolationtester.c.
Referenced by main(), run_permutation(), and try_complete_step().
|
static |
Definition at line 41 of file isolationtester.c.
Referenced by disconnect_atexit(), main(), and run_permutation().