minor improvement in snapbuild: use existing interface and remove fake code - Mailing list pgsql-hackers

From ocean_li_996
Subject minor improvement in snapbuild: use existing interface and remove fake code
Date
Msg-id 53dd2539.b4ec.19a92d2fe61.Coremail.ocean_li_996@163.com
Whole thread Raw
Responses Re: minor improvement in snapbuild: use existing interface and remove fake code
List 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

pgsql-hackers by date:

Previous
From: Mahendra Singh Thalor
Date:
Subject: Re: Non-text mode for pg_dumpall
Next
From: Corey Huinker
Date:
Subject: Re: Extended Statistics set/restore/clear functions.