Problems loading pgAudit library on Postgres 12.2 I'm trying to add the pgAudit extension to register the events of my database. I downloaded pgAudit and installed via git.
git clone https://github.com/pgaudit/pgaudit.git
cd pgaudit
git checkout REL_11_STABLE
gmake install USE_PGXS=1 

And added 'pgaudit' to the shared_preload_libraries. However, when I try to start the server, it throws the following error:
FATAL: could not load library &quot;/usr/local/lib/postgresql/pgaudit.so&quot;: /usr/local/lib/postgresql/pgaudit.so: Undefined symbol &quot;IsSystemNamespace&quot;. 

I've googled for a while but cannot find what's wrong. I've checked that the library is really there and uninstalled/reinstalled it. I'm currently working with FreeBSD-12.0 RELEASE and PostgreSQL 12.12.
Thanks in advance for your time.
This commit renamed IsSystemNamespace to IsCatalogNamespace in PostgreSQL v12, so you must have built the extension with PostgreSQL v11 or older by mistake.
Check the result of
which pg_config

to see what was first on your PATH when you built the extension.
Be explicit with
make USE_PGXS=1 PG_CONFIG=/path/to/pg12/bin/pg_config