Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
7a1527c0
Commit
7a1527c0
authored
Mar 12, 2021
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust perl style.
Per buildfarm member crake.
parent
d60e61de
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
src/bin/pg_amcheck/t/003_check.pl
src/bin/pg_amcheck/t/003_check.pl
+6
-7
src/bin/pg_amcheck/t/004_verify_heapam.pl
src/bin/pg_amcheck/t/004_verify_heapam.pl
+2
-2
No files found.
src/bin/pg_amcheck/t/003_check.pl
View file @
7a1527c0
...
@@ -10,7 +10,7 @@ my ($node, $port, %corrupt_page, %remove_relation);
...
@@ -10,7 +10,7 @@ my ($node, $port, %corrupt_page, %remove_relation);
# Returns the filesystem path for the named relation.
# Returns the filesystem path for the named relation.
#
#
# Assumes the test node is running
# Assumes the test node is running
sub
relation_filepath
($$)
sub
relation_filepath
{
{
my
(
$dbname
,
$relname
)
=
@_
;
my
(
$dbname
,
$relname
)
=
@_
;
...
@@ -24,7 +24,7 @@ sub relation_filepath($$)
...
@@ -24,7 +24,7 @@ sub relation_filepath($$)
# Returns the name of the toast relation associated with the named relation.
# Returns the name of the toast relation associated with the named relation.
#
#
# Assumes the test node is running
# Assumes the test node is running
sub
relation_toast
($$)
sub
relation_toast
{
{
my
(
$dbname
,
$relname
)
=
@_
;
my
(
$dbname
,
$relname
)
=
@_
;
...
@@ -34,7 +34,6 @@ sub relation_toast($$)
...
@@ -34,7 +34,6 @@ sub relation_toast($$)
WHERE c.oid = '$relname'::regclass
WHERE c.oid = '$relname'::regclass
AND c.reltoastrelid != 0
AND c.reltoastrelid != 0
)
);
)
);
return
undef
unless
defined
$rel
;
return
$rel
;
return
$rel
;
}
}
...
@@ -42,7 +41,7 @@ sub relation_toast($$)
...
@@ -42,7 +41,7 @@ sub relation_toast($$)
# to be corrupted by means of overwriting junk in the first page.
# to be corrupted by means of overwriting junk in the first page.
#
#
# Assumes the test node is running.
# Assumes the test node is running.
sub
plan_to_corrupt_first_page
($$)
sub
plan_to_corrupt_first_page
{
{
my
(
$dbname
,
$relname
)
=
@_
;
my
(
$dbname
,
$relname
)
=
@_
;
my
$relpath
=
relation_filepath
(
$dbname
,
$relname
);
my
$relpath
=
relation_filepath
(
$dbname
,
$relname
);
...
@@ -53,7 +52,7 @@ sub plan_to_corrupt_first_page($$)
...
@@ -53,7 +52,7 @@ sub plan_to_corrupt_first_page($$)
# to be corrupted by means of removing the file..
# to be corrupted by means of removing the file..
#
#
# Assumes the test node is running
# Assumes the test node is running
sub
plan_to_remove_relation_file
($$)
sub
plan_to_remove_relation_file
{
{
my
(
$dbname
,
$relname
)
=
@_
;
my
(
$dbname
,
$relname
)
=
@_
;
my
$relpath
=
relation_filepath
(
$dbname
,
$relname
);
my
$relpath
=
relation_filepath
(
$dbname
,
$relname
);
...
@@ -65,7 +64,7 @@ sub plan_to_remove_relation_file($$)
...
@@ -65,7 +64,7 @@ sub plan_to_remove_relation_file($$)
# corrupted by means of removing the file.
# corrupted by means of removing the file.
#
#
# Assumes the test node is running.
# Assumes the test node is running.
sub
plan_to_remove_toast_file
($$)
sub
plan_to_remove_toast_file
{
{
my
(
$dbname
,
$relname
)
=
@_
;
my
(
$dbname
,
$relname
)
=
@_
;
my
$toastname
=
relation_toast
(
$dbname
,
$relname
);
my
$toastname
=
relation_toast
(
$dbname
,
$relname
);
...
@@ -73,7 +72,7 @@ sub plan_to_remove_toast_file($$)
...
@@ -73,7 +72,7 @@ sub plan_to_remove_toast_file($$)
}
}
# Corrupts the first page of the given file path
# Corrupts the first page of the given file path
sub
corrupt_first_page
($)
sub
corrupt_first_page
{
{
my
(
$relpath
)
=
@_
;
my
(
$relpath
)
=
@_
;
...
...
src/bin/pg_amcheck/t/004_verify_heapam.pl
View file @
7a1527c0
...
@@ -92,7 +92,7 @@ use constant HEAPTUPLE_PACK_LENGTH => 58; # Total size
...
@@ -92,7 +92,7 @@ use constant HEAPTUPLE_PACK_LENGTH => 58; # Total size
# perl hash with named fields. These fields exactly match the ones understood
# perl hash with named fields. These fields exactly match the ones understood
# by write_tuple(), below. Returns a reference to this hash.
# by write_tuple(), below. Returns a reference to this hash.
#
#
sub
read_tuple
($$)
sub
read_tuple
{
{
my
(
$fh
,
$offset
)
=
@_
;
my
(
$fh
,
$offset
)
=
@_
;
my
(
$buffer
,
%
tup
);
my
(
$buffer
,
%
tup
);
...
@@ -145,7 +145,7 @@ sub read_tuple ($$)
...
@@ -145,7 +145,7 @@ sub read_tuple ($$)
# subset of fields modified. The function does no error checking. Use
# subset of fields modified. The function does no error checking. Use
# cautiously.
# cautiously.
#
#
sub
write_tuple
($$$)
sub
write_tuple
{
{
my
(
$fh
,
$offset
,
$tup
)
=
@_
;
my
(
$fh
,
$offset
,
$tup
)
=
@_
;
my
$buffer
=
pack
(
HEAPTUPLE_PACK_CODE
,
my
$buffer
=
pack
(
HEAPTUPLE_PACK_CODE
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment