Make struct ParallelSlot private within pg_dump/parallel.c.
Tom Lane <tgl@sss.pgh.pa.us>
Make struct ParallelSlot private within pg_dump/parallel.c. The only field of this struct that other files have any need to touch is the pointer to the TocEntry a worker is working on. (Well, pg_backup_archiver.c is actually looking at workerStatus too, but that can be finessed by specifying that the TocEntry pointer is NULL for a non-busy worker.) Hence, move out the TocEntry pointers to a separate array within struct ParallelState, and then we can make struct ParallelSlot private. I noted the possibility of this previously, but hadn't got round to actually doing it. Discussion: <1188.1464544443@sss.pgh.pa.us>
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/pg_dump/parallel.c | modified | +54 −8 |
| src/bin/pg_dump/parallel.h | modified | +5 −40 |
| src/bin/pg_dump/pg_backup_archiver.c | modified | +6 −6 |