Re: Re : Re : Re : Re : Select in temporary table

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: Re : Re : Re : Re : Select in temporary table
Дата
Msg-id 300D20DC-4655-4EC2-B4AB-447A025E1B9E@solfertje.student.utwente.nl
обсуждение исходный текст
Ответ на Re : Re : Re : Re : Select in temporary table  (Sylvain Lara <sly_lara@yahoo.com>)
Список pgsql-general
On 1 Apr 2010, at 10:47, Sylvain Lara wrote:
> De : jose javier parra sanchez <jojapasa@gmail.com>
> Cc : pgsql-general@postgresql.org
> Envoyé le : Jeu 1 avril 2010, 9 h 26 min 27 s
> Objet : Re: Re : Re : Re : [GENERAL] Select in temporary table
>
> Not sure about how de C# driver you use to connect, but if you have
> multiple connections, then you have multiple sessions.
>
> -----------------------------------------------
>
> I've got multiple connections, but when selecting data in my temp table (when it works, once, twice, three times and
morebefore the error), I've got my data when selecting into the temp table. 
>
> Whereas if I connect the same base, at the same time, from another client, it doesn't display the same data, which is
correctfor me. 
>
> Each client has it's own temporary table data.
>
> But my problem is that this temporary table is randomly accessible by the same client.
> And it's seems that if I wait a moment between two executions (I put a breakpoint and browse my NpgSQLConnection
object),I can access my temp table without any problem... 


Sounds like there's a connection pooler in there somewhere and you sometimes get a different connection than the one
yourtemp table lives in. Only the connection that created the temp table will be able to see it. 

Other possibilities I can think of:

Are you rolling back the transaction with which you created the temp table? In that case the temp table is gone after
yourolled back, so if later code is trying to access it it won't find it. 

Is your client multi-threaded? Is it possible that you're trying to access the temp table from another thread before it
finishedcreating? 
That's probably not the case, or you'd either need to serialize your database access to be able to use the same
connection- in which case this situation can't occur - or you're using multiple parallel connections from the same
clientand we're back at the multiple-connection answer. If you'd be using one connection in parallel threads without
serializingthem then you're having more serious issues to deal with... 

It's most probably a problem in your client or your connection library, other people are using temp tables without a
problem.Temp tables are not exactly a new feature either. 

Alban Hertroys

PS. Considering the way you quote your mails you seem to have an absolutely terrible mail client. If you have a choice,
considergetting something decent. 

--
Screwing up is an excellent way to attach something to the ceiling.


!DSPAM:737,4bb46f1610411569890503!



В списке pgsql-general по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: [HACKERS] Postgres 9.1 - Release Theme
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: prevent connection using pgpass.conf