Fix unnecessary includes and comments in 019_replslot_limit.pl, 007_wal.pl and 004_timeline_switch.pl

Started by Bharath Rupireddyalmost 4 years ago6 messageshackers
Jump to latest
#1Bharath Rupireddy
bharath.rupireddyforpostgres@gmail.com

Hi,

While working on a feature, I noticed that there are unnecessary
includes of "use File::Path qw(rmtree);" in some TAP test files and
also some wrong comments in 019_replslot_limit.pl. Attaching a patch
to fix these.

Regards,
Bharath Rupireddy.

Attachments:

v1-0001-Fix-unnecessary-includes-and-comments-in-019_repl.patchapplication/octet-stream; name=v1-0001-Fix-unnecessary-includes-and-comments-in-019_repl.patchDownload+2-7
#2Maxim Orlov
orlovmg@gmail.com
In reply to: Bharath Rupireddy (#1)
Re: Fix unnecessary includes and comments in 019_replslot_limit.pl, 007_wal.pl and 004_timeline_switch.pl

Hi!

This is an obvious change, I totally for it. Hope it will be commited soon.

--
Best regards,
Maxim Orlov.

#3Pavel Borisov
pashkin.elfe@gmail.com
In reply to: Maxim Orlov (#2)
Re: Fix unnecessary includes and comments in 019_replslot_limit.pl, 007_wal.pl and 004_timeline_switch.pl

On Wed, Jul 6, 2022 at 5:05 PM Maxim Orlov <orlovmg@gmail.com> wrote:

Hi!

This is an obvious change, I totally for it. Hope it will be commited soon.

I'm sorry for some nitpicking about changes in the comments:
- The number of WAL segments advanced hasn't changed from 5 to 1, it just
advances as 1+4 as previously. So the original comment is right. I reverted
this in v2.
- wal_segment_size is in bytes so comment "(wal_segment_size * n) MB" is
incorrect. I corrected this to bytes.

PFA v2 of a patch (only comments changed/reverted to original).
Overall I completely agree with Maxim: the patch is good and simple enough
to be RfC.

--
Best regards,
Pavel Borisov

Postgres Professional: http://postgrespro.com <http://www.postgrespro.com&gt;

Attachments:

v2-0001-Fix-unnecessary-includes-and-comments-in-019_repl.patchapplication/octet-stream; name=v2-0001-Fix-unnecessary-includes-and-comments-in-019_repl.patchDownload+1-6
#4Maxim Orlov
orlovmg@gmail.com
In reply to: Pavel Borisov (#3)
Re: Fix unnecessary includes and comments in 019_replslot_limit.pl, 007_wal.pl and 004_timeline_switch.pl

I'm sorry for some nitpicking about changes in the comments:
- The number of WAL segments advanced hasn't changed from 5 to 1, it just
advances as 1+4 as previously. So the original comment is right. I reverted
this in v2.

Yeah, it looks even better now.

--
Best regards,
Maxim Orlov.

#5Michael Paquier
michael@paquier.xyz
In reply to: Maxim Orlov (#4)
Re: Fix unnecessary includes and comments in 019_replslot_limit.pl, 007_wal.pl and 004_timeline_switch.pl

On Wed, Jul 06, 2022 at 04:26:38PM +0300, Maxim Orlov wrote:

Yeah, it looks even better now.

Especially knowing that the test uses a segment size of 1MB via initdb
to be cheaper. v2 looks fine by itself, so applied.
--
Michael

#6Pavel Borisov
pashkin.elfe@gmail.com
In reply to: Michael Paquier (#5)
Re: Fix unnecessary includes and comments in 019_replslot_limit.pl, 007_wal.pl and 004_timeline_switch.pl

Especially knowing that the test uses a segment size of 1MB via initdb
to be cheaper. v2 looks fine by itself, so applied.

Thanks, Michael!

--
Best regards,
Pavel Borisov

Postgres Professional: http://postgrespro.com <http://www.postgrespro.com&gt;