arkhipov / temporal_tables

Temporal Tables PostgreSQL Extension
BSD 2-Clause "Simplified" License
927 stars 46 forks source link

PG13 no longer has heap_openrv #55

Closed mitchblank closed 1 year ago

mitchblank commented 3 years ago

It looks like in PG12 heap_openrv was available as a compatibility macro but now it is gone entirely.

See https://github.com/postgres/postgres/commit/f25968c49697db673f6cd2a07b3f7626779f1827

This means even with the PG12 fixes in head (b1b50c9f8290b85a76e5399a20e09daf3f64493a ) the compile fails with:

Undefined symbols for architecture x86_64:
  "_heap_openrv", referenced from:
      _insert_history_row in versioning.o
bbernhard commented 3 years ago

I've just created a branch with (what I believe are) the necessary changes: https://github.com/bbernhard/temporal_tables/tree/pg13

Here's the commit: https://github.com/bbernhard/temporal_tables/commit/23284c2a593d3e01f7b4918c0aaa8459de84c4d8

I think the changes should be fine (at least it's building fine with PostgreSQL v13.1). I am not entirely sure at which PostgreSQL release this change was introduced, as the commit in the PostgreSQL repository is tagged with REL_13_2 and REL_13_BETA1. So for now, I am applying the change for PostgreSQL >= 13.1.

In the next days I'll run my integration test suite against the newly built temporal_tables extension. If there's some seriously wrong with my patch, I guess I'll recognize it ;). If everything works fine, I could create a PR for that.

mitchblank commented 3 years ago

OK, I opened a homebrew PR that imports that patch here: https://github.com/Homebrew/homebrew-core/pull/70936

That way we can at least see if the homebrew's CI builds are happy with that change. Currently the homebrew formula is completely broken anyway so it can't make it worse :-)

bbernhard commented 3 years ago

Just a short update: According to my integration test coverage (it only consists of some basic tests, but I guess that's better than nothing) the change should be good. There are a few broken test cases, but they are related to the PostgreSQL update (I've updated from PostgreSQL 9.6.x to PostgreSQL 13). The temporal_tables extension seems to be working fine.

I'll create a PR for that next - let's see if we can get the changes in there :)