Re: Skipping logical replication transactions on subscriber side
Masahiko Sawada <sawada.mshk@gmail.com>
On Thu, Jul 8, 2021 at 6:28 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > On Wed, Jul 7, 2021 at 11:47 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > > > > On Tue, Jul 6, 2021 at 6:33 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > > > > > > > > > > According to the doc, ALTER SUBSCRIPTION ... SET is used to alter > > > > parameters originally set by CREATE SUBSCRIPTION. Therefore, we can > > > > specify a subset of parameters that can be specified by CREATE > > > > SUBSCRIPTION. It makes sense to me for 'disable_on_error' since it can > > > > be specified by CREATE SUBSCRIPTION. Whereas SKIP TRANSACTION stuff > > > > cannot be done. Are you concerned about adding a syntax to ALTER > > > > SUBSCRIPTION? > > > > > > > > > > Both for additional syntax and consistency with disable_on_error. > > > Isn't it just a current implementation that Alter only allows to > > > change parameters supported by Create? Is there a reason why we can't > > > allow Alter to set/change some parameters not supported by Create? > > > > I think there is not reason for that but looking at ALTER TABLE I > > thought there is such a policy. > > > > If we are looking for precedent then I think we allow to set > configuration parameters via Alter Database but not via Create > Database. Does that address your concern? Thank you for the info! But it seems like CREATE DATABASE doesn't support SET in the first place. Also interestingly, ALTER SUBSCRIPTION support both ENABLE/DISABLE and SET (enabled = on/off). I’m not sure from the point of view of consistency with other CREATE, ALTER commands, and disable_on_error but it might be better to avoid adding additional syntax. > > > I thought the skipping transaction > > feature is somewhat different from disable_on_error feature. The > > former seems a feature to deal with a problem on the spot whereas the > > latter seems a setting of a subscription. Anyway, if we use the > > subscription option, we can reset the XID by setting 0? Or do we need > > ALTER SUBSCRIPTION RESET? > > The other commands like Alter Table, Alter Database, etc, which > provides a way to Set some parameter/option, have a Reset variant. I > think it would be good to have it for Alter Subscription as well but > we might want to allow other parameters to be reset by that as well. Agreed. Regards, -- Masahiko Sawada EDB: https://www.enterprisedb.com/
Commits
-
Test ALIGNOF_DOUBLE==4 compatibility under ALIGNOF_DOUBLE==8.
- c1da0acbb06e 15.0 landed
-
Reorder subskiplsn in pg_subscription to avoid alignment issues.
- 79b716cfb7a1 15.0 landed
-
Add ALTER SUBSCRIPTION ... SKIP.
- 208c5d65bbd6 15.0 landed
-
Optionally disable subscriptions on error.
- 705e20f8550c 15.0 cited
-
Update docs of logical replication for commit 8d74fc96db.
- 85c61ba8920b 15.0 landed
-
Respect permissions within logical replication.
- a2ab9c06ea15 15.0 cited
-
Fix regression test failure caused by commit 8d74fc96db.
- 41e66fee0516 15.0 landed
-
Add a view to show the stats of subscription workers.
- 8d74fc96db5f 15.0 landed
-
Add logical change details to logical replication worker errcontext.
- abc0910e2e0a 15.0 landed
-
Rename LOGICAL_REP_MSG_STREAM_END to LOGICAL_REP_MSG_STREAM_STOP.
- 4cd7a1896871 15.0 landed
-
Fix typo in protocol.sgml.
- e1915646658d 14.0 landed
- 0ac1aee0d7d8 15.0 landed
-
Remove unused argument in apply_handle_commit_internal().
- f4b939f1a372 14.0 landed
- 16bd4becee32 15.0 landed
-
Fix replication of in-progress transactions in tablesync worker.
- 0926e96c4934 14.0 cited
-
Reorder pg_sequence columns to avoid alignment issue
- f3b421da5f4a 10.0 cited