pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Reduce cost of test_decoding's new oldest_xmin test 5+ messages / 1 participants [nested] [flat]
* pgsql: Reduce cost of test_decoding's new oldest_xmin test @ 2018-07-05 20:46 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 5+ messages in thread From: Alvaro Herrera @ 2018-07-05 20:46 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reduce cost of test_decoding's new oldest_xmin test Change a whole-database VACUUM into doing just pg_attribute, which is the portion that verifies what we want it to do. The original formulation wastes a lot of CPU time, which leads the test to fail when runtime exceeds isolationtester timeout when it's super-slow, such as under CLOBBER_CACHE_ALWAYS. Per buildfarm member friarbird. It turns out that the previous shape of the test doesn't always detect the condition it is supposed to detect (on unpatched reorderbuffer code): the reason is that there is a good chance of encountering a xl_running_xacts record (logged every 15 seconds) before the checkpoint -- and because we advance the xmin when we receive that WAL record, and we *don't* advance the xmin twice consecutively without receiving a client message in between, that means the xmin is not advanced enough for the tuple to be pruned from pg_attribute by VACUUM. So the test would spuriously pass. The reason this test deficiency wasn't detected earlier is that HOT pruning removes the tuple anyway, even if vacuum leaves it in place, so the test correctly fails (detecting the coding mistake), but for the wrong reason. To fix this mess, run the s0_get_changes step twice before vacuum instead of once: this seems to cause the xmin to be advanced reliably, wreaking havoc with more certainty. Author: Arseny Sher Discussion: https://postgr.es/m/87h8lkuxoa.fsf@ars-thinkpad Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/8d1c1ca70b012594932578a0994a5d45f29d9572 Modified Files -------------- contrib/test_decoding/expected/oldest_xmin.out | 7 +++++-- contrib/test_decoding/specs/oldest_xmin.spec | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Reduce cost of test_decoding's new oldest_xmin test @ 2018-07-05 20:46 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 5+ messages in thread From: Alvaro Herrera @ 2018-07-05 20:46 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reduce cost of test_decoding's new oldest_xmin test Change a whole-database VACUUM into doing just pg_attribute, which is the portion that verifies what we want it to do. The original formulation wastes a lot of CPU time, which leads the test to fail when runtime exceeds isolationtester timeout when it's super-slow, such as under CLOBBER_CACHE_ALWAYS. Per buildfarm member friarbird. It turns out that the previous shape of the test doesn't always detect the condition it is supposed to detect (on unpatched reorderbuffer code): the reason is that there is a good chance of encountering a xl_running_xacts record (logged every 15 seconds) before the checkpoint -- and because we advance the xmin when we receive that WAL record, and we *don't* advance the xmin twice consecutively without receiving a client message in between, that means the xmin is not advanced enough for the tuple to be pruned from pg_attribute by VACUUM. So the test would spuriously pass. The reason this test deficiency wasn't detected earlier is that HOT pruning removes the tuple anyway, even if vacuum leaves it in place, so the test correctly fails (detecting the coding mistake), but for the wrong reason. To fix this mess, run the s0_get_changes step twice before vacuum instead of once: this seems to cause the xmin to be advanced reliably, wreaking havoc with more certainty. Author: Arseny Sher Discussion: https://postgr.es/m/87h8lkuxoa.fsf@ars-thinkpad Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/aba2184bed64ef3b6f01465df940eb560d5f772d Modified Files -------------- contrib/test_decoding/expected/oldest_xmin.out | 7 +++++-- contrib/test_decoding/specs/oldest_xmin.spec | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Reduce cost of test_decoding's new oldest_xmin test @ 2018-07-05 20:57 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 5+ messages in thread From: Alvaro Herrera @ 2018-07-05 20:57 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reduce cost of test_decoding's new oldest_xmin test Change a whole-database VACUUM into doing just pg_attribute, which is the portion that verifies what we want it to do. The original formulation wastes a lot of CPU time, which leads the test to fail when runtime exceeds isolationtester timeout when it's super-slow, such as under CLOBBER_CACHE_ALWAYS. Per buildfarm member friarbird. It turns out that the previous shape of the test doesn't always detect the condition it is supposed to detect (on unpatched reorderbuffer code): the reason is that there is a good chance of encountering a xl_running_xacts record (logged every 15 seconds) before the checkpoint -- and because we advance the xmin when we receive that WAL record, and we *don't* advance the xmin twice consecutively without receiving a client message in between, that means the xmin is not advanced enough for the tuple to be pruned from pg_attribute by VACUUM. So the test would spuriously pass. The reason this test deficiency wasn't detected earlier is that HOT pruning removes the tuple anyway, even if vacuum leaves it in place, so the test correctly fails (detecting the coding mistake), but for the wrong reason. To fix this mess, run the s0_get_changes step twice before vacuum instead of once: this seems to cause the xmin to be advanced reliably, wreaking havoc with more certainty. Author: Arseny Sher Discussion: https://postgr.es/m/87h8lkuxoa.fsf@ars-thinkpad Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/eedbbff504e408bd65ff22e70fde85b5ac0bf8c0 Modified Files -------------- contrib/test_decoding/expected/oldest_xmin.out | 7 +++++-- contrib/test_decoding/specs/oldest_xmin.spec | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Reduce cost of test_decoding's new oldest_xmin test @ 2018-07-05 20:57 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 5+ messages in thread From: Alvaro Herrera @ 2018-07-05 20:57 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reduce cost of test_decoding's new oldest_xmin test Change a whole-database VACUUM into doing just pg_attribute, which is the portion that verifies what we want it to do. The original formulation wastes a lot of CPU time, which leads the test to fail when runtime exceeds isolationtester timeout when it's super-slow, such as under CLOBBER_CACHE_ALWAYS. Per buildfarm member friarbird. It turns out that the previous shape of the test doesn't always detect the condition it is supposed to detect (on unpatched reorderbuffer code): the reason is that there is a good chance of encountering a xl_running_xacts record (logged every 15 seconds) before the checkpoint -- and because we advance the xmin when we receive that WAL record, and we *don't* advance the xmin twice consecutively without receiving a client message in between, that means the xmin is not advanced enough for the tuple to be pruned from pg_attribute by VACUUM. So the test would spuriously pass. The reason this test deficiency wasn't detected earlier is that HOT pruning removes the tuple anyway, even if vacuum leaves it in place, so the test correctly fails (detecting the coding mistake), but for the wrong reason. To fix this mess, run the s0_get_changes step twice before vacuum instead of once: this seems to cause the xmin to be advanced reliably, wreaking havoc with more certainty. Author: Arseny Sher Discussion: https://postgr.es/m/87h8lkuxoa.fsf@ars-thinkpad Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/301b2a1aad77eeda54b02027597eb65e976a8c7b Modified Files -------------- contrib/test_decoding/expected/oldest_xmin.out | 7 +++++-- contrib/test_decoding/specs/oldest_xmin.spec | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Reduce cost of test_decoding's new oldest_xmin test @ 2018-07-05 21:00 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 5+ messages in thread From: Alvaro Herrera @ 2018-07-05 21:00 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Reduce cost of test_decoding's new oldest_xmin test Change a whole-database VACUUM into doing just pg_attribute, which is the portion that verifies what we want it to do. The original formulation wastes a lot of CPU time, which leads the test to fail when runtime exceeds isolationtester timeout when it's super-slow, such as under CLOBBER_CACHE_ALWAYS. Per buildfarm member friarbird. It turns out that the previous shape of the test doesn't always detect the condition it is supposed to detect (on unpatched reorderbuffer code): the reason is that there is a good chance of encountering a xl_running_xacts record (logged every 15 seconds) before the checkpoint -- and because we advance the xmin when we receive that WAL record, and we *don't* advance the xmin twice consecutively without receiving a client message in between, that means the xmin is not advanced enough for the tuple to be pruned from pg_attribute by VACUUM. So the test would spuriously pass. The reason this test deficiency wasn't detected earlier is that HOT pruning removes the tuple anyway, even if vacuum leaves it in place, so the test correctly fails (detecting the coding mistake), but for the wrong reason. To fix this mess, run the s0_get_changes step twice before vacuum instead of once: this seems to cause the xmin to be advanced reliably, wreaking havoc with more certainty. Author: Arseny Sher Discussion: https://postgr.es/m/87h8lkuxoa.fsf@ars-thinkpad Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7acbb481c808effffae7033b5ea1069112d6545f Modified Files -------------- contrib/test_decoding/expected/oldest_xmin.out | 7 +++++-- contrib/test_decoding/specs/oldest_xmin.spec | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2018-07-05 21:00 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2018-07-05 20:46 pgsql: Reduce cost of test_decoding's new oldest_xmin test Alvaro Herrera <alvherre@alvh.no-ip.org> 2018-07-05 20:46 pgsql: Reduce cost of test_decoding's new oldest_xmin test Alvaro Herrera <alvherre@alvh.no-ip.org> 2018-07-05 20:57 pgsql: Reduce cost of test_decoding's new oldest_xmin test Alvaro Herrera <alvherre@alvh.no-ip.org> 2018-07-05 20:57 pgsql: Reduce cost of test_decoding's new oldest_xmin test Alvaro Herrera <alvherre@alvh.no-ip.org> 2018-07-05 21:00 pgsql: Reduce cost of test_decoding's new oldest_xmin test Alvaro Herrera <alvherre@alvh.no-ip.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox