[check_postgres] Quick patch for check_wal_files() function
Guillaume Lelarge
guillaume at lelarge.info
Fri Apr 22 14:34:50 UTC 2011
Le 22/04/2011 16:30, Greg Sabino Mullane a écrit :
>> One of my colleague found a bug in check_wal_files() function while
>> doing a demo to on of our customer.
>>
>> Here is the patch to fix it. The issue is that q{} doesn't allow the use
>> of a variable inside the string. qq{} takes care of it.
>
> Thanks. Looks like the current version doesn't have that issue, as
> the $extrabits no longer exists. It was linked to the new
> archive_ready action, which also got removed; I'll add it back in and
> fix the typo.
>
Seems I did a mistake too. The last dollar shouldn't be deleted. It
needs a \ before. Which gives us this line:
$SQL = qq{SELECT count(*) AS count FROM pg_ls_dir('pg_xlog') WHERE
pg_ls_dir ~ E'^[0-9A-F]{24}$extrabit\$'};
--
Guillaume
http://www.postgresql.fr
http://dalibo.com
More information about the Check_postgres
mailing list