Re: abi-compliance-checker

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Peter Geoghegan <pg(at)bowt(dot)ie>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: abi-compliance-checker
Date: 2023-05-30 04:32:20
Message-ID: c4a9ba77-4e1b-0b2c-e649-f7181ff9e9cd@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 27.05.23 02:52, Peter Geoghegan wrote:
> Attached is a html report that was generated by a tool called
> abi-compliance-checker/abi-dumper [1][2] (by using
> "abi-compliance-checker -l libTest ... ") .

I have been using the libabigail library/set of tools (abidiff, abidw)
for this. I was not familiar with the tool you used. The nice thing
about abidiff is that it gives you text output and a meaningful exit
status, so you can make it part of the build or test process. You can
also write suppression files to silence specific warnings.

I think the way to use this would be to compute the ABI for the .0
release (or rc1 or something like that) and commit it into the tree.
And then compute the current ABI and compare that against the recorded
base ABI.

Here is the workflow:

# build REL_11_0
abidw src/backend/postgres > src/tools/postgres-abi-REL_11_0.xml
# build REL_11_20
abidw src/backend/postgres > src/tools/postgres-abi.xml
abidiff --no-added-syms src/tools/postgres-abi-REL_11_0.xml
src/tools/postgres-abi.xml

This prints

Functions changes summary: 0 Removed, 0 Changed, 0 Added function
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
Function symbols changes summary: 14 Removed, 0 Added (85 filtered out)
function symbols not referenced by debug info
Variable symbols changes summary: 1 Removed, 0 Added (3 filtered out)
variable symbols not referenced by debug info

14 Removed function symbols not referenced by debug info:

[D] RelationHasUnloggedIndex
[D] assign_nestloop_param_placeholdervar
[D] assign_nestloop_param_var
[D] logicalrep_typmap_gettypname
[D] logicalrep_typmap_update
[D] pqsignal_no_restart
[D] rb_begin_iterate
[D] rb_create
[D] rb_delete
[D] rb_find
[D] rb_insert
[D] rb_iterate
[D] rb_leftmost
[D] transformCreateSchemaStmt

1 Removed variable symbol not referenced by debug info:

[D] wrconn

This appears to be similar to what your tool produced, but I haven't
checked it in detail.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2023-05-30 08:01:08 Re: [16Beta1][doc] Add BackendType for standalone backends
Previous Message shveta malik 2023-05-30 02:53:37 Re: Support logical replication of DDLs