Download pgsql/include/server/access/parallel.h from codekingpro/portable-devtools: direct link, hf CLI and curl.
- Browser
- Download file 2.65 kB
-
https://huggingface.co/datasets/codekingpro/portable-devtools/resolve/df58e70f9edde36aaca2d2aacc2440dd6c2f807d/pgsql/include/server/access/parallel.h
- Command line
-
hf download hf://datasets/codekingpro/portable-devtools@df58e70f9edde36aaca2d2aacc2440dd6c2f807d/pgsql/include/server/access/parallel.h
-
curl -L -o parallel.h https://huggingface.co/datasets/codekingpro/portable-devtools/resolve/df58e70f9edde36aaca2d2aacc2440dd6c2f807d/pgsql/include/server/access/parallel.h
2.65 kB
| /*------------------------------------------------------------------------- | |
| * | |
| * parallel.h | |
| * Infrastructure for launching parallel workers | |
| * | |
| * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group | |
| * Portions Copyright (c) 1994, Regents of the University of California | |
| * | |
| * src/include/access/parallel.h | |
| * | |
| *------------------------------------------------------------------------- | |
| */ | |
| typedef void (*parallel_worker_main_type) (dsm_segment *seg, shm_toc *toc); | |
| typedef struct ParallelWorkerInfo | |
| { | |
| BackgroundWorkerHandle *bgwhandle; | |
| shm_mq_handle *error_mqh; | |
| int32 pid; | |
| } ParallelWorkerInfo; | |
| typedef struct ParallelContext | |
| { | |
| dlist_node node; | |
| SubTransactionId subid; | |
| int nworkers; /* Maximum number of workers to launch */ | |
| int nworkers_to_launch; /* Actual number of workers to launch */ | |
| int nworkers_launched; | |
| char *library_name; | |
| char *function_name; | |
| ErrorContextCallback *error_context_stack; | |
| shm_toc_estimator estimator; | |
| dsm_segment *seg; | |
| void *private_memory; | |
| shm_toc *toc; | |
| ParallelWorkerInfo *worker; | |
| int nknown_attached_workers; | |
| bool *known_attached_workers; | |
| } ParallelContext; | |
| typedef struct ParallelWorkerContext | |
| { | |
| dsm_segment *seg; | |
| shm_toc *toc; | |
| } ParallelWorkerContext; | |
| extern PGDLLIMPORT volatile sig_atomic_t ParallelMessagePending; | |
| extern PGDLLIMPORT int ParallelWorkerNumber; | |
| extern PGDLLIMPORT bool InitializingParallelWorker; | |
| extern ParallelContext *CreateParallelContext(const char *library_name, | |
| const char *function_name, int nworkers); | |
| extern void InitializeParallelDSM(ParallelContext *pcxt); | |
| extern void ReinitializeParallelDSM(ParallelContext *pcxt); | |
| extern void ReinitializeParallelWorkers(ParallelContext *pcxt, int nworkers_to_launch); | |
| extern void LaunchParallelWorkers(ParallelContext *pcxt); | |
| extern void WaitForParallelWorkersToAttach(ParallelContext *pcxt); | |
| extern void WaitForParallelWorkersToFinish(ParallelContext *pcxt); | |
| extern void DestroyParallelContext(ParallelContext *pcxt); | |
| extern bool ParallelContextActive(void); | |
| extern void HandleParallelMessageInterrupt(void); | |
| extern void HandleParallelMessages(void); | |
| extern void AtEOXact_Parallel(bool isCommit); | |
| extern void AtEOSubXact_Parallel(bool isCommit, SubTransactionId mySubId); | |
| extern void ParallelWorkerReportLastRecEnd(XLogRecPtr last_xlog_end); | |
| extern void ParallelWorkerMain(Datum main_arg); | |