You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-11-06 16:09:25 +03:00
Bug Fixes: * Fixed the info command so the WAL archive min/max displayed is for the current database version. (Fixed by Cynthia Shang.) * Fixed the backup command so the backup-standby option is reset (and the backup proceeds on the master) if the standby is not configured and/or reachable. (Fixed by Cynthia Shang.) * Fixed config warnings raised from a remote process causing errors in the master process. (Fixed by Cynthia Shang.) Features: * Amazon S3 repository support. (Reviewed by Cynthia Shang.) Refactoring: * Refactor storage layer to allow for new repository filesystems using drivers. (Reviewed by Cynthia Shang.) * Refactor IO layer to allow for new compression formats, checksum types, and other capabilities using filters. (Reviewed by Cynthia Shang.) * Move modules in Protocol directory in subdirectories. * Move backup modules into Backup directory.
68 lines
1.5 KiB
Perl
68 lines
1.5 KiB
Perl
package pgBackRest::LibC;
|
|
|
|
use 5.010001;
|
|
use strict;
|
|
use warnings;
|
|
use Carp;
|
|
|
|
require Exporter;
|
|
use AutoLoader;
|
|
|
|
our @ISA = qw(Exporter);
|
|
|
|
# Library version (add .999 during development)
|
|
our $VERSION = '1.19';
|
|
|
|
sub libCVersion {return $VERSION};
|
|
|
|
# Items to export into caller's namespace by default. Note: do not export names by default without a very good reason. Use EXPORT_OK
|
|
# instead. Do not simply export all your public functions/methods/constants.
|
|
#
|
|
# This allows declaration use pgBackRest::LibC ':all'; If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
|
|
# will save memory.
|
|
our %EXPORT_TAGS =
|
|
(
|
|
'debug' => [qw(
|
|
UVSIZE
|
|
libCVersion
|
|
)],
|
|
|
|
'checksum' => [qw(
|
|
pageChecksum
|
|
pageChecksumTest
|
|
pageChecksumBufferTest
|
|
)],
|
|
);
|
|
|
|
our @EXPORT_OK = (@{$EXPORT_TAGS{'debug'}}, @{$EXPORT_TAGS{'checksum'}});
|
|
|
|
# Nothing is exported by default
|
|
our @EXPORT = qw();
|
|
|
|
# This AUTOLOAD is used to 'autoload' constants from the constant() XS function. Nothing in this function needs to be updated to
|
|
# add new constants.
|
|
sub AUTOLOAD
|
|
{
|
|
my $constname;
|
|
our $AUTOLOAD;
|
|
|
|
($constname = $AUTOLOAD) =~ s/.*:://;
|
|
|
|
croak "&pgBackRest::LibC::constant not defined" if $constname eq 'constant';
|
|
my ($error, $val) = constant($constname);
|
|
|
|
if ($error) { croak $error; }
|
|
{
|
|
no strict 'refs';
|
|
*$AUTOLOAD = sub {$val};
|
|
}
|
|
|
|
goto &$AUTOLOAD;
|
|
}
|
|
|
|
require XSLoader;
|
|
XSLoader::load('pgBackRest::LibC', $VERSION);
|
|
|
|
1;
|
|
__END__
|