Re: Is CREATE TABLE non-blocking ? - Mailing list pgsql-sql

FromRob Sargent
SubjectRe: Is CREATE TABLE non-blocking ?
Date
Msg-id[email protected]
Whole thread Raw
In response toRe: Is CREATE TABLE non-blocking ?  (Benjamin Dugast <[email protected]>)
Listpgsql-sql
On 07/23/2014 09:13 AM, Benjamin Dugast wrote:
We finally solved our problem,
Thanks for your help.


2014-07-23 15:43 GMT+02:00 hubert depesz lubaczewski <[email protected]>:
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 <[email protected]> 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?


And the solutions was....


pgsql-sql by date:

Previous
From: Benjamin Dugast
Date:
Subject: Re: Is CREATE TABLE non-blocking ?
Next
From: Benjamin Dugast
Date:
Subject: Re: Is CREATE TABLE non-blocking ?