From: | Benjamin Dugast <bdugast(at)excilys(dot)com> |
---|---|
To: | hubert depesz lubaczewski <depesz(at)gmail(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Is CREATE TABLE non-blocking ? |
Date: | 2014-07-24 08:36:17 |
Message-ID: | CAB9ggRrownPVTm0QEKyQ+WvOqQTSn_2kB7=oLrpQ3MWM2yG4dg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
So the solution was a simple problem in our program that send some INSERT
requests before we actually CREATE our tables.
We didn't figured out this problem on our first test system because it was
really fast.
On our second test environment that is much slower, the application shut
down instantly because of the tables were not created.
2014-07-23 17:13 GMT+02:00 Benjamin Dugast <bdugast(at)excilys(dot)com>:
> We finally solved our problem,
> Thanks for your help.
>
>
> 2014-07-23 15:43 GMT+02:00 hubert depesz lubaczewski <depesz(at)gmail(dot)com>:
>
> No, it's not.
>> What might happen, though, is that you call your callback before the
>> transaction with create table got committed.
>>
>> depesz
>>
>>
>> On Wed, Jul 23, 2014 at 12:33 PM, Benjamin Dugast <bdugast(at)excilys(dot)com>
>> wrote:
>>
>>> Hello,
>>>
>>> We have an issue with tables creations in our application.
>>>
>>> We think CREATE TABLE returns before the tables are created. Because
>>> this looks like a non-blocking operation, our inserts (in a callback) are
>>> actually happening before the tables are created.
>>>
>>> We tried to use a Thread.sleep() just before the insert and it works but
>>> we can't stay with this.
>>>
>>> What can we do to avoid this problem?
>>>
>>
>>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Vinayak Pokale | 2014-07-25 08:59:12 | Re: PGsql function timestamp issue |
Previous Message | Rob Sargent | 2014-07-23 15:52:34 | Re: Is CREATE TABLE non-blocking ? |