Re: foreign key on delete cascade order?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: George Woodring <george(dot)woodring(at)iglass(dot)net>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: foreign key on delete cascade order?
Date: 2022-03-10 17:38:27
Message-ID: 658814.1646933907@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

George Woodring <george(dot)woodring(at)iglass(dot)net> writes:
> I have always thought the way to avoid deadlocks was to update rows in the
> same order by the different updaters. Is there a better chain of thought
> for updating and deleting rows at the same time? Do we need to put a lock
> on the table to update, then have the delete queue up waiting for the lock
> to be removed?

With the amount of detail you've provided (viz: none), it's impossible
for anyone to guess what your problem actually is, let alone speculate
on suitable solutions.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Durumdara 2022-03-11 08:53:44 Am I in the same transaction block in complex PLPGSQL?
Previous Message George Woodring 2022-03-10 17:32:21 Re: foreign key on delete cascade order?