Re: [HACKERS] [GENERAL] Using an SMP machine to make multiple indices on

2001-10-25 Thread Hiroshi Inoue
Tom Lane wrote: > > Hiroshi Inoue <[EMAIL PROTECTED]> writes: > > Tom Lane wrote: > >> Also, I'm now a little worried about whether concurrent index creations > >> will actually work. Both CREATE INDEX operations will try to update > >> the pg_class tuple to set relhasindex true. > > > Yes but t

Re: [HACKERS] [GENERAL] Using an SMP machine to make multiple indices on the same

2001-10-25 Thread Tom Lane
Hiroshi Inoue <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Also, I'm now a little worried about whether concurrent index creations >> will actually work. Both CREATE INDEX operations will try to update >> the pg_class tuple to set relhasindex true. > Yes but there's a big difference. It's at

Re: [HACKERS] [GENERAL] Using an SMP machine to make multiple indices on

2001-10-24 Thread Hiroshi Inoue
Tom Lane wrote: > > "Hiroshi Inoue" <[EMAIL PROTECTED]> writes: > > In the end, I changed DefineIndex() to not call IndexesAreActive(). > > I saw that. But is it a good solution? If someone has deactivated > indexes on a user table (ie turned off relhasindex), then creating a > new index would

Re: [HACKERS] [GENERAL] Using an SMP machine to make multiple indices on the same

2001-10-24 Thread Tom Lane
"Hiroshi Inoue" <[EMAIL PROTECTED]> writes: > In the end, I changed DefineIndex() to not call IndexesAreActive(). I saw that. But is it a good solution? If someone has deactivated indexes on a user table (ie turned off relhasindex), then creating a new index would activate them again, which wou

Re: [HACKERS] [GENERAL] Using an SMP machine to make multiple indices on the same

2001-10-24 Thread Hiroshi Inoue
> -Original Message- > From: Hiroshi Inoue > > Tom Lane wrote: > > > > Martin Weinberg <[EMAIL PROTECTED]> writes: > > > Yes, I understand locking the table, but empirically, two index > > > creations will not run simultaneously on the same table. > > > > Hmm, on trying it you are right. T

Re: [HACKERS] [GENERAL] Using an SMP machine to make multiple indices on the same

2001-10-24 Thread Hiroshi Inoue
Tom Lane wrote: > > Martin Weinberg <[EMAIL PROTECTED]> writes: > > Yes, I understand locking the table, but empirically, two index > > creations will not run simultaneously on the same table. > > Hmm, on trying it you are right. The second index creation blocks here: > > #6 0x1718e0 in XactLo

Re: [HACKERS] [GENERAL] Using an SMP machine to make multiple indices on the same table

2001-10-23 Thread Tom Lane
Martin Weinberg <[EMAIL PROTECTED]> writes: > Yes, I understand locking the table, but empirically, two index > creations will not run simultaneously on the same table. Hmm, on trying it you are right. The second index creation blocks here: #6 0x1718e0 in XactLockTableWait (xid=17334) at lmgr.