From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Support for REINDEX CONCURRENTLY |
Date: | 2013-01-26 22:36:08 |
Message-ID: | CAB7nPqQNCUtAUaLb=xSCjAaH5oRhkKu9e62DriuPMdBks365NA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Jan 27, 2013 at 1:37 AM, Andres Freund <andres(at)2ndquadrant(dot)com>wrote:
> On 2013-01-25 14:11:39 +0900, Michael Paquier wrote:
>
> It sure isn't optimal, but it should do the trick if you use the
> hash_seq stuff to iterate the hash afterwards. And you could use it to
> map to the respective locks et al.
>
> If you prefer other ways to implement it I guess the other easy solution
> is to add the values without preventing duplicates and then sort &
> remove duplicates in the end. Probably ends up being slightly more code,
> but I am not sure.
>
Indeed, I began playing with the HTAB functions and it looks that the only
correct way to use that would be to use a hash table using as key the index
OID with as entry:
- the index OID itself
- the concurrent OID
And a second hash table with parent relation OID as key and as output the
LOCKTAG for each parent relation.
> I don't think we can leave the quadratic part in there as-is.
>
Sure, that is understandable.
--
Michael Paquier
http://michael.otacoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-01-26 22:36:51 | Re: enhanced error fields |
Previous Message | Phil Sorber | 2013-01-26 22:20:11 | Re: [PATCH] pg_isready (was: [WIP] pg_ping utility) |