postgres=# begin; BEGIN postgres=*# insert into t2(info) values('world'); INSERT01 postgres=*# commit ; ^CCancel request sent WARNING: canceling wait for synchronous replication due touser request DETAIL: The transaction has already committed locally, but might not have been replicated to the standby. COMMIT
postgres=# begin; BEGIN postgres=*# select nextval('t2_id_seq'); nextval --------- 4 (1row)
/* * We don't want to log each fetching of a value from a sequence, * so we pre-log a few fetches in advance. In the event of * crash we can lose (skip over) as many values as we pre-logged. */ #define SEQ_LOG_VALS 32
...
/* * 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. */ XLogBeginInsert(); XLogRegisterBuffer(0, buf, REGBUF_WILL_INIT);
/* set values that will be saved in xlog */ seq->last_value = next; seq->is_called =true; seq->log_cnt =0;
^CCancel request sent WARNING: canceling wait for synchronous replication due touser request DETAIL: The transaction has already committed locally, but might not have been replicated to the standby.
postgres=# \q [postgres@mypg~]$ pg_ctl -D 17data restart -mi waiting for server to shut down.... done server stopped waiting for server to start....2024-09-1021:21:12.521 CST [23943] LOG: redirecting log output to logging collector process 2024-09-1021:21:12.521 CST [23943] HINT: Future log output will appear in directory "log". done server started [postgres@mypg~]$ psql psql (17devel) Type "help" for help.
postgres=# checkpoint ; CHECKPOINT postgres=# select nextval('t2_id_seq'); ^CCancel request sent WARNING: canceling wait for synchronous replication due touser request DETAIL: The transaction has already committed locally, but might not have been replicated to the standby. postgres=# checkpoint ; CHECKPOINT postgres=# select nextval('t2_id_seq'); ^CCancel request sent WARNING: canceling wait for synchronous replication due touser request DETAIL: The transaction has already committed locally, but might not have been replicated to the standby.