mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
Use InvalidSnapshot, now SnapshotNow, as the default snapshot.
As far as I can determine, there's no code in the core distribution that fails to explicitly set the snapshot of a scan or executor state. If there is any such code, this will probably cause it to seg fault; friendlier suggestions were discussed on pgsql-hackers, but there was no consensus that anything more than this was needed. This is another step towards the hoped-for complete removal of SnapshotNow.
This commit is contained in:
parent
e6055061c5
commit
765ad89be3
@ -79,7 +79,7 @@ RelationGetIndexScan(Relation indexRelation, int nkeys, int norderbys)
|
||||
|
||||
scan->heapRelation = NULL; /* may be set later */
|
||||
scan->indexRelation = indexRelation;
|
||||
scan->xs_snapshot = SnapshotNow; /* may be set later */
|
||||
scan->xs_snapshot = InvalidSnapshot; /* caller must initialize this */
|
||||
scan->numberOfKeys = nkeys;
|
||||
scan->numberOfOrderBys = norderbys;
|
||||
|
||||
|
@ -105,7 +105,7 @@ CreateExecutorState(void)
|
||||
* Initialize all fields of the Executor State structure
|
||||
*/
|
||||
estate->es_direction = ForwardScanDirection;
|
||||
estate->es_snapshot = SnapshotNow;
|
||||
estate->es_snapshot = InvalidSnapshot; /* caller must initialize this */
|
||||
estate->es_crosscheck_snapshot = InvalidSnapshot; /* no crosscheck */
|
||||
estate->es_range_table = NIL;
|
||||
estate->es_plannedstmt = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user