diff --git a/contrib/test_decoding/Makefile b/contrib/test_decoding/Makefile
index f439c582a5..7b03919be4 100644
--- a/contrib/test_decoding/Makefile
+++ b/contrib/test_decoding/Makefile
@@ -5,7 +5,7 @@ PGFILEDESC = "test_decoding - example of a logical decoding output plugin"
 
 REGRESS = ddl xact rewrite toast permissions decoding_in_xact \
 	decoding_into_rel binary prepared replorigin time messages \
-	spill slot truncate
+	spill slot truncate sequence
 ISOLATION = mxact delayed_startup ondisk_startup concurrent_ddl_dml \
 	oldest_xmin snapshot_transfer subxact_without_top
 
diff --git a/contrib/test_decoding/expected/ddl.out b/contrib/test_decoding/expected/ddl.out
index 2c999fd3eb..2d5a3b8db7 100644
--- a/contrib/test_decoding/expected/ddl.out
+++ b/contrib/test_decoding/expected/ddl.out
@@ -93,6 +93,10 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
                                                            data                                                            
 ---------------------------------------------------------------------------------------------------------------------------
  BEGIN
+ table public.replication_example_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
+ BEGIN
+ table public.replication_example_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
  table public.replication_example: INSERT: id[integer]:1 somedata[integer]:1 text[character varying]:'1'
  table public.replication_example: INSERT: id[integer]:2 somedata[integer]:1 text[character varying]:'2'
  COMMIT
@@ -114,7 +118,7 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
  BEGIN
  table public.replication_example: INSERT: id[integer]:10 somedata[integer]:4 somenum[character varying]:'1'
  COMMIT
-(22 rows)
+(26 rows)
 
 ALTER TABLE replication_example ALTER COLUMN somenum TYPE int4 USING (somenum::int4);
 -- check that this doesn't produce any changes from the heap rewrite
@@ -197,15 +201,21 @@ INSERT INTO tr_unique(data) VALUES(10);
 ALTER TABLE tr_unique RENAME TO tr_pkey;
 ALTER TABLE tr_pkey ADD COLUMN id serial primary key;
 SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-rewrites', '1');
-                                    data                                     
------------------------------------------------------------------------------
+                                                   data                                                    
+-----------------------------------------------------------------------------------------------------------
  BEGIN
+ table public.tr_unique_id2_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
+ BEGIN
+ table public.tr_unique_id2_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
  table public.tr_unique: INSERT: id2[integer]:1 data[integer]:10
  COMMIT
  BEGIN
+ table public.tr_pkey_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false
+ table public.tr_pkey_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
  table public.tr_pkey: INSERT: id2[integer]:1 data[integer]:10 id[integer]:1
  COMMIT
-(6 rows)
+(12 rows)
 
 INSERT INTO tr_pkey(data) VALUES(1);
 --show deletion with primary key
@@ -251,7 +261,7 @@ ORDER BY 1,2;
      1 | COMMIT                                                                | COMMIT
      1 | message: transactional: 1 prefix: test, sz: 14 content:tx logical msg | message: transactional: 1 prefix: test, sz: 14 content:tx logical msg
      1 | table public.tr_oddlength: INSERT: id[text]:'ab' data[text]:'foo'     | table public.tr_oddlength: INSERT: id[text]:'ab' data[text]:'foo'
- 20467 | table public.tr_etoomuch: DELETE: id[integer]:1                       | table public.tr_etoomuch: UPDATE: id[integer]:9999 data[integer]:-9999
+ 20779 | table public.tr_etoomuch: DELETE: id[integer]:1                       | table public.tr_etoomuch: UPDATE: id[integer]:9999 data[integer]:-9999
 (5 rows)
 
 -- check updates of primary keys work correctly
@@ -310,9 +320,13 @@ INSERT INTO tr_sub(path) VALUES ('1-top-2-#1');
 RELEASE SAVEPOINT b;
 COMMIT;
 SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
-                                 data                                 
-----------------------------------------------------------------------
+                                                 data                                                  
+-------------------------------------------------------------------------------------------------------
+ BEGIN
+ table public.tr_sub_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
  BEGIN
+ table public.tr_sub_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
  table public.tr_sub: INSERT: id[integer]:1 path[text]:'1-top-#1'
  table public.tr_sub: INSERT: id[integer]:2 path[text]:'1-top-1-#1'
  table public.tr_sub: INSERT: id[integer]:3 path[text]:'1-top-1-#2'
@@ -320,7 +334,7 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
  table public.tr_sub: INSERT: id[integer]:5 path[text]:'1-top-2-1-#2'
  table public.tr_sub: INSERT: id[integer]:6 path[text]:'1-top-2-#1'
  COMMIT
-(8 rows)
+(12 rows)
 
 -- check that we handle xlog assignments correctly
 BEGIN;
@@ -500,6 +514,10 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
                                                                 data                                                                
 ------------------------------------------------------------------------------------------------------------------------------------
  BEGIN
+ table public.replication_metadata_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
+ BEGIN
+ table public.replication_metadata_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
  table public.replication_metadata: INSERT: id[integer]:1 relation[name]:'foo' options[text[]]:'{a,b}'
  COMMIT
  BEGIN
@@ -511,7 +529,7 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
  BEGIN
  table public.replication_metadata: INSERT: id[integer]:4 relation[name]:'zaphod' options[text[]]:null rewritemeornot[integer]:null
  COMMIT
-(12 rows)
+(16 rows)
 
 /*
  * check whether we handle updates/deletes correct with & without a pkey
@@ -588,6 +606,10 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  BEGIN
+ table public.table_without_key_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
+ BEGIN
+ table public.table_without_key_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
  table public.table_without_key: INSERT: id[integer]:1 data[integer]:1
  table public.table_without_key: INSERT: id[integer]:2 data[integer]:2
  COMMIT
@@ -619,6 +641,10 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
  table public.table_without_key: DELETE: id[integer]:2 data[integer]:3 new_column[text]:'someval'
  COMMIT
  BEGIN
+ table public.table_with_pkey_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
+ BEGIN
+ table public.table_with_pkey_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
  table public.table_with_pkey: INSERT: id[integer]:1 data[integer]:1
  table public.table_with_pkey: INSERT: id[integer]:2 data[integer]:2
  COMMIT
@@ -644,6 +670,10 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
  table public.table_with_pkey: DELETE: id[integer]:2
  COMMIT
  BEGIN
+ table public.table_with_unique_not_null_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
+ BEGIN
+ table public.table_with_unique_not_null_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
  table public.table_with_unique_not_null: INSERT: id[integer]:1 data[integer]:1
  table public.table_with_unique_not_null: INSERT: id[integer]:2 data[integer]:2
  COMMIT
@@ -682,6 +712,12 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
  table public.table_with_unique_not_null: DELETE: id[integer]:4
  COMMIT
  BEGIN
+ table public.toasttable_rand_seq: SEQUENCE: last_value[bigint]:79 log_cnt[bigint]:0 is_called[boolean]:false
+ table public.toasttable_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
+ BEGIN
+ table public.toasttable_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasttable_rand_seq: SEQUENCE: last_value[bigint]:79 log_cnt[bigint]:0 is_called[boolean]:true
  table public.toasttable: INSERT: id[integer]:1 toasted_col1[text]:'12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000' rand1[double precision]:79 toasted_col2[text]:null rand2[double precision]:1578
  COMMIT
  BEGIN
@@ -690,7 +726,7 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
  BEGIN
  table public.toasttable: UPDATE: id[integer]:1 toasted_col1[text]:'12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000' rand1[double precision]:79 toasted_col2[text]:null rand2[double precision]:1578
  COMMIT
-(103 rows)
+(121 rows)
 
 INSERT INTO toasttable(toasted_col1) SELECT string_agg(g.i::text, '') FROM generate_series(1, 2000) g(i);
 -- update of second column, first column unchanged
diff --git a/contrib/test_decoding/expected/decoding_in_xact.out b/contrib/test_decoding/expected/decoding_in_xact.out
index ab4d3aee72..3d6104f661 100644
--- a/contrib/test_decoding/expected/decoding_in_xact.out
+++ b/contrib/test_decoding/expected/decoding_in_xact.out
@@ -59,12 +59,16 @@ SELECT txid_current() = 0;
 -- don't show yet, haven't committed
 INSERT INTO nobarf(data) VALUES('2');
 SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
-                           data                            
------------------------------------------------------------
+                                                 data                                                  
+-------------------------------------------------------------------------------------------------------
+ BEGIN
+ table public.nobarf_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
  BEGIN
+ table public.nobarf_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
  table public.nobarf: INSERT: id[integer]:1 data[text]:'1'
  COMMIT
-(3 rows)
+(7 rows)
 
 COMMIT;
 INSERT INTO nobarf(data) VALUES('3');
diff --git a/contrib/test_decoding/expected/decoding_into_rel.out b/contrib/test_decoding/expected/decoding_into_rel.out
index 8fd3390066..9114fa409b 100644
--- a/contrib/test_decoding/expected/decoding_into_rel.out
+++ b/contrib/test_decoding/expected/decoding_into_rel.out
@@ -21,41 +21,61 @@ INSERT INTO somechange DEFAULT VALUES;
 CREATE TABLE changeresult AS
     SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
 SELECT * FROM changeresult;
-                      data                      
-------------------------------------------------
+                                                   data                                                    
+-----------------------------------------------------------------------------------------------------------
  BEGIN
+ table public.somechange_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
+ BEGIN
+ table public.somechange_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
  table public.somechange: INSERT: id[integer]:1
  COMMIT
-(3 rows)
+(7 rows)
 
 INSERT INTO changeresult
     SELECT data FROM pg_logical_slot_peek_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
 INSERT INTO changeresult
     SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
 SELECT * FROM changeresult;
-                                                                       data                                                                       
---------------------------------------------------------------------------------------------------------------------------------------------------
+                                                                                                    data                                                                                                     
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  BEGIN
+ table public.somechange_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
+ BEGIN
+ table public.somechange_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
  table public.somechange: INSERT: id[integer]:1
  COMMIT
  BEGIN
  table public.changeresult: INSERT: data[text]:'BEGIN'
+ table public.changeresult: INSERT: data[text]:'table public.somechange_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false'
+ table public.changeresult: INSERT: data[text]:'COMMIT'
+ table public.changeresult: INSERT: data[text]:'BEGIN'
+ table public.changeresult: INSERT: data[text]:'table public.somechange_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true'
  table public.changeresult: INSERT: data[text]:'table public.somechange: INSERT: id[integer]:1'
  table public.changeresult: INSERT: data[text]:'COMMIT'
  COMMIT
  BEGIN
  table public.changeresult: INSERT: data[text]:'BEGIN'
+ table public.changeresult: INSERT: data[text]:'table public.somechange_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false'
+ table public.changeresult: INSERT: data[text]:'COMMIT'
+ table public.changeresult: INSERT: data[text]:'BEGIN'
+ table public.changeresult: INSERT: data[text]:'table public.somechange_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true'
  table public.changeresult: INSERT: data[text]:'table public.somechange: INSERT: id[integer]:1'
  table public.changeresult: INSERT: data[text]:'COMMIT'
  COMMIT
  BEGIN
  table public.changeresult: INSERT: data[text]:'BEGIN'
  table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''BEGIN'''
+ table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.somechange_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false'''
+ table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''COMMIT'''
+ table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''BEGIN'''
+ table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.somechange_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true'''
  table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.somechange: INSERT: id[integer]:1'''
  table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''COMMIT'''
  table public.changeresult: INSERT: data[text]:'COMMIT'
  COMMIT
-(20 rows)
+(36 rows)
 
 DROP TABLE changeresult;
 DROP TABLE somechange;
@@ -66,42 +86,58 @@ BEGIN
     SELECT data FROM pg_logical_slot_peek_changes(slot_name, NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
 END$$ LANGUAGE plpgsql;
 SELECT * FROM slot_changes_wrapper('regression_slot');
-                                                                                          slot_changes_wrapper                                                                                          
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+                                                                                                                       slot_changes_wrapper                                                                                                                        
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  BEGIN
  table public.changeresult: INSERT: data[text]:'BEGIN'
  table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''BEGIN'''
+ table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.somechange_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false'''
+ table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''COMMIT'''
+ table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''BEGIN'''
+ table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.somechange_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true'''
  table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.somechange: INSERT: id[integer]:1'''
  table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''COMMIT'''
  table public.changeresult: INSERT: data[text]:'COMMIT'
  table public.changeresult: INSERT: data[text]:'BEGIN'
  table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''BEGIN'''
  table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.changeresult: INSERT: data[text]:''''BEGIN'''''''
+ table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.changeresult: INSERT: data[text]:''''table public.somechange_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false'''''''
+ table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.changeresult: INSERT: data[text]:''''COMMIT'''''''
+ table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.changeresult: INSERT: data[text]:''''BEGIN'''''''
+ table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.changeresult: INSERT: data[text]:''''table public.somechange_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true'''''''
  table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.changeresult: INSERT: data[text]:''''table public.somechange: INSERT: id[integer]:1'''''''
  table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.changeresult: INSERT: data[text]:''''COMMIT'''''''
  table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''COMMIT'''
  table public.changeresult: INSERT: data[text]:'COMMIT'
  COMMIT
-(14 rows)
+(22 rows)
 
 SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
-                                                                                                  data                                                                                                  
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+                                                                                                                               data                                                                                                                                
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  BEGIN
  table public.changeresult: INSERT: data[text]:'BEGIN'
  table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''BEGIN'''
+ table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.somechange_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false'''
+ table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''COMMIT'''
+ table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''BEGIN'''
+ table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.somechange_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true'''
  table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.somechange: INSERT: id[integer]:1'''
  table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''COMMIT'''
  table public.changeresult: INSERT: data[text]:'COMMIT'
  table public.changeresult: INSERT: data[text]:'BEGIN'
  table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''BEGIN'''
  table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.changeresult: INSERT: data[text]:''''BEGIN'''''''
+ table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.changeresult: INSERT: data[text]:''''table public.somechange_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false'''''''
+ table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.changeresult: INSERT: data[text]:''''COMMIT'''''''
+ table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.changeresult: INSERT: data[text]:''''BEGIN'''''''
+ table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.changeresult: INSERT: data[text]:''''table public.somechange_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true'''''''
  table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.changeresult: INSERT: data[text]:''''table public.somechange: INSERT: id[integer]:1'''''''
  table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''table public.changeresult: INSERT: data[text]:''''COMMIT'''''''
  table public.changeresult: INSERT: data[text]:'table public.changeresult: INSERT: data[text]:''COMMIT'''
  table public.changeresult: INSERT: data[text]:'COMMIT'
  COMMIT
-(14 rows)
+(22 rows)
 
 SELECT 'stop' FROM pg_drop_replication_slot('regression_slot');
  ?column? 
diff --git a/contrib/test_decoding/expected/mxact.out b/contrib/test_decoding/expected/mxact.out
index f0d96cc67d..8851b1e0d8 100644
--- a/contrib/test_decoding/expected/mxact.out
+++ b/contrib/test_decoding/expected/mxact.out
@@ -23,6 +23,7 @@ step s0start: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NUL
 data           
 
 BEGIN          
+table public.do_write_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
 table public.do_write: INSERT: id[integer]:1
 COMMIT         
 step s2commit: COMMIT;
@@ -57,6 +58,7 @@ data
 BEGIN          
 COMMIT         
 BEGIN          
+table public.do_write_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
 table public.do_write: INSERT: id[integer]:1 ts[timestamp with time zone]:null
 COMMIT         
 step s2commit: COMMIT;
diff --git a/contrib/test_decoding/expected/ondisk_startup.out b/contrib/test_decoding/expected/ondisk_startup.out
index c7b1f45b46..442f4a006e 100644
--- a/contrib/test_decoding/expected/ondisk_startup.out
+++ b/contrib/test_decoding/expected/ondisk_startup.out
@@ -31,6 +31,7 @@ step s1start: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NUL
 data           
 
 BEGIN          
+table public.do_write_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
 table public.do_write: INSERT: id[integer]:1 addedbys2[integer]:null
 COMMIT         
 step s1insert: INSERT INTO do_write DEFAULT VALUES;
@@ -40,6 +41,7 @@ step s1start: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NUL
 data           
 
 BEGIN          
+table public.do_write_id_seq: SEQUENCE: last_value[bigint]:2 log_cnt[bigint]:0 is_called[boolean]:true
 table public.do_write: INSERT: id[integer]:2 addedbys2[integer]:null
 COMMIT         
 BEGIN          
diff --git a/contrib/test_decoding/expected/replorigin.out b/contrib/test_decoding/expected/replorigin.out
index 3b249f4856..3e18367a1e 100644
--- a/contrib/test_decoding/expected/replorigin.out
+++ b/contrib/test_decoding/expected/replorigin.out
@@ -49,11 +49,13 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
                                                                                     data                                                                                    
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  BEGIN
+ table public.target_tbl_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
  table public.target_tbl: INSERT: id[integer]:1 data[text]:'BEGIN'
- table public.target_tbl: INSERT: id[integer]:2 data[text]:'table public.origin_tbl: INSERT: id[integer]:1 data[text]:''will be replicated and decoded and decoded again'''
- table public.target_tbl: INSERT: id[integer]:3 data[text]:'COMMIT'
+ table public.target_tbl: INSERT: id[integer]:2 data[text]:'table public.origin_tbl_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true'
+ table public.target_tbl: INSERT: id[integer]:3 data[text]:'table public.origin_tbl: INSERT: id[integer]:1 data[text]:''will be replicated and decoded and decoded again'''
+ table public.target_tbl: INSERT: id[integer]:4 data[text]:'COMMIT'
  COMMIT
-(5 rows)
+(7 rows)
 
 INSERT INTO origin_tbl(data) VALUES ('will be replicated, but not decoded again');
 -- mark session as replaying
diff --git a/contrib/test_decoding/expected/rewrite.out b/contrib/test_decoding/expected/rewrite.out
index b30999c436..af149acc73 100644
--- a/contrib/test_decoding/expected/rewrite.out
+++ b/contrib/test_decoding/expected/rewrite.out
@@ -65,12 +65,16 @@ SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_d
 CREATE TABLE replication_example(id SERIAL PRIMARY KEY, somedata int, text varchar(120));
 INSERT INTO replication_example(somedata) VALUES (1);
 SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
-                                                   data                                                   
-----------------------------------------------------------------------------------------------------------
+                                                        data                                                        
+--------------------------------------------------------------------------------------------------------------------
  BEGIN
+ table public.replication_example_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
+ BEGIN
+ table public.replication_example_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
  table public.replication_example: INSERT: id[integer]:1 somedata[integer]:1 text[character varying]:null
  COMMIT
-(3 rows)
+(7 rows)
 
 BEGIN;
 INSERT INTO replication_example(somedata) VALUES (2);
@@ -145,12 +149,13 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
                                                                                        data                                                                                        
 -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  BEGIN
+ table public.replication_example_id_seq: SEQUENCE: last_value[bigint]:9 log_cnt[bigint]:0 is_called[boolean]:true
  table public.replication_example: INSERT: id[integer]:9 somedata[integer]:8 text[character varying]:null testcolumn1[integer]:6 testcolumn2[integer]:null testcolumn3[integer]:1
  COMMIT
  BEGIN
  table public.replication_example: INSERT: id[integer]:10 somedata[integer]:9 text[character varying]:null testcolumn1[integer]:7 testcolumn2[integer]:null testcolumn3[integer]:1
  COMMIT
-(6 rows)
+(7 rows)
 
 SELECT pg_drop_replication_slot('regression_slot');
  pg_drop_replication_slot 
diff --git a/contrib/test_decoding/expected/sequence.out b/contrib/test_decoding/expected/sequence.out
new file mode 100644
index 0000000000..b97705e877
--- /dev/null
+++ b/contrib/test_decoding/expected/sequence.out
@@ -0,0 +1,138 @@
+-- predictability
+SET synchronous_commit = on;
+SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_decoding');
+ERROR:  replication slot "regression_slot" already exists
+CREATE SEQUENCE test_sequence;
+-- test the sequence changes by several nextval() calls
+SELECT nextval('test_sequence');
+ nextval 
+---------
+       1
+(1 row)
+
+SELECT nextval('test_sequence');
+ nextval 
+---------
+       2
+(1 row)
+
+SELECT nextval('test_sequence');
+ nextval 
+---------
+       3
+(1 row)
+
+SELECT nextval('test_sequence');
+ nextval 
+---------
+       4
+(1 row)
+
+-- test the sequence changes by several ALTER commands
+ALTER SEQUENCE test_sequence INCREMENT BY 10;
+SELECT nextval('test_sequence');
+ nextval 
+---------
+      14
+(1 row)
+
+ALTER SEQUENCE test_sequence START WITH 3000;
+ALTER SEQUENCE test_sequence MAXVALUE 10000;
+ALTER SEQUENCE test_sequence RESTART WITH 4000;
+SELECT nextval('test_sequence');
+ nextval 
+---------
+    4000
+(1 row)
+
+-- test the sequence changes by several setval() calls
+SELECT setval('test_sequence', 3500);
+ setval 
+--------
+   3500
+(1 row)
+
+SELECT nextval('test_sequence');
+ nextval 
+---------
+    3510
+(1 row)
+
+SELECT setval('test_sequence', 3500, true);
+ setval 
+--------
+   3500
+(1 row)
+
+SELECT nextval('test_sequence');
+ nextval 
+---------
+    3510
+(1 row)
+
+SELECT setval('test_sequence', 3500, false);
+ setval 
+--------
+   3500
+(1 row)
+
+SELECT nextval('test_sequence');
+ nextval 
+---------
+    3500
+(1 row)
+
+-- show results
+SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
+                                                   data                                                   
+----------------------------------------------------------------------------------------------------------
+ BEGIN
+ table public.test_sequence: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
+ BEGIN
+ table public.test_sequence: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
+ COMMIT
+ BEGIN
+ table public.test_sequence: SEQUENCE: last_value[bigint]:4 log_cnt[bigint]:0 is_called[boolean]:true
+ COMMIT
+ BEGIN
+ table public.test_sequence: SEQUENCE: last_value[bigint]:14 log_cnt[bigint]:0 is_called[boolean]:true
+ COMMIT
+ BEGIN
+ table public.test_sequence: SEQUENCE: last_value[bigint]:14 log_cnt[bigint]:32 is_called[boolean]:true
+ COMMIT
+ BEGIN
+ table public.test_sequence: SEQUENCE: last_value[bigint]:14 log_cnt[bigint]:0 is_called[boolean]:true
+ COMMIT
+ BEGIN
+ table public.test_sequence: SEQUENCE: last_value[bigint]:4000 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
+ BEGIN
+ table public.test_sequence: SEQUENCE: last_value[bigint]:4000 log_cnt[bigint]:0 is_called[boolean]:true
+ COMMIT
+ BEGIN
+ table public.test_sequence: SEQUENCE: last_value[bigint]:3500 log_cnt[bigint]:0 is_called[boolean]:true
+ COMMIT
+ BEGIN
+ table public.test_sequence: SEQUENCE: last_value[bigint]:3510 log_cnt[bigint]:0 is_called[boolean]:true
+ COMMIT
+ BEGIN
+ table public.test_sequence: SEQUENCE: last_value[bigint]:3500 log_cnt[bigint]:0 is_called[boolean]:true
+ COMMIT
+ BEGIN
+ table public.test_sequence: SEQUENCE: last_value[bigint]:3510 log_cnt[bigint]:0 is_called[boolean]:true
+ COMMIT
+ BEGIN
+ table public.test_sequence: SEQUENCE: last_value[bigint]:3500 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
+ BEGIN
+ table public.test_sequence: SEQUENCE: last_value[bigint]:3500 log_cnt[bigint]:0 is_called[boolean]:true
+ COMMIT
+(42 rows)
+
+SELECT pg_drop_replication_slot('regression_slot');
+ pg_drop_replication_slot 
+--------------------------
+ 
+(1 row)
+
diff --git a/contrib/test_decoding/expected/slot.out b/contrib/test_decoding/expected/slot.out
index 1000171530..d0e8567060 100644
--- a/contrib/test_decoding/expected/slot.out
+++ b/contrib/test_decoding/expected/slot.out
@@ -75,16 +75,20 @@ SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot2', 'test_
 
 INSERT INTO replication_example(somedata, text) VALUES (1, 3);
 SELECT data FROM pg_logical_slot_get_changes('regression_slot1', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
-                                                  data                                                   
----------------------------------------------------------------------------------------------------------
+                                                        data                                                        
+--------------------------------------------------------------------------------------------------------------------
+ BEGIN
+ table public.replication_example_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
  BEGIN
+ table public.replication_example_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
  table public.replication_example: INSERT: id[integer]:1 somedata[integer]:1 text[character varying]:'1'
  table public.replication_example: INSERT: id[integer]:2 somedata[integer]:1 text[character varying]:'2'
  COMMIT
  BEGIN
  table public.replication_example: INSERT: id[integer]:3 somedata[integer]:1 text[character varying]:'3'
  COMMIT
-(7 rows)
+(11 rows)
 
 SELECT data FROM pg_logical_slot_get_changes('regression_slot2', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
                                                   data                                                   
diff --git a/contrib/test_decoding/expected/toast.out b/contrib/test_decoding/expected/toast.out
index 91a9a1e86d..c6b8772c90 100644
--- a/contrib/test_decoding/expected/toast.out
+++ b/contrib/test_decoding/expected/toast.out
@@ -56,6 +56,14 @@ SELECT substr(data, 1, 200) FROM pg_logical_slot_get_changes('regression_slot',
                                                                                                   substr                                                                                                  
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  BEGIN
+ table public.xpto_rand_seq: SEQUENCE: last_value[bigint]:79 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
+ BEGIN
+ table public.xpto_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
+ BEGIN
+ table public.xpto_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.xpto_rand_seq: SEQUENCE: last_value[bigint]:79 log_cnt[bigint]:0 is_called[boolean]:true
  table public.xpto: INSERT: id[integer]:1 toasted_col1[text]:'1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  COMMIT
  BEGIN
@@ -74,6 +82,10 @@ SELECT substr(data, 1, 200) FROM pg_logical_slot_get_changes('regression_slot',
  table public.xpto: DELETE: id[integer]:1
  COMMIT
  BEGIN
+ table public.toasted_key_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
+ BEGIN
+ table public.toasted_key_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
  table public.toasted_key: INSERT: id[integer]:1 toasted_key[text]:'1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
  COMMIT
  BEGIN
@@ -290,7 +302,7 @@ SELECT substr(data, 1, 200) FROM pg_logical_slot_get_changes('regression_slot',
  table public.toasted_copy: INSERT: id[integer]:202 data[text]:'untoasted199'
  table public.toasted_copy: INSERT: id[integer]:203 data[text]:'untoasted200'
  COMMIT
-(235 rows)
+(247 rows)
 
 -- test we can decode "old" tuples bigger than the max heap tuple size correctly
 DROP TABLE IF EXISTS toasted_several;
@@ -316,9 +328,13 @@ SELECT regexp_replace(data, '^(.{100}).*(.{100})$', '\1..\2') FROM pg_logical_sl
                                                                                                regexp_replace                                                                                               
 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  BEGIN
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
+ BEGIN
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
  table public.toasted_several: INSERT: id[integer]:1 toasted_key[text]:'98765432109876543210987654321..098765432109876543210987654321098765432109876543210' toasted_col1[text]:null toasted_col2[text]:null
  COMMIT
-(3 rows)
+(7 rows)
 
 -- test update of a toasted key without changing it
 UPDATE toasted_several SET toasted_col1 = toasted_key;
@@ -327,6 +343,10 @@ SELECT regexp_replace(data, '^(.{100}).*(.{100})$', '\1..\2') FROM pg_logical_sl
                                                                                                regexp_replace                                                                                               
 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  BEGIN
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
+ BEGIN
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:true
  table public.toasted_several: INSERT: id[integer]:1 toasted_key[text]:'98765432109876543210987654321..098765432109876543210987654321098765432109876543210' toasted_col1[text]:null toasted_col2[text]:null
  COMMIT
  BEGIN
@@ -335,7 +355,7 @@ SELECT regexp_replace(data, '^(.{100}).*(.{100})$', '\1..\2') FROM pg_logical_sl
  BEGIN
  table public.toasted_several: UPDATE: old-key: id[integer]:1 toasted_key[text]:'98765432109876543210..876543210987654321098765432109876543210987654321098765432109876543210987654321098765432109876543210'
  COMMIT
-(9 rows)
+(13 rows)
 
 /*
  * update with large tuplebuf, in a transaction large enough to force to spool to disk
@@ -351,10 +371,320 @@ WHERE data NOT LIKE '%INSERT: %';
                                                                                                regexp_replace                                                                                               
 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  BEGIN
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:34 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:67 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:100 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:133 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:166 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:199 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:232 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:265 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:298 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:331 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:364 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:397 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:430 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:463 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:496 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:529 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:562 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:595 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:628 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:661 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:694 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:727 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:760 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:793 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:826 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:859 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:892 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:925 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:958 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:991 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1024 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1057 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1090 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1123 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1156 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1189 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1222 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1255 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1288 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1321 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1354 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1387 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1420 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1453 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1486 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1519 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1552 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1585 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1618 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1651 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1684 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1717 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1750 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1783 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1816 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1849 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1882 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1915 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1948 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:1981 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2014 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2047 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2080 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2113 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2146 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2179 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2212 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2245 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2278 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2311 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2344 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2377 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2410 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2443 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2476 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2509 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2542 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2575 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2608 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2641 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2674 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2707 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2740 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2773 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2806 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2839 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2872 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2905 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2938 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:2971 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3004 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3037 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3070 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3103 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3136 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3169 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3202 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3235 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3268 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3301 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3334 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3367 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3400 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3433 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3466 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3499 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3532 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3565 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3598 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3631 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3664 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3697 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3730 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3763 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3796 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3829 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3862 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3895 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3928 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3961 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:3994 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4027 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4060 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4093 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4126 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4159 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4192 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4225 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4258 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4291 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4324 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4357 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4390 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4423 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4456 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4489 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4522 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4555 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4588 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4621 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4654 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4687 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4720 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4753 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4786 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4819 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4852 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4885 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4918 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4951 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:4984 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5017 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5050 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5083 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5116 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5149 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5182 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5215 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5248 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5281 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5314 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5347 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5380 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5413 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5446 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5479 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5512 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5545 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5578 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5611 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5644 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5677 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5710 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5743 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5776 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5809 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5842 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5875 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5908 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5941 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:5974 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6007 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6040 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6073 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6106 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6139 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6172 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6205 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6238 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6271 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6304 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6337 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6370 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6403 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6436 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6469 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6502 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6535 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6568 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6601 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6634 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6667 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6700 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6733 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6766 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6799 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6832 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6865 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6898 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6931 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6964 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:6997 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7030 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7063 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7096 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7129 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7162 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7195 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7228 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7261 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7294 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7327 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7360 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7393 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7426 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7459 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7492 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7525 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7558 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7591 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7624 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7657 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7690 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7723 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7756 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7789 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7822 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7855 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7888 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7921 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7954 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:7987 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8020 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8053 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8086 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8119 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8152 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8185 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8218 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8251 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8284 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8317 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8350 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8383 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8416 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8449 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8482 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8515 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8548 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8581 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8614 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8647 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8680 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8713 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8746 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8779 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8812 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8845 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8878 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8911 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8944 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:8977 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9010 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9043 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9076 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9109 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9142 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9175 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9208 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9241 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9274 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9307 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9340 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9373 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9406 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9439 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9472 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9505 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9538 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9571 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9604 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9637 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9670 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9703 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9736 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9769 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9802 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9835 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9868 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9901 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9934 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:9967 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:10000 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:10033 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:10066 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:10099 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:10132 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:10165 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:10198 log_cnt[bigint]:0 is_called[boolean]:true
+ table public.toasted_several_id_seq: SEQUENCE: last_value[bigint]:10231 log_cnt[bigint]:0 is_called[boolean]:true
  table public.toasted_several: UPDATE: old-key: id[integer]:1 toasted_key[text]:'98765432109876543210..7654321098765432109876543210987654321098765432109876543210' toasted_col2[text]:unchanged-toast-datum
  table public.toasted_several: DELETE: id[integer]:1 toasted_key[text]:'98765432109876543210987654321..876543210987654321098765432109876543210987654321098765432109876543210987654321098765432109876543210'
  COMMIT
-(4 rows)
+(314 rows)
 
 SELECT pg_drop_replication_slot('regression_slot');
  pg_drop_replication_slot 
diff --git a/contrib/test_decoding/expected/truncate.out b/contrib/test_decoding/expected/truncate.out
index 1cf2ae835c..8d90e036ac 100644
--- a/contrib/test_decoding/expected/truncate.out
+++ b/contrib/test_decoding/expected/truncate.out
@@ -12,16 +12,20 @@ TRUNCATE tab1;
 TRUNCATE tab1, tab1 RESTART IDENTITY CASCADE;
 TRUNCATE tab1, tab2;
 SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
-                         data                         
-------------------------------------------------------
+                                                data                                                 
+-----------------------------------------------------------------------------------------------------
+ BEGIN
+ table public.tab1_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false
+ COMMIT
  BEGIN
  table public.tab1: TRUNCATE: (no-flags)
  COMMIT
  BEGIN
+ table public.tab1_id_seq: SEQUENCE: last_value[bigint]:1 log_cnt[bigint]:0 is_called[boolean]:false
  table public.tab1: TRUNCATE: restart_seqs cascade
  COMMIT
  BEGIN
  table public.tab1, public.tab2: TRUNCATE: (no-flags)
  COMMIT
-(9 rows)
+(13 rows)
 
diff --git a/contrib/test_decoding/sql/sequence.sql b/contrib/test_decoding/sql/sequence.sql
new file mode 100644
index 0000000000..eed54513db
--- /dev/null
+++ b/contrib/test_decoding/sql/sequence.sql
@@ -0,0 +1,33 @@
+-- predictability
+SET synchronous_commit = on;
+SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_decoding');
+
+CREATE SEQUENCE test_sequence;
+
+-- test the sequence changes by several nextval() calls
+SELECT nextval('test_sequence');
+SELECT nextval('test_sequence');
+SELECT nextval('test_sequence');
+SELECT nextval('test_sequence');
+
+-- test the sequence changes by several ALTER commands
+ALTER SEQUENCE test_sequence INCREMENT BY 10;
+SELECT nextval('test_sequence');
+
+ALTER SEQUENCE test_sequence START WITH 3000;
+ALTER SEQUENCE test_sequence MAXVALUE 10000;
+ALTER SEQUENCE test_sequence RESTART WITH 4000;
+SELECT nextval('test_sequence');
+
+-- test the sequence changes by several setval() calls
+SELECT setval('test_sequence', 3500);
+SELECT nextval('test_sequence');
+SELECT setval('test_sequence', 3500, true);
+SELECT nextval('test_sequence');
+SELECT setval('test_sequence', 3500, false);
+SELECT nextval('test_sequence');
+
+-- show results
+SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
+
+SELECT pg_drop_replication_slot('regression_slot');
diff --git a/contrib/test_decoding/test_decoding.c b/contrib/test_decoding/test_decoding.c
index 93c948856e..7a7e572d6c 100644
--- a/contrib/test_decoding/test_decoding.c
+++ b/contrib/test_decoding/test_decoding.c
@@ -466,6 +466,15 @@ pg_decode_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
 									&change->data.tp.oldtuple->tuple,
 									true);
 			break;
+		case REORDER_BUFFER_CHANGE_SEQUENCE:
+					appendStringInfoString(ctx->out, " SEQUENCE:");
+					if (change->data.sequence.newtuple == NULL)
+						appendStringInfoString(ctx->out, " (no-tuple-data)");
+					else
+						tuple_to_stringinfo(ctx->out, tupdesc,
+											&change->data.sequence.newtuple->tuple,
+											false);
+					break;
 		default:
 			Assert(false);
 	}
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c
index 6aab73bfd4..6e3ccdc702 100644
--- a/src/backend/commands/sequence.c
+++ b/src/backend/commands/sequence.c
@@ -789,16 +789,15 @@ nextval_internal(Oid relid, bool check_permissions)
 		XLogRecPtr	recptr;
 
 		/*
-		 * We don't log the current state of the tuple, but rather the state
-		 * as it would appear after "log" more fetches.  This lets us skip
-		 * that many future WAL records, at the cost that we lose those
-		 * sequence values if we crash.
+		 * For the current sequence value to be correctly replicated by
+		 * subscriber or decoding plugin, we log the current state of the
+		 * tuple
 		 */
 		XLogBeginInsert();
 		XLogRegisterBuffer(0, buf, REGBUF_WILL_INIT);
 
 		/* set values that will be saved in xlog */
-		seq->last_value = next;
+		seq->last_value = last;
 		seq->is_called = true;
 		seq->log_cnt = 0;
 
diff --git a/src/backend/replication/logical/decode.c b/src/backend/replication/logical/decode.c
index c2e5e3abf8..3dc14ead08 100644
--- a/src/backend/replication/logical/decode.c
+++ b/src/backend/replication/logical/decode.c
@@ -42,6 +42,7 @@
 #include "replication/reorderbuffer.h"
 #include "replication/snapbuild.h"
 #include "storage/standby.h"
+#include "commands/sequence.h"
 
 typedef struct XLogRecordBuffer
 {
@@ -70,9 +71,11 @@ static void DecodeCommit(LogicalDecodingContext *ctx, XLogRecordBuffer *buf,
 						 xl_xact_parsed_commit *parsed, TransactionId xid);
 static void DecodeAbort(LogicalDecodingContext *ctx, XLogRecordBuffer *buf,
 						xl_xact_parsed_abort *parsed, TransactionId xid);
+static void DecodeSequence(LogicalDecodingContext *ctx, XLogRecordBuffer *buf);
 
 /* common function to decode tuples */
 static void DecodeXLogTuple(char *data, Size len, ReorderBufferTupleBuf *tup);
+static void DecodeSeqTuple(char *data, Size len, ReorderBufferTupleBuf *tuple);
 
 /*
  * Take every XLogReadRecord()ed record and perform the actions required to
@@ -130,6 +133,10 @@ LogicalDecodingProcessRecord(LogicalDecodingContext *ctx, XLogReaderState *recor
 			DecodeLogicalMsgOp(ctx, &buf);
 			break;
 
+		case RM_SEQ_ID:
+			DecodeSequence(ctx, &buf);
+			break;
+
 			/*
 			 * Rmgrs irrelevant for logical decoding; they describe stuff not
 			 * represented in logical decoding. Add new rmgrs in rmgrlist.h's
@@ -145,7 +152,6 @@ LogicalDecodingProcessRecord(LogicalDecodingContext *ctx, XLogReaderState *recor
 		case RM_HASH_ID:
 		case RM_GIN_ID:
 		case RM_GIST_ID:
-		case RM_SEQ_ID:
 		case RM_SPGIST_ID:
 		case RM_BRIN_ID:
 		case RM_COMMIT_TS_ID:
@@ -1052,3 +1058,80 @@ DecodeXLogTuple(char *data, Size len, ReorderBufferTupleBuf *tuple)
 	header->t_infomask2 = xlhdr.t_infomask2;
 	header->t_hoff = xlhdr.t_hoff;
 }
+
+/*
+ * Decode Sequence Tuple
+ */
+static void
+DecodeSeqTuple(char *data, Size len, ReorderBufferTupleBuf *tuple)
+{
+	int			datalen = len - sizeof(xl_seq_rec) - SizeofHeapTupleHeader;
+
+	Assert(datalen >= 0);
+
+	tuple->tuple.t_len = datalen + SizeofHeapTupleHeader;;
+
+	ItemPointerSetInvalid(&tuple->tuple.t_self);
+
+	tuple->tuple.t_tableOid = InvalidOid;
+
+	memcpy(((char *) tuple->tuple.t_data),
+		   data + sizeof(xl_seq_rec),
+		   SizeofHeapTupleHeader);
+
+	memcpy(((char *) tuple->tuple.t_data) + SizeofHeapTupleHeader,
+		   data + sizeof(xl_seq_rec) + SizeofHeapTupleHeader,
+		   datalen);
+}
+
+/*
+ * Handle sequence decode
+ */
+static void
+DecodeSequence(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
+{
+	ReorderBufferChange *change;
+	RelFileNode target_node;
+	XLogReaderState *r = buf->record;
+	char	   *tupledata = NULL;
+	Size		tuplelen;
+	Size		datalen = 0;
+	uint8		info = XLogRecGetInfo(buf->record) & ~XLR_INFO_MASK;
+
+	/* only decode changes flagged with XLOG_SEQ_LOG  */
+	if (info != XLOG_SEQ_LOG)
+		return;
+
+	/* only interested in our database */
+	XLogRecGetBlockTag(r, 0, &target_node, NULL, NULL);
+	if (target_node.dbNode != ctx->slot->data.database)
+		return;
+
+	/* output plugin doesn't look for this origin, no need to queue */
+	if (FilterByOrigin(ctx, XLogRecGetOrigin(r)))
+		return;
+
+	change = ReorderBufferGetChange(ctx->reorder);
+	change->action = REORDER_BUFFER_CHANGE_SEQUENCE;
+	change->origin_id = XLogRecGetOrigin(r);
+
+	memcpy(&change->data.sequence.relnode, &target_node, sizeof(RelFileNode));
+
+	tupledata = XLogRecGetData(r);
+	datalen = XLogRecGetDataLen(r);
+
+	if(!datalen || !tupledata)
+		return;
+
+	tuplelen = datalen - SizeOfHeapHeader - sizeof(xl_seq_rec);
+
+	change->data.sequence.newtuple =
+		ReorderBufferGetTupleBuf(ctx->reorder, tuplelen);
+
+	DecodeSeqTuple(tupledata, datalen, change->data.sequence.newtuple);
+
+	ReorderBufferXidSetCatalogChanges(ctx->reorder, XLogRecGetXid(buf->record), buf->origptr);
+
+	ReorderBufferQueueChange(ctx->reorder, XLogRecGetXid(r), buf->origptr, change);
+
+}
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index 481277a1fd..fb292ec66a 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -474,6 +474,13 @@ ReorderBufferReturnChange(ReorderBuffer *rb, ReorderBufferChange *change)
 		case REORDER_BUFFER_CHANGE_INTERNAL_COMMAND_ID:
 		case REORDER_BUFFER_CHANGE_INTERNAL_TUPLECID:
 			break;
+		case REORDER_BUFFER_CHANGE_SEQUENCE:
+			if (change->data.sequence.newtuple)
+			{
+				ReorderBufferReturnTupleBuf(rb, change->data.sequence.newtuple);
+				change->data.sequence.newtuple = NULL;
+			}
+			break;
 	}
 
 	pfree(change);
@@ -1833,6 +1840,30 @@ ReorderBufferCommit(ReorderBuffer *rb, TransactionId xid,
 				case REORDER_BUFFER_CHANGE_INTERNAL_TUPLECID:
 					elog(ERROR, "tuplecid value in changequeue");
 					break;
+				case REORDER_BUFFER_CHANGE_SEQUENCE:
+					Assert(snapshot_now);
+
+					reloid = RelidByRelfilenode(change->data.sequence.relnode.spcNode,
+												change->data.sequence.relnode.relNode);
+
+					if (reloid == InvalidOid)
+						elog(ERROR, "could not map filenode \"%s\" to relation OID",
+							 relpathperm(change->data.tp.relnode,
+										 MAIN_FORKNUM));
+
+					relation = RelationIdGetRelation(reloid);
+
+					if (!RelationIsValid(relation))
+						elog(ERROR, "could not open relation with OID %u (for filenode \"%s\")",
+							 reloid,
+							 relpathperm(change->data.sequence.relnode,
+										 MAIN_FORKNUM));
+
+					if (!RelationIsLogicallyLogged(relation))
+						goto change_done;
+
+					rb->apply_change(rb, txn, relation, change);
+					break;
 			}
 		}
 
@@ -2516,15 +2547,23 @@ ReorderBufferSerializeChange(ReorderBuffer *rb, ReorderBufferTXN *txn,
 		case REORDER_BUFFER_CHANGE_UPDATE:
 		case REORDER_BUFFER_CHANGE_DELETE:
 		case REORDER_BUFFER_CHANGE_INTERNAL_SPEC_INSERT:
+		case REORDER_BUFFER_CHANGE_SEQUENCE:
 			{
 				char	   *data;
 				ReorderBufferTupleBuf *oldtup,
 						   *newtup;
 				Size		oldlen = 0;
 				Size		newlen = 0;
-
-				oldtup = change->data.tp.oldtuple;
-				newtup = change->data.tp.newtuple;
+				if (change->action == REORDER_BUFFER_CHANGE_SEQUENCE)
+				{
+					oldtup = NULL;
+					newtup = change->data.sequence.newtuple;
+				}
+				else
+				{
+					oldtup = change->data.tp.oldtuple;
+					newtup = change->data.tp.newtuple;
+				}
 
 				if (oldtup)
 				{
@@ -2707,14 +2746,23 @@ ReorderBufferChangeSize(ReorderBufferChange *change)
 		case REORDER_BUFFER_CHANGE_UPDATE:
 		case REORDER_BUFFER_CHANGE_DELETE:
 		case REORDER_BUFFER_CHANGE_INTERNAL_SPEC_INSERT:
+		case REORDER_BUFFER_CHANGE_SEQUENCE:
 			{
 				ReorderBufferTupleBuf *oldtup,
 						   *newtup;
 				Size		oldlen = 0;
 				Size		newlen = 0;
 
-				oldtup = change->data.tp.oldtuple;
-				newtup = change->data.tp.newtuple;
+				if (change->action == REORDER_BUFFER_CHANGE_SEQUENCE)
+				{
+					oldtup = NULL;
+					newtup = change->data.sequence.newtuple;
+				}
+				else
+				{
+					oldtup = change->data.tp.oldtuple;
+					newtup = change->data.tp.newtuple;
+				}
 
 				if (oldtup)
 				{
@@ -3048,6 +3096,31 @@ ReorderBufferRestoreChange(ReorderBuffer *rb, ReorderBufferTXN *txn,
 		case REORDER_BUFFER_CHANGE_INTERNAL_COMMAND_ID:
 		case REORDER_BUFFER_CHANGE_INTERNAL_TUPLECID:
 			break;
+		case REORDER_BUFFER_CHANGE_SEQUENCE:
+			if (change->data.sequence.newtuple)
+			{
+				uint32		tuplelen;
+
+				memcpy(&tuplelen, data + offsetof(HeapTupleData, t_len),
+					   sizeof(uint32));
+
+				change->data.sequence.newtuple =
+					ReorderBufferGetTupleBuf(rb, tuplelen - SizeofHeapTupleHeader);
+
+				/* restore ->tuple */
+				memcpy(&change->data.sequence.newtuple->tuple, data,
+					   sizeof(HeapTupleData));
+				data += sizeof(HeapTupleData);
+
+				/* reset t_data pointer into the new tuplebuf */
+				change->data.sequence.newtuple->tuple.t_data =
+					ReorderBufferTupleBufData(change->data.sequence.newtuple);
+
+				/* restore tuple data itself */
+				memcpy(change->data.sequence.newtuple->tuple.t_data, data, tuplelen);
+				data += tuplelen;
+			}
+			break;
 	}
 
 	dlist_push_tail(&txn->changes, &change->node);
diff --git a/src/include/replication/reorderbuffer.h b/src/include/replication/reorderbuffer.h
index 626ecf4dc9..17c3fb427d 100644
--- a/src/include/replication/reorderbuffer.h
+++ b/src/include/replication/reorderbuffer.h
@@ -62,7 +62,8 @@ enum ReorderBufferChangeType
 	REORDER_BUFFER_CHANGE_INTERNAL_TUPLECID,
 	REORDER_BUFFER_CHANGE_INTERNAL_SPEC_INSERT,
 	REORDER_BUFFER_CHANGE_INTERNAL_SPEC_CONFIRM,
-	REORDER_BUFFER_CHANGE_TRUNCATE
+	REORDER_BUFFER_CHANGE_TRUNCATE,
+	REORDER_BUFFER_CHANGE_SEQUENCE,
 };
 
 /* forward declaration */
@@ -149,6 +150,14 @@ typedef struct ReorderBufferChange
 			CommandId	cmax;
 			CommandId	combocid;
 		}			tuplecid;
+		/*
+		 * Context data for Sequence changes
+		 */
+		struct
+		{
+			RelFileNode relnode;
+			ReorderBufferTupleBuf *newtuple;
+		}			sequence;
 	}			data;
 
 	/*
