| From: | ocean_li_996 <ocean_li_996(at)163(dot)com> |
|---|---|
| To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Cc: | "mohen(dot)lhy(at)alibaba-inc(dot)com" <mohen(dot)lhy(at)alibaba-inc(dot)com> |
| Subject: | minor improvement in snapbuild: use existing interface and remove fake code |
| Date: | 2025-11-17 17:18:12 |
| Message-ID: | 53dd2539.b4ec.19a92d2fe61.Coremail.ocean_li_996@163.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi hackers,
While reviewing the snapbuild implementation, I noticed several small changes that could improve code clarity, correctness, and reuse.
I have prepared a patch with these modifications (attached):
1. Removed the Assert in SnapBuildGetOrBuildSnapshot(). When called from logicalmsg_decode(), this Assert may not hold, which looks like a bug.
2. In SnapBuildProcessChange(), now reuse SnapBuildGetOrBuildSnapshot() to obtain the snapshot.
3. Removed handling of SNAPBUILD_START and SNAPBUILD_BUILDING_SNAPSHOT states in SnapBuildCommitTxn(). When entering this function,
builder->state is always SNAPBUILD_FULL_SNAPSHOT or SNAPBUILD_CONSISTENT.
Looking forward to your comments.
Best regards,
Haiyang Li
| Attachment | Content-Type | Size |
|---|---|---|
| v01_minor_improvement_in_snapbuild.patch | application/octet-stream | 2.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Corey Huinker | 2025-11-17 17:18:55 | Re: Extended Statistics set/restore/clear functions. |
| Previous Message | Mahendra Singh Thalor | 2025-11-17 17:15:28 | Re: Non-text mode for pg_dumpall |