Skip to content

Commit

Permalink
add pg_proctab (#205)
Browse files Browse the repository at this point in the history
Co-authored-by: Ian Stanton <ian@coredb.io>
  • Loading branch information
EvanHStanton and ianstanton authored Jul 13, 2023
1 parent b308a45 commit 97795bb
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
31 changes: 31 additions & 0 deletions contrib/pg_proctab/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
ARG PG_VERSION=15
FROM quay.io/coredb/c-builder:pg${PG_VERSION}
USER root

# Extension build dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libreadline-dev \
zlib1g-dev \
flex bison \
libxml2-dev \
libxslt-dev \
libssl-dev \
libxml2-utils \
xsltproc \
ccache

# Clone repository
RUN git clone https://github.com/postgres/postgres.git

ARG PG_VERSION=15

# Build extension
RUN cd postgres && \
git fetch origin REL_${PG_VERSION}_STABLE && \
git checkout REL_${PG_VERSION}_STABLE && \
./configure && \
cd contrib && \
git clone https://gitlab.com/pg_proctab/pg_proctab.git && \
cd pg_proctab && \
make USE_PGXS=1
20 changes: 20 additions & 0 deletions contrib/pg_proctab/Trunk.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[extension]
name = "pg_proctab"
version = "0.0.10"
repository = "https://gitlab.com/pg_proctab/pg_proctab"
license = "Copyright"
description = "Access operating system process table."
homepage = "https://pg_proctab.gitlab.io/"
documentation = "https://gitlab.com/pg_proctab/pg_proctab"
categories = ["metrics"]

[build]
postgres_version = "15"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd postgres/contrib/pg_proctab && make USE_PGXS=1 install
set -x
mv /usr/local/pgsql/share/extension/* /usr/share/postgresql/15/extension
mv /usr/local/pgsql/lib/* /usr/lib/postgresql/15/lib
"""

0 comments on commit 97795bb

Please sign in to comment.