Thread: BUG #18584: Triggers are not fired or executing when any DML transaction runs

BUG #18584: Triggers are not fired or executing when any DML transaction runs

From
PG Bug reporting form
Date:
The following bug has been logged on the website:

Bug reference:      18584
Logged by:          Shekhar Salunkhe
Email address:      shekhar.salunkhe@capgemini.com
PostgreSQL version: 16.2
Operating system:   Linux
Description:

Trigger should get automatically executed once DML operation
invoke/completed. 
I have converted Oracle code using AWS Shema Conversion tool to Postgres
16.1 (In this version triggers are executing completely fine). 
Similarly, I have converted Oracle code using AWS Schema Conversion tool
into Postgres 16.2 however we have observed not a single trigger executed
after DML operation. 
Further I have created simple new table and trigger on it, still it is not
invoked after update statement.
I also compared other Database parameter with 16.1 vs 16.2 where only
"session_replication_role" was set as "replica" in 16.2. This parameter now
set as "Origin" but still triggers are not working.

I am completely blocked to test further scenarios. 

I have provided required grants "SELECT, INSERT, UPDATE, DELETE, TRUNCATE,
REFERENCES, TRIGGER" of that table to user. Provided all usage schema to
that user. Given ownership of trigger functions to that user.  
Still there is no trigger executed except insert / update / delete operation
runs OK.

Request you to please help me out.


Re: BUG #18584: Triggers are not fired or executing when any DML transaction runs

From
"David G. Johnston"
Date:
On Sat, Aug 17, 2024 at 9:15 AM PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      18584
Logged by:          Shekhar Salunkhe
Email address:      shekhar.salunkhe@capgemini.com
PostgreSQL version: 16.2
Operating system:   Linux
Description:       

Trigger should get automatically executed once DML operation
invoke/completed.

The buildfarm proves that a stock community 16.2 install has functioning triggers.  Whatever is going on is specific to your situation and most likely not a bug.  I'd suggest posting for help to -general with more details including the evidence for the simple test you performed below.

Further I have created simple new table and trigger on it, still it is not
invoked after update statement.
 
[...]
I have provided required grants "SELECT, INSERT, UPDATE, DELETE, TRUNCATE,
REFERENCES, TRIGGER" of that table to user. Provided all usage schema to
that user. Given ownership of trigger functions to that user. 
Still there is no trigger executed except insert / update / delete operation
runs OK.

None of those actions are expected to make a difference.  You would have seen permission errors if they were relevant.

David J.