mirror of
https://github.com/postgres/postgres.git
synced 2025-07-11 10:01:57 +03:00
pgindent run for 9.4
This includes removing tabs after periods in C comments, which was applied to back branches, so this change should not effect backpatching.
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
* regd_count and count it in RegisteredSnapshots, but this reference is not
|
||||
* tracked by a resource owner. We used to use the TopTransactionResourceOwner
|
||||
* to track this snapshot reference, but that introduces logical circularity
|
||||
* and thus makes it impossible to clean up in a sane fashion. It's better to
|
||||
* and thus makes it impossible to clean up in a sane fashion. It's better to
|
||||
* handle this reference as an internally-tracked registration, so that this
|
||||
* module is entirely lower-level than ResourceOwners.
|
||||
*
|
||||
@ -24,9 +24,9 @@
|
||||
* transaction).
|
||||
*
|
||||
* These arrangements let us reset MyPgXact->xmin when there are no snapshots
|
||||
* referenced by this transaction. (One possible improvement would be to be
|
||||
* referenced by this transaction. (One possible improvement would be to be
|
||||
* able to advance Xmin when the snapshot with the earliest Xmin is no longer
|
||||
* referenced. That's a bit harder though, it requires more locking, and
|
||||
* referenced. That's a bit harder though, it requires more locking, and
|
||||
* anyway it should be rather uncommon to keep temporary snapshots referenced
|
||||
* for too long.)
|
||||
*
|
||||
@ -63,7 +63,7 @@
|
||||
* CurrentSnapshot points to the only snapshot taken in transaction-snapshot
|
||||
* mode, and to the latest one taken in a read-committed transaction.
|
||||
* SecondarySnapshot is a snapshot that's always up-to-date as of the current
|
||||
* instant, even in transaction-snapshot mode. It should only be used for
|
||||
* instant, even in transaction-snapshot mode. It should only be used for
|
||||
* special-purpose code (say, RI checking.) CatalogSnapshot points to an
|
||||
* MVCC snapshot intended to be used for catalog scans; we must refresh it
|
||||
* whenever a system catalog change occurs.
|
||||
@ -135,7 +135,7 @@ static int RegisteredSnapshots = 0;
|
||||
bool FirstSnapshotSet = false;
|
||||
|
||||
/*
|
||||
* Remember the serializable transaction snapshot, if any. We cannot trust
|
||||
* Remember the serializable transaction snapshot, if any. We cannot trust
|
||||
* FirstSnapshotSet in combination with IsolationUsesXactSnapshot(), because
|
||||
* GUC may be reset before us, changing the value of IsolationUsesXactSnapshot.
|
||||
*/
|
||||
@ -169,9 +169,9 @@ Snapshot
|
||||
GetTransactionSnapshot(void)
|
||||
{
|
||||
/*
|
||||
* Return historic snapshot if doing logical decoding. We'll never
|
||||
* need a non-historic transaction snapshot in this (sub-)transaction, so
|
||||
* there's no need to be careful to set one up for later calls to
|
||||
* Return historic snapshot if doing logical decoding. We'll never need a
|
||||
* non-historic transaction snapshot in this (sub-)transaction, so there's
|
||||
* no need to be careful to set one up for later calls to
|
||||
* GetTransactionSnapshot().
|
||||
*/
|
||||
if (HistoricSnapshotActive())
|
||||
@ -238,8 +238,7 @@ GetLatestSnapshot(void)
|
||||
{
|
||||
/*
|
||||
* So far there are no cases requiring support for GetLatestSnapshot()
|
||||
* during logical decoding, but it wouldn't be hard to add if
|
||||
* required.
|
||||
* during logical decoding, but it wouldn't be hard to add if required.
|
||||
*/
|
||||
Assert(!HistoricSnapshotActive());
|
||||
|
||||
@ -283,12 +282,11 @@ Snapshot
|
||||
GetNonHistoricCatalogSnapshot(Oid relid)
|
||||
{
|
||||
/*
|
||||
* If the caller is trying to scan a relation that has no syscache,
|
||||
* no catcache invalidations will be sent when it is updated. For a
|
||||
* a few key relations, snapshot invalidations are sent instead. If
|
||||
* we're trying to scan a relation for which neither catcache nor
|
||||
* snapshot invalidations are sent, we must refresh the snapshot every
|
||||
* time.
|
||||
* If the caller is trying to scan a relation that has no syscache, no
|
||||
* catcache invalidations will be sent when it is updated. For a a few
|
||||
* key relations, snapshot invalidations are sent instead. If we're
|
||||
* trying to scan a relation for which neither catcache nor snapshot
|
||||
* invalidations are sent, we must refresh the snapshot every time.
|
||||
*/
|
||||
if (!CatalogSnapshotStale && !RelationInvalidatesSnapshotsOnly(relid) &&
|
||||
!RelationHasSysCache(relid))
|
||||
@ -403,7 +401,7 @@ SetTransactionSnapshot(Snapshot sourcesnap, TransactionId sourcexid)
|
||||
|
||||
/*
|
||||
* In transaction-snapshot mode, the first snapshot must live until end of
|
||||
* xact, so we must make a copy of it. Furthermore, if we're running in
|
||||
* xact, so we must make a copy of it. Furthermore, if we're running in
|
||||
* serializable mode, predicate.c needs to do its own processing.
|
||||
*/
|
||||
if (IsolationUsesXactSnapshot())
|
||||
@ -499,7 +497,7 @@ FreeSnapshot(Snapshot snapshot)
|
||||
*
|
||||
* If the passed snapshot is a statically-allocated one, or it is possibly
|
||||
* subject to a future command counter update, create a new long-lived copy
|
||||
* with active refcount=1. Otherwise, only increment the refcount.
|
||||
* with active refcount=1. Otherwise, only increment the refcount.
|
||||
*/
|
||||
void
|
||||
PushActiveSnapshot(Snapshot snap)
|
||||
@ -868,7 +866,7 @@ ExportSnapshot(Snapshot snapshot)
|
||||
* However, we haven't got enough information to do that, since we don't
|
||||
* know if we're at top level or not. For example, we could be inside a
|
||||
* plpgsql function that is going to fire off other transactions via
|
||||
* dblink. Rather than disallow perfectly legitimate usages, don't make a
|
||||
* dblink. Rather than disallow perfectly legitimate usages, don't make a
|
||||
* check.
|
||||
*
|
||||
* Also note that we don't make any restriction on the transaction's
|
||||
@ -1081,7 +1079,7 @@ parseXidFromText(const char *prefix, char **s, const char *filename)
|
||||
|
||||
/*
|
||||
* ImportSnapshot
|
||||
* Import a previously exported snapshot. The argument should be a
|
||||
* Import a previously exported snapshot. The argument should be a
|
||||
* filename in SNAPSHOT_EXPORT_DIR. Load the snapshot from that file.
|
||||
* This is called by "SET TRANSACTION SNAPSHOT 'foo'".
|
||||
*/
|
||||
|
Reference in New Issue
Block a user