Re: Using an SMP machine to make multiple indices on the - Mailing list pgsql-general

From Martin Weinberg
Subject Re: Using an SMP machine to make multiple indices on the
Date
Msg-id 200110231759.NAA02477@osprey.astro.umass.edu
Whole thread Raw
In response to Re: Using an SMP machine to make multiple indices on the same table  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom,

Yes, I understand locking the table, but empirically, two index
creations will not run simultaneously on the same table.  So if
I start (and background) two

    psql -c "create index one on mytable . . ." database
    psql -c "create index two on mytable . . ." database

commands.  The first one starts and the second one waits until the
first is finished  (as tracked by "ps avx" or "top").

--Martin

Tom Lane wrote on Mon, 22 Oct 2001 23:09:26 EDT
>Martin Weinberg <weinberg@osprey.astro.umass.edu> writes:
>> On Postgresql 7.1.3, it seems that the table is locked after the
>> first "create index" is started up.  Is this right?
>
>AFAIK it's a share lock, which only prohibits modifications to the
>table, not reads (nor concurrent index builds).  Not sure how you
>expect the system to do better than that.
>
>            regards, tom lane
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?
>
>http://www.postgresql.org/users-lounge/docs/faq.html
>



pgsql-general by date:

Previous
From: "Aasmund Midttun Godal"
Date:
Subject: Re: Database design?
Next
From: "Barbara Ferrell"
Date:
Subject: Can Postgresql search full text fast through 3.3 million text documents?