diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2024-05-17 07:30:19 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2024-05-17 07:36:12 +0200 |
commit | be5942aee7a012ce7f30bc7a6617903127f29e89 (patch) | |
tree | f923ef193459fff2949be589a99d41dbb38cc1ff /src/include/storage/bufmgr.h | |
parent | 110eb4aefbad683c8f512ee8a7168d1718353baa (diff) |
Remove unused typedefs
There were a few typedefs that were never used to define a variable or
field. This had the effect that the buildfarm's typedefs.list would
not include them, and so they would need to be re-added manually to
keep the overall pgindent result perfectly clean.
We can easily get rid of these typedefs to avoid the issue. In a few
cases, we just let the enum or struct stand on its own without a
typedef around it. In one case, an enum was abused to define flag
bits; that's better done with macro definitions.
This fixes all the remaining issues with missing entries in the
buildfarm's typedefs.list.
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/1919000.1715815925@sss.pgh.pa.us
Diffstat (limited to 'src/include/storage/bufmgr.h')
-rw-r--r-- | src/include/storage/bufmgr.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h index 42211bfec4f..08364447c74 100644 --- a/src/include/storage/bufmgr.h +++ b/src/include/storage/bufmgr.h @@ -107,14 +107,10 @@ typedef struct BufferManagerRelation #define BMR_REL(p_rel) ((BufferManagerRelation){.rel = p_rel}) #define BMR_SMGR(p_smgr, p_relpersistence) ((BufferManagerRelation){.smgr = p_smgr, .relpersistence = p_relpersistence}) -typedef enum ReadBuffersFlags -{ - /* Zero out page if reading fails. */ - READ_BUFFERS_ZERO_ON_ERROR = (1 << 0), - - /* Call smgrprefetch() if I/O necessary. */ - READ_BUFFERS_ISSUE_ADVICE = (1 << 1), -} ReadBuffersFlags; +/* Zero out page if reading fails. */ +#define READ_BUFFERS_ZERO_ON_ERROR (1 << 0) +/* Call smgrprefetch() if I/O necessary. */ +#define READ_BUFFERS_ISSUE_ADVICE (1 << 1) struct ReadBuffersOperation { |