Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installations in windows machine #51

Open
kanchanbd04 opened this issue Feb 5, 2023 · 2 comments
Open

installations in windows machine #51

kanchanbd04 opened this issue Feb 5, 2023 · 2 comments
Labels
question Further information is requested

Comments

@kanchanbd04
Copy link

kanchanbd04 commented Feb 5, 2023

I face some problem while installing pg_ivm module in postgres on my windows machine. Can you please kindly help me?

How do I install pg_ivm in postgres on my windows machine?

I use postgresql 14 version. Is pg_ivm module included as built-in feature in any postgresql version?

@delemercier
Copy link

Hello,

On my windows machine, I had to use docker in WSL2 to make it run.

Here are my configs :

docker-compose.yml


version: '3.1'

services:
  db:
    image: postgresql-ivm
    restart: always
    build: ./
    environment:
      POSTGRES_PASSWORD: mypassword
      POSTGRES_DB: postres
    ports:
      - 5432:5432

Dockerfile :

FROM postgres:14-alpine3.15

LABEL maintainer="Denis Lemercier"

RUN apk add --no-cache --virtual .fetch-deps \
        ca-certificates \
        openssl \
        unzip \
    \
    && wget -O pv_ivm.zip "https://github.com/sraoss/pg_ivm/archive/refs/heads/main.zip" \
    && mkdir -p /usr/src/pg_ivm \
    && unzip -d /usr/src/pg_ivm/ pv_ivm.zip \
    && apk add --no-cache --virtual .build-deps \
        autoconf \
        automake \
        clang-dev \
        file \
        g++ \
        gcc \
        gettext-dev \
        json-c-dev \
        libtool \
        libxml2-dev \
        llvm-dev \
        make \
        pcre-dev \
        perl \
        protobuf-c-dev \
    \
    && cd /usr/src/pg_ivm/pg_ivm-main \
    && make install \

Then : docker-compose up -d

@yugo-n yugo-n added the question Further information is requested label Jun 7, 2023
@yugo-n
Copy link
Collaborator

yugo-n commented Jun 7, 2023

I face some problem while installing pg_ivm module in postgres on my windows machine.

What problems are you facing?

I am not familiar to Windows, but if you are facing errors like unresolved external symbol InvalidObjectAddress, the reason would be that such keywords are not exported. This would be resolved in PG15 in the following commit;
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=8ec569479fc28ddd634a13dc100b36352ec3a3c2

In order to build pg_ivm with PG14, perhaps it might be resolved by making DEF file for exporting them, for example,

LIBRARY pg_ivm
EXPORTS
  InvalidObjectAddress                @1
  ....

See https://learn.microsoft.com/en-us/cpp/build/exporting-from-a-dll-using-def-files?view=msvc-170

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants