PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | ParallelSlot |
struct | ParallelSlotArray |
Typedefs | |
typedef bool(* | ParallelSlotResultHandler) (PGresult *res, PGconn *conn, void *context) |
typedef struct ParallelSlot | ParallelSlot |
typedef struct ParallelSlotArray | ParallelSlotArray |
Functions | |
static void | ParallelSlotSetHandler (ParallelSlot *slot, ParallelSlotResultHandler handler, void *context) |
static void | ParallelSlotClearHandler (ParallelSlot *slot) |
ParallelSlot * | ParallelSlotsGetIdle (ParallelSlotArray *sa, const char *dbname) |
ParallelSlotArray * | ParallelSlotsSetup (int numslots, ConnParams *cparams, const char *progname, bool echo, const char *initcmd) |
void | ParallelSlotsAdoptConn (ParallelSlotArray *sa, PGconn *conn) |
void | ParallelSlotsTerminate (ParallelSlotArray *sa) |
bool | ParallelSlotsWaitCompletion (ParallelSlotArray *sa) |
bool | TableCommandResultHandler (PGresult *res, PGconn *conn, void *context) |
typedef struct ParallelSlot ParallelSlot |
typedef struct ParallelSlotArray ParallelSlotArray |
Definition at line 18 of file parallel_slot.h.
|
inlinestatic |
Definition at line 55 of file parallel_slot.h.
References ParallelSlot::handler, and ParallelSlot::handler_context.
Referenced by ParallelSlotsWaitCompletion(), and wait_on_slots().
void ParallelSlotsAdoptConn | ( | ParallelSlotArray * | sa, |
PGconn * | conn | ||
) |
Definition at line 460 of file parallel_slot.c.
References conn, disconnectDatabase(), and find_unconnected_slot().
Referenced by main(), reindex_one_database(), and vacuum_one_database().
|
inlinestatic |
Definition at line 47 of file parallel_slot.h.
References context, ParallelSlot::handler, and ParallelSlot::handler_context.
Referenced by main(), reindex_one_database(), and vacuum_one_database().
ParallelSlot* ParallelSlotsGetIdle | ( | ParallelSlotArray * | sa, |
const char * | dbname | ||
) |
Definition at line 371 of file parallel_slot.c.
References Assert, connect_slot(), dbname, disconnectDatabase(), find_any_idle_slot(), find_matching_idle_slot(), find_unconnected_slot(), and wait_on_slots().
Referenced by main(), reindex_one_database(), and vacuum_one_database().
ParallelSlotArray* ParallelSlotsSetup | ( | int | numslots, |
ConnParams * | cparams, | ||
const char * | progname, | ||
bool | echo, | ||
const char * | initcmd | ||
) |
Definition at line 428 of file parallel_slot.c.
References Assert, palloc0(), and progname.
Referenced by main(), reindex_one_database(), and vacuum_one_database().
void ParallelSlotsTerminate | ( | ParallelSlotArray * | sa | ) |
Definition at line 479 of file parallel_slot.c.
References conn, disconnectDatabase(), and i.
Referenced by main(), reindex_one_database(), and vacuum_one_database().
bool ParallelSlotsWaitCompletion | ( | ParallelSlotArray * | sa | ) |
Definition at line 501 of file parallel_slot.c.
References consumeQueryResult(), i, and ParallelSlotClearHandler().
Referenced by main(), reindex_one_database(), and vacuum_one_database().
Definition at line 540 of file parallel_slot.c.
References Assert, conn, ERRCODE_UNDEFINED_TABLE, PG_DIAG_SQLSTATE, pg_log_error, PGRES_COMMAND_OK, PQclear(), PQdb(), PQerrorMessage(), PQresultErrorField(), PQresultStatus(), and res.
Referenced by reindex_one_database(), and vacuum_one_database().