pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Greg Stark <gsstark@mit.edu>
To: Jim C. Nasby <jnasby@pervasive.com>
Cc: Greg Stark <gsstark@mit.edu>
Cc: Brendan Duddridge <brendan@clickspace.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: App very unresponsive while performing simple update
Date: 01 Jun 2006 00:30:46 -0400
Message-ID: <87hd35ijk9.fsf@stark.xeocode.com> (raw )
In-Reply-To: <20060601031805.GI53487@pervasive.com >
References: <961F6F02-4B00-494C-B071-6DF76A305C14@clickspace.com >
<21B15664-F4EE-462C-88B4-EEEB2B4A979F@clickspace.com >
<874pzanvk6.fsf@stark.xeocode.com >
<17733.1148832292@sss.pgh.pa.us >
<3C756C36-DC66-4D13-B2CE-99CFCE7BF390@clickspace.com >
<87hd39n3c4.fsf@stark.xeocode.com >
<20060531062307.GG53487@pervasive.com >
<874pz6jjze.fsf@stark.xeocode.com >
<20060601031805.GI53487@pervasive.com >
"Jim C. Nasby" <jnasby@pervasive.com> writes:
> I tried duplicating this but couldn't. What's the data in the tables?
Sorry, I had intended to include the definition and data:
stark=> create table t1 (a integer primary key, b integer);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "t1_pkey" for table "t1"
CREATE TABLE
stark=> create table t2 (a integer, b integer primary key);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "t2_pkey" for table "t2"
CREATE TABLE
stark=> insert into t1 values (1,2);
INSERT 0 1
stark=> insert into t2 values (1,2);
INSERT 0 1
stark=> alter table t1 add constraint fk foreign key (b) references t2 deferrable initially deferred ;
ALTER TABLE
stark=> alter table t2 add constraint fk foreign key (a) references t1 deferrable initially deferred ;
ALTER TABLE
stark=> \d t1
Table "public.t1"
Column | Type | Modifiers
--------+---------+-----------
a | integer | not null
b | integer |
Indexes:
"t1_pkey" PRIMARY KEY, btree (a)
Foreign-key constraints:
"fk" FOREIGN KEY (b) REFERENCES t2(b) DEFERRABLE INITIALLY DEFERRED
stark=> \d t2
Table "public.t2"
Column | Type | Modifiers
--------+---------+-----------
a | integer |
b | integer | not null
Indexes:
"t2_pkey" PRIMARY KEY, btree (b)
Foreign-key constraints:
"fk" FOREIGN KEY (a) REFERENCES t1(a) DEFERRABLE INITIALLY DEFERRED
stark=> select * from t1;
a | b
---+---
1 | 2
(1 row)
stark=> select * from t2;
a | b
---+---
1 | 2
(1 row)
--
greg
view thread (18+ messages)
Message-ID: <87hd35ijk9.fsf@stark.xeocode.com>
Permalink: ../87hd35ijk9.fsf@stark.xeocode.com/
Also on: postgresql.org/message-id/87hd35ijk9.fsf@stark.xeocode.com
copy link · copy postgr.es
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: gsstark@mit.edu, jnasby@pervasive.com, brendan@clickspace.com, tgl@sss.pgh.pa.us
Subject: Re: App very unresponsive while performing simple update
In-Reply-To: <87hd35ijk9.fsf@stark.xeocode.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