Skip to content

Commit 12cf3ac

Browse files
committed
doc Improve C GUC-related comments
Discussion: https://postgr.es/m/CAEG8a3LZHTR5S+OPZCbZvECwsqdbx=pBRFZZyDjKaAtgoALOQQ@mail.gmail.com Author: Junwang Zhao Backpatch-through: master
1 parent a978565 commit 12cf3ac

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/backend/access/common/reloptions.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242
*
4343
* To add an option:
4444
*
45-
* (i) decide on a type (integer, real, bool, string), name, default value,
46-
* upper and lower bounds (if applicable); for strings, consider a validation
47-
* routine.
45+
* (i) decide on a type (bool, integer, real, enum, string), name, default
46+
* value, upper and lower bounds (if applicable); for strings, consider a
47+
* validation routine.
4848
* (ii) add a record below (or use add_<type>_reloption).
4949
* (iii) add it to the appropriate options struct (perhaps StdRdOptions)
5050
* (iv) add it to the appropriate handling routine (perhaps
@@ -68,24 +68,24 @@
6868
* since they are only used by the AV procs and don't change anything
6969
* currently executing.
7070
*
71-
* Fillfactor can be set because it applies only to subsequent changes made to
72-
* data blocks, as documented in hio.c
71+
* Fillfactor can be set at ShareUpdateExclusiveLock because it applies only to
72+
* subsequent changes made to data blocks, as documented in hio.c
7373
*
7474
* n_distinct options can be set at ShareUpdateExclusiveLock because they
7575
* are only used during ANALYZE, which uses a ShareUpdateExclusiveLock,
7676
* so the ANALYZE will not be affected by in-flight changes. Changing those
7777
* values has no effect until the next ANALYZE, so no need for stronger lock.
7878
*
79-
* Planner-related parameters can be set with ShareUpdateExclusiveLock because
79+
* Planner-related parameters can be set at ShareUpdateExclusiveLock because
8080
* they only affect planning and not the correctness of the execution. Plans
8181
* cannot be changed in mid-flight, so changes here could not easily result in
8282
* new improved plans in any case. So we allow existing queries to continue
8383
* and existing plans to survive, a small price to pay for allowing better
8484
* plans to be introduced concurrently without interfering with users.
8585
*
86-
* Setting parallel_workers is safe, since it acts the same as
87-
* max_parallel_workers_per_gather which is a USERSET parameter that doesn't
88-
* affect existing plans or queries.
86+
* Setting parallel_workers at ShareUpdateExclusiveLock is safe, since it acts
87+
* the same as max_parallel_workers_per_gather which is a USERSET parameter
88+
* that doesn't affect existing plans or queries.
8989
*
9090
* vacuum_truncate can be set at ShareUpdateExclusiveLock because it
9191
* is only used during VACUUM, which uses a ShareUpdateExclusiveLock,

0 commit comments

Comments
 (0)