Re: pgsql: pg_basebackup: Add tests for -X option

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: pg_basebackup: Add tests for -X option
Date: 2015-07-29 06:58:12
Message-ID: CAB7nPqSsvaonrcyX6re+5DRfvYYERpGUfT68Zc2Yy_VdZ+bNoQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Wed, Jul 29, 2015 at 9:34 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> pg_basebackup: Add tests for -X option

One thing that I noticed after more tests is that actually the LSN
position restart_lsn is not necessarily 8-character long as this
tests, but it can be 7-character length as well:
like($lsn, qr!^0/[0-9A-Z]{8}$!, 'restart LSN of slot has advanced');
So you may have random failures depending on how much the LSN has
advanced depending on the number of base backups taken on the server
during the tests (found out the problem on Windows because we need to
skip some tests as there is no symlink support). I would suggest that
instead of checking the format of restart_lsn we encapsulate it within
pg_xlogfile_name and check if result has a correct length of 24
characters with characters 0-9A-F, like in the patch attached.
Sorry for not noticing that before, attached is a patch to fix the issue.
--
Michael

Attachment Content-Type Size
20150729_fix_tap_basebackup.patch binary/octet-stream 1.0 KB

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2015-07-29 07:58:34 pgsql: Fix typo in comment.
Previous Message Joe Conway 2015-07-29 01:13:39 Re: pgsql: Suppress "variable may be used uninitialized" warning.