Re: [GENERAL] Changing foreign key referential actions in big databases

2016-11-07 Thread Arthur Silva
On Nov 7, 2016 3:34 PM, "Tom Lane" wrote: > > Arthur Silva writes: > > We recently started looking into a long standing ticket to change some > > foreign keys referential actions from CASCADE to RESTRICT for our own > > safety. Everything else in the FK stays the same. > > The problem is that run

Re: [GENERAL] Changing foreign key referential actions in big databases

2016-11-07 Thread Arthur Silva
On Nov 7, 2016 3:29 PM, "Adrian Klaver" wrote: > > On 11/07/2016 02:09 AM, Arthur Silva wrote: >> >> Hi all, we're running a few Pg databases in production. >> >> Ubuntu 14.04 x64 >> 32 x64 cores >> 64GB to 256GB memory, depending on cluster >> PostgreSQL 9.3.9 on x86_64-unknown-linux-gnu, compile

Re: [GENERAL] Changing foreign key referential actions in big databases

2016-11-07 Thread Tom Lane
Arthur Silva writes: > We recently started looking into a long standing ticket to change some > foreign keys referential actions from CASCADE to RESTRICT for our own > safety. Everything else in the FK stays the same. > The problem is that running a query like the one bellow takes an exclusive > l

Re: [GENERAL] Changing foreign key referential actions in big databases

2016-11-07 Thread Adrian Klaver
On 11/07/2016 02:09 AM, Arthur Silva wrote: Hi all, we're running a few Pg databases in production. Ubuntu 14.04 x64 32 x64 cores 64GB to 256GB memory, depending on cluster PostgreSQL 9.3.9 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2, 64-bit FusionIO storage We r

[GENERAL] Changing foreign key referential actions in big databases

2016-11-07 Thread Arthur Silva
Hi all, we're running a few Pg databases in production. Ubuntu 14.04 x64 32 x64 cores 64GB to 256GB memory, depending on cluster PostgreSQL 9.3.9 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2, 64-bit FusionIO storage We recently started looking into a long standing t