[GENERAL] regarding isolation between threads

2005-08-11 Thread Surabhi Ahuja
Dear All, I am stuck in the following scenario: In a dual processor machine, I am running 5 threads. each of the threads is calling a particular stored procedure to insert a row in the table. the insertion takes place in a transaction and i have set the transaction level to serializable.

[GENERAL] regarding isolation between threads

2005-08-11 Thread Surabhi Ahuja
This is in continuation of my previous mail: each thread is using a different pgconn. thanks again Surabhi Ahuja Dear All, I am stuck in the following scenario: In a dual processor machine, I am running 5 threads. each of the threads is calling a particular stored procedure to insert a row

[GENERAL] regarding isolation between threads

2005-08-11 Thread Surabhi Ahuja
void *connect(void* threadid){ char command[100]; int *id_ptr, taskid; id_ptr = (int *) threadid; taskid = *id_ptr; if(taskid == 0) strcpy(command, "select insert (1)"); else if(taskid == 1) strcpy(command, "select insert (1)"); else if(taskid == 2) strcpy(command, "select insert (3)");

Re: [GENERAL] regarding isolation between threads

2005-08-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-08-11 16:04:00 +0530: void *connect(void* threadid) { char command[100]; int *id_ptr, taskid; id_ptr = (int *) threadid; taskid = *id_ptr; if(taskid == 0) strcpy(command, select insert (1)); else if(taskid == 1)

Re: [GENERAL] regarding isolation between threads

2005-08-11 Thread Stephan Szabo
On Thu, 11 Aug 2005, Surabhi Ahuja wrote: the stored procedure (just the pseudo code) table x has a primary key k insert(integer) { select from table if k = $1 if not found insert into x ($1); else insert into some_other_table($1); end if } the