Re: Bug in ProcArrayApplyRecoveryInfo for snapshots crossing 4B, breaking replicas

2022-01-27 Thread Tomas Vondra
On 1/26/22 23:54, Michael Paquier wrote: On Wed, Jan 26, 2022 at 07:31:00PM +0100, Tomas Vondra wrote: I actually tried doing that, but I was not very happy with the result. The test has to call pg_resetwal, but then it also has to fake pg_xact data and so on, which seemed a bit ugly so did not

Re: Bug in ProcArrayApplyRecoveryInfo for snapshots crossing 4B, breaking replicas

2022-01-26 Thread Michael Paquier
On Wed, Jan 26, 2022 at 07:31:00PM +0100, Tomas Vondra wrote: > I actually tried doing that, but I was not very happy with the result. The > test has to call pg_resetwal, but then it also has to fake pg_xact data and > so on, which seemed a bit ugly so did not include the test in the patch. Indeed

Re: Bug in ProcArrayApplyRecoveryInfo for snapshots crossing 4B, breaking replicas

2022-01-26 Thread Tomas Vondra
On 1/25/22 04:25, Michael Paquier wrote: On Mon, Jan 24, 2022 at 10:45:48PM +0100, Tomas Vondra wrote: On 1/24/22 22:28, Bossart, Nathan wrote: Attached patch is fixing this by just sorting the XIDs logically. The xidComparator is meant for places that can't do logical ordering. But these XID

Re: Bug in ProcArrayApplyRecoveryInfo for snapshots crossing 4B, breaking replicas

2022-01-24 Thread Michael Paquier
On Mon, Jan 24, 2022 at 10:45:48PM +0100, Tomas Vondra wrote: > On 1/24/22 22:28, Bossart, Nathan wrote: >>> Attached patch is fixing this by just sorting the XIDs logically. The >>> xidComparator is meant for places that can't do logical ordering. But >>> these XIDs come from RUNNING_XACTS, so the

Re: Bug in ProcArrayApplyRecoveryInfo for snapshots crossing 4B, breaking replicas

2022-01-24 Thread Tomas Vondra
On 1/24/22 22:28, Bossart, Nathan wrote: On 1/22/22, 4:43 PM, "Tomas Vondra" wrote: There's a bug in ProcArrayApplyRecoveryInfo, introduced by 8431e296ea, which may cause failures when starting a replica, making it unusable. The commit message for 8431e296ea is not very clear about what exactly

Re: Bug in ProcArrayApplyRecoveryInfo for snapshots crossing 4B, breaking replicas

2022-01-24 Thread Bossart, Nathan
On 1/22/22, 4:43 PM, "Tomas Vondra" wrote: > There's a bug in ProcArrayApplyRecoveryInfo, introduced by 8431e296ea, > which may cause failures when starting a replica, making it unusable. > The commit message for 8431e296ea is not very clear about what exactly > is being done and why, but the root

Bug in ProcArrayApplyRecoveryInfo for snapshots crossing 4B, breaking replicas

2022-01-22 Thread Tomas Vondra
Hi, There's a bug in ProcArrayApplyRecoveryInfo, introduced by 8431e296ea, which may cause failures when starting a replica, making it unusable. The commit message for 8431e296ea is not very clear about what exactly is being done and why, but the root cause is that at while processing RUNNING