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
d954019f
Commit
d954019f
authored
3 years ago
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Message style improvements
parent
e5f6493e
REL_14_STABLE
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
21 deletions
+25
-21
src/backend/access/heap/vacuumlazy.c
src/backend/access/heap/vacuumlazy.c
+19
-17
src/backend/commands/analyze.c
src/backend/commands/analyze.c
+6
-4
No files found.
src/backend/access/heap/vacuumlazy.c
View file @
d954019f
...
@@ -807,21 +807,21 @@ heap_vacuum_rel(Relation rel, VacuumParams *params,
...
@@ -807,21 +807,21 @@ heap_vacuum_rel(Relation rel, VacuumParams *params,
if
(
vacrel
->
do_index_vacuuming
)
if
(
vacrel
->
do_index_vacuuming
)
{
{
msgfmt
=
_
(
"
%u pages from table (%.2f%% of total) had %lld dead item identifiers removed
\n
"
);
msgfmt
=
_
(
"%u pages from table (%.2f%% of total) had %lld dead item identifiers removed
\n
"
);
if
(
vacrel
->
nindexes
==
0
||
vacrel
->
num_index_scans
==
0
)
if
(
vacrel
->
nindexes
==
0
||
vacrel
->
num_index_scans
==
0
)
appendStringInfoString
(
&
buf
,
_
(
"index scan not needed:"
));
appendStringInfoString
(
&
buf
,
_
(
"index scan not needed:
"
));
else
else
appendStringInfoString
(
&
buf
,
_
(
"index scan needed:"
));
appendStringInfoString
(
&
buf
,
_
(
"index scan needed:
"
));
}
}
else
else
{
{
msgfmt
=
_
(
"
%u pages from table (%.2f%% of total) have %lld dead item identifiers
\n
"
);
msgfmt
=
_
(
"%u pages from table (%.2f%% of total) have %lld dead item identifiers
\n
"
);
if
(
!
vacrel
->
failsafe_active
)
if
(
!
vacrel
->
failsafe_active
)
appendStringInfoString
(
&
buf
,
_
(
"index scan bypassed:"
));
appendStringInfoString
(
&
buf
,
_
(
"index scan bypassed:
"
));
else
else
appendStringInfoString
(
&
buf
,
_
(
"index scan bypassed by failsafe:"
));
appendStringInfoString
(
&
buf
,
_
(
"index scan bypassed by failsafe:
"
));
}
}
orig_rel_pages
=
vacrel
->
rel_pages
+
vacrel
->
pages_removed
;
orig_rel_pages
=
vacrel
->
rel_pages
+
vacrel
->
pages_removed
;
appendStringInfo
(
&
buf
,
msgfmt
,
appendStringInfo
(
&
buf
,
msgfmt
,
...
@@ -848,12 +848,14 @@ heap_vacuum_rel(Relation rel, VacuumParams *params,
...
@@ -848,12 +848,14 @@ heap_vacuum_rel(Relation rel, VacuumParams *params,
read_rate
,
write_rate
);
read_rate
,
write_rate
);
if
(
track_io_timing
)
if
(
track_io_timing
)
{
{
appendStringInfoString
(
&
buf
,
_
(
"I/O
T
imings:"
));
appendStringInfoString
(
&
buf
,
_
(
"I/O
t
imings:"
));
if
(
pgStatBlockReadTime
-
startreadtime
>
0
)
if
(
pgStatBlockReadTime
-
startreadtime
>
0
)
appendStringInfo
(
&
buf
,
_
(
" read
=%.3f
"
),
appendStringInfo
(
&
buf
,
_
(
" read
: %.3f ms
"
),
(
double
)
(
pgStatBlockReadTime
-
startreadtime
)
/
1000
);
(
double
)
(
pgStatBlockReadTime
-
startreadtime
)
/
1000
);
if
((
pgStatBlockReadTime
-
startreadtime
>
0
)
&&
(
pgStatBlockWriteTime
-
startwritetime
>
0
))
appendStringInfoString
(
&
buf
,
_
(
","
));
if
(
pgStatBlockWriteTime
-
startwritetime
>
0
)
if
(
pgStatBlockWriteTime
-
startwritetime
>
0
)
appendStringInfo
(
&
buf
,
_
(
" write
=%.3f
"
),
appendStringInfo
(
&
buf
,
_
(
" write
: %.3f ms
"
),
(
double
)
(
pgStatBlockWriteTime
-
startwritetime
)
/
1000
);
(
double
)
(
pgStatBlockWriteTime
-
startwritetime
)
/
1000
);
appendStringInfoChar
(
&
buf
,
'\n'
);
appendStringInfoChar
(
&
buf
,
'\n'
);
}
}
...
@@ -1650,7 +1652,7 @@ lazy_scan_heap(LVRelState *vacrel, VacuumParams *params, bool aggressive)
...
@@ -1650,7 +1652,7 @@ lazy_scan_heap(LVRelState *vacrel, VacuumParams *params, bool aggressive)
*/
*/
if
(
vacrel
->
nindexes
==
0
&&
vacrel
->
lpdead_item_pages
>
0
)
if
(
vacrel
->
nindexes
==
0
&&
vacrel
->
lpdead_item_pages
>
0
)
ereport
(
elevel
,
ereport
(
elevel
,
(
errmsg
(
"
\"
%s
\"
: removed %lld dead item identifiers in %u pages"
,
(
errmsg
(
"
table
\"
%s
\"
: removed %lld dead item identifiers in %u pages"
,
vacrel
->
relname
,
(
long
long
)
vacrel
->
lpdead_items
,
vacrel
->
relname
,
(
long
long
)
vacrel
->
lpdead_items
,
vacrel
->
lpdead_item_pages
)));
vacrel
->
lpdead_item_pages
)));
...
@@ -1673,7 +1675,7 @@ lazy_scan_heap(LVRelState *vacrel, VacuumParams *params, bool aggressive)
...
@@ -1673,7 +1675,7 @@ lazy_scan_heap(LVRelState *vacrel, VacuumParams *params, bool aggressive)
appendStringInfo
(
&
buf
,
_
(
"%s."
),
pg_rusage_show
(
&
ru0
));
appendStringInfo
(
&
buf
,
_
(
"%s."
),
pg_rusage_show
(
&
ru0
));
ereport
(
elevel
,
ereport
(
elevel
,
(
errmsg
(
"
\"
%s
\"
: found %lld removable, %lld nonremovable row versions in %u out of %u pages"
,
(
errmsg
(
"
table
\"
%s
\"
: found %lld removable, %lld nonremovable row versions in %u out of %u pages"
,
vacrel
->
relname
,
vacrel
->
relname
,
(
long
long
)
vacrel
->
tuples_deleted
,
(
long
long
)
vacrel
->
tuples_deleted
,
(
long
long
)
vacrel
->
num_tuples
,
vacrel
->
scanned_pages
,
(
long
long
)
vacrel
->
num_tuples
,
vacrel
->
scanned_pages
,
...
@@ -2177,7 +2179,7 @@ lazy_vacuum(LVRelState *vacrel)
...
@@ -2177,7 +2179,7 @@ lazy_vacuum(LVRelState *vacrel)
*/
*/
vacrel
->
do_index_vacuuming
=
false
;
vacrel
->
do_index_vacuuming
=
false
;
ereport
(
elevel
,
ereport
(
elevel
,
(
errmsg
(
"
\"
%s
\"
: index scan bypassed: %u pages from table (%.2f%% of total) have %lld dead item identifiers"
,
(
errmsg
(
"
table
\"
%s
\"
: index scan bypassed: %u pages from table (%.2f%% of total) have %lld dead item identifiers"
,
vacrel
->
relname
,
vacrel
->
lpdead_item_pages
,
vacrel
->
relname
,
vacrel
->
lpdead_item_pages
,
100
.
0
*
vacrel
->
lpdead_item_pages
/
vacrel
->
rel_pages
,
100
.
0
*
vacrel
->
lpdead_item_pages
/
vacrel
->
rel_pages
,
(
long
long
)
vacrel
->
lpdead_items
)));
(
long
long
)
vacrel
->
lpdead_items
)));
...
@@ -2388,8 +2390,8 @@ lazy_vacuum_heap_rel(LVRelState *vacrel)
...
@@ -2388,8 +2390,8 @@ lazy_vacuum_heap_rel(LVRelState *vacrel)
vacuumed_pages
==
vacrel
->
lpdead_item_pages
));
vacuumed_pages
==
vacrel
->
lpdead_item_pages
));
ereport
(
elevel
,
ereport
(
elevel
,
(
errmsg
(
"
\"
%s
\"
: removed %
d dead item identifiers in %u pages"
,
(
errmsg
(
"
table
\"
%s
\"
: removed %ll
d dead item identifiers in %u pages"
,
vacrel
->
relname
,
tupindex
,
vacuumed_pages
),
vacrel
->
relname
,
(
long
long
)
tupindex
,
vacuumed_pages
),
errdetail_internal
(
"%s"
,
pg_rusage_show
(
&
ru0
))));
errdetail_internal
(
"%s"
,
pg_rusage_show
(
&
ru0
))));
/* Revert to the previous phase information for error traceback */
/* Revert to the previous phase information for error traceback */
...
@@ -2625,7 +2627,7 @@ lazy_check_wraparound_failsafe(LVRelState *vacrel)
...
@@ -2625,7 +2627,7 @@ lazy_check_wraparound_failsafe(LVRelState *vacrel)
vacrel
->
relnamespace
,
vacrel
->
relnamespace
,
vacrel
->
relname
,
vacrel
->
relname
,
vacrel
->
num_index_scans
),
vacrel
->
num_index_scans
),
errdetail
(
"
table's relfrozenxid or relminmxid is too far in the past
"
),
errdetail
(
"
The table's relfrozenxid or relminmxid is too far in the past.
"
),
errhint
(
"Consider increasing configuration parameter
\"
maintenance_work_mem
\"
or
\"
autovacuum_work_mem
\"
.
\n
"
errhint
(
"Consider increasing configuration parameter
\"
maintenance_work_mem
\"
or
\"
autovacuum_work_mem
\"
.
\n
"
"You might also need to consider other ways for VACUUM to keep up with the allocation of transaction IDs."
)));
"You might also need to consider other ways for VACUUM to keep up with the allocation of transaction IDs."
)));
...
@@ -4261,7 +4263,7 @@ vacuum_error_callback(void *arg)
...
@@ -4261,7 +4263,7 @@ vacuum_error_callback(void *arg)
if
(
BlockNumberIsValid
(
errinfo
->
blkno
))
if
(
BlockNumberIsValid
(
errinfo
->
blkno
))
{
{
if
(
OffsetNumberIsValid
(
errinfo
->
offnum
))
if
(
OffsetNumberIsValid
(
errinfo
->
offnum
))
errcontext
(
"while scanning block %u
and
offset %u of relation
\"
%s.%s
\"
"
,
errcontext
(
"while scanning block %u offset %u of relation
\"
%s.%s
\"
"
,
errinfo
->
blkno
,
errinfo
->
offnum
,
errinfo
->
relnamespace
,
errinfo
->
relname
);
errinfo
->
blkno
,
errinfo
->
offnum
,
errinfo
->
relnamespace
,
errinfo
->
relname
);
else
else
errcontext
(
"while scanning block %u of relation
\"
%s.%s
\"
"
,
errcontext
(
"while scanning block %u of relation
\"
%s.%s
\"
"
,
...
@@ -4276,7 +4278,7 @@ vacuum_error_callback(void *arg)
...
@@ -4276,7 +4278,7 @@ vacuum_error_callback(void *arg)
if
(
BlockNumberIsValid
(
errinfo
->
blkno
))
if
(
BlockNumberIsValid
(
errinfo
->
blkno
))
{
{
if
(
OffsetNumberIsValid
(
errinfo
->
offnum
))
if
(
OffsetNumberIsValid
(
errinfo
->
offnum
))
errcontext
(
"while vacuuming block %u
and
offset %u of relation
\"
%s.%s
\"
"
,
errcontext
(
"while vacuuming block %u offset %u of relation
\"
%s.%s
\"
"
,
errinfo
->
blkno
,
errinfo
->
offnum
,
errinfo
->
relnamespace
,
errinfo
->
relname
);
errinfo
->
blkno
,
errinfo
->
offnum
,
errinfo
->
relnamespace
,
errinfo
->
relname
);
else
else
errcontext
(
"while vacuuming block %u of relation
\"
%s.%s
\"
"
,
errcontext
(
"while vacuuming block %u of relation
\"
%s.%s
\"
"
,
...
...
This diff is collapsed.
Click to expand it.
src/backend/commands/analyze.c
View file @
d954019f
...
@@ -778,7 +778,7 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
...
@@ -778,7 +778,7 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
* reads which are also picked up by track_io_timing, if enabled,
* reads which are also picked up by track_io_timing, if enabled,
* the 'average write rate' is actually talking about the rate of
* the 'average write rate' is actually talking about the rate of
* pages being dirtied, not being written out, so it's typical to
* pages being dirtied, not being written out, so it's typical to
* have a non-zero 'avg write rate' while I/O
T
imings only reports
* have a non-zero 'avg write rate' while I/O
t
imings only reports
* reads.
* reads.
*
*
* It's not clear that an ANALYZE will ever result in
* It's not clear that an ANALYZE will ever result in
...
@@ -813,12 +813,14 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
...
@@ -813,12 +813,14 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
read_rate
,
write_rate
);
read_rate
,
write_rate
);
if
(
track_io_timing
)
if
(
track_io_timing
)
{
{
appendStringInfoString
(
&
buf
,
_
(
"I/O
T
imings:"
));
appendStringInfoString
(
&
buf
,
_
(
"I/O
t
imings:"
));
if
(
pgStatBlockReadTime
-
startreadtime
>
0
)
if
(
pgStatBlockReadTime
-
startreadtime
>
0
)
appendStringInfo
(
&
buf
,
_
(
" read
=%.3f
"
),
appendStringInfo
(
&
buf
,
_
(
" read
: %.3f ms
"
),
(
double
)
(
pgStatBlockReadTime
-
startreadtime
)
/
1000
);
(
double
)
(
pgStatBlockReadTime
-
startreadtime
)
/
1000
);
if
((
pgStatBlockReadTime
-
startreadtime
>
0
)
&&
(
pgStatBlockWriteTime
-
startwritetime
>
0
))
appendStringInfoString
(
&
buf
,
_
(
","
));
if
(
pgStatBlockWriteTime
-
startwritetime
>
0
)
if
(
pgStatBlockWriteTime
-
startwritetime
>
0
)
appendStringInfo
(
&
buf
,
_
(
" write
=%.3f
"
),
appendStringInfo
(
&
buf
,
_
(
" write
: %.3f ms
"
),
(
double
)
(
pgStatBlockWriteTime
-
startwritetime
)
/
1000
);
(
double
)
(
pgStatBlockWriteTime
-
startwritetime
)
/
1000
);
appendStringInfoChar
(
&
buf
,
'\n'
);
appendStringInfoChar
(
&
buf
,
'\n'
);
}
}
...
...
This diff is collapsed.
Click to expand it.
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