pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: hash: Immediately after a bucket split, try to clean the old buc
2+ messages / 2 participants
[nested] [flat]

* pgsql: hash: Immediately after a bucket split, try to clean the old buc
@ 2017-08-05 00:54 Robert Haas <rhaas@postgresql.org>
  2017-08-07 12:33 ` Re: pgsql: hash: Immediately after a bucket split, try to clean the old buc Ashutosh Sharma <ashu.coek88@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Robert Haas @ 2017-08-05 00:54 UTC (permalink / raw)
  To: pgsql-committers

hash: Immediately after a bucket split, try to clean the old bucket.

If it works, then we won't be storing two copies of all the tuples
that were just moved.  If not, VACUUM will still take care of it
eventually.  Per a report from AP and analysis from Amit Kapila, it
seems that a bulk load can cause splits fast enough that VACUUM won't
deal with the problem in time to prevent bloat.

Amit Kapila; I rewrote the comment.

Discussion: http://postgr.es/m/20170704105728.mwb72jebfmok2nm2@zip.com.au

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ff98a5e1e49de061600feb6b4de5ce0a22d386af

Modified Files
--------------
src/backend/access/hash/hashpage.c | 45 ++++++++++++++++++++++++++++----------
1 file changed, 34 insertions(+), 11 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* Re: pgsql: hash: Immediately after a bucket split, try to clean the old buc
  2017-08-05 00:54 pgsql: hash: Immediately after a bucket split, try to clean the old buc Robert Haas <rhaas@postgresql.org>
@ 2017-08-07 12:33 ` Ashutosh Sharma <ashu.coek88@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Ashutosh Sharma @ 2017-08-07 12:33 UTC (permalink / raw)
  To: Robert Haas <rhaas@postgresql.org>; +Cc: pgsql-committers

Hi,

I could see some diff getting generated after running pgindent script
on 'src/backend/access/hash/hashpage.c' file and from the diff it
looks like it got introduced as a part of this commit. Below is the
diff observed,

        /*
         * If possible, clean up the old bucket.  We might not be able
to do this
         * if someone else has a pin on it, but if not then we can go
ahead.  This
-        * isn't absolutely necessary, but it reduces bloat; if we
don't do it now,
-        * VACUUM will do it eventually, but maybe not until new overflow pages
-        * have been allocated.  Note that there's no need to clean up the new
-        * bucket.
+        * isn't absolutely necessary, but it reduces bloat; if we don't do it
+        * now, VACUUM will do it eventually, but maybe not until new overflow
+        * pages have been allocated.  Note that there's no need to clean up the
+        * new bucket.
         */

--
With Regards,
Ashutosh Sharma
EnterpriseDB:http://www.enterprisedb.com

On Sat, Aug 5, 2017 at 6:24 AM, Robert Haas <rhaas@postgresql.org> wrote:
> hash: Immediately after a bucket split, try to clean the old bucket.
>
> If it works, then we won't be storing two copies of all the tuples
> that were just moved.  If not, VACUUM will still take care of it
> eventually.  Per a report from AP and analysis from Amit Kapila, it
> seems that a bulk load can cause splits fast enough that VACUUM won't
> deal with the problem in time to prevent bloat.
>
> Amit Kapila; I rewrote the comment.
>
> Discussion: http://postgr.es/m/20170704105728.mwb72jebfmok2nm2@zip.com.au
>
> Branch
> ------
> master
>
> Details
> -------
> https://git.postgresql.org/pg/commitdiff/ff98a5e1e49de061600feb6b4de5ce0a22d386af
>
> Modified Files
> --------------
> src/backend/access/hash/hashpage.c | 45 ++++++++++++++++++++++++++++----------
> 1 file changed, 34 insertions(+), 11 deletions(-)
>
>
> --
> Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-committers


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



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


end of thread, other threads:[~2017-08-07 12:33 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-08-05 00:54 pgsql: hash: Immediately after a bucket split, try to clean the old buc Robert Haas <rhaas@postgresql.org>
2017-08-07 12:33 ` Ashutosh Sharma <ashu.coek88@gmail.com>

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