pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix end LSN determination in recently added test 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix end LSN determination in recently added test @ 2022-12-23 16:27 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 2+ messages in thread From: Alvaro Herrera @ 2022-12-23 16:27 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix end LSN determination in recently added test The test added in commit e44dae07f931 has a thinko: it wants to read info about a few WAL records, but it obtains the LSN of the final record to read by asking for the WAL insert position; however, pg_get_wal_records_info only accepts to read up to the flush position (cf. IsFutureLSN()). In normal conditions there is no difference, since the last record written by the preceding loop is known flushed and it's the one the test wants; but it's possible to have some other process insert another WAL record that isn't flushed, and that causes the whole test to explode. Fix by having pg_get_wal_records_info() read only up to the flushed position. Backpatch to 15, which is where pg_walinspect appeared. Author: Karina Litskevich <litskevichkarina@gmail.com> Discussion: https://postgr.es/m/a5559c95-52c3-5eea-cd63-9b4f1c70ff96@gmail.com Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5436cb373c6289eca8fc2b4aabb75f002a0394cf Modified Files -------------- src/test/modules/brin/t/02_wal_consistency.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix end LSN determination in recently added test @ 2022-12-23 16:27 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 2+ messages in thread From: Alvaro Herrera @ 2022-12-23 16:27 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix end LSN determination in recently added test The test added in commit e44dae07f931 has a thinko: it wants to read info about a few WAL records, but it obtains the LSN of the final record to read by asking for the WAL insert position; however, pg_get_wal_records_info only accepts to read up to the flush position (cf. IsFutureLSN()). In normal conditions there is no difference, since the last record written by the preceding loop is known flushed and it's the one the test wants; but it's possible to have some other process insert another WAL record that isn't flushed, and that causes the whole test to explode. Fix by having pg_get_wal_records_info() read only up to the flushed position. Backpatch to 15, which is where pg_walinspect appeared. Author: Karina Litskevich <litskevichkarina@gmail.com> Discussion: https://postgr.es/m/a5559c95-52c3-5eea-cd63-9b4f1c70ff96@gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/6602599ce25665394112b944f3cdbd68a2587d97 Modified Files -------------- src/test/modules/brin/t/02_wal_consistency.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2022-12-23 16:27 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-12-23 16:27 pgsql: Fix end LSN determination in recently added test Alvaro Herrera <alvherre@alvh.no-ip.org> 2022-12-23 16:27 pgsql: Fix end LSN determination in recently added 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