mirror of
https://github.com/postgres/postgres.git
synced 2026-10-23 13:29:09 +03:00
Fix misplaced comment in snapbuild.c.
Commits2bef06d516and240e0dbacdadded code between the comment and the assignment it describes, so the comment now appears to explain an unrelated line. Move it back to its original place. Author: Antonin Houska <ah@cybertec.at> Discussion: https://postgr.es/m/14864.1788978951@localhost
This commit is contained in:
@@ -471,10 +471,6 @@ SnapBuildInitialSnapshot(SnapBuild *builder)
|
||||
snap = SnapBuildBuildSnapshot(builder);
|
||||
|
||||
/*
|
||||
* We know that snap->xmin is alive, enforced by the logical xmin
|
||||
* mechanism. Due to that we can do this without locks, we're only
|
||||
* changing our own value.
|
||||
*
|
||||
* Building an initial snapshot is expensive and an unenforced xmin
|
||||
* horizon would have bad consequences, therefore always double-check that
|
||||
* the horizon is enforced.
|
||||
@@ -487,6 +483,11 @@ SnapBuildInitialSnapshot(SnapBuild *builder)
|
||||
elog(ERROR, "cannot build an initial slot snapshot as oldest safe xid %u follows snapshot's xmin %u",
|
||||
safeXid, snap->xmin);
|
||||
|
||||
/*
|
||||
* We know that snap->xmin is alive, enforced by the logical xmin
|
||||
* mechanism. Due to that we can do this without locks, we're only
|
||||
* changing our own value.
|
||||
*/
|
||||
MyProc->xmin = snap->xmin;
|
||||
|
||||
/* allocate in transaction context */
|
||||
|
||||
Reference in New Issue
Block a user