From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <akapila(at)postgresql(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, John Naylor <john(dot)naylor(at)2ndquadrant(dot)com> |
Cc: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pgsql: Avoid creation of the free space map for small heap relations. |
Date: | 2019-01-28 04:17:00 |
Message-ID: | CAA4eK1JntHd7X6dLJVPGYV917HejjhbMKXn9m_RnnCE162LbLA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On Mon, Jan 28, 2019 at 8:49 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Mon, Jan 28, 2019 at 8:17 AM Amit Kapila <akapila(at)postgresql(dot)org> wrote:
> >
> > Avoid creation of the free space map for small heap relations.
> >
>
> It seems there is some failure due to this on build farm machines. I
> will investigate!
>
The failure is as below:
@@ -26,7 +26,7 @@
pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
heap_size | fsm_size
-----------+----------
- 24576 | 0
+ 32768 | 0
(1 row)
-- Extend table with enough blocks to exceed the FSM threshold
@@ -56,7 +56,7 @@
SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
fsm_size
----------
- 16384
+ 24576
(1 row)
So here in the above tests, we are deleting some rows, performing
vacuum and then checking the size of heap and or vacuum. It seems to
me sometimes the vacuum is *not* able to remove the rows and truncate
the relation/FSM as per tests expectation. One possible theory is
that there is some parallel transaction running which prevents a
vacuum from doing so. We have tried to avoid that by not allowing to
run the FSM test in parallel with other tests, but I think still
something seems to have run in parallel to the FSM test. One
possibility is that autovacuum has triggered to perform truncation of
some other relation (remove pages at the end) which doesn't allow the
FSM test to remove the rows/perform truncation and thus let to the
failure. Can there be anything else which can start a transaction
when a regression test is running? Still thinking, but inputs are
welcome.
If my theory is correct, then in the newly added tests by this patch,
we can't rely on the vacuum to truncate the relation pages at the end
and hence can't rely on heap/FSM size.
Thoughts?
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Gierth | 2019-01-28 04:55:06 | Re: pgsql: Avoid creation of the free space map for small heap relations. |
Previous Message | Amit Kapila | 2019-01-28 03:19:47 | Re: pgsql: Avoid creation of the free space map for small heap relations. |
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2019-01-28 04:18:02 | Re: speeding up planning with partitions |
Previous Message | Amit Langote | 2019-01-28 04:12:05 | Re: [Sender Address Forgery]Re: using expression syntax for partition bounds |