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

Commitfdf87ed

Browse files
committed
Fix failure-to-copy bug in commit6f6b99d.
The previous coding of get_qual_for_list() was careful to copy everythingit was using from the input data structure. The new version missedmaking a copy of pass-by-ref datum values that it's inserting into Consts.This is not optional, however, as revealed by buildfarm failures onmachines running -DRELCACHE_FORCE_RELEASE: we're copying from a relcacheentry that could go away before the required lifespan of our outputexpression. I'm pretty sure -DCLOBBER_CACHE_ALWAYS machines won't likethis either, but none of them have reported in yet.
1 parente56dd7c commitfdf87ed

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎src/backend/catalog/partition.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,12 +1559,18 @@ get_qual_for_list(Relation parent, PartitionBoundSpec *spec)
15591559
{
15601560
Const*val;
15611561

1562-
/* Construct const from datum */
1562+
/*
1563+
* Construct Const from known-not-null datum. We must be careful
1564+
* to copy the value, because our result has to be able to outlive
1565+
* the relcache entry we're copying from.
1566+
*/
15631567
val=makeConst(key->parttypid[0],
15641568
key->parttypmod[0],
15651569
key->parttypcoll[0],
15661570
key->parttyplen[0],
1567-
*boundinfo->datums[i],
1571+
datumCopy(*boundinfo->datums[i],
1572+
key->parttypbyval[0],
1573+
key->parttyplen[0]),
15681574
false,/* isnull */
15691575
key->parttypbyval[0]);
15701576

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp