Re: ERROR: subtransaction logged without previous top-level txn record
От
Arseny Sher
Тема
Re: ERROR: subtransaction logged without previous top-level txn record
Дата
Msg-id
87mu8y7u9r.fsf@ars-thinkpad
Ответ на
Список
Дерево обсуждения
ERROR: subtransaction logged without previous top-level txn record "Hsu, John" <hsuchen@amazon.com>
Re: ERROR: subtransaction logged without previous top-level txn record Arseny Sher <a.sher@postgrespro.ru>
Re: ERROR: subtransaction logged without previous top-level txnrecord Andres Freund <andres@anarazel.de>
Re: ERROR: subtransaction logged without previous top-level txn record Arseny Sher <a.sher@postgrespro.ru>
Re: ERROR: subtransaction logged without previous top-level txn record Arseny Sher <a.sher@postgrespro.ru>
Re: ERROR: subtransaction logged without previous top-level txn record Dan Katz <dkatz@joor.com>
Re: ERROR: subtransaction logged without previous top-level txn record Arseny Sher <a.sher@postgrespro.ru>
Re: ERROR: subtransaction logged without previous top-level txn record Dan Katz <dkatz@joor.com>
Re: ERROR: subtransaction logged without previous top-level txn record Arseny Sher <a.sher@postgrespro.ru>
Re: ERROR: subtransaction logged without previous top-level txn record Amit Kapila <amit.kapila16@gmail.com>
Re: ERROR: subtransaction logged without previous top-level txn record Arseny Sher <a.sher@postgrespro.ru>
Re: ERROR: subtransaction logged without previous top-level txn record Amit Kapila <amit.kapila16@gmail.com>
Re: ERROR: subtransaction logged without previous top-level txn record Arseny Sher <a.sher@postgrespro.ru>
Re: ERROR: subtransaction logged without previous top-level txn record Amit Kapila <amit.kapila16@gmail.com>
Re: ERROR: subtransaction logged without previous top-level txn record Arseny Sher <a.sher@postgrespro.ru>
Re: ERROR: subtransaction logged without previous top-level txn record Amit Kapila <amit.kapila16@gmail.com>
Re: ERROR: subtransaction logged without previous top-level txn record Amit Kapila <amit.kapila16@gmail.com>
Re: ERROR: subtransaction logged without previous top-level txn record Arseny Sher <a.sher@postgrespro.ru>
Re: ERROR: subtransaction logged without previous top-level txn record Amit Kapila <amit.kapila16@gmail.com>
Re: ERROR: subtransaction logged without previous top-level txn record Arseny Sher <a.sher@postgrespro.ru>
Re: ERROR: subtransaction logged without previous top-level txn record Amit Kapila <amit.kapila16@gmail.com>
Re: ERROR: subtransaction logged without previous top-level txn record Arseny Sher <a.sher@postgrespro.ru>
Re: ERROR: subtransaction logged without previous top-level txn record Arseny Sher <a.sher@postgrespro.ru>
Re: ERROR: subtransaction logged without previous top-level txn record Amit Kapila <amit.kapila16@gmail.com>
Re: ERROR: subtransaction logged without previous top-level txn record Arseny Sher <a.sher@postgrespro.ru>
Re: ERROR: subtransaction logged without previous top-level txn record Dilip Kumar <dilipbalaut@gmail.com>
Re: ERROR: subtransaction logged without previous top-level txn record Amit Kapila <amit.kapila16@gmail.com>
Re: ERROR: subtransaction logged without previous top-level txn record Amit Kapila <amit.kapila16@gmail.com>
Re: ERROR: subtransaction logged without previous top-level txn record Arseny Sher <a.sher@postgrespro.ru>
Re: ERROR: subtransaction logged without previous top-level txn record Amit Kapila <amit.kapila16@gmail.com>
Re: ERROR: subtransaction logged without previous top-level txn record Dilip Kumar <dilipbalaut@gmail.com>
Re: ERROR: subtransaction logged without previous top-level txn record Amit Kapila <amit.kapila16@gmail.com>
Re: ERROR: subtransaction logged without previous top-level txn record Dilip Kumar <dilipbalaut@gmail.com>
Re: ERROR: subtransaction logged without previous top-level txn record Amit Kapila <amit.kapila16@gmail.com>
Re: ERROR: subtransaction logged without previous top-level txn record Arseny Sher <a.sher@postgrespro.ru>
Re: ERROR: subtransaction logged without previous top-level txn record Amit Kapila <amit.kapila16@gmail.com>
Re: ERROR: subtransaction logged without previous top-level txn record Arseny Sher <a.sher@postgrespro.ru>
Re: ERROR: subtransaction logged without previous top-level txn record Amit Kapila <amit.kapila16@gmail.com>
Re: ERROR: subtransaction logged without previous top-level txn record Arseny Sher <a.sher@postgrespro.ru>
Amit Kapila writes: > I think here you are trying to deduce the meaning. I don't see that > it can clearly define that don't use serialized snapshots. It is not > clear to me why have you changed the below code, basically why it is > okay to pass InvalidXLogRecPtr instead of restart_lsn? > > @@ -327,7 +327,7 @@ CreateInitDecodingContext(char *plugin, > ReplicationSlotMarkDirty(); > ReplicationSlotSave(); > > - ctx = StartupDecodingContext(NIL, restart_lsn, xmin_horizon, > + ctx = StartupDecodingContext(NIL, InvalidXLogRecPtr, xmin_horizon, > need_full_snapshot, false, > read_page, prepare_write, do_write, > update_progress); Because when we create the slot we don't demand to stream from some specific point. In fact we just can't, because we don't know since which LSN it is actually possible to stream, i.e. when we'd have good snapshot and no old (which we haven't seen in full) xacts running. It is up to snapbuild.c to define this point. The previous coding was meaningless: we asked for some random restart_lsn and snapbuild.c would silently advance it to earliest suitable LSN. OTOH, when we are decoding from existing slot not only we know earliest possible point, but to avoid missing xacts we must enforce streaming since this very point despite the snapbuilder being unable (because he might not know which xacts are running at point of the snapshot) to check its safety. start_decoding_at reflects the difference between these scenarios, and serialized snapshots handling stems from here. Thanks for looking into this. -- cheers, arseny
В списке pgsql-bugs по дате отправления
От: Daniel Gustafsson
Дата: