pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #8307: can reproduce: pg_dump: schema with OID xxxxxx does not exist
2+ messages / 2 participants
[nested] [flat]

* BUG #8307: can reproduce: pg_dump: schema with OID xxxxxx does not exist
@ 2013-07-17 14:37 michael.enke@wincor-nixdorf.com
  0 siblings, 0 replies; 2+ messages in thread

From: michael.enke@wincor-nixdorf.com @ 2013-07-17 14:37 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      8307
Logged by:          Michael Enke
Email address:      michael.enke@wincor-nixdorf.com
PostgreSQL version: 9.1.8
Operating system:   Linux/CentOS 6.2
Description:        

Hi,
after hitting the above error and found that this is a long lasting one
which nobody knows how to reproduce, I found a way to reproduce it:
In one session create tables in a schema,
in another session drop that schema.


Here comes my test script:


#!/bin/sh


DB=testdb # change if you need
NUM=2000 # adjust so that creation takes enough time to issue drop schema


CREATE=/tmp/$DB.sql
START=/tmp/testdb.start
END=/tmp/testdb.end


LANG=C
rm -f $START $END
>$CREATE
for I in $(seq $NUM); do
  echo "create table t$I(at text, bt text, ct text, dt text);" >> $CREATE
  echo "create table tt$I as select g1.*, t$I.* from g1, t$I where 1=2;" >>
$CREATE
  echo "drop table t$I;" >> $CREATE
done


(
  psql -U postgres -d template1 <<!
    \set ON_ERROR_STOP
    drop database $DB;
    create database $DB;
    \connect $DB
    create schema testschema;
    set search_path = testschema,"\$user",public;
    create table g1(ag text, bg text, cg text, dg text);
    \echo now create $NUM tables
    \o $START
    \o /dev/null
    \i $CREATE
    \o $END
!
  rm -f $CREATE
  sleep 2
  pg_dump -U postgres $DB > testdb.dump
)&


while [ ! -f $START ]; do usleep 100000; done
sleep 1
psql -U postgres -d $DB -c "drop schema testschema cascade" 2>&1 | grep
"^NOTICE"
if [ -f $END ]; then
  echo "too late"
fi
wait
rm -f $START $END


# end script


There are 3 possible errors reported (I executed 10x):
1: Deadlock detected: 1x
2: Could not open relation for Create: 4x
3: cache lookup failed: 5x


In case of 2 or 3 pg_dump reports above error.


If I modify the creation to only one line:
echo "create table tt$I as select g1.* from g1 where 1=2;" >> $CREATE
then in 100% I get the case number 2.


Hope it helps tracking down the reason.



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #8307: can reproduce: pg_dump: schema with OID xxxxxx does not exist
@ 2013-07-17 14:43 Michael Enke <michael.enke@wincor-nixdorf.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Michael Enke @ 2013-07-17 14:43 UTC (permalink / raw)
  To: pgsql-bugs

The script does not work as expected in the very first case where testdb
does not exist.
Please change the "\set ON_ERROR_STOP" to appear behind the "drop
database $DB;"

WINCOR NIXDORF International GmbH
Sitz der Gesellschaft: Paderborn
Registergericht Paderborn HRB 3507
Geschäftsführer: Eckard Heidloff (Vorsitzender), Dr. Jürgen Wunram (stellv. Vors.), Jens Bohlen, Olaf Heyden
Vorsitzender des Aufsichtsrats: Dr. Alexander Dibelius
Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr. DE44477193

Diese E-Mail enthält vertrauliche Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.

This e-mail may contain confidential information.
If you are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail.
Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2013-07-17 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-07-17 14:37 BUG #8307: can reproduce: pg_dump: schema with OID xxxxxx does not exist michael.enke@wincor-nixdorf.com
2013-07-17 14:43 Re: BUG #8307: can reproduce: pg_dump: schema with OID xxxxxx does not exist Michael Enke <michael.enke@wincor-nixdorf.com>

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