diff options
Diffstat (limited to 'src/bin/pg_dump/parallel.h')
-rw-r--r-- | src/bin/pg_dump/parallel.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/bin/pg_dump/parallel.h b/src/bin/pg_dump/parallel.h index 0fbf736c811..0b39285a015 100644 --- a/src/bin/pg_dump/parallel.h +++ b/src/bin/pg_dump/parallel.h @@ -33,6 +33,19 @@ typedef enum WFW_ALL_IDLE } WFW_WaitOption; +/* + * Maximum number of parallel jobs allowed. + * + * On Windows we can only have at most MAXIMUM_WAIT_OBJECTS (= 64 usually) + * parallel jobs because that's the maximum limit for the + * WaitForMultipleObjects() call. + */ +#ifdef WIN32 +#define PG_MAX_JOBS MAXIMUM_WAIT_OBJECTS +#else +#define PG_MAX_JOBS INT_MAX +#endif + /* ParallelSlot is an opaque struct known only within parallel.c */ typedef struct ParallelSlot ParallelSlot; |