From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | John Naylor <john(dot)naylor(at)2ndquadrant(dot)com> |
Cc: | Mithun Cy <mithun(dot)cy(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: WIP: Avoid creation of the free space map for small tables |
Date: | 2019-01-29 10:55:52 |
Message-ID: | CAA4eK1KRByXY03qR2JvUjUxKBzpBnCSO5H19oAC=_v4r5dzTwQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jan 29, 2019 at 5:59 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Tue, Jan 29, 2019 at 12:37 AM John Naylor
> <john(dot)naylor(at)2ndquadrant(dot)com> wrote:
> > > I think here you need to clear the map if it exists or clear it
> > > unconditionally, the earlier one would be better.
> >
> > Ok, maybe all callers should call it unconditonally, but within the
> > function, check "if (FSM_LOCAL_MAP_EXISTS)"?
> >
>
> Sounds sensible. I think we should try to reproduce these failures,
> for ex. for pgbench failure, we can try the same test with more
> clients.
>
I am able to reproduce this by changing pgbench test as below:
--- a/src/bin/pgbench/t/001_pgbench_with_server.pl
+++ b/src/bin/pgbench/t/001_pgbench_with_server.pl
@@ -56,9 +56,9 @@ $node->safe_psql('postgres',
'CREATE UNLOGGED TABLE insert_tbl (id serial primary key); ');
pgbench(
- '--no-vacuum --client=5 --protocol=prepared --transactions=25',
+ '--no-vacuum --client=10 --protocol=prepared --transactions=25',
0,
- [qr{processed: 125/125}],
+ [qr{processed: 250/250}],
You can find this change in attached patch. Then, I ran the make
check in src/bin/pgbench multiple times using test_conc_insert.sh.
You can vary the number of times the test should run, if you are not
able to reproduce it with this.
The attached patch (clear_local_map_if_exists_1.patch) atop the main
patch fixes the issue for me. Kindly verify the same.
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
change_pgbench_test_1.patch | application/octet-stream | 607 bytes |
test_conc_insert.sh | text/x-sh | 49 bytes |
clear_local_map_if_exists_1.patch | application/octet-stream | 1.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Fabio Isabettini | 2019-01-29 11:32:47 | Re: dsa_allocate() faliure |
Previous Message | Konstantin Knizhnik | 2019-01-29 10:45:35 | Re: [HACKERS] Cached plans and statement generalization |