Trigger to Count Number of Logical Replication Table Changes.

2023-11-16 Thread Avi Weinberg
I'm using Postgres (13 and 15) logical replication to sync data from two servers. I would like to have an update counter whenever data is changed. The counter can be incremented by 1 even if multiple rows are updated, but it is also ok to be incremented the counter by the number of rows updated

Re: New addition to the merge sql standard

2023-11-16 Thread Alvaro Herrera
On 2023-Nov-16, Nick DeCoursin wrote: > In my opinion, it would be better for merge to offer the functionality to > simply ignore the rows that cause unique violation exceptions instead of > tanking the whole query. "ignore" may not be what you want, though. Perhaps the fact that insert (coming

New addition to the merge sql standard

2023-11-16 Thread Nick DeCoursin
Dear Postgres Administrators, There was a great article of `merge` by Lukas Fittl here: https://pganalyze.com/blog/5mins-postgres-15-merge-vs-insert-on-conflict In his article, he highlights one of the severe disadvantages to merge: The comment that he essentially made is that the downside of ME