pgAudit 1.6.4 commit log

Stamp 1.6.3.

commit   : abdb653a57228c28c52600aefa4852616eb6b0af    
  
author   : David Steele <david@pgbackrest.org>    
date     : Wed, 19 Feb 2025 13:53:15 -0600    
  
committer: David Steele <david@pgbackrest.org>    
date     : Wed, 19 Feb 2025 13:53:15 -0600    

Click here for diff

M Makefile
A pgaudit–1.6.2–1.6.3.sql
R100 pgaudit–1.6.2.sql pgaudit–1.6.3.sql
M pgaudit.control

Add exception for call statement to stack check.

commit   : ff66faa6fc3dbbf236357171eda05e9a322276c7    
  
author   : Alper Kocatas <alperkocatas@gmail.com>    
date     : Tue, 18 Feb 2025 20:42:47 +0300    
  
committer: David Steele <david@pgbackrest.org>    
date     : Tue, 18 Feb 2025 20:42:47 +0300    

Click here for diff

A call statement can be on the stack when another command is executed if the procedure itself contains a cursor. If this happens the user will get a 'pgaudit stack is not empty' error.  
  
Prevent this by allowing call statements on the stack when a new command runs.

M pgaudit.c

commit   : c322fd922becb7dea5f666e8dcd55ff90396e693    
  
author   : David Youatt <david.youatt@crunchydata.com>    
date     : Mon, 6 Jan 2025 10:27:02 -0500    
  
committer: David Steele <david@pgbackrest.org>    
date     : Mon, 6 Jan 2025 10:27:02 -0500    

Click here for diff

M pgaudit.c

Avoid failures with ENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS.

commit   : ebb541af429502a68efeb47433f7088a2e14926d    
  
author   : Michael Paquier <michaelpq@users.noreply.github.com>    
date     : Tue, 19 Nov 2024 23:41:18 +0900    
  
committer: David Steele <david@pgbackrest.org>    
date     : Tue, 19 Nov 2024 23:41:18 +0900    

Click here for diff

Compiling PostgreSQL with -DENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS causes the regression test suite of pgaudit to fail because the roles created do not comply with the upstream rule for role names, where these should be suffixed with "regress_".  
  
The tests fail when creating such non-compliant roles with warnings like this one:  
WARNING: roles created by regression test cases should have names starting with "regress_"  
  
The regression test coverage does not change with the roles renamed, and the expected output is updated accordingly.  

M expected/pgaudit.out
M sql/pgaudit.sql

Fix warnings when -Wmissing-variable-declarations is enabled.

commit   : bbd069ec0518a433c4dcd66910134ba1f375d950    
  
author   : Michael Paquier <michaelpq@users.noreply.github.com>    
date     : Tue, 19 Nov 2024 05:37:17 +0900    
  
committer: David Steele <david@pgbackrest.org>    
date     : Tue, 19 Nov 2024 05:37:17 +0900    

Click here for diff

The GUC variables were defined extern but were only used within pgaudit.c so they should be defined as static.  
  
Reviewed by David Steele (@dwsteele).  

M pgaudit.c

Add llvm-toolset to RHEL test container.

commit   : 03467dbd265184334d65e178afe748dfec6a499d    
  
author   : David Steele <david@pgbackrest.org>    
date     : Mon, 18 Nov 2024 17:46:14 -0500    
  
committer: David Steele <david@pgbackrest.org>    
date     : Mon, 18 Nov 2024 17:46:14 -0500    

Click here for diff

This is now required for build to succeed.  

M test/Dockerfile.rhel

Additional exclusions for .gitignore.

commit   : c5c10f2fe79f82c2f9e93336a5ece9192ca2ed82    
  
author   : Michael Paquier <michaelpq@users.noreply.github.com>    
date     : Tue, 19 Nov 2024 05:02:41 +0900    
  
committer: David Steele <david@pgbackrest.org>    
date     : Tue, 19 Nov 2024 05:02:41 +0900    

Click here for diff

Add more exclusions to the project's .gitignore, ensuring that unwanted contents are not pushed into the tree:
  
- Coverage files
  
- More object and library patterns
  
- LLVM code
  
- Dependencies
  

  
Reviewed by David Steele (@dwsteele).

M .gitignore

Skip auditing of relations without permissions.

commit   : d19a29c6c7edb56b836958fa4648cd0b944963f8    
  
author   : David Steele <david@pgmasters.net>    
date     : Thu, 1 Aug 2024 10:28:57 +0700    
  
committer: David Steele <david@pgmasters.net>    
date     : Thu, 1 Aug 2024 10:28:57 +0700    

Click here for diff

Relations without permissions should be skipped since they represent either optimizer artifacts or partitions. Normally they do not cause a problem, but in some cases they lack a distinct mem context and cause the stack to get out of sync. It is also more efficient to skip them and this solution is similar to what was done for PostgreSQL 16.  
  
This eliminates a duplicated log entry that was also fixed in PostgreSQL 16.  
  
Reported by @wzbnb001, Alexander Kukushkin (@CyberDem0n).  
Reviewed by Alexander Kukushkin (@CyberDem0n).  

M expected/pgaudit.out
M pgaudit.c
M sql/pgaudit.sql

Update RHEL test container to Rocky Linux 8.

commit   : f6dcf7614cf4f5e84f431d76126aa641c969084a    
  
author   : David Steele <david@pgmasters.net>    
date     : Thu, 1 Aug 2024 10:05:24 +0700    
  
committer: David Steele <david@pgmasters.net>    
date     : Thu, 1 Aug 2024 10:05:24 +0700    

Click here for diff

CentOS 7 is EOL and has been removed from mirrors.  

M test/Dockerfile.rhel

Update Debian CI runner/container to Ubuntu 22.04.

commit   : 1b7f74c6ac5d6ad3162b2f881fcd198e50e182e6    
  
author   : David Steele <david@pgmasters.net>    
date     : Mon, 27 May 2024 09:54:56 +1000    
  
committer: David Steele <david@pgmasters.net>    
date     : Mon, 27 May 2024 09:54:56 +1000    

Click here for diff

M .github/workflows/test.yml
M test/Dockerfile.debian

Add PostgreSQL 17 to supported versions in documentation.

commit   : 1ae3a72005edf320317332e1ddca6f2654feeb3e    
  
author   : David Steele <david@pgmasters.net>    
date     : Mon, 27 May 2024 09:37:30 +1000    
  
committer: David Steele <david@pgmasters.net>    
date     : Mon, 27 May 2024 09:37:30 +1000    

Click here for diff

M README.md

Update GitHub test check action version to 4.

commit   : 9ed5aca33cc1656d023a8a757af9b4d899a39e11    
  
author   : David Steele <david@pgmasters.net>    
date     : Sat, 18 May 2024 09:19:58 +1000    
  
committer: David Steele <david@pgmasters.net>    
date     : Sat, 18 May 2024 09:19:58 +1000    

Click here for diff

Version 3 is now deprecated.  

M .github/workflows/test.yml

Improve description for pgaudit.log_rows setting.

commit   : b89337391dd7b5bec1e2cce2223559a9c3b8f141    
  
author   : Bimochan Shrestha <bmochan@gmail.com>    
date     : Tue, 9 Apr 2024 05:59:03 +0545    
  
committer: David Steele <david@pgmasters.net>    
date     : Tue, 9 Apr 2024 05:59:03 +0545    

Click here for diff

This makes it clearer that the field will contain a row count and not the actual rows.

M README.md

commit   : 64c20e364a4313cda8300d5b4cdb17b7825eb501    
  
author   : David Youatt <david.youatt@crunchydata.com>    
date     : Thu, 18 Jan 2024 03:51:51 -0800    
  
committer: David Steele <david@pgmasters.net>    
date     : Thu, 18 Jan 2024 03:51:51 -0800    

Click here for diff

M pgaudit.c

Remove key import for PGDG yum repository.

commit   : 60b9a5cc2182b964600a728520164af762ebd21d    
  
author   : David Steele <david@pgmasters.net>    
date     : Thu, 18 Jan 2024 09:17:23 -0300    
  
committer: David Steele <david@pgmasters.net>    
date     : Thu, 18 Jan 2024 09:17:23 -0300    

Click here for diff

For a production system it makes sense to separately import and verify the key but it seems overkill for test systems.  

M test/Dockerfile.rhel

Correction to log_statement_once documentation.

commit   : b3b788724c934078b4a8fd6fb826d7412c5b3460    
  
author   : Valerie Parham-Thompson <16852807+dataindataout@users.noreply.github.com>    
date     : Fri, 1 Dec 2023 11:56:45 -0500    
  
committer: David Steele <david@pgmasters.net>    
date     : Fri, 1 Dec 2023 11:56:45 -0500    

Click here for diff

Change "disabled" to "enabled" since the current documentation for log_statement_once has this backwards.

M README.md
M pgaudit.c

Remove PostgreSQL 11 from supported versions in documentation.

commit   : 1d64a81c5b75d69f6f606879d295e825082f61e3    
  
author   : David Steele <david@pgmasters.net>    
date     : Fri, 1 Dec 2023 13:48:30 -0300    
  
committer: David Steele <david@pgmasters.net>    
date     : Fri, 1 Dec 2023 13:48:30 -0300    

Click here for diff

M README.md

Update supported versions in documentation.

commit   : ec5d375c79cba93428c7f937bfda6daf76936ea6    
  
author   : David Steele <david@pgmasters.net>    
date     : Tue, 5 Sep 2023 15:26:23 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Tue, 5 Sep 2023 15:26:23 -0400    

Click here for diff

M README.md

Update RHEL CI container to work with aarch64.

commit   : 6a7331781801824639ab2d8348daf704f77711b0    
  
author   : David Steele <david@pgmasters.net>    
date     : Tue, 5 Sep 2023 12:26:45 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Tue, 5 Sep 2023 12:26:45 -0400    

Click here for diff

M test/Dockerfile.rhel

Fix typos.

commit   : b2a6d9b29487c24faebbf145983af043e43f9d1b    
  
author   : David Steele <david@pgmasters.net>    
date     : Fri, 9 Jun 2023 18:18:27 +0300    
  
committer: David Steele <david@pgmasters.net>    
date     : Fri, 9 Jun 2023 18:18:27 +0300    

Click here for diff

M pgaudit.c

Update Github action/checkout to new version.

commit   : 67ab8e14f0b59e6ba43f9657ad9158b86a9347c5    
  
author   : David Steele <david@pgmasters.net>    
date     : Thu, 27 Apr 2023 22:31:50 +0300    
  
committer: David Steele <david@pgmasters.net>    
date     : Thu, 27 Apr 2023 22:31:50 +0300    

Click here for diff

This removes the deprecation warning.  

M .github/workflows/test.yml

Explicitly install pg_statements in Makefile.

commit   : eec4b596edb88c888ebc5e4a9b5c0a00e7ea590c    
  
author   : David Steele <david@pgmasters.net>    
date     : Thu, 27 Apr 2023 22:18:23 +0300    
  
committer: David Steele <david@pgmasters.net>    
date     : Thu, 27 Apr 2023 22:18:23 +0300    

Click here for diff

This is required by in-tree builds and is ignored by CI.  

M Makefile

commit   : cae561f9688071cbe28a7d6ed56ae3a309ec198e    
  
author   : David Youatt <youattdp@gmail.com>    
date     : Wed, 4 Jan 2023 01:31:31 -0800    
  
committer: David Steele <david@pgmasters.net>    
date     : Wed, 4 Jan 2023 01:31:31 -0800    

Click here for diff

M pgaudit.c

Add caveat about auditing the superuser.

commit   : d7f3fe55a60d0ec2dc0aafa8c1999630f658583c    
  
author   : David Steele <david@pgmasters.net>    
date     : Tue, 14 Jun 2022 13:35:35 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Tue, 14 Jun 2022 13:35:35 -0400    

Click here for diff

M README.md

Documentation updates for PostgreSQL 15 release.

commit   : 28c4050ff51dee6ca7835d63e2d29a22babd7c95    
  
author   : David Steele <david@pgmasters.net>    
date     : Mon, 13 Jun 2022 16:32:26 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Mon, 13 Jun 2022 16:32:26 -0400    

Click here for diff

M README.md

Documentation updates missed in PostgreSQL 14 release.

commit   : 1930790e4bd07171b54a35890a117fe32ddcab7b    
  
author   : David Steele <david@pgmasters.net>    
date     : Mon, 13 Jun 2022 16:11:51 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Mon, 13 Jun 2022 16:11:51 -0400    

Click here for diff

M README.md

Add explanation why `CREATE EXTENSION` is required.

commit   : 02d3dfd91ba97a077384426cef0d77fdd4b7af38    
  
author   : Yuli <yuli@crunchydata.com>    
date     : Mon, 13 Jun 2022 15:41:22 -0400    
  
committer: GitHub <noreply@github.com>    
date     : Mon, 13 Jun 2022 15:41:22 -0400    

Click here for diff

M README.md

Explicitly grant permissions on public schema in expect script.

commit   : 6a3ab20747aafeb61591d35c2703898223b5c076    
  
author   : David Steele <david@pgmasters.net>    
date     : Mon, 13 Jun 2022 14:00:26 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Mon, 13 Jun 2022 14:00:26 -0400    

Click here for diff

PostgreSQL >= 15 does not automatically grant rights on the public schema.  
  
It makes sense to back patch this to older versions to minimize differences in the script.  

M expected/pgaudit.out
M sql/pgaudit.sql

Reorder container scripts for more efficient builds across versions.

commit   : 959f0652ea75f0d0d44322f9cb5f069dbfa33194    
  
author   : David Steele <david@pgmasters.net>    
date     : Mon, 13 Jun 2022 12:36:54 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Mon, 13 Jun 2022 12:36:54 -0400    

Click here for diff

M test/Dockerfile.debian
M test/Dockerfile.rhel

Fix typo in pgaudit.role help.

commit   : 605aa9dad13437874b8e111f306f1cd26b67e7b1    
  
author   : tjjcarroll <tjjcarroll@hotmail.com>    
date     : Wed, 4 May 2022 15:35:10 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Wed, 4 May 2022 15:35:10 -0400    

Click here for diff

M pgaudit.c