Posix shared memory resize with mremap when several processes are using the segment

I’m storing some data in a shared memory array used by several processes. At some point I want to grow the array.

Assume there’s already a synchronisation mechanism between the processes

Initially Process 1 will create the segment and process 2 will open it.

Process 1
shm_open() O_CREAT

Process 2

At some point one process wants to grow the array and resize the shared segment.

Process 1 calls

Shall Process 2 be notified of the resize and call mremap() to update it’s own virtual address too ?

If Process 2 has to be notified I’m thinking of opening a second shared memory segment with some metadata e.g the table’s capacity and a mutex. Each process stores the table’s capacity initially from shared memory and on each operation checks the local value against the shared memory metadata value. If the value has changed it will call mremap()

Is this a proper way to do this if mremap() has to be called on each process after resizing?