Re: Should TIDs be typbyval = FLOAT8PASSBYVAL to speed up CREATE INDEX CONCURRENTLY?

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Should TIDs be typbyval = FLOAT8PASSBYVAL to speed up CREATE INDEX CONCURRENTLY?
Date: 2015-12-17 17:29:14
Message-ID: CADkLM=fHkXx6NBNuEvZh_sQAynRkAH4qgaHNhV7iMYEk5=_bYg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Dec 16, 2015 at 4:24 PM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:

> On Wed, Dec 16, 2015 at 12:28 PM, Robert Haas <robertmhaas(at)gmail(dot)com>
> wrote:
> >> I seem to be able to produce these sorting patches at a much greater
> >> rate than they can be committed, in part because Robert is the only
> >> one that ever reviews them, and he is only one person.
> >
> > I object to that vicious slander. I am at least three people, if not
> more!
>
> I was referring only to the Robert that reviews my sorting patches. :-)
>
> > Meanwhile, I did some simple benchmarking on your latest patch on my
> > MacBook Pro. I did pgbench -i -s 100 and then tried:
> >
> > create index x on pgbench_accounts (aid);
> > create index concurrently x on pgbench_accounts (aid);
> >
> > The first took about 6.9 seconds. The second took about 11.3 seconds
> > patched versus 14.6 seconds unpatched. That's certainly a healthy
> > improvement.
>
> That seems pretty good. It probably doesn't matter, but FWIW it's
> likely that your numbers are not as good as mine because this ends up
> with a perfect logical/physical correlation, which the quicksort
> precheck [1] does very well on when sorting the TIDs (since input is
> *perfectly* correlated, as opposed to 99.99% correlated, a case that
> does poorly [2]).
>
> > I have also reviewed the code, and it looks OK to me, so committed.
>
> Thanks!
>
> [1] Commit a3f0b3d68f9a5357a3f72b40a45bcc714a9e0649
> [2] http://www.postgresql.org/message-id/54EB580C.2000904@2ndquadrant.com
> --
> Peter Geoghegan
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

My apologies to Peter and all the Roberts, I wasn't able to set up a test
fast enough. Glad it got committed.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2015-12-17 17:31:15 Re: Cluster "stuck" in "not accepting commands to avoid wraparound data loss"
Previous Message Andres Freund 2015-12-17 17:14:15 Re: Fwd: Cluster "stuck" in "not accepting commands to avoid wraparound data loss"