Обсуждение: Is PgAudit extension database specific?

Поиск
Список
Период
Сортировка

Is PgAudit extension database specific?

От
Siraj G
Дата:
Hello Experts!

Here is my observation:

Connected to postgres DB and ran:
CREATE EXTENSION pgaudit;

Within postgres DB, I ran this:
SELECT * FROM pg_catalog.pg_extension WHERE extname = 'pgaudit';

It does return a row.

I changed the DB and ran the same SQL, but it does not return any thing.

The PostgreSQL instance is a GCP cloud SQL running with postgres V14.19.

Would you help me understand this, please.

Regards
Siraj

Re: Is PgAudit extension database specific?

От
"David G. Johnston"
Дата:
On Tue, Jan 6, 2026 at 10:19 AM Siraj G <tosiraj.g@gmail.com> wrote:
Connected to postgres DB and ran:
CREATE EXTENSION pgaudit;


"create extension" always executes strictly within the database you are connected to.  It may have effects that go beyond that database, depending on what the extension does, but absent documentation to the contrary assume that an extension only operates within the database it was installed into.

David J.

Re: Is PgAudit extension database specific?

От
zaidagilist
Дата:
Hello Siraj,

pgAudit is a coupled component build for a specific PG version, for each PG version you are required to install separately. Same behavior as other PG based extensions.

Regards,
Zaid

On Tue, Jan 6, 2026 at 10:19 PM Siraj G <tosiraj.g@gmail.com> wrote:
Hello Experts!

Here is my observation:

Connected to postgres DB and ran:
CREATE EXTENSION pgaudit;

Within postgres DB, I ran this:
SELECT * FROM pg_catalog.pg_extension WHERE extname = 'pgaudit';

It does return a row.

I changed the DB and ran the same SQL, but it does not return any thing.

The PostgreSQL instance is a GCP cloud SQL running with postgres V14.19.

Would you help me understand this, please.

Regards
Siraj

Re: Is PgAudit extension database specific?

От
Dharin Shah
Дата:
Hello, 

This is standard for all pg extensions as mentioned above.

Just adding a minor doc patch to add clarification in the doc.

Thanks,
Dharin

On Tue, Jan 6, 2026 at 6:30 PM zaidagilist <zaidagilist@gmail.com> wrote:
Hello Siraj,

pgAudit is a coupled component build for a specific PG version, for each PG version you are required to install separately. Same behavior as other PG based extensions.

Regards,
Zaid

On Tue, Jan 6, 2026 at 10:19 PM Siraj G <tosiraj.g@gmail.com> wrote:
Hello Experts!

Here is my observation:

Connected to postgres DB and ran:
CREATE EXTENSION pgaudit;

Within postgres DB, I ran this:
SELECT * FROM pg_catalog.pg_extension WHERE extname = 'pgaudit';

It does return a row.

I changed the DB and ran the same SQL, but it does not return any thing.

The PostgreSQL instance is a GCP cloud SQL running with postgres V14.19.

Would you help me understand this, please.

Regards
Siraj

Вложения