since-v7.diff.txt

text/plain

Filename: since-v7.diff.txt
Type: text/plain
Part: 0
Message: Re: [PATCH] pg_stat_activity: make slow/hanging authentication more visible
1:  b91a602cab8 ! 1:  81a61854bdf pgstat: report in earlier with STATE_STARTING
    @@ src/backend/utils/activity/backend_status.c: pgstat_bestart(void)
     +
     +	PGSTAT_END_WRITE_ACTIVITY(beentry);
      
    + 	/* Create the backend statistics entry */
    + 	if (pgstat_tracks_backend_bktype(MyBackendType))
    + 		pgstat_create_backend(MyProcNumber);
    + 
      	/* Update app name to current GUC setting */
     +	/* TODO: ask the list: maybe do this before setting STATE_UNDEFINED? */
      	if (application_name)
    @@ src/test/authentication/meson.build: tests += {
      ## src/test/authentication/t/007_pre_auth.pl (new) ##
     @@
     +
    -+# Copyright (c) 2021-2024, PostgreSQL Global Development Group
    ++# Copyright (c) 2021-2025, PostgreSQL Global Development Group
     +
     +# Tests for connection behavior prior to authentication.
     +
    @@ src/test/ssl/t/001_ssltests.pl: command_like(
     +	while (1)
     +	{
     +		$pid = $psql->query(
    -+			"SELECT pid FROM pg_stat_activity WHERE state = 'starting';");
    ++			"SELECT pid FROM pg_stat_activity WHERE state = 'starting' AND client_addr IS NOT NULL;");
     +		last if $pid ne "";
     +
     +		usleep(100_000);
    @@ src/test/ssl/t/001_ssltests.pl: command_like(
     +		$psql->query(
     +			"SELECT ssl, version, cipher, bits FROM pg_stat_ssl WHERE pid = $pid"
     +		),
    -+		qr/^t|TLSv[\d.]+|[\w-]+|\d+$/,
    ++		qr/^t\|TLSv[\d.]+\|[\w-]+\|\d+$/,
     +		'pg_stat_ssl view is updated prior to authentication');
     +
     +	# Detach the waitpoint and wait for the connection to complete.
2:  0cb5ab8b89d = 2:  e734e46009f Report external auth calls as wait events
3:  a0308928dd3 < -:  ----------- squash! Report external auth calls as wait events
-:  ----------- > 3:  39c7d9ce42b squash! Report external auth calls as wait events