We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
2 parents2561f96 +d759c1b commitb94b4f2Copy full SHA for b94b4f2
.gitignore
@@ -1,4 +1,7 @@
1
.deps
2
+results/pg_pathman.out
3
+regression.diffs
4
+regression.out
5
*.o
6
*.so
-pg_pathman--*.sql
7
+pg_pathman--*.sql
dsm_array.c
@@ -290,7 +290,7 @@ resize_dsm_array(DsmArray *arr, size_t entry_size, size_t length)
290
}
291
292
void*
293
-dsm_array_get_pointer(constDsmArray*arr)
+dsm_array_get_pointer(constDsmArray*arr)
294
{
295
return (char*)dsm_segment_address(segment)+arr->offset+sizeof(BlockHeader);
296
pl_funcs.c
@@ -159,11 +159,6 @@ find_or_create_range_partition(PG_FUNCTION_ARGS)
159
/* Start background worker to create new partitions */
160
child_oid=create_partitions_bg_worker(relid,value,value_type,&crashed);
161
162
-// SPI_connect();
163
-// child_oid = create_partitions(relid, value, value_type, &crashed);
164
-// SPI_finish();
165
-// elog(WARNING, "Worker finished");
166
-
167
/* Release locks */
168
if (!crashed)
169
@@ -172,8 +167,7 @@ find_or_create_range_partition(PG_FUNCTION_ARGS)
172
173
174
/* Repeat binary search */
175
-ranges=dsm_array_get_pointer(&rangerel->ranges);
176
-pos=range_binary_search(rangerel,&cmp_func,value,&found);
170
+(void)range_binary_search(rangerel,&cmp_func,value,&found);
177
171
if (found)
178
PG_RETURN_OID(child_oid);
179
worker.c
@@ -99,6 +99,12 @@ create_partitions_bg_worker(Oid relid, Datum value, Oid value_type, bool *crashe
99
100
/* Wait till the worker finishes its job */
101
status=WaitForBackgroundWorkerShutdown(worker_handle);
102
+if (status==BGWH_POSTMASTER_DIED)
103
+{
104
+ereport(WARNING,
105
+ (errmsg("Postmaster died during the pg_pathman background worker process"),
106
+errhint("More details may be available in the server log.")));
107
+}
108
*crashed=args->crashed;
109
child_oid=args->result;
110
@@ -170,7 +176,6 @@ create_partitions(Oid relid, Datum value, Oid value_type, bool *crashed)
prel=get_pathman_relation_info(relid,NULL);
rangerel=get_pathman_range_relation(relid,NULL);
180
/* Comparison function */
181
cmp_func=*get_cmp_func(value_type,prel->atttype);