RE: Fix slotsync worker busy loop causing repeated log messages

From: cca5507 <2624345507(at)qq(dot)com>
To: Zhijie Hou (Fujitsu) <houzj(dot)fnst(at)fujitsu(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: RE: Fix slotsync worker busy loop causing repeated log messages
Date: 2026-03-04 02:59:29
Message-ID: tencent_DF7615DED412A4D8C9BCE3411C44D9B5850A@qq.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I have a small question about this:

```
@@ -1143,11 +1146,7 @@ SnapBuildProcessRunningXacts(SnapBuild *builder, XLogRecPtr lsn, xl_running_xact
* our snapshot so others or we, after a restart, can use it.
*/
if (builder->state < SNAPBUILD_CONSISTENT)
- {
- /* returns false if there's no point in performing cleanup just yet */
- if (!SnapBuildFindSnapshot(builder, lsn, running))
- return;
- }
+ SnapBuildFindSnapshot(builder, lsn, running);
else
SnapBuildSerialize(builder, lsn);
```

Why we don't call SnapBuildSerialize() when reaching consistent
in SnapBuildFindSnapshot()? I think we can serialize the snapshot
if we are not building a full snapshot, at least.

--
Regards,
ChangAo Chen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2026-03-04 03:36:13 Re: pg_plan_advice (now with transparent SQL plan performance overrides - pg_stash_advice)
Previous Message Peter Geoghegan 2026-03-04 02:27:36 Re: Correcting freeze conflict horizon calculation