pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Ryan Kelly <rpkelly22@gmail.com>
Cc: joe <joe@tanga.com>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #6699: pg_restore with -j -- doesn't restore view that groups by primary key
Date: Tue, 19 Jun 2012 22:56:30 -0400
Message-ID: <14428.1340160990@sss.pgh.pa.us> (raw)
In-Reply-To: <12801.1340155595@sss.pgh.pa.us>
References: <E1Sh4QS-0000EB-4R@wrigleys.postgresql.org>
	<20120619202058.GA7792@llserver.lakeliving.com>
	<1340139400-sup-7121@alvh.no-ip.org>
	<22882.1340141854@sss.pgh.pa.us>
	<12801.1340155595@sss.pgh.pa.us>

I wrote:
> 168; 1259 41968 TABLE public t1 postgres
> ;       depends on: 5
> 1921; 2606 41975 CONSTRAINT public t1_pkey postgres
> ;       depends on: 168 168
> 169; 1259 41976 VIEW public v1 postgres
> ;       depends on: 1919 5
> 1922; 0 41968 TABLE DATA public t1 postgres
> ;       depends on: 168

BTW, there's another pretty unpleasant thing going on here, which is
that the t1_pkey constraint is getting hoisted up to before t1's table
data because it is a dependency of v1.  That means the index will be
created before the data is loaded, which is not what we want.

Parallel pg_restore actually has a hack that should work around that,
namely repoint_table_dependencies().  That doesn't help for plain serial
restores though.  I'm thinking we really ought to bite the bullet and do
something comparable to repoint_table_dependencies() at an appropriate
point in pg_dump, so that the dependencies are sane to begin with.

			regards, tom lane



view thread (9+ messages)  latest in thread

Message-ID: <14428.1340160990@sss.pgh.pa.us>
Permalink:  ../14428.1340160990@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14428.1340160990@sss.pgh.pa.us

 · 

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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@commandprompt.com, rpkelly22@gmail.com, joe@tanga.com
  Subject: Re: BUG #6699: pg_restore with -j -- doesn't restore view that groups by primary key
  In-Reply-To: <14428.1340160990@sss.pgh.pa.us>
  References: <E1Sh4QS-0000EB-4R@wrigleys.postgresql.org> <20120619202058.GA7792@llserver.lakeliving.com> <1340139400-sup-7121@alvh.no-ip.org> <22882.1340141854@sss.pgh.pa.us> <12801.1340155595@sss.pgh.pa.us> <14428.1340160990@sss.pgh.pa.us>

* 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