Skip to content

Commit 691f2a7

Browse files
committed
Define EXT_OID_START to suggest oid range for extensions.
Fix GpMatviewAuxId has duplicated oid with other extensions. All extension should use oids start from EXT_OID_START to avoid this issue. Authored-by: Zhang Mingli avamingli@gmail.com
1 parent 3d48d86 commit 691f2a7

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

src/include/catalog/gp_matview_aux.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/*
2424
* Defines for gp_matview_aux
2525
*/
26-
CATALOG(gp_matview_aux,7061,GpMatviewAuxId) BKI_SHARED_RELATION
26+
CATALOG(gp_matview_aux,7153,GpMatviewAuxId) BKI_SHARED_RELATION
2727
{
2828
Oid mvoid; /* materialized view oid */
2929
NameData mvname; /* materialized view name */
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*-------------------------------------------------------------------------
2+
*
3+
* oid_divide.h
4+
*
5+
* Portions Copyright (c) 2024-Present HashData, Inc. or its affiliates.
6+
*
7+
*
8+
* IDENTIFICATION
9+
* src/include/catalog/oid_divide.h
10+
*
11+
* NOTES
12+
* This is used to divide oid range for core and extensions
13+
* to avoid duplicated.
14+
*
15+
*-------------------------------------------------------------------------
16+
*/
17+
18+
#ifndef GP_OID_DIVIDE_H
19+
#define GP_OID_DIVIDE_H
20+
21+
/*
22+
* Extensions should use Oids start from EXT_OID_START!
23+
*
24+
* To avoid duplicated oids across extensions or repos.
25+
* We strongly suggest extesions should begin from EXT_OID_START
26+
* to separate kernel and extensions.
27+
*/
28+
#define EXT_OID_START 9932
29+
30+
#endif /* GP_OID_DIVIDE_H */

0 commit comments

Comments
 (0)