pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Deferrable FK not behaving as expected.
Date: Mon, 7 Dec 2020 16:56:35 -0600
Message-ID: <3e71cfa9-77d5-06c0-f435-9baffc55ea94@gmail.com> (raw)
In-Reply-To: <3159381.1607377202@sss.pgh.pa.us>
References: <75fe0761-a291-86a9-c8d8-4906da077469@gmail.com>
	<b97cbd9d-1615-c9e1-aff1-683a37fedee9@gmx.net>
	<3c32cc9c-1589-7f22-b9e3-f4bcccbaf87e@gmail.com>
	<3144564.1607369236@sss.pgh.pa.us>
	<9c844ed1-e9e3-57c9-3f34-3b09479078e6@gmail.com>
	<3159381.1607377202@sss.pgh.pa.us>

On 12/7/20 3:40 PM, Tom Lane wrote:
> Ron <ronljohnsonjr@gmail.com> writes:
>> That works *sometimes*, but not when we *really* want it to work.
>> test=# begin transaction;
>> BEGIN
>> test=# ALTER TABLE sales_header DETACH PARTITION sales_header_202001;
>> ERROR:  removing partition "sales_header_202001" violates foreign key
>> constraint "sales_detail_cust_id_order_ts_fkey"
> That I think you're gonna have to live with.  DETACH PARTITION isn't
> something we can defer to end of transaction.

Very sad, since it would simplify the archiving of the 24x365 system we're 
porting from Oracle to RDS Postgresql.

-- 
Angular momentum makes the world go 'round.





view thread (10+ messages)

Message-ID: <3e71cfa9-77d5-06c0-f435-9baffc55ea94@gmail.com>
Permalink:  ../3e71cfa9-77d5-06c0-f435-9baffc55ea94@gmail.com/
Also on:    postgresql.org/message-id/3e71cfa9-77d5-06c0-f435-9baffc55ea94@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ronljohnsonjr@gmail.com
  Subject: Re: Deferrable FK not behaving as expected.
  In-Reply-To: <3e71cfa9-77d5-06c0-f435-9baffc55ea94@gmail.com>
  References: <75fe0761-a291-86a9-c8d8-4906da077469@gmail.com> <b97cbd9d-1615-c9e1-aff1-683a37fedee9@gmx.net> <3c32cc9c-1589-7f22-b9e3-f4bcccbaf87e@gmail.com> <3144564.1607369236@sss.pgh.pa.us> <9c844ed1-e9e3-57c9-3f34-3b09479078e6@gmail.com> <3159381.1607377202@sss.pgh.pa.us> <3e71cfa9-77d5-06c0-f435-9baffc55ea94@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox