Skip to content

Commit

Permalink
drop support for pre pg11
Browse files Browse the repository at this point in the history
  • Loading branch information
luss committed Sep 9, 2023
1 parent f332e3f commit e15bca2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
10 changes: 0 additions & 10 deletions plprofiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,7 @@ _PG_init(void)
/* Request the additionl shared memory and LWLock needed. */
#if PG_VERSION_NUM < 150000
RequestAddinShmemSpace(profiler_shmem_size());
#if PG_VERSION_NUM >= 90600
RequestNamedLWLockTranche("plprofiler", 1);
#else
RequestAddinLWLocks(1);
#endif
#endif
}
}
Expand Down Expand Up @@ -672,11 +668,7 @@ profiler_shmem_startup(void)
memset(plpss, 0, offsetof(profilerSharedState, line_info) +
sizeof(linestatsLineInfo) * profiler_max_lines);

#if PG_VERSION_NUM >= 90600
plpss->lock = &(GetNamedLWLockTranche("plprofiler"))->lock;
#else
plpss->lock = LWLockAssign();
#endif
}

/* (Re)Initialize local hash tables. */
Expand Down Expand Up @@ -1171,10 +1163,8 @@ profiler_xact_callback(XactEvent event, void *arg)
{
case XACT_EVENT_COMMIT:
case XACT_EVENT_ABORT:
#if PG_VERSION_NUM >= 90500
case XACT_EVENT_PARALLEL_COMMIT:
case XACT_EVENT_PARALLEL_ABORT:
#endif
profiler_collect_data();
break;

Expand Down
4 changes: 0 additions & 4 deletions plprofiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@
#include <sys/time.h>
#include "access/hash.h"
#include "access/htup.h"

#if PG_VERSION_NUM >= 90300
#include "access/htup_details.h"
#endif

#include "access/sysattr.h"
#include "catalog/indexing.h"
#include "catalog/namespace.h"
Expand Down

0 comments on commit e15bca2

Please sign in to comment.