On 14/03/2024 22:00, Melanie Plageman wrote:
On Thu, Mar 14, 2024 at 05:30:30PM +0200, Heikki Linnakangas wrote:
typedef struct SharedBitmapHeapInstrumentation
{
int num_workers;
BitmapHeapScanInstrumentation sinstrument[FLEXIBLE_ARRAY_MEMBER];
} SharedBitmapHeapInstrumentation;
typedef struct BitmapHeapScanState
{
ScanState ss; /* its first field is
NodeTag */
...
SharedBitmapHeapInstrumentation sinstrument;
} BitmapHeapScanState;
that compiles, at least with my compiler, but I find it weird to have a
variable-length inner struct embedded in an outer struct like that.
In the attached patch, BitmapHeapScanState->sinstrument is a pointer,
though. Or are you proposing the above as an alternative that you
decided not to go with?
Right, the above is what I contemplated at first but decided it was a
bad idea.
--
Heikki Linnakangas
Neon (https://neon.tech)