BDR global sequences in two machine failover

Поиск
Список
Период
Сортировка
От Giovanni Maruzzelli
Тема BDR global sequences in two machine failover
Дата
Msg-id CALXCt0q1a+xUsPNENNqzZ2gw2Fy4ncJa9Qunw+hL5zdazeekbA@mail.gmail.com
обсуждение исходный текст
Ответы Re: BDR global sequences in two machine failover
Список pgsql-general
Hello,

Typical HA situation.

I have master-master, two only machines, one active and one passive (standby) with floating IP.
I write to only one machine at time, the one with the floating IP.

I have one column that is a serial from a global sequence in BDR.

When one machine is down I can no more refill sequence allocated chunk (eg: next pool of values)...

How do you deal with this? In a failover situation you want the single surviving machine to continue working... For an arbitrary period (eg: number of inserts will be more than the preallocated number of sequence values).

Seems that BDR global sequences will not be good for master-master failover.

They *need* half the nodes + 1 to be running and connected to vote for next chunk.

So, when you consumed the preallocated chunk (default to 15000 values), your surviving machine will no more be able to insert into a table with a serial column with underlying BDR global sequence.

We're back to changing the start and increment of each sequence that underly the "serial" field in each table.
And must do so differently for each node (only two in a master-master failover).

Is there any workaround?

For "traditional" (non BDR) serial, there is a way to set into configuration what will be START and INCREMENT of all sequences?
Or each serial sequence must be individually ALTERed for each serial column in each table?

Thank you all in advance,

-giovanni


--
Sincerely,

Giovanni Maruzzelli
Cell : +39-347-2665618

В списке pgsql-general по дате отправления:

Предыдущее
От: Ben Chobot
Дата:
Сообщение: Re: in defensive of zone_reclaim_mode on linux
Следующее
От: "FarjadFarid\(ChkNet\)"
Дата:
Сообщение: table dependencies