Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit676a9c3

Browse files
committed
Correct several behavior descriptions in comments.
Reuse cautionary language from src/test/ssl/README insrc/test/kerberos/README. SLRUs have had access to six-charactersegments names since commit73c986a,and recovery stopped calling HeapTupleHeaderAdvanceLatestRemovedXid() incommit558a916. The other correctionsare more self-evident.
1 parentdb659a3 commit676a9c3

File tree

12 files changed

+36
-50
lines changed

12 files changed

+36
-50
lines changed

‎src/backend/access/heap/heapam.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6920,8 +6920,6 @@ HeapTupleHeaderAdvanceLatestRemovedXid(HeapTupleHeader tuple,
69206920
* updated/deleted by the inserting transaction.
69216921
*
69226922
* Look for a committed hint bit, or if no xmin bit is set, check clog.
6923-
* This needs to work on both primary and standby, where it is used to
6924-
* assess btree delete records.
69256923
*/
69266924
if (HeapTupleHeaderXminCommitted(tuple)||
69276925
(!HeapTupleHeaderXminInvalid(tuple)&&TransactionIdDidCommit(xmin)))

‎src/backend/access/transam/README

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -635,12 +635,11 @@ be reconstructed later following a crash and the action is simply a way
635635
of optimising for performance. When a hint is written we use
636636
MarkBufferDirtyHint() to mark the block dirty.
637637

638-
If the buffer is clean and checksums are in use then
639-
MarkBufferDirtyHint() inserts an XLOG_FPI record to ensure that we
640-
take a full page image that includes the hint. We do this to avoid
641-
a partial page write, when we write the dirtied page. WAL is not
642-
written during recovery, so we simply skip dirtying blocks because
643-
of hints when in recovery.
638+
If the buffer is clean and checksums are in use then MarkBufferDirtyHint()
639+
inserts an XLOG_FPI_FOR_HINT record to ensure that we take a full page image
640+
that includes the hint. We do this to avoid a partial page write, when we
641+
write the dirtied page. WAL is not written during recovery, so we simply skip
642+
dirtying blocks because of hints when in recovery.
644643

645644
If you do decide to optimise away a WAL record, then any calls to
646645
MarkBufferDirty() must be replaced by MarkBufferDirtyHint(),

‎src/backend/access/transam/varsup.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -367,12 +367,13 @@ SetTransactionIdLimit(TransactionId oldest_datfrozenxid, Oid oldest_datoid)
367367
* We'll refuse to continue assigning XIDs in interactive mode once we get
368368
* within 3M transactions of data loss. This leaves lots of room for the
369369
* DBA to fool around fixing things in a standalone backend, while not
370-
* being significant compared to total XID space. (Note that since
371-
* vacuuming requires one transaction per table cleaned, we had better be
372-
* sure there's lots of XIDs left...) Also, at default BLCKSZ, this
373-
* leaves two completely-idle segments. In the event of edge-case bugs
374-
* involving page or segment arithmetic, idle segments render the bugs
375-
* unreachable outside of single-user mode.
370+
* being significant compared to total XID space. (VACUUM requires an XID
371+
* if it truncates at wal_level!=minimal. "VACUUM (ANALYZE)", which a DBA
372+
* might do by reflex, assigns an XID. Hence, we had better be sure
373+
* there's lots of XIDs left...) Also, at default BLCKSZ, this leaves two
374+
* completely-idle segments. In the event of edge-case bugs involving
375+
* page or segment arithmetic, idle segments render the bugs unreachable
376+
* outside of single-user mode.
376377
*/
377378
xidStopLimit=xidWrapLimit-3000000;
378379
if (xidStopLimit<FirstNormalTransactionId)

‎src/backend/commands/async.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -302,13 +302,10 @@ static SlruCtlData NotifyCtlData;
302302
#defineQUEUE_FULL_WARN_INTERVAL5000/* warn at most once every 5s */
303303

304304
/*
305-
* slru.c currently assumes that all filenames are four characters of hex
306-
* digits. That means that we can use segments 0000 through FFFF.
307-
* Each segment contains SLRU_PAGES_PER_SEGMENT pages which gives us
308-
* the pages from 0 to SLRU_PAGES_PER_SEGMENT * 0x10000 - 1.
309-
*
310-
* It's of course possible to enhance slru.c, but this gives us so much
311-
* space already that it doesn't seem worth the trouble.
305+
* Use segments 0000 through FFFF. Each contains SLRU_PAGES_PER_SEGMENT pages
306+
* which gives us the pages from 0 to SLRU_PAGES_PER_SEGMENT * 0x10000 - 1.
307+
* We could use as many segments as SlruScanDirectory() allows, but this gives
308+
* us so much space already that it doesn't seem worth the trouble.
312309
*
313310
* The most data we can have in the queue at a time is QUEUE_MAX_PAGE/2
314311
* pages, because more than that would confuse slru.c into thinking there

‎src/backend/commands/vacuum.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -949,11 +949,11 @@ vacuum_set_xid_limits(Relation rel,
949949
/*
950950
* We can always ignore processes running lazy vacuum. This is because we
951951
* use these values only for deciding which tuples we must keep in the
952-
* tables. Since lazy vacuum doesn't write its XID anywhere, it's safe to
953-
* ignore it. In theory it could be problematic to ignore lazy vacuums in
954-
* a full vacuum, but keep in mind that only one vacuum process can be
955-
*working on a particular table at any time, and that each vacuum is
956-
* always an independent transaction.
952+
* tables. Since lazy vacuum doesn't write its XID anywhere (usually no
953+
*XID assigned), it's safe toignore it. In theory it could be
954+
*problematic to ignore lazy vacuums ina full vacuum, but keep in mind
955+
*that only one vacuum process can be working on a particular table at
956+
*any time, and that each vacuum isalways an independent transaction.
957957
*/
958958
*oldestXmin=GetOldestNonRemovableTransactionId(rel);
959959

‎src/backend/storage/buffer/bufmgr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3578,7 +3578,7 @@ IncrBufferRefCount(Buffer buffer)
35783578
* This is essentially the same as MarkBufferDirty, except:
35793579
*
35803580
* 1. The caller does not write WAL; so if checksums are enabled, we may need
3581-
* to write anXLOG_FPI WAL record to protect against torn pages.
3581+
* to write anXLOG_FPI_FOR_HINT WAL record to protect against torn pages.
35823582
* 2. The caller might have only share-lock instead of exclusive-lock on the
35833583
* buffer's content lock.
35843584
* 3. This function does not guarantee that the buffer is always marked dirty

‎src/bin/pg_waldump/pg_waldump.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -611,14 +611,9 @@ XLogDumpDisplayStats(XLogDumpConfig *config, XLogDumpStats *stats)
611611
doublerec_len_pct,
612612
fpi_len_pct;
613613

614-
/* ---
615-
* Make a first pass to calculate column totals:
616-
* count(*),
617-
* sum(xl_len+SizeOfXLogRecord),
618-
* sum(xl_tot_len-xl_len-SizeOfXLogRecord), and
619-
* sum(xl_tot_len).
620-
* These are used to calculate percentages for each record type.
621-
* ---
614+
/*
615+
* Each row shows its percentages of the total, so make a first pass to
616+
* calculate column totals.
622617
*/
623618

624619
for (ri=0;ri<RM_NEXT_ID;ri++)

‎src/include/access/xlog_internal.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,8 @@ typedef struct XLogPageHeaderData
4343
/*
4444
* When there is not enough space on current page for whole record, we
4545
* continue on the next page. xlp_rem_len is the number of bytes
46-
* remaining from a previous page.
47-
*
48-
* Note that xlp_rem_len includes backup-block data; that is, it tracks
49-
* xl_tot_len not xl_len in the initial header. Also note that the
50-
* continuation data isn't necessarily aligned.
46+
* remaining from a previous page; it tracks xl_tot_len in the initial
47+
* header. Note that the continuation data isn't necessarily aligned.
5148
*/
5249
uint32xlp_rem_len;/* total len of remaining data for record */
5350
}XLogPageHeaderData;

‎src/test/kerberos/README

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ functionality. This requires a full MIT Kerberos installation,
88
including server and client tools, and is therefore kept separate and
99
not run by default.
1010

11-
Also, this test suite creates a KDC server that listens for TCP/IP
12-
connections on localhost without any real access control, so it is not
13-
safe to run this on a system where there might be untrusted local
14-
users.
11+
CAUTION: The test server run by this test is configured to listen for TCP
12+
connections on localhost. Any user on the same host is able to log in to the
13+
test server while the tests are running. Do not run this suite on a multi-user
14+
system where you don't trust all local users! Also, this test suite creates a
15+
KDC server that listens for TCP/IP connections on localhost without any real
16+
access control.
1517

1618
Running the tests
1719
=================

‎src/test/perl/PostgresNode.pm

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,10 +1234,8 @@ sub can_bind
12341234
return$ret;
12351235
}
12361236

1237-
# Automatically shut down any still-running nodes when the test script exits.
1238-
# Note that this just stops the postmasters (in the same order the nodes were
1239-
# created in). Any temporary directories are deleted, in an unspecified
1240-
# order, later when the File::Temp objects are destroyed.
1237+
# Automatically shut down any still-running nodes (in the same order the nodes
1238+
# were created in) when the test script exits.
12411239
END
12421240
{
12431241

‎src/test/recovery/t/010_logical_decoding_timelines.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
# Examine the physical slot the replica uses to stream changes
112112
# from the primary to make sure its hot_standby_feedback
113113
# has locked in a catalog_xmin on the physical slot, and that
114-
# any xmin is< the catalog_xmin
114+
# any xmin is>= the catalog_xmin
115115
$node_primary->poll_query_until(
116116
'postgres',q[
117117
SELECT catalog_xmin IS NOT NULL

‎src/test/ssl/t/SSLServer.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
# - a database called trustdb that lets anyone in
1010
# - another database called certdb that uses certificate authentication, ie.
1111
# the client must present a valid certificate signed by the client CA
12-
# - two users, called ssltestuser and anotheruser.
1312
#
1413
# The server is configured to only accept connections from localhost. If you
1514
# want to run the client from another host, you'll have to configure that

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp