File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 1212#include "plpgsql.h"
1313#include "plpgsql_check.h"
1414
15+ #if PG_VERSION_NUM >= 190000
16+
17+ #include "utils/hsearch.h"
18+
19+ #endif
20+
1521#include "utils/inval.h"
1622#include "utils/lsyscache.h"
1723#include "utils/syscache.h"
Original file line number Diff line number Diff line change @@ -374,22 +374,44 @@ plpgsql_check_profiler_shmem_startup(void)
374374 info .keysize = sizeof (profiler_hashkey );
375375 info .entrysize = sizeof (profiler_stmt_chunk );
376376
377+ #if PG_VERSION_NUM >= 190000
378+
379+ shared_profiler_chunks_HashTable = ShmemInitHash ("plpgsql_check profiler chunks" ,
380+ plpgsql_check_profiler_max_shared_chunks ,
381+ & info ,
382+ HASH_ELEM | HASH_BLOBS );
383+
384+ #else
385+
377386 shared_profiler_chunks_HashTable = ShmemInitHash ("plpgsql_check profiler chunks" ,
378387 plpgsql_check_profiler_max_shared_chunks ,
379388 plpgsql_check_profiler_max_shared_chunks ,
380389 & info ,
381390 HASH_ELEM | HASH_BLOBS );
382391
392+ #endif
393+
383394 memset (& info , 0 , sizeof (info ));
384395 info .keysize = sizeof (fstats_hashkey );
385396 info .entrysize = sizeof (fstats );
386397
398+ #if PG_VERSION_NUM >= 190000
399+
400+ shared_fstats_HashTable = ShmemInitHash ("plpgsql_check fstats" ,
401+ 1000 ,
402+ & info ,
403+ HASH_ELEM | HASH_BLOBS );
404+
405+ #else
406+
387407 shared_fstats_HashTable = ShmemInitHash ("plpgsql_check fstats" ,
388408 500 ,
389409 1000 ,
390410 & info ,
391411 HASH_ELEM | HASH_BLOBS );
392412
413+ #endif
414+
393415 LWLockRelease (AddinShmemInitLock );
394416}
395417
You can’t perform that action at this time.
0 commit comments