mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
Fix relcache reference leak.
Reported by Kevin Grittner. Faulty commit identified by Tom Lane. Patch by Amit Langote, reviewed by Michael Paquier. Discussion: http://postgr.es/m/CACjxUsOHbH1=99u8mGxmLHfy5hov4ENEpvM6=3ARjos7wG7rtQ@mail.gmail.com
This commit is contained in:
@ -1360,11 +1360,14 @@ acquire_inherited_sample_rows(Relation onerel, int elevel,
|
||||
else
|
||||
{
|
||||
/*
|
||||
* ignore, but release the lock on it. could be a partitioned
|
||||
* table.
|
||||
* ignore, but release the lock on it. don't try to unlock the
|
||||
* passed-in relation
|
||||
*/
|
||||
Assert(childrel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE);
|
||||
if (childrel != onerel)
|
||||
heap_close(childrel, AccessShareLock);
|
||||
else
|
||||
heap_close(childrel, NoLock);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user