Re: Commit to primary with unavailable sync standby

2019-12-23 Thread Maksim Milyutin
On 19.12.2019 18:08, Fabio Ugo Venchiarutti wrote: On 19/12/2019 13:58, Maksim Milyutin wrote: On 19.12.2019 14:04, Andrey Borodin wrote: Hi! Hi! FYI, this topic was up recently in -hackers https://www.postgresql.org/message-id/caeet0zhg5off7iecby6tzadh1moslmfz1hlm311p9vot7z+...@mail.

Re: Commit to primary with unavailable sync standby

2019-12-19 Thread Fabio Ugo Venchiarutti
On 19/12/2019 13:58, Maksim Milyutin wrote: On 19.12.2019 14:04, Andrey Borodin wrote: Hi! Hi! FYI, this topic was up recently in -hackers https://www.postgresql.org/message-id/caeet0zhg5off7iecby6tzadh1moslmfz1hlm311p9vot7z+...@mail.gmail.com I cannot figure out proper way to impl

Re: Commit to primary with unavailable sync standby

2019-12-19 Thread Maksim Milyutin
On 19.12.2019 14:04, Andrey Borodin wrote: Hi! Hi! FYI, this topic was up recently in -hackers https://www.postgresql.org/message-id/caeet0zhg5off7iecby6tzadh1moslmfz1hlm311p9vot7z+...@mail.gmail.com I cannot figure out proper way to implement safe HA upsert. I will be very grateful if

Re: Commit to primary with unavailable sync standby

2019-12-19 Thread Fabio Ugo Venchiarutti
On 19/12/2019 12:25, Andrey Borodin wrote: Hi Fabio! Thanks for looking into this. 19 дек. 2019 г., в 17:14, Fabio Ugo Venchiarutti написал(а): You're hitting the CAP theorem ( https://en.wikipedia.org/wiki/CAP_theorem ) You cannot do it with fewer than 3 nodes, as the moment you set

Re: Commit to primary with unavailable sync standby

2019-12-19 Thread Andrey Borodin
Hi Fabio! Thanks for looking into this. > 19 дек. 2019 г., в 17:14, Fabio Ugo Venchiarutti > написал(а): > > > You're hitting the CAP theorem ( https://en.wikipedia.org/wiki/CAP_theorem ) > > > You cannot do it with fewer than 3 nodes, as the moment you set your standby > to synchronous to

Re: Commit to primary with unavailable sync standby

2019-12-19 Thread Fabio Ugo Venchiarutti
On 19/12/2019 11:04, Andrey Borodin wrote: Hi! I cannot figure out proper way to implement safe HA upsert. I will be very grateful if someone would help me. Imagine we have primary server after failover. It is network-partitioned. We are doing INSERT ON CONFLICT DO NOTHING; that eventual