Re: snapbuild woes
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>, Erik Rijkers <er@xs4all.nl>, Robert Haas <robertmhaas@gmail.com>, Craig Ringer <craig@2ndquadrant.com>
Date: 2017-05-05T00:00:04Z
Lists: pgsql-hackers
Hi, On 2017-05-02 08:55:53 +0200, Petr Jelinek wrote: > Aah, now I understand we talked about slightly different things, I > considered the running thing to be first step towards tracking aborted > txes everywhere. > I think > we'll have to revisit tracking of aborted transactions in PG11 then > though because of the 'snapshot too large' issue when exporting, at > least I don't see any other way to fix that. FWIW, that seems unnecessary - we can just check for that using the clog. Should be very simple to check for aborted xacts when exporting the snapshot (like 2 lines + comments). That should address your concern, right? > If you think that adding the SNAPBUILD_BUILD_INITIAL_SNAPSHOT would be > less invasive/smaller patch I am okay with doing that for PG10. Attached is a prototype patch for that. What I decided is that essentially tracking the running xacts is too unrealiable due to the race, so I decided that just relying on oldestRunningXid and nextXid - which are solely in the procArray and thus racefree - is better. It's not perfect yet, primarily because we'd need to take a bit more care about being ABI compatible for older releases, and because we'd probably have to trigger LogStandbySnapshot() a bit more frequently (presumably while waiting for WAL). The change means we'll have to wait a bit longer for slot creation, but it's considerably simpler / more robust. Could you have a look? Regards, Andres
Commits
-
Fix thinko introduced in 2bef06d516460 et al.
- d68742562ca4 9.4.13 landed
- 869a5869e5ba 9.5.8 landed
- 32d7480e02ee 9.6.4 landed
- 5af4456a5647 10.0 landed
-
Avoid superfluous work for commits during logical slot creation.
- fa9207c7415c 9.5.8 landed
- bd619fcfe046 9.6.4 landed
- 524dbc14335c 10.0 landed
- 2dca50b764d4 9.4.13 landed
-
Fix race condition leading to hanging logical slot creation.
- b64a68e3680a 9.5.8 landed
- 955a684e0401 10.0 landed
- 79abd23db1e9 9.4.13 landed
- 75784859cda2 9.6.4 landed
-
Don't use on-disk snapshots for exported logical decoding snapshot.
- b6ecf26ccc2b 9.4.12 landed
- 54270d7ebcdc 9.5.7 landed
- 29e8c881dd07 9.6.3 landed
- 56e19d938dd1 10.0 landed
-
Preserve required !catalog tuples while computing initial decoding snapshot.
- 5da64613875d 9.4.12 landed
- 47f896b5c2ec 9.5.7 landed
- 2bef06d51646 10.0 landed
- 28afff347a5d 9.6.3 landed