[pgsql-pkg-debian] pgsql 9.3 for debian/sid in pgdg repo has asserts enabled causingbig performance issues - Mailing list pgsql-pkg-debian

From Stefan Huehner
Subject [pgsql-pkg-debian] pgsql 9.3 for debian/sid in pgdg repo has asserts enabled causingbig performance issues
Date
Msg-id 20170610132747.GD11504@huehner.biz
Whole thread Raw
Responses Re: [pgsql-pkg-debian] pgsql 9.3 for debian/sid in pgdg repo hasasserts enabled causing big performance issues
List pgsql-pkg-debian
Hello,
please CC me on replies as i am not subscribed to the mailing list.

In short:
The following part from latest changelog:
  * debian/rules: Add stub to enable cassert builds (disabled by default).

does not work in practice as in debian/rules file the

#CASSERT_FLAGS := --enable-cassert

line is not commented out as it should have been.

That causes severe peformance issues at least in our use-case of batch-inserting lots of data with runtime going from
ca.1min to >=6min. 

Checking with perf shows lots of cpu-cycles spent in AllocSetCheck.

Doing local rebuilt of the source package with the assert disabled fixes the performance issue for me.

apt-cache policy postgresql-9.3
postgresql-9.3:
  Installed: 9.3.17-1.pgdg+1
  Candidate: 9.3.17-1.pgdg+1
  Version table:
     9.3.17-1.pgdg+1 500
        500 https://apt.postgresql.org/pub/repos/apt sid-pgdg/main amd64 Packages

Apart from 9.3 version as mentioned above it seems to affect more versions.

I did not check manually but checked pg_config output from postgresql-server-dev packages searching for 'assert' and
gotthe following: 

for i in `ls /usr/lib/postgresql/`; do echo "Version: $i"; /usr/lib/postgresql/$i/bin/pg_config | grep -c assert; done
Version: 10
0
Version: 8.4
0
Version: 9.0
0
Version: 9.1
0
Version: 9.2
1
Version: 9.3
1
Version: 9.4
1
Version: 9.5
1
Version: 9.6
0

So apparently 9.2..9.5 version has that problem as well.

Regards,
Stefan


pgsql-pkg-debian by date:

Previous
From: apt.postgresql.org repository
Date:
Subject: [pgsql-pkg-debian] repmgr updated to version 3.3.2-1.pgdg+1
Next
From: Christoph Berg
Date:
Subject: Re: [pgsql-pkg-debian] pgsql 9.3 for debian/sid in pgdg repo hasasserts enabled causing big performance issues