Unused variable in perl test

Started by Daniil Davydov3 months ago3 messages
#1Daniil Davydov
3danissimo@gmail.com
1 attachment(s)

Hi, here is my 2c :)

There is an unused variable "backup_name" in
test/recovery/t/006_logical_decoding.pl
What about getting rid of it?

--
Best regards,
Daniil Davydov

Attachments:

0001-Get-rid-of-unused-variable.patchtext/x-patch; charset=US-ASCII; name=0001-Get-rid-of-unused-variable.patchDownload
From a0087458cf931826a18a1079b3618d867acdbf96 Mon Sep 17 00:00:00 2001
From: Daniil Davidov <d.davydov@postgrespro.ru>
Date: Fri, 24 Oct 2025 21:02:51 +0700
Subject: [PATCH] Get rid of unused variable

---
 src/test/recovery/t/006_logical_decoding.pl | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/test/recovery/t/006_logical_decoding.pl b/src/test/recovery/t/006_logical_decoding.pl
index f6c0a5bf649..96b70b84d5e 100644
--- a/src/test/recovery/t/006_logical_decoding.pl
+++ b/src/test/recovery/t/006_logical_decoding.pl
@@ -21,7 +21,6 @@ $node_primary->append_conf(
 wal_level = logical
 ));
 $node_primary->start;
-my $backup_name = 'primary_backup';
 
 $node_primary->safe_psql('postgres',
 	qq[CREATE TABLE decoding_test(x integer, y text);]);
-- 
2.43.0

#2Daniel Gustafsson
daniel@yesql.se
In reply to: Daniil Davydov (#1)
Re: Unused variable in perl test

On 24 Oct 2025, at 16:12, Daniil Davydov <3danissimo@gmail.com> wrote:

There is an unused variable "backup_name" in
test/recovery/t/006_logical_decoding.pl
What about getting rid of it?

Seems to have been unused since introduced in d851bef2d60ff close to a decade
ago.

--
Daniel Gustafsson

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Daniel Gustafsson (#2)
Re: Unused variable in perl test

Daniel Gustafsson <daniel@yesql.se> writes:

On 24 Oct 2025, at 16:12, Daniil Davydov <3danissimo@gmail.com> wrote:

There is an unused variable "backup_name" in
test/recovery/t/006_logical_decoding.pl
What about getting rid of it?

Seems to have been unused since introduced in d851bef2d60ff close to a decade
ago.

I didn't double-check the history, but it's clearly unused now.
Pushed.

regards, tom lane