Re: [EXTERNAL]: Re: [EXTERNAL]: Re: UPSERT in Postgres

2023-04-10 Thread Peter J. Holzer
On 2023-04-10 14:35:38 +0200, Karsten Hilbert wrote: > All I really wanted to hint at is that "incoming call > timestamp" may work pretty well in given settings but does > not _always_ make for a "unique enough" key. This is true for all natural primary keys: Any attribute of an entity which is un

Re: [EXTERNAL]: Re: [EXTERNAL]: Re: UPSERT in Postgres

2023-04-10 Thread Karsten Hilbert
Am Mon, Apr 10, 2023 at 01:33:41PM +0200 schrieb Francisco Olarte: > > > > This the part that's always eluded me: How does the client, the > > > > UPSERTer, come to hold an id and not know whether or not it's already in > > > > the database. > > > > > > This is extremely easy to do if you have nat

Re: [EXTERNAL]: Re: [EXTERNAL]: Re: UPSERT in Postgres

2023-04-10 Thread Francisco Olarte
Hi karsten: On Mon, 10 Apr 2023 at 11:40, Karsten Hilbert wrote: > > Am Mon, Apr 10, 2023 at 09:41:15AM +0200 schrieb Francisco Olarte: > > > On Mon, 10 Apr 2023 at 04:16, Rob Sargent wrote: > > > > An UPSERT checks whether a row exists, if so, it does an update, if not > > > > it does an inser

Re: [EXTERNAL]: Re: [EXTERNAL]: Re: UPSERT in Postgres

2023-04-10 Thread Karsten Hilbert
Am Mon, Apr 10, 2023 at 09:41:15AM +0200 schrieb Francisco Olarte: > On Mon, 10 Apr 2023 at 04:16, Rob Sargent wrote: > > > An UPSERT checks whether a row exists, if so, it does an update, if not > > > it does an insert. This is the literal definition. > > This the part that's always eluded me:

Re: Patroni vs pgpool II

2023-04-10 Thread Allan Nielsen
Hi I have used pg_auto_failover for quite some time which provides automatic failover with sync replication. I did not have any issues yet and running around 30 clusters. Regards Allan man. 3. apr. 2023 kl. 08.33 skrev Inzamam Shafiq : > Hi Guys, > > Hope you are doing well. > > Can someone ple

Re: [EXTERNAL]: Re: [EXTERNAL]: Re: UPSERT in Postgres

2023-04-10 Thread Francisco Olarte
Hi Rob: On Mon, 10 Apr 2023 at 04:16, Rob Sargent wrote: > > An UPSERT checks whether a row exists, if so, it does an update, if not it > > does an insert. This is the literal definition. > This the part that's always eluded me: How does the client, the > UPSERTer, come to hold an id and not kno

Re: [EXTERNAL]: Re: [EXTERNAL]: Re: UPSERT in Postgres

2023-04-10 Thread Francisco Olarte
Hi Louis: On Mon, 10 Apr 2023 at 03:05, Louis Tian wrote: > I think we need to make a distinction between an "operation" and a > "statement". OK > The concept of idempotency applies to an "operation" not an entire statement. I think I'll need a definition of both to say anything on this. > Lik