forked from timescale/timescaledb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To properly clean up the OSM catalog we need a way to reliably track hypertable deletion (including internal hypertables for CAGGS).
- Loading branch information
Showing
8 changed files
with
129 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* This file and its contents are licensed under the Apache License 2.0. | ||
* Please see the included NOTICE for copyright information and | ||
* LICENSE-APACHE for a copy of the license. | ||
*/ | ||
#include "osm_callbacks.h" | ||
|
||
#include <fmgr.h> | ||
|
||
#define OSM_CALLBACKS_VAR_NAME "osm_callbacks" | ||
|
||
OsmCallbacks * | ||
ts_get_osm_callbacks(void) | ||
{ | ||
OsmCallbacks **ptr = (OsmCallbacks **) find_rendezvous_variable(OSM_CALLBACKS_VAR_NAME); | ||
|
||
return *ptr; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* This file and its contents are licensed under the Apache License 2.0. | ||
* Please see the included NOTICE for copyright information and | ||
* LICENSE-APACHE for a copy of the license. | ||
*/ | ||
#ifndef TIMESCALEDB_OSM_CALLBACKS_H | ||
#define TIMESCALEDB_OSM_CALLBACKS_H | ||
|
||
#include <postgres.h> | ||
#include <catalog/objectaddress.h> | ||
|
||
typedef int (*chunk_insert_check_hook_type)(Oid ht_oid, int64 range_start, int64 range_end); | ||
typedef void (*hypertable_drop_hook_type)(const char *schema_name, const char *table_name); | ||
|
||
/* | ||
* Object Storage Manager callbacks. | ||
* | ||
* chunk_insert_check_hook - checks whether the specified range is managed by OSM | ||
* hypertable_drop_hook - used for OSM catalog cleanups | ||
*/ | ||
typedef struct | ||
{ | ||
chunk_insert_check_hook_type chunk_insert_check_hook; | ||
hypertable_drop_hook_type hypertable_drop_hook; | ||
} OsmCallbacks; | ||
|
||
extern OsmCallbacks *ts_get_osm_callbacks(void); | ||
|
||
#endif /* TIMESCALEDB_OSM_CALLBACKS_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters