Correct several behavior descriptions in comments.
Reuse cautionary language from src/test/ssl/README in src/test/kerberos/README. SLRUs have had access to six-character segments names since commit73c986adde
, and recovery stopped calling HeapTupleHeaderAdvanceLatestRemovedXid() in commit558a9165e0
. The other corrections are more self-evident.
This commit is contained in:
parent
db659a3416
commit
676a9c3cc4
|
@ -6920,8 +6920,6 @@ HeapTupleHeaderAdvanceLatestRemovedXid(HeapTupleHeader tuple,
|
||||||
* updated/deleted by the inserting transaction.
|
* updated/deleted by the inserting transaction.
|
||||||
*
|
*
|
||||||
* Look for a committed hint bit, or if no xmin bit is set, check clog.
|
* Look for a committed hint bit, or if no xmin bit is set, check clog.
|
||||||
* This needs to work on both primary and standby, where it is used to
|
|
||||||
* assess btree delete records.
|
|
||||||
*/
|
*/
|
||||||
if (HeapTupleHeaderXminCommitted(tuple) ||
|
if (HeapTupleHeaderXminCommitted(tuple) ||
|
||||||
(!HeapTupleHeaderXminInvalid(tuple) && TransactionIdDidCommit(xmin)))
|
(!HeapTupleHeaderXminInvalid(tuple) && TransactionIdDidCommit(xmin)))
|
||||||
|
|
|
@ -635,12 +635,11 @@ be reconstructed later following a crash and the action is simply a way
|
||||||
of optimising for performance. When a hint is written we use
|
of optimising for performance. When a hint is written we use
|
||||||
MarkBufferDirtyHint() to mark the block dirty.
|
MarkBufferDirtyHint() to mark the block dirty.
|
||||||
|
|
||||||
If the buffer is clean and checksums are in use then
|
If the buffer is clean and checksums are in use then MarkBufferDirtyHint()
|
||||||
MarkBufferDirtyHint() inserts an XLOG_FPI record to ensure that we
|
inserts an XLOG_FPI_FOR_HINT record to ensure that we take a full page image
|
||||||
take a full page image that includes the hint. We do this to avoid
|
that includes the hint. We do this to avoid a partial page write, when we
|
||||||
a partial page write, when we write the dirtied page. WAL is not
|
write the dirtied page. WAL is not written during recovery, so we simply skip
|
||||||
written during recovery, so we simply skip dirtying blocks because
|
dirtying blocks because of hints when in recovery.
|
||||||
of hints when in recovery.
|
|
||||||
|
|
||||||
If you do decide to optimise away a WAL record, then any calls to
|
If you do decide to optimise away a WAL record, then any calls to
|
||||||
MarkBufferDirty() must be replaced by MarkBufferDirtyHint(),
|
MarkBufferDirty() must be replaced by MarkBufferDirtyHint(),
|
||||||
|
|
|
@ -367,12 +367,13 @@ SetTransactionIdLimit(TransactionId oldest_datfrozenxid, Oid oldest_datoid)
|
||||||
* We'll refuse to continue assigning XIDs in interactive mode once we get
|
* We'll refuse to continue assigning XIDs in interactive mode once we get
|
||||||
* within 3M transactions of data loss. This leaves lots of room for the
|
* within 3M transactions of data loss. This leaves lots of room for the
|
||||||
* DBA to fool around fixing things in a standalone backend, while not
|
* DBA to fool around fixing things in a standalone backend, while not
|
||||||
* being significant compared to total XID space. (Note that since
|
* being significant compared to total XID space. (VACUUM requires an XID
|
||||||
* vacuuming requires one transaction per table cleaned, we had better be
|
* if it truncates at wal_level!=minimal. "VACUUM (ANALYZE)", which a DBA
|
||||||
* sure there's lots of XIDs left...) Also, at default BLCKSZ, this
|
* might do by reflex, assigns an XID. Hence, we had better be sure
|
||||||
* leaves two completely-idle segments. In the event of edge-case bugs
|
* there's lots of XIDs left...) Also, at default BLCKSZ, this leaves two
|
||||||
* involving page or segment arithmetic, idle segments render the bugs
|
* completely-idle segments. In the event of edge-case bugs involving
|
||||||
* unreachable outside of single-user mode.
|
* page or segment arithmetic, idle segments render the bugs unreachable
|
||||||
|
* outside of single-user mode.
|
||||||
*/
|
*/
|
||||||
xidStopLimit = xidWrapLimit - 3000000;
|
xidStopLimit = xidWrapLimit - 3000000;
|
||||||
if (xidStopLimit < FirstNormalTransactionId)
|
if (xidStopLimit < FirstNormalTransactionId)
|
||||||
|
|
|
@ -302,13 +302,10 @@ static SlruCtlData NotifyCtlData;
|
||||||
#define QUEUE_FULL_WARN_INTERVAL 5000 /* warn at most once every 5s */
|
#define QUEUE_FULL_WARN_INTERVAL 5000 /* warn at most once every 5s */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* slru.c currently assumes that all filenames are four characters of hex
|
* Use segments 0000 through FFFF. Each contains SLRU_PAGES_PER_SEGMENT pages
|
||||||
* digits. That means that we can use segments 0000 through FFFF.
|
* which gives us the pages from 0 to SLRU_PAGES_PER_SEGMENT * 0x10000 - 1.
|
||||||
* Each segment contains SLRU_PAGES_PER_SEGMENT pages which gives us
|
* We could use as many segments as SlruScanDirectory() allows, but this gives
|
||||||
* the pages from 0 to SLRU_PAGES_PER_SEGMENT * 0x10000 - 1.
|
* us so much space already that it doesn't seem worth the trouble.
|
||||||
*
|
|
||||||
* It's of course possible to enhance slru.c, but this gives us so much
|
|
||||||
* space already that it doesn't seem worth the trouble.
|
|
||||||
*
|
*
|
||||||
* The most data we can have in the queue at a time is QUEUE_MAX_PAGE/2
|
* The most data we can have in the queue at a time is QUEUE_MAX_PAGE/2
|
||||||
* pages, because more than that would confuse slru.c into thinking there
|
* pages, because more than that would confuse slru.c into thinking there
|
||||||
|
|
|
@ -949,11 +949,11 @@ vacuum_set_xid_limits(Relation rel,
|
||||||
/*
|
/*
|
||||||
* We can always ignore processes running lazy vacuum. This is because we
|
* We can always ignore processes running lazy vacuum. This is because we
|
||||||
* use these values only for deciding which tuples we must keep in the
|
* use these values only for deciding which tuples we must keep in the
|
||||||
* tables. Since lazy vacuum doesn't write its XID anywhere, it's safe to
|
* tables. Since lazy vacuum doesn't write its XID anywhere (usually no
|
||||||
* ignore it. In theory it could be problematic to ignore lazy vacuums in
|
* XID assigned), it's safe to ignore it. In theory it could be
|
||||||
* a full vacuum, but keep in mind that only one vacuum process can be
|
* problematic to ignore lazy vacuums in a full vacuum, but keep in mind
|
||||||
* working on a particular table at any time, and that each vacuum is
|
* that only one vacuum process can be working on a particular table at
|
||||||
* always an independent transaction.
|
* any time, and that each vacuum is always an independent transaction.
|
||||||
*/
|
*/
|
||||||
*oldestXmin = GetOldestNonRemovableTransactionId(rel);
|
*oldestXmin = GetOldestNonRemovableTransactionId(rel);
|
||||||
|
|
||||||
|
|
|
@ -3578,7 +3578,7 @@ IncrBufferRefCount(Buffer buffer)
|
||||||
* This is essentially the same as MarkBufferDirty, except:
|
* This is essentially the same as MarkBufferDirty, except:
|
||||||
*
|
*
|
||||||
* 1. The caller does not write WAL; so if checksums are enabled, we may need
|
* 1. The caller does not write WAL; so if checksums are enabled, we may need
|
||||||
* to write an XLOG_FPI WAL record to protect against torn pages.
|
* to write an XLOG_FPI_FOR_HINT WAL record to protect against torn pages.
|
||||||
* 2. The caller might have only share-lock instead of exclusive-lock on the
|
* 2. The caller might have only share-lock instead of exclusive-lock on the
|
||||||
* buffer's content lock.
|
* buffer's content lock.
|
||||||
* 3. This function does not guarantee that the buffer is always marked dirty
|
* 3. This function does not guarantee that the buffer is always marked dirty
|
||||||
|
|
|
@ -611,14 +611,9 @@ XLogDumpDisplayStats(XLogDumpConfig *config, XLogDumpStats *stats)
|
||||||
double rec_len_pct,
|
double rec_len_pct,
|
||||||
fpi_len_pct;
|
fpi_len_pct;
|
||||||
|
|
||||||
/* ---
|
/*
|
||||||
* Make a first pass to calculate column totals:
|
* Each row shows its percentages of the total, so make a first pass to
|
||||||
* count(*),
|
* calculate column totals.
|
||||||
* sum(xl_len+SizeOfXLogRecord),
|
|
||||||
* sum(xl_tot_len-xl_len-SizeOfXLogRecord), and
|
|
||||||
* sum(xl_tot_len).
|
|
||||||
* These are used to calculate percentages for each record type.
|
|
||||||
* ---
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (ri = 0; ri < RM_NEXT_ID; ri++)
|
for (ri = 0; ri < RM_NEXT_ID; ri++)
|
||||||
|
|
|
@ -43,11 +43,8 @@ typedef struct XLogPageHeaderData
|
||||||
/*
|
/*
|
||||||
* When there is not enough space on current page for whole record, we
|
* When there is not enough space on current page for whole record, we
|
||||||
* continue on the next page. xlp_rem_len is the number of bytes
|
* continue on the next page. xlp_rem_len is the number of bytes
|
||||||
* remaining from a previous page.
|
* remaining from a previous page; it tracks xl_tot_len in the initial
|
||||||
*
|
* header. Note that the continuation data isn't necessarily aligned.
|
||||||
* Note that xlp_rem_len includes backup-block data; that is, it tracks
|
|
||||||
* xl_tot_len not xl_len in the initial header. Also note that the
|
|
||||||
* continuation data isn't necessarily aligned.
|
|
||||||
*/
|
*/
|
||||||
uint32 xlp_rem_len; /* total len of remaining data for record */
|
uint32 xlp_rem_len; /* total len of remaining data for record */
|
||||||
} XLogPageHeaderData;
|
} XLogPageHeaderData;
|
||||||
|
|
|
@ -8,10 +8,12 @@ functionality. This requires a full MIT Kerberos installation,
|
||||||
including server and client tools, and is therefore kept separate and
|
including server and client tools, and is therefore kept separate and
|
||||||
not run by default.
|
not run by default.
|
||||||
|
|
||||||
Also, this test suite creates a KDC server that listens for TCP/IP
|
CAUTION: The test server run by this test is configured to listen for TCP
|
||||||
connections on localhost without any real access control, so it is not
|
connections on localhost. Any user on the same host is able to log in to the
|
||||||
safe to run this on a system where there might be untrusted local
|
test server while the tests are running. Do not run this suite on a multi-user
|
||||||
users.
|
system where you don't trust all local users! Also, this test suite creates a
|
||||||
|
KDC server that listens for TCP/IP connections on localhost without any real
|
||||||
|
access control.
|
||||||
|
|
||||||
Running the tests
|
Running the tests
|
||||||
=================
|
=================
|
||||||
|
|
|
@ -1234,10 +1234,8 @@ sub can_bind
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Automatically shut down any still-running nodes when the test script exits.
|
# Automatically shut down any still-running nodes (in the same order the nodes
|
||||||
# Note that this just stops the postmasters (in the same order the nodes were
|
# were created in) when the test script exits.
|
||||||
# created in). Any temporary directories are deleted, in an unspecified
|
|
||||||
# order, later when the File::Temp objects are destroyed.
|
|
||||||
END
|
END
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,7 @@ is($stdout, 'before_basebackup',
|
||||||
# Examine the physical slot the replica uses to stream changes
|
# Examine the physical slot the replica uses to stream changes
|
||||||
# from the primary to make sure its hot_standby_feedback
|
# from the primary to make sure its hot_standby_feedback
|
||||||
# has locked in a catalog_xmin on the physical slot, and that
|
# has locked in a catalog_xmin on the physical slot, and that
|
||||||
# any xmin is < the catalog_xmin
|
# any xmin is >= the catalog_xmin
|
||||||
$node_primary->poll_query_until(
|
$node_primary->poll_query_until(
|
||||||
'postgres', q[
|
'postgres', q[
|
||||||
SELECT catalog_xmin IS NOT NULL
|
SELECT catalog_xmin IS NOT NULL
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
# - a database called trustdb that lets anyone in
|
# - a database called trustdb that lets anyone in
|
||||||
# - another database called certdb that uses certificate authentication, ie.
|
# - another database called certdb that uses certificate authentication, ie.
|
||||||
# the client must present a valid certificate signed by the client CA
|
# the client must present a valid certificate signed by the client CA
|
||||||
# - two users, called ssltestuser and anotheruser.
|
|
||||||
#
|
#
|
||||||
# The server is configured to only accept connections from localhost. If you
|
# The server is configured to only accept connections from localhost. If you
|
||||||
# want to run the client from another host, you'll have to configure that
|
# want to run the client from another host, you'll have to configure that
|
||||||
|
|
Loading…
Reference in New Issue