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

Commite8d526b

Browse files
committed
-
1 parent260738c commite8d526b

File tree

4 files changed

+80
-0
lines changed

4 files changed

+80
-0
lines changed

‎contrib/pg_exchange/expath.c

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* expath.c
3+
*
4+
*/
5+
6+
#include"postgres.h"
7+
8+
#include"optimizer/pathnode.h"
9+
10+
#include"expath.h"
11+
12+
13+
/*
14+
* FDW paths and EXCHANGE paths are incompatible and can't be combined at a plan.
15+
* We need to construct two non-intersecting path branches across all plan.
16+
* Costs of this plans is not an indicator of path quality at intermediate
17+
* stages of a plan building. We need bypass add_path() path checking procedure.
18+
*/
19+
void
20+
force_add_path(RelOptInfo*rel,Path*path)
21+
{
22+
List*pathlist=rel->pathlist;
23+
24+
rel->pathlist=NIL;
25+
rel->cheapest_parameterized_paths=NIL;
26+
rel->cheapest_startup_path=rel->cheapest_total_path=
27+
rel->cheapest_unique_path=NULL;
28+
add_path(rel,path);
29+
rel->pathlist=list_concat(rel->pathlist,pathlist);
30+
set_cheapest(rel);
31+
}

‎contrib/pg_exchange/expath.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* expath.h
3+
*
4+
*/
5+
6+
#ifndefEXPATH_H_
7+
#defineEXPATH_H_
8+
9+
#include"nodes/relation.h"
10+
11+
voidforce_add_path(RelOptInfo*rel,Path*path);
12+
13+
#endif/* EXPATH_H_ */

‎contrib/pg_exchange/sbuf.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* sbuf.c
3+
*
4+
*/
5+
6+
#include"sbuf.h"
7+
8+
void
9+
initTupleBuffer(TupleBuffer*tbuf,size_tmem_size)
10+
{
11+
tbuf->curptr=&tbuf->data;
12+
/* Will corrected before send to DMQ for 'trim tails' purpose. */
13+
tbuf->size=mem_size;
14+
}

‎contrib/pg_exchange/sbuf.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* sbuf.h
3+
*
4+
*/
5+
6+
#ifndefSBUF_H_
7+
#defineSBUF_H_
8+
9+
#include"postgres.h"
10+
11+
typedefstructTupleBuffer
12+
{
13+
size_tsize;
14+
void*curptr;
15+
chardata[FLEXIBLE_ARRAY_MEMBER];
16+
}TupleBuffer;
17+
18+
#defineDEFAULT_TUPLEBUF_SIZE(BLCKSZ * 2)
19+
20+
externvoidinitTupleBuffer(TupleBuffer*tbuf,size_tmem_size);
21+
22+
#endif/* SBUF_H_ */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp