pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Add injection-point test for new multixact CV usage
3+ messages / 3 participants
[nested] [flat]

Commits from this thread:
  2024-08-23 94a3373ac5  Rework new SLRU test with injection points
* pgsql: Add injection-point test for new multixact CV usage
@ 2024-08-20 18:35  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Alvaro Herrera @ 2024-08-20 18:35 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Add injection-point test for new multixact CV usage

Before commit a0e0fb1ba56f, multixact.c contained a case in the
multixact-read path where it would loop sleeping 1ms each time until
another multixact-create path completed, which was uncovered by any
tests.  That commit changed the code to rely on a condition variable
instead.  Add a test now, which relies on injection points and "loading"
thereof (because of it being in a critical section), per commit
4b211003ecc2.

Author: Andrey Borodin <x4mmm@yandex-team.ru>
Reviewed-by: Michaël Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/0925F9A9-4D53-4B27-A87E-3D83A757B0E0@yandex-team.ru

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/768a9fd5535fddb781088b6f83132b9a1b1f5bd3

Modified Files
--------------
src/backend/access/transam/multixact.c        |   5 ++
src/test/modules/test_slru/Makefile           |   7 +-
src/test/modules/test_slru/meson.build        |   9 ++
src/test/modules/test_slru/t/001_multixact.pl | 124 ++++++++++++++++++++++++++
src/test/modules/test_slru/test_multixact.c   |  57 ++++++++++++
src/test/modules/test_slru/test_slru--1.0.sql |   6 ++
6 files changed, 207 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgsql: Add injection-point test for new multixact CV usage
@ 2024-08-21 22:24  Alexander Korotkov <aekorotkov@gmail.com>
  parent: Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Alexander Korotkov @ 2024-08-21 22:24 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: pgsql-committers@lists.postgresql.org

On Tue, Aug 20, 2024 at 9:35 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> Add injection-point test for new multixact CV usage
>
> Before commit a0e0fb1ba56f, multixact.c contained a case in the
> multixact-read path where it would loop sleeping 1ms each time until
> another multixact-create path completed, which was uncovered by any
> tests.  That commit changed the code to rely on a condition variable
> instead.  Add a test now, which relies on injection points and "loading"
> thereof (because of it being in a critical section), per commit
> 4b211003ecc2.
>
> Author: Andrey Borodin <x4mmm@yandex-team.ru>
> Reviewed-by: Michaël Paquier <michael@paquier.xyz>
> Discussion: https://postgr.es/m/0925F9A9-4D53-4B27-A87E-3D83A757B0E0@yandex-team.ru
>
> Branch
> ------
> master
>
> Details
> -------
> https://git.postgresql.org/pg/commitdiff/768a9fd5535fddb781088b6f83132b9a1b1f5bd3
>
> Modified Files
> --------------
> src/backend/access/transam/multixact.c        |   5 ++
> src/test/modules/test_slru/Makefile           |   7 +-
> src/test/modules/test_slru/meson.build        |   9 ++
> src/test/modules/test_slru/t/001_multixact.pl | 124 ++++++++++++++++++++++++++
> src/test/modules/test_slru/test_multixact.c   |  57 ++++++++++++
> src/test/modules/test_slru/test_slru--1.0.sql |   6 ++
> 6 files changed, 207 insertions(+), 1 deletion(-)

It seems that header files aren't alphabetically ordered here.

 #include "storage/proc.h"
 #include "storage/procarray.h"
 #include "utils/fmgrprotos.h"
+#include "utils/injection_point.h"
 #include "utils/guc_hooks.h"
 #include "utils/memutils.h"

------
Regards,
Alexander Korotkov
Supabase





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgsql: Add injection-point test for new multixact CV usage
@ 2024-08-23 03:12  Michael Paquier <michael@paquier.xyz>
  parent: Alexander Korotkov <aekorotkov@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Michael Paquier @ 2024-08-23 03:12 UTC (permalink / raw)
  To: Alexander Korotkov <aekorotkov@gmail.com>; +Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>; pgsql-committers@lists.postgresql.org

On Thu, Aug 22, 2024 at 01:24:33AM +0300, Alexander Korotkov wrote:
> It seems that header files aren't alphabetically ordered here.

Thanks.  I've fixed this one in 94a3373ac5c3 while tweaking the area.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2024-08-23 03:12 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-08-20 18:35 pgsql: Add injection-point test for new multixact CV usage Alvaro Herrera <alvherre@alvh.no-ip.org>
2024-08-21 22:24 ` Alexander Korotkov <aekorotkov@gmail.com>
2024-08-23 03:12   ` Michael Paquier <michael@paquier.xyz>

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