If you call dsa_allocate_extended(DSA_ALLOC_NO_OOM), it will still
ereport an error if you run out of space (originally reported at [0]).
Attached patch adds code to test_dsa.c to demonstrate that:
postgres=# select test_dsa_basic();
ERROR: could not resize shared memory segment "/PostgreSQL.1312700148"
to 1075843072 bytes: No space left on device
[0] https://github.com/pgvector/pgvector/issues/434#issuecomment-1912744489
--
Heikki Linnakangas
Neon (https://neon.tech)