agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Rob Sargent <robjsargent@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Is CREATE TABLE non-blocking ?
Date: Wed, 23 Jul 2014 09:52:34 -0600
Message-ID: <53CFDA42.8010305@gmail.com> (raw)
In-Reply-To: <CAB9ggRrAHJiVGPBPeYt0b5iDfa88aTML2Y2VwoEgQgXjPUrmFA@mail.gmail.com>
References: <CAB9ggRr-DJXb6ha7=KDd6W1WZAdcNkmULR0fv1J_TS3WO5+VGw@mail.gmail.com>
	<CAKrjmhfFt7jt9gJowB8eQ8eMnkUwVqNFA2EFhmR9AA+XWvbZbg@mail.gmail.com>
	<CAB9ggRrAHJiVGPBPeYt0b5iDfa88aTML2Y2VwoEgQgXjPUrmFA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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 <depesz@gmail.com 
> <mailto:depesz@gmail.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@excilys.com <mailto:bdugast@excilys.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?
>
>
>
And the solutions was....

view thread (6+ messages)  latest in thread

Message-ID: <53CFDA42.8010305@gmail.com>
Permalink:  ../53CFDA42.8010305@gmail.com/
Also on:    postgresql.org/message-id/53CFDA42.8010305@gmail.com

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: robjsargent@gmail.com
  Subject: Re: Is CREATE TABLE non-blocking ?
  In-Reply-To: <53CFDA42.8010305@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox