postgres icon indicating copy to clipboard operation
postgres copied to clipboard

Test extensions

Open nbyavuz opened this issue 2 years ago • 16 comments

I am not sure if that is correct way to test the extensions? Also, I tried a couple more extensions but it seems they don't support PG 15 yet. Do you have any other extension suggestions to add?

nbyavuz avatar Jun 21 '22 14:06 nbyavuz

I did some refactoring and added pgbouncer.

Some of the tests' of pgbouncer fail, they also fail on my local except test_password_server, which passes on my local. (I didn't try pgbouncer with autoconf)

nbyavuz avatar Jun 22 '22 13:06 nbyavuz

Some of the tests' of pgbouncer fail, they also fail on my local except test_password_server, which passes on my local. (I didn't try pgbouncer with autoconf)

It'd be good to check if that works with autoconf. If it's reproducible there, worth opening a bug

I am not sure if that is correct way to test the extensions?

Looks good.

Also, I tried a couple more extensions but it seems they don't support PG 15 yet. Do you have any other extension suggestions to add?

A good source could be the list of extensions from the various cloud providers. E.g. https://docs.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-extensions#postgres-13-extensions https://docs.aws.amazon.com/AmazonRDS/latest/PostgreSQLReleaseNotes/postgresql-extensions.html#postgresql-extensions-14x Note that a lot of these are ones built into postgres (in contrib/), thus not worth testing.

Likely interesting:

  • oracfe
  • hll
  • pg_partman
  • hypopg
  • pg_qualstats
  • postgis (but that's likely too much work / too expensive)

anarazel avatar Jun 22 '22 19:06 anarazel

Some of the tests' of pgbouncer fail, they also fail on my local except test_password_server, which passes on my local. (I didn't try pgbouncer with autoconf)

It'd be good to check if that works with autoconf. If it's reproducible there, worth opening a bug

I checked with autoconf and same errors appeared.


* oracfe

While building oracfe, it fails with:

others.c: In function ‘ora_get_major_version’:
others.c:511:42: error: ‘PACKAGE_STRING’ undeclared (first use in this function); did you mean ‘PACKAGE_VERSION’?
  511 |         PG_RETURN_TEXT_P(cstring_to_text(PACKAGE_STRING));

* hll

While building hll, it fails with:

src/hll.c:50:10: fatal error: utils/int8.h: No such file or directory
   50 | #include "utils/int8.h"

* pg_partman

Build step doesn't work, there is open issue for error: https://github.com/pgpartman/pg_partman/issues/464 and I couldn't find a way to start tests of pg_partman.


* hypopg

Done.


* pg_qualstats

Done.


* postgis (but that's likely too much work / too expensive)

Almost done, only one test (in_gml) fails and it also fails on my local. It is interesting that I tested with autoconf and there were 2 tests (in_gml, long_xact) failed.


nbyavuz avatar Jul 25 '22 11:07 nbyavuz

While building hll, it fails with:

Does it work against an autoconf build?

Almost done, only one test (in_gml) fails and it also fails on my local. It is interesting that I tested with autoconf and there were 2 tests (in_gml, long_xact) failed.

Probably worth reporting to the postgis folks

anarazel avatar Aug 01 '22 16:08 anarazel

While building hll, it fails with:

Does it work against an autoconf build?

No, it seems utils/int8.h no longer exist in postgres.

Almost done, only one test (in_gml) fails and it also fails on my local. It is interesting that I tested with autoconf and there were 2 tests (in_gml, long_xact) failed.

Probably worth reporting to the postgis folks

I updated my default postgres branch and only in_gml test fails now. I will report it.

nbyavuz avatar Aug 02 '22 09:08 nbyavuz

No, it seems utils/int8.h no longer exist in postgres.

Extensions that fail to build with autoconf as well don't seem worth testing...

anarazel avatar Aug 02 '22 16:08 anarazel

others.c:511:42: error: ‘PACKAGE_STRING’ undeclared (first use in this function); did you mean ‘PACKAGE_VERSION’?
  511 |         PG_RETURN_TEXT_P(cstring_to_text(PACKAGE_STRING));

FWIW, I think that might now be fixed, I defined it.

anarazel avatar Aug 04 '22 16:08 anarazel

I re-enabled 'pg_partman' since https://github.com/pgpartman/pg_partman/issues/464 is fixed.

postgis is working now, it seems that both 'proj' and 'proj-devel' need to be installed on OpenSUSE Tumbleweed. 'proj-devel' is enough to build but 'in_gml' test doesn't pass.

pg_bouncer isn't working(same errors on autoconf), should I remove or comment it?

nbyavuz avatar Sep 13 '22 09:09 nbyavuz

pg_bouncer isn't working(same errors on autoconf), should I remove or comment it?

Yes, commenting it out for now makes sense.

anarazel avatar Sep 13 '22 19:09 anarazel

I updated branch to use debian instead of openSUSE.

building orafce fails with:

parse_keyword.c:5:10: fatal error: parser/gramparse.h: No such file or directory
    5 | #include "parser/gramparse.h"
       |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [/usr/local/lib/x86_64-linux-gnu/postgresql/pgxs/src/makefiles/../../src/Makefile.global:948: parse_keyword.o] Error 1

And I have some questions:

1 - I think we can create another task to build and test extensions, we can set that task's depends_on: debian meson task. Otherwise, if the tests pass but extensions fail; task will be shown as failed. 2 - Should packages required to build extensions be installed while creating the debian image or during the task itself?

nbyavuz avatar Sep 29 '22 12:09 nbyavuz

building orafce fails with:

orafce will need to be updated...

2 - Should packages required to build extensions be installed while creating the debian image or during the task itself?

What packages are we talking about here? Depends on the size, I'd say.

anarazel avatar Oct 03 '22 16:10 anarazel

1 - I think we can create another task to build and test extensions, we can set that task's depends_on: debian meson task. Otherwise, if the tests pass but extensions fail; task will be shown as failed.

Yes, that makes sense.

anarazel avatar Oct 03 '22 16:10 anarazel

It might even be worth setting allow_failures for that task.

anarazel avatar Oct 03 '22 16:10 anarazel

2 - Should packages required to build extensions be installed while creating the debian image or during the task itself?

What packages are we talking about here? Depends on the size, I'd say.

install_required_packages_for_extensions_script: |
  apt-get update
  DEBIAN_FRONTEND=noninteractive apt-get -y install \
    autoconf \
    libtool \
    libgeos-dev \
    libproj-dev \
    libprotobuf-c-dev \
    protobuf-c-compiler

nbyavuz avatar Oct 05 '22 11:10 nbyavuz

2 - Should packages required to build extensions be installed while creating the debian image or during the task itself?

What packages are we talking about here? Depends on the size, I'd say.

install_required_packages_for_extensions_script: |
  apt-get update
  DEBIAN_FRONTEND=noninteractive apt-get -y install \
    autoconf \
    libtool \
    libgeos-dev \
    libproj-dev \
    libprotobuf-c-dev \
    protobuf-c-compiler

How many MB does that add?

anarazel avatar Oct 06 '22 17:10 anarazel

Could you rebase this?

anarazel avatar Jun 03 '23 15:06 anarazel