From: | Matheus Alcantara <mths(dot)dev(at)pm(dot)me> |
---|---|
To: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Trying to add more tests to gistbuild.c |
Date: | 2022-05-06 13:19:43 |
Message-ID: | 3z8Fde-IHbW57a7bEZtaf19f4YOCWu67IZoWJoGW18rKD9R16ZHHchf4d7KFI3Yg7-0N4NonFuwKEgh98HjMCZYoVx7KOioPo6Wn2nZRpf4=@pm.me |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I'm studying how the gist index works trying to improve the test coverage of gistbuild.c.
Reading the source code I noticed that the gistInitBuffering function is not covered, so I decided to start with it.
Reading the documentation and the source I understood that for this function to be executed it is necessary to force
bufferring=on when creating the index or the index to be created is big enough to not fit in the cache, am I correct?
Considering the above, I added two new index creation statements in the gist regression test (patch attached) to create
an index using buffering=on and another to try to simulate an index that does not fit in the cache.
With these new tests the coverage went from 45.3% to 85.5%, but I have some doubts:
- Does this test make sense?
- Would there be a way to validate that the buffering was done correctly?
- Is this test necessary?
I've been studying Postgresql implementations and I'm just trying to start contributing the source code.
--
Matheus Alcantara
Attachment | Content-Type | Size |
---|---|---|
new_gist_buffering_test_cases.patch | text/x-patch | 1.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2022-05-06 13:24:14 | Re: Support logical replication of DDLs |
Previous Message | Daniel Gustafsson | 2022-05-06 12:58:46 | Re: Fix typo in comment |