| From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Use LOCKMODE in parse_relation.c/.h |
| Date: | 2026-02-18 09:50:38 |
| Message-ID: | 4bcd65fb-2497-484c-bb41-83cb435eb64d@eisentraut.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
There are a couple of comments in parse_relation.c
> Note: properly, lockmode should be declared LOCKMODE not int, but that
> would require importing storage/lock.h into parse_relation.h. Since
> LOCKMODE is typedef'd as int anyway, that seems like overkill.
but actually LOCKMODE has been in storage/lockdefs.h for a while,
which is intentionally a more narrow header. So we can include that
one in parse_relation.h and just use LOCKMODE normally.
An alternative would be to add a duplicate typedef into
parse_relation.h, but that doesn't seem necessary here.
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Use-LOCKMODE-in-parse_relation.c-.h.patch | text/plain | 3.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Anthonin Bonnefoy | 2026-02-18 09:51:59 | Re: Don't keep closed WAL segment in page cache after replay |
| Previous Message | Siddharth Kothari | 2026-02-18 09:39:15 | [PATCH] Add RetrieveInstrumentation hook for CustomScan providers |