# Returns the filesystem path for the named relation.
#
# Assumes the test node is running
-sub relation_filepath($$)
+sub relation_filepath
{
my ($dbname, $relname) = @_;
# Returns the name of the toast relation associated with the named relation.
#
# Assumes the test node is running
-sub relation_toast($$)
+sub relation_toast
{
my ($dbname, $relname) = @_;
WHERE c.oid = '$relname'::regclass
AND c.reltoastrelid != 0
));
- return undef unless defined $rel;
return $rel;
}
# to be corrupted by means of overwriting junk in the first page.
#
# Assumes the test node is running.
-sub plan_to_corrupt_first_page($$)
+sub plan_to_corrupt_first_page
{
my ($dbname, $relname) = @_;
my $relpath = relation_filepath($dbname, $relname);
# to be corrupted by means of removing the file..
#
# Assumes the test node is running
-sub plan_to_remove_relation_file($$)
+sub plan_to_remove_relation_file
{
my ($dbname, $relname) = @_;
my $relpath = relation_filepath($dbname, $relname);
# corrupted by means of removing the file.
#
# Assumes the test node is running.
-sub plan_to_remove_toast_file($$)
+sub plan_to_remove_toast_file
{
my ($dbname, $relname) = @_;
my $toastname = relation_toast($dbname, $relname);
}
# Corrupts the first page of the given file path
-sub corrupt_first_page($)
+sub corrupt_first_page
{
my ($relpath) = @_;
# perl hash with named fields. These fields exactly match the ones understood
# by write_tuple(), below. Returns a reference to this hash.
#
-sub read_tuple ($$)
+sub read_tuple
{
my ($fh, $offset) = @_;
my ($buffer, %tup);
# subset of fields modified. The function does no error checking. Use
# cautiously.
#
-sub write_tuple($$$)
+sub write_tuple
{
my ($fh, $offset, $tup) = @_;
my $buffer = pack(HEAPTUPLE_PACK_CODE,