Re: Foreign Key locking / deadlock issue.... v2

Поиск
Список
Период
Сортировка
От rob stone
Тема Re: Foreign Key locking / deadlock issue.... v2
Дата
Msg-id 1521805381.3002.8.camel@gmail.com
обсуждение исходный текст
Ответ на RE: Foreign Key locking / deadlock issue.... v2  (HORDER Phil <Phil.Horder@uk.thalesgroup.com>)
Ответы RE: Foreign Key locking / deadlock issue.... v2
Список pgsql-general
Hello Phil,

I've run your sample script on 9.6.5 and 10.3.
The only thing that I added was a commit; after the initial inserts
just to ensure the rows were saved.
No errors were reported for either version.

The output of \dp after running was:-

                                Access privileges
 Schema | Name | Type  | Access privileges | Column privileges
|     Policies     
--------+------+-------+-------------------+-------------------+-------
-----------
 public | eln  | table |                   |                   | 
 public | pl   | table |                   |                   |
security_policy:+
        |      |       |                   |                   |   (u):
true


--> including the FOR ALL in the create policy statement as well as
WITH CHECK(true).

                               Access privileges
 Schema | Name | Type  | Access privileges | Column privileges
|     Policies     
--------+------+-------+-------------------+-------------------+-------
-----------
 public | eln  | table |                   |                   | 
 public | pl   | table |                   |                   |
security_policy:+
        |      |       |                   |                   |   (u):
true     +
        |      |       |                   |                   |   (c):
true


The only mystery is what happens here:-

<snip>

-- …. Pause while other processing happens …..
(commit;)
 
 
-- Child table processing – occurs often & quickly. Starts after parent
update.

<\snip>


I'd like to know more about RLS and trying to de-bug your script.

On a production application you'd be testing for errors and raising
exceptions so as to inform users that a problem occurred.

So, without knowing what occurs during "Pause while other processing
happens" I can't help any further.

Cheers,
Rob



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

Предыдущее
От: Patricia DECHANDOL
Дата:
Сообщение: Use pgloader with FDW
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Use pgloader with FDW