Re: Dirty buffers with suppress_redundant_updates_trigger - Mailing list pgsql-general

From Michael Lewis
Subject Re: Dirty buffers with suppress_redundant_updates_trigger
Date
Msg-id CAHOFxGo6MLYudUrCjit0Hj44PF=gpWTR6hacDYr7vAVqqfRhgw@mail.gmail.com
Whole thread Raw
In response to Re: Dirty buffers with suppress_redundant_updates_trigger  (Mike Noordermeer <mike@normi.net>)
Responses Re: Dirty buffers with suppress_redundant_updates_trigger  (Mike Noordermeer <mike@normi.net>)
List pgsql-general
Just curious, are you doing this in a trigger or in your application code? Either way, I'd think you could use the table record type to compare the temp vs real table values as an entire unit.

with cte_indexes as(
select * from pg_indexes limit 10
)
select i1.indexdef, i2.tablename
from cte_indexes AS i1
join cte_indexes AS i2 on i1.indexname = i2.indexname
where
i1 IS DISTINCT FROM i2;

trigger-

I would probably delete records in the regular table that do not exist in the temp table, then delete from the temp table that already exists in the main table and then update the remaining rows.

pgsql-general by date:

Previous
From: Mike Noordermeer
Date:
Subject: Re: Dirty buffers with suppress_redundant_updates_trigger
Next
From: Laurenz Albe
Date:
Subject: Re: Effective IO Concurrency