Re: Is CREATE TABLE non-blocking ?

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: Is CREATE TABLE non-blocking ?
Дата
Msg-id CAKrjmhfFt7jt9gJowB8eQ8eMnkUwVqNFA2EFhmR9AA+XWvbZbg@mail.gmail.com
обсуждение исходный текст
Ответ на Is CREATE TABLE non-blocking ?  (Benjamin Dugast <bdugast@excilys.com>)
Ответы Re: Is CREATE TABLE non-blocking ?  (Benjamin Dugast <bdugast@excilys.com>)
Список pgsql-sql
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> 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?

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

Предыдущее
От: Benjamin Dugast
Дата:
Сообщение: Is CREATE TABLE non-blocking ?
Следующее
От: David G Johnston
Дата:
Сообщение: Re: Is CREATE TABLE non-blocking ?