Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit410fede

Browse files
committed
Fix two bugs in change_owner_recurse_to_sequences: it was grabbing an
overly strong lock on pg_depend, and it wasn't closing the rel when done.The latter bug was masked by the ResourceOwner code, which is somethingthat should be changed.
1 parent6d3f74d commit410fede

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎src/backend/commands/tablecmds.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.150 2005/03/24 00:03:22 neilc Exp $
11+
* $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.151 2005/03/25 18:04:34 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -5374,7 +5374,7 @@ change_owner_recurse_to_sequences(Oid relationOid, int32 newOwnerSysId)
53745374
* SERIAL sequences are those having an internal dependency on one
53755375
* of the table's columns (we don't care *which* column, exactly).
53765376
*/
5377-
depRel=heap_openr(DependRelationName,RowExclusiveLock);
5377+
depRel=heap_openr(DependRelationName,AccessShareLock);
53785378

53795379
ScanKeyInit(&key[0],
53805380
Anum_pg_depend_refclassid,
@@ -5420,6 +5420,8 @@ change_owner_recurse_to_sequences(Oid relationOid, int32 newOwnerSysId)
54205420
}
54215421

54225422
systable_endscan(scan);
5423+
5424+
relation_close(depRel,AccessShareLock);
54235425
}
54245426

54255427
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp