Re: pgsql: Add support event triggers on authenticated login

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Alexander Korotkov <akorotkov@postgresql.org>, Andres Freund <andres@anarazel.de>, pgsql-committers@lists.postgresql.org
Date: 2024-01-12T02:55:19Z
Lists: pgsql-hackers

Attachments

Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> writes:
> Hi, I'm seeing a compiler warning with CFLAGS -O3 but not with -O2.

> In file included from dbcommands.c:20:
> dbcommands.c: In function ‘createdb’:
> ../../../src/include/postgres.h:104:16: warning: ‘src_hasloginevt’ may
> be used uninitialized in this function [-Wmaybe-uninitialized]

Hmm, I also see that at -O3 (not at -O2) when using Fedora 39's
gcc 13.2.1, but *not* when using RHEL8's gcc 8.5.0.

I'm not sure how excited I am about curing that, though, because gcc
13.2.1 spews several other totally baseless warnings (see attached).
Some of them match up with warnings we're seeing on buildfarm member
serinus, which I seem to recall that Andres had tracked to a known gcc
bug.

			regards, tom lane

Commits

  1. Use pg_assume() to avoid compiler warning below exec_set_found()

  2. Add pg_assume(expr) macro

  3. Fix gcc >= 10 warning

  4. Add support event triggers on authenticated login