Skip to content

Commit

Permalink
Define EXT_OID_START to suggest oid range for extensions.
Browse files Browse the repository at this point in the history
Fix GpMatviewAuxId duplicates 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
  • Loading branch information
avamingli committed Jul 11, 2024
1 parent 3d48d86 commit 23a99a4
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/include/catalog/gp_matview_aux.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/*
* Defines for gp_matview_aux
*/
CATALOG(gp_matview_aux,7061,GpMatviewAuxId) BKI_SHARED_RELATION
CATALOG(gp_matview_aux,7153,GpMatviewAuxId) BKI_SHARED_RELATION
{
Oid mvoid; /* materialized view oid */
NameData mvname; /* materialized view name */
Expand Down
30 changes: 30 additions & 0 deletions src/include/catalog/gp_oid_divide.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*-------------------------------------------------------------------------
*
* oid_divide.h
*
* Portions Copyright (c) 2024-Present HashData, Inc. or its affiliates.
*
*
* IDENTIFICATION
* src/include/catalog/oid_divide.h
*
* NOTES
* This is used to divide oid range for core and extensions
* to avoid duplicated.
*
*-------------------------------------------------------------------------
*/

#ifndef GP_OID_DIVIDE_H
#define GP_OID_DIVIDE_H

/*
* Extensions should use Oids start from EXT_OID_START!
*
* To avoid duplicated oids across extensions or repos.
* We strongly suggest extesions should begin from EXT_OID_START
* to separate kernel and extensions.
*/
#define EXT_OID_START 9932

#endif /* GP_OID_DIVIDE_H */

0 comments on commit 23a99a4

Please # to comment.