shmem examples not working
Hi! I'm learning how to do the shared memory, running the actual example it returns an error:
select vec_select();
ERROR: PgLwLock was not initialized
Seems the examples are also using a older version of pgrx which can't be used with the git one.
Thx!
Have you added shmem.so to shared_preload_libraries?
Hi! no, I don't see nothing like that in the example project. Other projects (out of pgrx) do not request what is wrote here: https://github.com/pgcentralfoundation/pgrx/blob/develop/docs/src/extension/install.md
pgrx seems to mount its own PG right? where is postgres.conf?
I think would be nice add this points to the example and the missing steps :)
I think would be nice add this points to the example and the missing steps :)
It's documented in https://docs.rs/pgrx/latest/pgrx/macro.pg_shmem_init.html; this step is needed only if PostgreSQL's shared memory api is used.
where is
postgres.conf?
You can get it by SHOW config_file;.
Hi, thx for the answer! would be nice write that here. https://github.com/pgcentralfoundation/pgrx/tree/develop/pgrx-examples/shmem
I think is better make that things explicit, when we are starting there is a lot of new things and functions to read, write the needed parts to be able to run the examples can improve them a lot to introduce to pgrx.
I forgot SHOW config_file; exists, thx remind me that!
could also be nice have in that example a pg config file and in the instructions load it with
cargo pgrx start --postgres-conf custom_conf_file
This would make the example complete because we can know all that is needed to run it and the exceptions to the rule.