Re: [Proposal] global sequence implemented by snowflake ID

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: [Proposal] global sequence implemented by snowflake ID
Дата
Msg-id CAA4eK1KP-gxEsc6veq63i4up5V-KQPejzdKZi6P+NtWndxr9kg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [Proposal] global sequence implemented by snowflake ID  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Ответы Re: [Proposal] global sequence implemented by snowflake ID  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Список pgsql-hackers
On Thu, Nov 30, 2023 at 5:21 PM Tomas Vondra
<tomas.vondra@enterprisedb.com> wrote:
>
> On 11/30/23 11:56, Amit Kapila wrote:
>
> >
> > This was the key point that I wanted to discuss or hear opinions
> > about. So, if we wish to have some sort of global sequences then it is
> > not clear to me what benefits will we get by having replication of
> > non-global sequences. One thing that comes to mind is replication
> > covers a subset of use cases (like help in case of failover or
> > switchover to subscriber) and till the time we have some
> > implementation of global sequences, it can help users.
> >
>
> What are you going to do about use cases like using logical replication
> for upgrade to the next major version?


As per my understanding, they should work as it is when using a global
sequence. Just for the sake of example, considering we have a
same-name global sequence on both pub and sub now it should work
during and after major version upgrades.

>
> Or applications that prefer (or
> have to) use traditional sequences?
>

I think we have to suggest them to use global sequence for the use
cases where they want those to work with logical replication use
cases. Now, if still users want their existing sequences to work then
we can probably see if there is a way to provide an option via Alter
Sequence to change it to a global sequence.

--
With Regards,
Amit Kapila.



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

Предыдущее
От: "Zhijie Hou (Fujitsu)"
Дата:
Сообщение: RE: Synchronizing slots from primary to standby
Следующее
От: Nurul Karim Rafi
Дата:
Сообщение: Materialized view in Postgres from the variables rather than SQL query results