pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix mesurement of elapsed time during truncating heap in VACUUM.
6+ messages / 1 participants
[nested] [flat]

* pgsql: Fix mesurement of elapsed time during truncating heap in VACUUM.
@ 2020-02-19 11:47 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Fujii Masao @ 2020-02-19 11:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix mesurement of elapsed time during truncating heap in VACUUM.

VACUUM may truncate heap in several batches. The activity report
is logged for each batch, and contains the number of pages in the table
before and after the truncation, and also the elapsed time during
the truncation. Previously the elapsed time reported in each batch was
the total elapsed time since starting the truncation until finishing
each batch. For example, if the truncation was processed dividing into
three batches, the second batch reported the accumulated time elapsed
during both first and second batches. This is strange and confusing
because the number of pages in the table reported together is not
total. Instead, each batch should report the time elapsed during
only that batch.

The cause of this issue was that the resource usage snapshot was
initialized only at the beginning of the truncation and was never
reset later. This commit fixes the issue by changing VACUUM so that
the resource usage snapshot is reset at each batch.

Back-patch to all supported branches.

Reported-by: Tatsuhito Kasahara
Author: Tatsuhito Kasahara
Reviewed-by: Masahiko Sawada, Fujii Masao
Discussion: https://postgr.es/m/CAP0=ZVJsf=NvQuy+QXQZ7B=ZVLoDV_JzsVC1FRsF1G18i3zMGg@mail.gmail.com

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4a3f164b74f56e91c3528e74166a1d45d6176f4d

Modified Files
--------------
src/backend/commands/vacuumlazy.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix mesurement of elapsed time during truncating heap in VACUUM.
@ 2020-02-19 11:48 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Fujii Masao @ 2020-02-19 11:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix mesurement of elapsed time during truncating heap in VACUUM.

VACUUM may truncate heap in several batches. The activity report
is logged for each batch, and contains the number of pages in the table
before and after the truncation, and also the elapsed time during
the truncation. Previously the elapsed time reported in each batch was
the total elapsed time since starting the truncation until finishing
each batch. For example, if the truncation was processed dividing into
three batches, the second batch reported the accumulated time elapsed
during both first and second batches. This is strange and confusing
because the number of pages in the table reported together is not
total. Instead, each batch should report the time elapsed during
only that batch.

The cause of this issue was that the resource usage snapshot was
initialized only at the beginning of the truncation and was never
reset later. This commit fixes the issue by changing VACUUM so that
the resource usage snapshot is reset at each batch.

Back-patch to all supported branches.

Reported-by: Tatsuhito Kasahara
Author: Tatsuhito Kasahara
Reviewed-by: Masahiko Sawada, Fujii Masao
Discussion: https://postgr.es/m/CAP0=ZVJsf=NvQuy+QXQZ7B=ZVLoDV_JzsVC1FRsF1G18i3zMGg@mail.gmail.com

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/307c2703744432a3e46ebaa2f99c11a533e5efdd

Modified Files
--------------
src/backend/commands/vacuumlazy.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix mesurement of elapsed time during truncating heap in VACUUM.
@ 2020-02-19 11:48 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Fujii Masao @ 2020-02-19 11:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix mesurement of elapsed time during truncating heap in VACUUM.

VACUUM may truncate heap in several batches. The activity report
is logged for each batch, and contains the number of pages in the table
before and after the truncation, and also the elapsed time during
the truncation. Previously the elapsed time reported in each batch was
the total elapsed time since starting the truncation until finishing
each batch. For example, if the truncation was processed dividing into
three batches, the second batch reported the accumulated time elapsed
during both first and second batches. This is strange and confusing
because the number of pages in the table reported together is not
total. Instead, each batch should report the time elapsed during
only that batch.

The cause of this issue was that the resource usage snapshot was
initialized only at the beginning of the truncation and was never
reset later. This commit fixes the issue by changing VACUUM so that
the resource usage snapshot is reset at each batch.

Back-patch to all supported branches.

Reported-by: Tatsuhito Kasahara
Author: Tatsuhito Kasahara
Reviewed-by: Masahiko Sawada, Fujii Masao
Discussion: https://postgr.es/m/CAP0=ZVJsf=NvQuy+QXQZ7B=ZVLoDV_JzsVC1FRsF1G18i3zMGg@mail.gmail.com

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/79f344d52bd51611bff655a97a89c62118aaa5ee

Modified Files
--------------
src/backend/commands/vacuumlazy.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix mesurement of elapsed time during truncating heap in VACUUM.
@ 2020-02-19 11:48 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Fujii Masao @ 2020-02-19 11:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix mesurement of elapsed time during truncating heap in VACUUM.

VACUUM may truncate heap in several batches. The activity report
is logged for each batch, and contains the number of pages in the table
before and after the truncation, and also the elapsed time during
the truncation. Previously the elapsed time reported in each batch was
the total elapsed time since starting the truncation until finishing
each batch. For example, if the truncation was processed dividing into
three batches, the second batch reported the accumulated time elapsed
during both first and second batches. This is strange and confusing
because the number of pages in the table reported together is not
total. Instead, each batch should report the time elapsed during
only that batch.

The cause of this issue was that the resource usage snapshot was
initialized only at the beginning of the truncation and was never
reset later. This commit fixes the issue by changing VACUUM so that
the resource usage snapshot is reset at each batch.

Back-patch to all supported branches.

Reported-by: Tatsuhito Kasahara
Author: Tatsuhito Kasahara
Reviewed-by: Masahiko Sawada, Fujii Masao
Discussion: https://postgr.es/m/CAP0=ZVJsf=NvQuy+QXQZ7B=ZVLoDV_JzsVC1FRsF1G18i3zMGg@mail.gmail.com

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/414ed1ca232134e512ecfed1849f092f24f2a27a

Modified Files
--------------
src/backend/commands/vacuumlazy.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix mesurement of elapsed time during truncating heap in VACUUM.
@ 2020-02-19 11:49 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Fujii Masao @ 2020-02-19 11:49 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix mesurement of elapsed time during truncating heap in VACUUM.

VACUUM may truncate heap in several batches. The activity report
is logged for each batch, and contains the number of pages in the table
before and after the truncation, and also the elapsed time during
the truncation. Previously the elapsed time reported in each batch was
the total elapsed time since starting the truncation until finishing
each batch. For example, if the truncation was processed dividing into
three batches, the second batch reported the accumulated time elapsed
during both first and second batches. This is strange and confusing
because the number of pages in the table reported together is not
total. Instead, each batch should report the time elapsed during
only that batch.

The cause of this issue was that the resource usage snapshot was
initialized only at the beginning of the truncation and was never
reset later. This commit fixes the issue by changing VACUUM so that
the resource usage snapshot is reset at each batch.

Back-patch to all supported branches.

Reported-by: Tatsuhito Kasahara
Author: Tatsuhito Kasahara
Reviewed-by: Masahiko Sawada, Fujii Masao
Discussion: https://postgr.es/m/CAP0=ZVJsf=NvQuy+QXQZ7B=ZVLoDV_JzsVC1FRsF1G18i3zMGg@mail.gmail.com

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/16e6c968be64db82a9680961e2e69d38cdfbd408

Modified Files
--------------
src/backend/access/heap/vacuumlazy.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix mesurement of elapsed time during truncating heap in VACUUM.
@ 2020-02-19 11:49 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Fujii Masao @ 2020-02-19 11:49 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix mesurement of elapsed time during truncating heap in VACUUM.

VACUUM may truncate heap in several batches. The activity report
is logged for each batch, and contains the number of pages in the table
before and after the truncation, and also the elapsed time during
the truncation. Previously the elapsed time reported in each batch was
the total elapsed time since starting the truncation until finishing
each batch. For example, if the truncation was processed dividing into
three batches, the second batch reported the accumulated time elapsed
during both first and second batches. This is strange and confusing
because the number of pages in the table reported together is not
total. Instead, each batch should report the time elapsed during
only that batch.

The cause of this issue was that the resource usage snapshot was
initialized only at the beginning of the truncation and was never
reset later. This commit fixes the issue by changing VACUUM so that
the resource usage snapshot is reset at each batch.

Back-patch to all supported branches.

Reported-by: Tatsuhito Kasahara
Author: Tatsuhito Kasahara
Reviewed-by: Masahiko Sawada, Fujii Masao
Discussion: https://postgr.es/m/CAP0=ZVJsf=NvQuy+QXQZ7B=ZVLoDV_JzsVC1FRsF1G18i3zMGg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/007491979461ff10d487e1da9bcc87f2fd834f26

Modified Files
--------------
src/backend/access/heap/vacuumlazy.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2020-02-19 11:49 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-02-19 11:47 pgsql: Fix mesurement of elapsed time during truncating heap in VACUUM. Fujii Masao <fujii@postgresql.org>
2020-02-19 11:48 pgsql: Fix mesurement of elapsed time during truncating heap in VACUUM. Fujii Masao <fujii@postgresql.org>
2020-02-19 11:48 pgsql: Fix mesurement of elapsed time during truncating heap in VACUUM. Fujii Masao <fujii@postgresql.org>
2020-02-19 11:48 pgsql: Fix mesurement of elapsed time during truncating heap in VACUUM. Fujii Masao <fujii@postgresql.org>
2020-02-19 11:49 pgsql: Fix mesurement of elapsed time during truncating heap in VACUUM. Fujii Masao <fujii@postgresql.org>
2020-02-19 11:49 pgsql: Fix mesurement of elapsed time during truncating heap in VACUUM. Fujii Masao <fujii@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox