pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: antengynnnn536@gmail.com
Subject:  BUG #18773: オートバキュームのリトライ時にreltuplesの値が減少する
Date: Wed, 15 Jan 2025 05:59:20 +0000
Message-ID: <18773-666a02177904ef98@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      18773
Logged by:          勇次 安藤
Email address:      antengynnnn536@gmail.com
PostgreSQL version: 13.6
Operating system:   linax
Description:        

現在、auroraposgres SQLを使用して、オートバキュームを起動して、運用を行っています。
オートバキュームの強度を確認したところ、あるテーブルを掴んでいる状態でオートバキュームのリトライが行われると、刀剣情報のreltuplesの値を減少させていることに気づきました。
マニュアル上は、オートバキューム実行時には書き換えられるものかと認識していましたが、リトライ時にも書き換えられており、テストでは、リトライを繰返すたびにあたいど徐々に小さくせいていることがわかりました。

reltuplesの値は、sql実行時に実行計画を作成するときに使用されるところなので、reltuples(テーブル行数)が小さいあたいで実行計画が作成されており、処理が終わりませんでした。analyzeをかけ直して、reltuplesの値を正規の値にしてsqlを実行したところ問題ない時間で処理が完了しています。

■再現テストの実施内容
1.aa_testというテーブルを50000件データで作成。
2.aa_testのテーブルに対して、1件deleteを行い、comitは行わずに掴んだ状態にしておく
3.更にaa_testに対して20000万件のdeleteを行い、こちらはcomitを行い完了しておく
4. 3.で20000万件deleteしたのをきっかけにオートバキュームが起動されるが、2.でテーブルを掴んでいるためリトライを繰返す
5.reltuplesの情報を確認すると、50000からリトライを繰返すたびに減少しており、529まで値が下がった



view thread (5+ messages)  latest in thread

Message-ID: <18773-666a02177904ef98@postgresql.org>
Permalink:  ../18773-666a02177904ef98@postgresql.org/
Also on:    postgresql.org/message-id/18773-666a02177904ef98@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, antengynnnn536@gmail.com
  Subject: Re:  BUG #18773: オートバキュームのリトライ時にreltuplesの値が減少する
  In-Reply-To: <18773-666a02177904ef98@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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