From: | Wes <wespvp(at)syntegra(dot)com> |
---|---|
To: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [GENERAL] Concurrency problem building indexes |
Date: | 2006-04-25 02:58:34 |
Message-ID: | C072FA8A.23AE1%wespvp@syntegra.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
On 4/24/06 7:54 PM, "Jim C. Nasby" <jnasby(at)pervasive(dot)com> wrote:
>> Long ago. I just tested it again, and AFAICS you can create indexes
>> concurrently so long as the underlying table isn't changing (ie,
>> neither reltuples nor relpages changes).
>
> Hrm, the OP seemed to find a case that was having problems:
> http://archives.postgresql.org/pgsql-general/2006-04/msg01009.php
>
> Of course it's possible that he's getting that error from an entirely
> different section of code, or that this is now only an issue if you're
> doing a lot of indexing at once...
I don't think there's much chance it's other code. The index build is a
standalone operation in an external script that uses psql (so it is easy to
tailor). This script is called as the last statement before the main
program exit. It does:
fork
create index1
create index2
exit
fork
create index3
create index4
exit
wait for termination
exit
As my test tables are small and indexing happens almost instantly, I put a
'sleep' after one of the forks so that the two don't complete at the same
time. When I do that, I don't get the errors.
Wes
From | Date | Subject | |
---|---|---|---|
Next Message | Orion | 2006-04-25 03:06:05 | Re: How to have a blind-superuser |
Previous Message | Steve Atkins | 2006-04-25 02:56:03 | Re: How to have a blind-superuser |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-04-25 03:05:18 | Re: Google SoC--Idea Request |
Previous Message | Jonah H. Harris | 2006-04-25 02:56:14 | Re: Google SoC--Idea Request |