Search Postgresql Archives

Re: foreign key on delete cascade order?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 10, 2022 at 10:56 AM Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
 Each cascaded delete ought to be removing a disjoint set of rows in the referencing
table, so I'm not quite sure why order should matter.

                        regards, tom lane

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?

Thanks,
George 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux