RE: Fix slotsync worker busy loop causing repeated log messages - Mailing list pgsql-hackers

From cca5507
Subject RE: Fix slotsync worker busy loop causing repeated log messages
Date
Msg-id tencent_DF7615DED412A4D8C9BCE3411C44D9B5850A@qq.com
Whole thread Raw
In response to RE: Fix slotsync worker busy loop causing repeated log messages  ("Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>)
List 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

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Correcting freeze conflict horizon calculation
Next
From: Robert Haas
Date:
Subject: Re: pg_plan_advice (now with transparent SQL plan performance overrides - pg_stash_advice)