Re: Watching for view changes - Mailing list pgsql-general

From Ricardo Martin Gomez
Subject Re: Watching for view changes
Date
Msg-id SC1P15201MB23043ECC20218275F67BF8E6A3B90@SC1P15201MB2304.LAMP152.PROD.OUTLOOK.COM
Whole thread Raw
In response to Re: Watching for view changes  (Mitar <mmitar@gmail.com>)
Responses Re: Watching for view changes  (Rob Sargent <robjsargent@gmail.com>)
List pgsql-general
Hi, perhaps you can use triggers for some tables.
Regards.


From: Mitar <mmitar@gmail.com>
Sent: Saturday, December 22, 2018 1:21:49 AM
To: Kevin Brannen
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Watching for view changes
 
Hi!

On Thu, Dec 20, 2018 at 12:54 PM Kevin Brannen <KBrannen@efji.com> wrote:
Hmm, I guess I could see that as long as the DB wasn't too [write] busy, else you'd be flooded with notifications.

Sure. But this could be resolved by allowing notifications to be batched together. Debounce them. So could maybe configure how often you want such notifications and if they are more often they would be combined together into one.
 
Maybe it's a useful idea for you ... or maybe not. 😊

Thanks. Yes, this is one approach to do it. Hooking into every modify call at the app level and in this way have some information what is changing. I would prefer doing it in the database though, so that it could be independent from the source of the change. Moreover, not all UPDATE queries really do end up updating the data.


Mitar

--

pgsql-general by date:

Previous
From: Mark
Date:
Subject: Re: Query planner / Analyse statistics bad estimate rows=1 withmaximum statistics 10000 on PostgreSQL 10.2
Next
From: Rob Sargent
Date:
Subject: Re: Watching for view changes