Re: foreign key locks

Lists: pgsql-hackers
From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <alvherre(at)commandprompt(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: foreign key locks
Date: 2012-06-23 22:38:10
Message-ID: 4FE5FF020200002500048A3D@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Alvaro Herrera wrote:

> So here's the rebased version.

I found a couple problems on `make check-world`. Attached is a patch
to fix one of them. The other is on pg_upgrade, pasted below.

+ pg_upgrade -d
/home/kevin/pg/master/contrib/pg_upgrade/tmp_check/data.old -D
/home/kevin/pg/master/contrib/pg_upgrade/tmp_check/data -b
/home/kevin/pg/master/contrib/pg_upgrade/tmp_check/install//home/
kevin/pg/master/Debug/bin -B
/home/kevin/pg/master/contrib/pg_upgrade/tmp_check/install//home/
kevin/pg/master/Debug/bin
Performing Consistency Checks
-----------------------------
Checking current, bin, and data directories ok
Checking cluster versions ok
Checking database user is a superuser ok
Checking for prepared transactions ok
Checking for reg* system OID user data types ok
Checking for contrib/isn with bigint-passing mismatch ok
Creating catalog dump ok
Checking for presence of required libraries ok
Checking database user is a superuser ok
Checking for prepared transactions ok

If pg_upgrade fails after this point, you must re-initdb the
new cluster before continuing.

Performing Upgrade
------------------
Analyzing all rows in the new cluster ok
Freezing all rows on the new cluster ok
Deleting files from new pg_clog ok
Copying old pg_clog to new server ok
Setting next transaction ID for new cluster ok
Deleting files from new pg_multixact/offsets ok
Copying old pg_multixact/offsets to new server ok
Deleting files from new pg_multixact/members ok
Copying old pg_multixact/members to new server ok
Setting next multixact ID and offset for new cluster sh:
/home/kevin/pg/master/contrib/pg_upgrade/tmp_check/install//home/
kevin/pg/master/Debug/bin: Permission denied
*failure*

Consult the last few lines of ""%s/pg_resetxlog" -O %u -m %u,%u "%s"
> /dev/null" for the probable cause of the failure.
Failure, exiting
make[2]: *** [check] Error 1
make[2]: Leaving directory `/home/kevin/pg/master/contrib/pg_upgrade'
make[1]: *** [check-pg_upgrade-recurse] Error 2
make[1]: Leaving directory `/home/kevin/pg/master/contrib'
make: *** [check-world-contrib-recurse] Error 2

I'm marking it as "Waiting for Author" since this seems like a "must
fix", but I'll keep looking at it,

-Kevin

Attachment Content-Type Size
fklocks-13a.diff application/octet-stream 719 bytes

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Kevin Grittner <kevin(dot)grittner(at)wicourts(dot)gov>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: foreign key locks
Date: 2012-06-25 03:24:47
Message-ID: 1340594279-sup-1868@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


Excerpts from Kevin Grittner's message of sáb jun 23 18:38:10 -0400 2012:
> Alvaro Herrera wrote:
>
> > So here's the rebased version.
>
> I found a couple problems on `make check-world`. Attached is a patch
> to fix one of them. The other is on pg_upgrade, pasted below.

Ah, I mismerged pg_upgrade. The fix is trivial, AFAICS -- a function
call is missing a log file name to be specified. Strange that the
compiler didn't warn me of a broken printf format specifier. However,
pg_upgrade itself has been broken by an unrelated commit and that fix is
not so trivial, so I'm stuck waiting for that to be fixed. (We really
need automated pg_upgrade testing.)

Thanks for the patch for the other problem, I'll push it out.

> I'm marking it as "Waiting for Author" since this seems like a "must
> fix", but I'll keep looking at it,

Great, thanks.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Kevin Grittner <kevin(dot)grittner(at)wicourts(dot)gov>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: foreign key locks
Date: 2012-06-25 03:47:19
Message-ID: 1340595731-sup-7644@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Excerpts from Alvaro Herrera's message of dom jun 24 23:24:47 -0400 2012:
> Excerpts from Kevin Grittner's message of sáb jun 23 18:38:10 -0400 2012:
> > Alvaro Herrera wrote:
> >
> > > So here's the rebased version.
> >
> > I found a couple problems on `make check-world`. Attached is a patch
> > to fix one of them. The other is on pg_upgrade, pasted below.
>
> Ah, I mismerged pg_upgrade. The fix is trivial, AFAICS -- a function
> call is missing a log file name to be specified. Strange that the
> compiler didn't warn me of a broken printf format specifier. However,
> pg_upgrade itself has been broken by an unrelated commit and that fix is
> not so trivial, so I'm stuck waiting for that to be fixed. (We really
> need automated pg_upgrade testing.)

Well, I ended up pushing the pg_upgrade fix anyway even though I
couldn't test it, because I had already committed it to my tree before
your patch. If it still doesn't work after the other guys fix the
outstanding problem I'll just push a new patch.

In the meantime, here's fklocks v14, which also merges to new master as
there were several other conflicts. It passes make installcheck-world
now.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Attachment Content-Type Size
fklocks-14.patch application/octet-stream 89.1 KB