pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Lakhin <exclusion@gmail.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Daniel Gustafsson <daniel@yesql.se>
Cc: Nazir Bilal Yavuz <byavuz81@gmail.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Typos in the code and README
Date: Thu, 4 Jul 2024 20:00:01 +0300
Message-ID: <c1d63754-cb85-2d8a-8409-bde2c4d2d04b@gmail.com> (raw)
In-Reply-To: <CAApHDvq7chgw8=7TU4-hLpQNw8e7qN9_oA4ew2UH05RCcihEDQ@mail.gmail.com>
References: <3F577953-A29E-4722-98AD-2DA9EFF2CBB8@yesql.se>
	<f6c71f45-8473-482c-a6f7-ed8f0641e11c@iki.fi>
	<3E020742-206E-4052-83AF-8721190A10E0@yesql.se>
	<CAApHDvpctL0i5Zu2i_vr5FoHG44g+fDshMM0ukQVx7D5kE=K=g@mail.gmail.com>
	<39A535AF-154F-4FFD-B887-3C4EDC362DA4@yesql.se>
	<CAN55FZ1YsO7e7Wr_49gi=2ne+Ov_YPY6q0EE-OxCJ1kWSJfEwg@mail.gmail.com>
	<D18650AE-65BF-431D-9FE0-6AD118F757A3@yesql.se>
	<CAApHDvq-2Zdqytm_Hf3RmVf0qg5PS9jTFAJ5QTc9xH9pwvwDTA@mail.gmail.com>
	<CAApHDvr3zgeb+2cQTsbyRcV2ZkjeMiHyDXYSWB5z71WwSyxwDA@mail.gmail.com>
	<ae9f2fcb-4b24-5bb0-4240-efbbbd944ca1@gmail.com>
	<CAApHDvq7chgw8=7TU4-hLpQNw8e7qN9_oA4ew2UH05RCcihEDQ@mail.gmail.com>

Hello hackers,

03.05.2024 17:36, David Rowley wrote:
> I pushed the patch after only adjusting the path in the docs which had
> "module" rather than "modules".

Please look at another bunch of inconsistencies/orphaned entities I found
in the tree, with the possible substitutions:
errmsg_buf -> errormsg_buf
(coined by 6b18b3fe2)

NoMovementScanDirectionScans -> NoMovementScanDirection
(introduced with e9aaf0632, discussed in [1], but still seems inaccurate)

XLogReadRecordInternal -> XLogReadRecord
(from 3f1ce9734, align with a comment above: "Start and end point of last
record returned by XLogReadRecord().")

BYPASS_ALLOWCONN -> BGWORKER_BYPASS_ROLELOGINCHECK (see 492217301)

xs_ctup.t_self -> xs_heaptid (see c2fe139c2 and 304532421)

pgStatShmLookupCache -> pgStatLocal.shmem (coined by 5891c7a8e)

smgr_fsm_nblocks and smgr_vm_nblocks -> smgr_cached_nblocks
(see the same comment updated by c5315f4f4)

XID becomes older than GlobalXmin -> XID becomes visible to everyone
(in accordance with dc7420c2c9 src/backend/access/gist/gistutil.c)

gen-rtab - remove (non-existing since db7d1a7b0)

BARRIER_SHOULD_CHECK - remove (unused since a3ed4d1ef)

EXE_EXT - remove (unused since f06b1c598)

endterm - remove
(see 60c90c16c -- Use xreflabel attributes instead of endterm ...)

xl_commit_ts_set, SizeOfCommitTsSet - remove (unused since 08aa89b32)

The corresponding patch is attached for your convenience.

[1] https://www.postgresql.org/message-id/20230131140224.7j6gbcsfwmad2a4b%40liskov

Best regards,
Alexander

Attachments:

fix-inconsistencies.patch (text/x-patch, 8.4K) download diff --git a/contrib/pgcrypto/Makefile b/contrib/pgcrypto/Makefile index 5efa10c334..85f1c94681 100644 --- a/contrib/pgcrypto/Makefile +++ b/contrib/pgcrypto/Makefile @@ -45,8 +45,6 @@ REGRESS = init md5 sha1 hmac-md5 hmac-sha1 blowfish rijndael \ pgp-armor pgp-decrypt pgp-encrypt pgp-encrypt-md5 $(CF_PGP_TESTS) \ pgp-pubkey-decrypt pgp-pubkey-encrypt pgp-info -EXTRA_CLEAN = gen-rtab - ifdef USE_PGXS PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) diff --git a/doc/src/sgml/README.links b/doc/src/sgml/README.links index 65df9c111f..900e0308b6 100644 --- a/doc/src/sgml/README.links +++ b/doc/src/sgml/README.links @@ -15,10 +15,6 @@ Intra-document Linking linkend= controls the target of the link/xref, required -endterm= - for <xref>, allows the text of the link/xref to be taken from a - different link target title - <link> use to supply text for the link, only uses linkend, requires </link> http://www.oasis-open.org/docbook/documentation/reference/html/link.html diff --git a/src/backend/access/gist/gistvacuum.c b/src/backend/access/gist/gistvacuum.c index 24fb94f473..59372783d0 100644 --- a/src/backend/access/gist/gistvacuum.c +++ b/src/backend/access/gist/gistvacuum.c @@ -643,7 +643,7 @@ gistdeletepage(IndexVacuumInfo *info, IndexBulkDeleteResult *stats, * The page cannot be immediately recycled, because in-progress scans that * saw the downlink might still visit it. Mark the page with the current * next-XID counter, so that we know when it can be recycled. Once that - * XID becomes older than GlobalXmin, we know that all scans that are + * XID becomes visible to everyone, we know that all scans that are * currently in progress must have ended. (That's much more conservative * than needed, but let's keep it safe and simple.) */ diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c index 37d2a57961..45bc17e7f4 100644 --- a/src/backend/access/transam/xlogreader.c +++ b/src/backend/access/transam/xlogreader.c @@ -946,7 +946,7 @@ err: XLogReaderInvalReadState(state); /* - * If an error was written to errmsg_buf, it'll be returned to the caller + * If an error was written to errormsg_buf, it'll be returned to the caller * of XLogReadRecord() after all successfully decoded records from the * read queue. */ diff --git a/src/backend/executor/execCurrent.c b/src/backend/executor/execCurrent.c index 70c62ac110..5285b84d30 100644 --- a/src/backend/executor/execCurrent.c +++ b/src/backend/executor/execCurrent.c @@ -200,7 +200,7 @@ execCurrentOf(CurrentOfExpr *cexpr, /* * For IndexOnlyScan, the tuple stored in ss_ScanTupleSlot may be * a virtual tuple that does not have the ctid column, so we have - * to get the TID from xs_ctup.t_self. + * to get the TID from xs_heaptid. */ IndexScanDesc scan = ((IndexOnlyScanState *) scanstate)->ioss_ScanDesc; diff --git a/src/backend/storage/ipc/procsignal.c b/src/backend/storage/ipc/procsignal.c index 4ed9cedcdd..d9a84b66e0 100644 --- a/src/backend/storage/ipc/procsignal.c +++ b/src/backend/storage/ipc/procsignal.c @@ -88,10 +88,6 @@ typedef struct */ #define NumProcSignalSlots (MaxBackends + NUM_AUXILIARY_PROCS) -/* Check whether the relevant type bit is set in the flags. */ -#define BARRIER_SHOULD_CHECK(flags, type) \ - (((flags) & (((uint32) 1) << (uint32) (type))) != 0) - /* Clear the relevant type bit from the flags. */ #define BARRIER_CLEAR_BIT(flags, type) \ ((flags) &= ~(((uint32) 1) << (uint32) (type))) diff --git a/src/backend/storage/smgr/smgr.c b/src/backend/storage/smgr/smgr.c index a691aed1f4..75e16b9b94 100644 --- a/src/backend/storage/smgr/smgr.c +++ b/src/backend/storage/smgr/smgr.c @@ -733,8 +733,8 @@ smgrtruncate(SMgrRelation reln, ForkNumber *forknum, int nforks, BlockNumber *nb /* * We might as well update the local smgr_cached_nblocks values. The * smgr cache inval message that this function sent will cause other - * backends to invalidate their copies of smgr_fsm_nblocks and - * smgr_vm_nblocks, and these ones too at the next command boundary. + * backends to invalidate their copies of smgr_cached_nblocks, and + * these ones too at the next command boundary. * But these ensure they aren't outright wrong until then. */ reln->smgr_cached_nblocks[forknum[i]] = nblocks[i]; diff --git a/src/backend/utils/activity/pgstat_shmem.c b/src/backend/utils/activity/pgstat_shmem.c index 634b967820..1cd16fc133 100644 --- a/src/backend/utils/activity/pgstat_shmem.c +++ b/src/backend/utils/activity/pgstat_shmem.c @@ -80,7 +80,7 @@ static const dshash_parameters dsh_params = { * compares to their copy of pgStatSharedRefAge on a regular basis. */ static pgstat_entry_ref_hash_hash *pgStatEntryRefHash = NULL; -static int pgStatSharedRefAge = 0; /* cache age of pgStatShmLookupCache */ +static int pgStatSharedRefAge = 0; /* cache age of pgStatLocal.shmem */ /* * Memory contexts containing the pgStatEntryRefHash table and the @@ -861,7 +861,7 @@ pgstat_drop_database_and_contents(Oid dboid) /* * If some of the stats data could not be freed, signal the reference - * holders to run garbage collection of their cached pgStatShmLookupCache. + * holders to run garbage collection of their cached pgStatLocal.shmem. */ if (not_freed_count > 0) pgstat_request_entry_refs_gc(); diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h index 8afe240bdf..98458bda9b 100644 --- a/src/bin/pg_upgrade/pg_upgrade.h +++ b/src/bin/pg_upgrade/pg_upgrade.h @@ -96,7 +96,6 @@ extern char *output_files[]; #define RMDIR_CMD "@RMDIR /s/q" #define SCRIPT_PREFIX "" #define SCRIPT_EXT "bat" -#define EXE_EXT ".exe" #define ECHO_QUOTE "" #define ECHO_BLANK "." #endif diff --git a/src/include/access/commit_ts.h b/src/include/access/commit_ts.h index 82d3aa8627..c18faea76d 100644 --- a/src/include/access/commit_ts.h +++ b/src/include/access/commit_ts.h @@ -46,17 +46,6 @@ extern int committssyncfiletag(const FileTag *ftag, char *path); #define COMMIT_TS_ZEROPAGE 0x00 #define COMMIT_TS_TRUNCATE 0x10 -typedef struct xl_commit_ts_set -{ - TimestampTz timestamp; - RepOriginId nodeid; - TransactionId mainxid; - /* subxact Xids follow */ -} xl_commit_ts_set; - -#define SizeOfCommitTsSet (offsetof(xl_commit_ts_set, mainxid) + \ - sizeof(TransactionId)) - typedef struct xl_commit_ts_truncate { int64 pageno; diff --git a/src/include/access/sdir.h b/src/include/access/sdir.h index d40d809bd2..c720096f1a 100644 --- a/src/include/access/sdir.h +++ b/src/include/access/sdir.h @@ -17,7 +17,7 @@ /* * Defines the direction for scanning a table or an index. Scans are never - * invoked using NoMovementScanDirectionScans. For convenience, we use the + * invoked using NoMovementScanDirection. For convenience, we use the * values -1 and 1 for backward and forward scans. This allows us to perform * a few mathematical tricks such as what is done in ScanDirectionCombine. */ diff --git a/src/include/access/xlogreader.h b/src/include/access/xlogreader.h index 2e9e5f43eb..5af6dc54e9 100644 --- a/src/include/access/xlogreader.h +++ b/src/include/access/xlogreader.h @@ -224,7 +224,7 @@ struct XLogReaderState * should not be accessed directly. * ---------------------------------------- * Start and end point of the last record read and decoded by - * XLogReadRecordInternal(). NextRecPtr is also used as the position to + * XLogReadRecord(). NextRecPtr is also used as the position to * decode next. Calling XLogBeginRead() sets NextRecPtr and EndRecPtr to * the requested starting position. */ diff --git a/src/test/modules/worker_spi/worker_spi.c b/src/test/modules/worker_spi/worker_spi.c index 7e1042f4ab..de8f46902b 100644 --- a/src/test/modules/worker_spi/worker_spi.c +++ b/src/test/modules/worker_spi/worker_spi.c @@ -174,9 +174,10 @@ worker_spi_main(Datum main_arg) worker_spi_role, flags); /* - * Disable parallel query for workers started with BYPASS_ALLOWCONN or - * BGWORKER_BYPASS_ALLOWCONN so as these don't attempt connections using a - * database or a role that may not allow that. + * Disable parallel query for workers started with + * BGWORKER_BYPASS_ALLOWCONN or BGWORKER_BYPASS_ROLELOGINCHECK so as these + * don't attempt connections using a database or a role that may not allow + * that. */ if ((flags & (BGWORKER_BYPASS_ALLOWCONN | BGWORKER_BYPASS_ROLELOGINCHECK))) SetConfigOption("max_parallel_workers_per_gather", "0",

view thread (55+ messages)  latest in thread

Message-ID: <c1d63754-cb85-2d8a-8409-bde2c4d2d04b@gmail.com>
Permalink:  ../c1d63754-cb85-2d8a-8409-bde2c4d2d04b@gmail.com/
Also on:    postgresql.org/message-id/c1d63754-cb85-2d8a-8409-bde2c4d2d04b@gmail.com

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: exclusion@gmail.com, dgrowleyml@gmail.com, daniel@yesql.se, byavuz81@gmail.com, hlinnaka@iki.fi
  Subject: Re: Typos in the code and README
  In-Reply-To: <c1d63754-cb85-2d8a-8409-bde2c4d2d04b@gmail.com>
  References: <3F577953-A29E-4722-98AD-2DA9EFF2CBB8@yesql.se> <f6c71f45-8473-482c-a6f7-ed8f0641e11c@iki.fi> <3E020742-206E-4052-83AF-8721190A10E0@yesql.se> <CAApHDvpctL0i5Zu2i_vr5FoHG44g+fDshMM0ukQVx7D5kE=K=g@mail.gmail.com> <39A535AF-154F-4FFD-B887-3C4EDC362DA4@yesql.se> <CAN55FZ1YsO7e7Wr_49gi=2ne+Ov_YPY6q0EE-OxCJ1kWSJfEwg@mail.gmail.com> <D18650AE-65BF-431D-9FE0-6AD118F757A3@yesql.se> <CAApHDvq-2Zdqytm_Hf3RmVf0qg5PS9jTFAJ5QTc9xH9pwvwDTA@mail.gmail.com> <CAApHDvr3zgeb+2cQTsbyRcV2ZkjeMiHyDXYSWB5z71WwSyxwDA@mail.gmail.com> <ae9f2fcb-4b24-5bb0-4240-efbbbd944ca1@gmail.com> <CAApHDvq7chgw8=7TU4-hLpQNw8e7qN9_oA4ew2UH05RCcihEDQ@mail.gmail.com> <c1d63754-cb85-2d8a-8409-bde2c4d2d04b@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox