Re: pgsql: Add ALTER SUBSCRIPTION ... SKIP.
От | Amit Kapila |
---|---|
Тема | Re: pgsql: Add ALTER SUBSCRIPTION ... SKIP. |
Дата | |
Msg-id | CAA4eK1JKHda3VzhM08MirwYhB+R46kDPE1WMKEEO=4sOO6Y1CQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: pgsql: Add ALTER SUBSCRIPTION ... SKIP. (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-committers |
On Tue, Mar 22, 2022 at 7:36 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Amit Kapila <akapila@postgresql.org> writes: > > The user can specify LSN by ALTER SUBSCRIPTION ... SKIP (lsn = XXX), > > which allows the apply worker to skip the transaction finished at > > specified LSN. The apply worker skips all data modification changes within > > the transaction. > > Hmm ... this seems like a really poor choice of syntax. > I would expect ALTER to be used for changes of persistent > object properties, which surely this is not? > We have discussed this syntax and discussed the point that this is different from other properties of subscription like slot_name, binary etc. and that is why we used SKIP for it rather than the usual way by using SET [1][2]. There could also be other such options in future like XID or other attributes, so we thought it would be easier to extend it. > An alternative perhaps could be to invoke the operation > via a function. > I agree that is another alternative but could be inconvenient if there are multiple such functions. We already have one pg_replication_origin_advance(). [1] - https://www.postgresql.org/message-id/CAA4eK1KD_C_0LSxaYB0UbG59VOgjf4mXBeSYbVWCLXAnnuqnPw%40mail.gmail.com [2] - https://www.postgresql.org/message-id/f716f584-65d0-fe83-2e84-53426631739a%40enterprisedb.com -- With Regards, Amit Kapila.
В списке pgsql-committers по дате отправления: