Skip to content

Commit

Permalink
Remove support for postgres 9.4
Browse files Browse the repository at this point in the history
This version has been EOL for a very long time, and supporting it just became
too expensive.  The main reason to drop this versions are:

- pg_event_trigger_ddl_commands() is not there, making it impossible to detect
  what extension has just been created or dropped in an event trigger.
  Previous versions of PoWA were blindly trying to register or unregister all
  supported extensions when any extension is created or dropped, but that's not
  a sensible approach and PoWA 5 checks for the actual extension
- Using named operators in function calls only works with the old (and not
  standard) syntax ":=" rather than "=>".  Having to stick with the old syntax
  is eventually going to byte us
- ASSERT is not supported in plpgsql.  While not critical it's nice to have and
  adding some client-side layer doesn't make sense
  • Loading branch information
rjuju committed Jul 24, 2024
1 parent 48dc95a commit 3917b63
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
36 changes: 18 additions & 18 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Read [README.md](https://github.com/powa-team/powa/blob/master/README.md) and
[the official documentation](http://powa.readthedocs.io/) for further details
about PoWA.

PoWA requires PostgreSQL 9.4 or more. This documentation assumes you're using
the 9.4 version of PostgreSQL.
PoWA requires PostgreSQL 9.5 or more. This documentation assumes you're using
the version 15 of PostgreSQL.

The following documentation describes the detailed installation steps to install
PoWA.
Expand All @@ -18,23 +18,23 @@ Download powa-archivist from the website
The latest stable version should be used. It can be downloaded from
[github](https://github.com/powa-team/powa-archivist/releases/latest).

This documentation assumes that the latest version is 3.0.0, and you downloaded
This documentation assumes that the version is 4.2.2, and you downloaded
the .zip file.

Unpack the downloaded file
--------------------------

```
cd /usr/src
unzip powa-REL_3_0_0.zip
unzip powa-REL_4_2_2.zip
```

Compile and install the software
--------------------------------

Before proceeding, be sure to have a compiler installed and the appropriate PostgreSQL development packages. Something like
```
apt-get install postgresql-server-dev-9.4
apt-get install postgresql-server-dev-15
```
or
```
Expand All @@ -43,14 +43,14 @@ yum install postgresql94-devel

Then:
```
cd /usr/src/powa-REL_3_0_0
cd /usr/src/powa-REL_4_2_2
make
```

If everything goes fine, you will have this kind of output :
```
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -fpic -I. -I. -I/home/thomas/postgresql/postgresql-9.3.4/include/server -I/home/thomas/postgresql/postgresql-9.4.4/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -c -o powa.o powa.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -fpic -L/home/thomas/postgresql/postgresql-9.3.4/lib -Wl,--as-needed -Wl,-rpath,'/home/thomas/postgresql/postgresql-9.4.4/lib',--enable-new-dtags -shared -o powa.so powa.o
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -fpic -I. [...] -c -o powa.o powa.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -fpic [...] -shared -o powa.so powa.o
```

Install the software :
Expand All @@ -67,14 +67,14 @@ make install

It should output something like the following :
```
/bin/mkdir -p '/usr/pgsql-9.4/share/extension'
/bin/mkdir -p '/usr/pgsql-9.4/share/extension'
/bin/mkdir -p '/usr/pgsql-9.4/lib'
/bin/mkdir -p '/usr/pgsql-9.4/share/doc/extension'
/usr/bin/install -c -m 644 ./powa.control '/usr/pgsql-9.4/share/extension/'
/usr/bin/install -c -m 644 ./powa--2.0.1.sql ./powa--2.0-2.0.1.sql ./powa--3.0.0.sql '/usr/pgsql-9.4/share/extension/'
/usr/bin/install -c -m 755 powa.so '/usr/pgsql-9.4/postgresql-9.4.4/lib/'
/usr/bin/install -c -m 644 ./README.md '/usr/pgsql-9.4/share/doc/extension/'
/bin/mkdir -p '/usr/pgsql-15/share/extension'
/bin/mkdir -p '/usr/pgsql-15/share/extension'
/bin/mkdir -p '/usr/pgsql-15/lib'
/bin/mkdir -p '/usr/pgsql-15/share/doc/extension'
/usr/bin/install -c -m 644 ./powa.control '/usr/pgsql-15/share/extension/'
/usr/bin/install -c -m 644 ./powa--2.0.1.sql ./powa--2.0-2.0.1.sql ./powa--3.0.0.sql '/usr/pgsql-15/share/extension/'
/usr/bin/install -c -m 755 powa.so '/usr/pgsql-15/postgresql-15.7/lib/'
/usr/bin/install -c -m 644 ./README.md '/usr/pgsql-15/share/doc/extension/'
```


Expand Down Expand Up @@ -124,7 +124,7 @@ Change the `shared_preload_libraries` appropriately :
shared_preload_libraries = 'powa,pg_stat_statements'# (change requires restart)
```

If possible (check with pg_test_timing), activate track_io_timing on your instance, in postgresql.conf :
If possible (check with pg_test_timing), activate track_io_timing on your instance, in postgresql.conf:

```
track_io_timing = on
Expand Down Expand Up @@ -174,5 +174,5 @@ update to PoWA 3.0.0. In this case, you need to drop and create the extension.
Next, you will need to restart PostgreSQL in order to take account of the
updated background worker. As root, run the following command :
```
service postgresql-9.4 restart
service postgresql-15 restart
```
2 changes: 1 addition & 1 deletion debian/pgversions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.4+
9.5+
4 changes: 2 additions & 2 deletions powa.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

#include "postgres.h"

#if PG_VERSION_NUM < 90400
#error "PoWA requires PostgreSQL 9.4 or later"
#if PG_VERSION_NUM < 90500
#error "PoWA requires PostgreSQL 9.5 or later"
#endif

/* For a bgworker */
Expand Down

0 comments on commit 3917b63

Please sign in to comment.