mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +03:00
Use macro to define the number of enum values
Refactoring in the interest of code consistency, a follow-up to 2e068db56e.
The argument against inserting a special enum value at the end of the enum
definition is that a switch statement might generate a compiler warning unless
it has a default clause.
Aleksander Alekseev, reviewed by Michael Paquier, Dean Rasheed, Peter Eisentraut
Discussion: https://postgr.es/m/CAJ7c6TMsiaV5urU_Pq6zJ2tXPDwk69-NKVh4AMN5XrRiM7N%2BGA%40mail.gmail.com
This commit is contained in:
@@ -247,9 +247,10 @@ typedef enum
|
||||
{
|
||||
AutoVacForkFailed, /* failed trying to start a worker */
|
||||
AutoVacRebalance, /* rebalance the cost limits */
|
||||
AutoVacNumSignals, /* must be last */
|
||||
} AutoVacuumSignal;
|
||||
|
||||
#define AutoVacNumSignals (AutoVacRebalance + 1)
|
||||
|
||||
/*
|
||||
* Autovacuum workitem array, stored in AutoVacuumShmem->av_workItems. This
|
||||
* list is mostly protected by AutovacuumLock, except that if an item is
|
||||
|
||||
Reference in New Issue
Block a user