Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4236825

Browse files
committed
Fix typos and grammar in code comments and docs
Author: Alexander Lakhin Discussion: https://postgr.es/m/f7e514cf-2446-21f1-a5d2-8c089a6e2168@gmail.com
1 parent c7cd2d6 commit 4236825

File tree

19 files changed

+24
-24
lines changed

19 files changed

+24
-24
lines changed

contrib/test_decoding/specs/skip_snapshot_restore.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ step "s2_get_changes_slot0" { SELECT data FROM pg_logical_slot_get_changes('slot
3939
# serializes consistent snapshots to the disk at LSNs where are before
4040
# s0-transaction's commit. After s0-transaction commits, "s1_init" resumes but
4141
# must not restore any serialized snapshots and will reach the consistent state
42-
# when decoding a RUNNING_XACT record generated after s0-transaction's commit.
42+
# when decoding a RUNNING_XACTS record generated after s0-transaction's commit.
4343
# We check if the get_changes on 'slot1' will not return any s0-transaction's
4444
# changes as its confirmed_flush_lsn will be after the s0-transaction's commit
4545
# record.

doc/src/sgml/xfunc.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3891,8 +3891,8 @@ static const PgStat_KindInfo custom_stats = {
38913891
it with <literal>pgstat_register_kind</literal> and a unique ID used to
38923892
store the entries related to this type of statistics:
38933893
<programlisting>
3894-
extern PgStat_Kind pgstat_add_kind(PgStat_Kind kind,
3895-
const PgStat_KindInfo *kind_info);
3894+
extern PgStat_Kind pgstat_register_kind(PgStat_Kind kind,
3895+
const PgStat_KindInfo *kind_info);
38963896
</programlisting>
38973897
While developing a new extension, use
38983898
<literal>PGSTAT_KIND_EXPERIMENTAL</literal> for

src/backend/access/transam/multixact.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2017,7 +2017,7 @@ check_multixact_offset_buffers(int *newval, void **extra, GucSource source)
20172017
}
20182018

20192019
/*
2020-
* GUC check_hook for multixact_member_buffer
2020+
* GUC check_hook for multixact_member_buffers
20212021
*/
20222022
bool
20232023
check_multixact_member_buffers(int *newval, void **extra, GucSource source)

src/backend/commands/matview.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ RefreshMatViewByOid(Oid matviewOid, bool is_create, bool skipData,
382382
* command tag is left false in cmdtaglist.h. Otherwise, the change of
383383
* completion tag output might break applications using it.
384384
*
385-
* When called from CREATE MATERIALIZED VIEW comand, the rowcount is
385+
* When called from CREATE MATERIALIZED VIEW command, the rowcount is
386386
* displayed with the command tag CMDTAG_SELECT.
387387
*/
388388
if (qc)

src/backend/commands/waitlsn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ pg_wal_replay_wait(PG_FUNCTION_ARGS)
369369
*/
370370
InvalidateCatalogSnapshot();
371371

372-
/* Give up if there is still an active or registered sanpshot. */
372+
/* Give up if there is still an active or registered snapshot. */
373373
if (GetOldestSnapshot())
374374
ereport(ERROR,
375375
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),

src/backend/executor/execExprInterp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,7 @@ ExecInterpExpr(ExprState *state, ExprContext *econtext, bool *isnull)
11011101

11021102
EEO_CASE(EEOP_PARAM_SET)
11031103
{
1104-
/* out of line, unlikely to matter performancewise */
1104+
/* out of line, unlikely to matter performance-wise */
11051105
ExecEvalParamSet(state, op, econtext);
11061106
EEO_NEXT();
11071107
}
@@ -4762,7 +4762,7 @@ ExecEvalJsonCoercionFinish(ExprState *state, ExprEvalStep *op)
47624762
if (SOFT_ERROR_OCCURRED(&jsestate->escontext))
47634763
{
47644764
/*
4765-
* jsestate->error or jsetate->empty being set means that the error
4765+
* jsestate->error or jsestate->empty being set means that the error
47664766
* occurred when coercing the JsonBehavior value. Throw the error in
47674767
* that case with the actual coercion error message shown in the
47684768
* DETAIL part.

src/backend/postmaster/postmaster.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2628,7 +2628,8 @@ CleanupBackend(Backend *bp,
26282628
BackgroundWorkerStopNotifications(bp->pid);
26292629

26302630
/*
2631-
* If it was a background worker, also update its RegisteredWorker entry.
2631+
* If it was a background worker, also update its RegisteredBgWorker
2632+
* entry.
26322633
*/
26332634
if (bp->bkend_type == BACKEND_TYPE_BGWORKER)
26342635
{

src/backend/replication/logical/slotsync.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
* this flag is set. Note that we don't need to reset this variable as after
8484
* promotion the slot sync worker won't be restarted because the pmState
8585
* changes to PM_RUN from PM_HOT_STANDBY and we don't support demoting
86-
* primary without restarting the server. See MaybeStartSlotSyncWorker.
86+
* primary without restarting the server. See LaunchMissingBackgroundProcesses.
8787
*
8888
* The 'syncing' flag is needed to prevent concurrent slot syncs to avoid slot
8989
* overwrites.

src/backend/storage/aio/read_stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ read_stream_begin_impl(int flags,
449449
queue_size = max_pinned_buffers + 1;
450450

451451
/*
452-
* Allocate the object, the buffers, the ios and per_data_data space in
452+
* Allocate the object, the buffers, the ios and per_buffer_data space in
453453
* one big chunk. Though we have queue_size buffers, we want to be able
454454
* to assume that all the buffers for a single read are contiguous (i.e.
455455
* don't wrap around halfway through), so we allow temporary overflows of

src/backend/storage/lmgr/lock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ LockManagerShmemInit(void)
396396

397397
/*
398398
* Compute init/max size to request for lock hashtables. Note these
399-
* calculations must agree with LockShmemSize!
399+
* calculations must agree with LockManagerShmemSize!
400400
*/
401401
max_table_size = NLOCKENTS();
402402
init_table_size = max_table_size / 2;

src/backend/utils/cache/typcache.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,9 @@ lookup_type_cache(Oid type_id, int flags)
367367
ctl.entrysize = sizeof(TypeCacheEntry);
368368

369369
/*
370-
* TypeEntry takes hash value from the system cache. For TypeCacheHash
371-
* we use the same hash in order to speedup search by hash value. This
372-
* is used by hash_seq_init_with_hash_value().
370+
* TypeCacheEntry takes hash value from the system cache. For
371+
* TypeCacheHash we use the same hash in order to speedup search by
372+
* hash value. This is used by hash_seq_init_with_hash_value().
373373
*/
374374
ctl.hash = type_cache_syshash;
375375

src/bin/pg_combinebackup/t/008_promote.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
EOM
5555
$node2->start();
5656

57-
# Wait until recoveery pauses, then promote.
57+
# Wait until recovery pauses, then promote.
5858
$node2->poll_query_until('postgres', "SELECT pg_get_wal_replay_pause_state() = 'paused';");
5959
$node2->safe_psql('postgres', "SELECT pg_promote()");
6060

@@ -65,7 +65,7 @@
6565
EOM
6666

6767
# Now take an incremental backup. If WAL summarization didn't follow the
68-
# timeline cange correctly, something should break at this point.
68+
# timeline change correctly, something should break at this point.
6969
my $backup2path = $node1->backup_dir . '/backup2';
7070
$node2->command_ok(
7171
[ 'pg_basebackup', '-D', $backup2path, '--no-sync', '-cfast',

src/bin/psql/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1715,7 +1715,7 @@ ExecQueryAndProcessResults(const char *query,
17151715
{
17161716
/*
17171717
* Display the current chunk of results, unless the output
1718-
* stream stopped working or we got cancelled. We skip use of
1718+
* stream stopped working or we got canceled. We skip use of
17191719
* PrintQueryResult and go directly to printQuery, so that we
17201720
* can pass the correct is_pager value and because we don't
17211721
* want PrintQueryStatus to happen yet. Above, we rejected

src/fe_utils/astreamer_gzip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* taken here is less flexible, because a writer can only write to a file,
1414
* while a compressor can write to a subsequent astreamer which is free
1515
* to do whatever it likes. The reason it's like this is because this
16-
* code was adapated from old, less-modular pg_basebackup code that used
16+
* code was adapted from old, less-modular pg_basebackup code that used
1717
* the same APIs that astreamer_gzip_writer now uses, and it didn't seem
1818
* necessary to change anything at the time.
1919
*

src/include/storage/read_stream.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ extern ReadStream *read_stream_begin_smgr_relation(int flags,
6666
ReadStreamBlockNumberCB callback,
6767
void *callback_private_data,
6868
size_t per_buffer_data_size);
69-
extern Buffer read_stream_next_buffer(ReadStream *stream, void **per_buffer_private);
7069
extern void read_stream_reset(ReadStream *stream);
7170
extern void read_stream_end(ReadStream *stream);
7271

src/include/utils/injection_point.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#define INJECTION_POINT_H
1313

1414
/*
15-
* Injections points require --enable-injection-points.
15+
* Injection points require --enable-injection-points.
1616
*/
1717
#ifdef USE_INJECTION_POINTS
1818
#define INJECTION_POINT_LOAD(name) InjectionPointLoad(name)

src/interfaces/libpq/fe-connect.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ fillPGconn(PGconn *conn, PQconninfoOption *connOptions)
948948
* Copy over option values from srcConn to dstConn
949949
*
950950
* Don't put anything cute here --- intelligence should be in
951-
* connectOptions2 ...
951+
* pqConnectOptions2 ...
952952
*
953953
* Returns true on success. On failure, returns false and sets error message of
954954
* dstConn.

src/test/modules/test_misc/t/006_signal_autovacuum.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767

6868
my $offset = -s $node->logfile;
6969

70-
# Role with pg_signal_autovacuum can terminate autovacuum worker.
70+
# Role with pg_signal_autovacuum_worker can terminate autovacuum worker.
7171
my $terminate_with_pg_signal_av = $node->psql(
7272
'postgres', qq(
7373
SET ROLE regress_worker_role;

src/test/subscription/t/021_twophase.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
INSERT INTO tab_full VALUES (11);
7777
PREPARE TRANSACTION 'test_prepared_tab_full';");
7878

79-
# Confirm the ERROR is reported becasue max_prepared_transactions is zero
79+
# Confirm the ERROR is reported because max_prepared_transactions is zero
8080
$node_subscriber->wait_for_log(
8181
qr/ERROR: ( [A-Z0-9]+:)? prepared transactions are disabled/);
8282

0 commit comments

Comments
 (0)