Re: Fix typos and inconsistencies for v16

2023-05-05 Thread Michael Paquier
On Tue, May 02, 2023 at 12:26:31PM +0900, Michael Paquier wrote:
> On Fri, Apr 21, 2023 at 12:00:00PM +0300, Alexander Lakhin wrote:
>> 4. CommitTSBuffer -> CommitTsBuffer // the inconsistency exists since 
>> 5da14938f; maybe this change should be backpatched
> 
> Yes, we'd better backpatch that.  I agree that it seems more sensible
> here to switch the compiled value rather than what the docs have been
> using for years.  Perhaps somebody has a different opinion?

Hearing nothing, I have now applied this part down to 13, on time for
the next minor release.
--
Michael


signature.asc
Description: PGP signature


Re: Fix typos and inconsistencies for v16

2023-05-01 Thread Michael Paquier
On Fri, Apr 21, 2023 at 12:00:00PM +0300, Alexander Lakhin wrote:
> Please look at the following two bunches for v14+ and v13+ (split to ease
> back-patching if needed). Having processed them, I've reached the state that
> could be considered "clean" ([2], [3]); at least I don't see how to detect
> yet more errors of this class in dozens, so it's my last run for now (though I
> have several entities left, which I couldn't find replacements for).

This was hanging around, and I had some time, so I have looked at the
whole.  One of the only two user-visible change was in the docs for
pg_amcheck, so I have applied that first as of 6fd8ae6 and backpatched
it down to 14.

Now, for the remaining 59..

> 1. agg_init_trans_check -> agg_trans
> 2. agg_strict_trans_check -> agg_trans

/*
 * pergroup = >all_pergroups
-* [op->d.agg_strict_trans_check.setoff]
-* [op->d.agg_init_trans_check.transno];
+* [op->d.agg_trans.setoff]
+* [op->d.agg_trans.transno];
 */
Honestly, while incorrect, I have no idea what this comment means ;)

> 4. CommitTSBuffer -> CommitTsBuffer // the inconsistency exists since 
> 5da14938f; maybe this change should be backpatched

Yes, we'd better backpatch that.  I agree that it seems more sensible
here to switch the compiled value rather than what the docs have been
using for years.  Perhaps somebody has a different opinion?

The others were OK and in line with the discussion of upthread, so
applied.
--
Michael


signature.asc
Description: PGP signature


Re: Fix typos and inconsistencies for v16

2023-04-21 Thread Alexander Lakhin

Hi David,

21.04.2023 01:49, David Rowley wrote:

On Wed, 19 Apr 2023 at 07:00, Alexander Lakhin  wrote:

please look at the similar list for v15+ (596b5af1d..HEAD).

I've now pushed most of these but didn't include the following ones:


Thank you!


3. BufFileOpenShared -> BufFileOpenFileSet // see dcac5e7ac

Maybe I need to spend longer, but I just didn't believe the command
that claimed that "BufFiles opened using BufFileOpenFileSet() are
read-only by definition". Looking at the code for that, it seems to
depend on if O_RDONLY is included in the mode flags.


I've found the following explanation for that:
1) As of dcac5e7ac~1 function ltsConcatWorkerTapes() contained:
...
    file = BufFileOpenShared(fileset, filename, O_RDONLY);
...
 * The only thing that currently prevents writing to the leader tape 
from
 * working is the fact that BufFiles opened using BufFileOpenShared() 
are
 * read-only by definition, but that could be changed if it seemed
...

2) A patch [1], which eventually resulted in c4649cce3, initially started
with the change:

-ltsConcatWorkerTapes(LogicalTapeSet *lts, TapeShare *shared,
...
- * working is the fact that BufFiles opened using BufFileOpenShared() are
...
+LogicalTapeImport(LogicalTapeSet *lts, int worker, TapeShare *shared)
...
+    file = BufFileOpenShared(lts->fileset, filename, O_RDONLY);
...
+ * the fact that BufFiles opened using BufFileOpenShared() are read-only

3) The commit dcac5e7ac (pushed 2021-08-30) renamed the function
BufFileOpenShared() to BufFileOpenFileSet() and changed the comment:
...
 * The only thing that currently prevents writing to the leader tape 
from
-    * working is the fact that BufFiles opened using BufFileOpenShared() 
are
+    * working is the fact that BufFiles opened using BufFileOpenFileSet() 
are
 * read-only by definition, but that could be changed if it seemed
...

4) The commit c4649cce3 (pushed 2021-10-18) removed the comment referencing
BufFileOpenFileSet() and added that somewhat distant comment
referencing BufFileOpenShared():
$ git show c4649cce3 src/backend/utils/sort/logtape.c | grep 'BufFiles opened'
-    * working is the fact that BufFiles opened using BufFileOpenFileSet() 
are
+    * the fact that BufFiles opened using BufFileOpenShared() are read-only

So I still believe that the "BufFileOpenShared -> BufFileOpenFileSet" change
is correct and that comment can be read now as referencing to the line:
    file = BufFileOpenFileSet(>fileset->fs, filename, O_RDONLY, false);
in LogicalTapeImport(). Although it could be improved, for sure.

Please look at the following two bunches for v14+ and v13+ (split to ease
back-patching if needed). Having processed them, I've reached the state that
could be considered "clean" ([2], [3]); at least I don't see how to detect
yet more errors of this class in dozens, so it's my last run for now (though I
have several entities left, which I couldn't find replacements for).

v14+:
1. AsyncCtl -> NotifyCtl // renamed in 5da14938f
2. ATExecConstrRecurse -> ATExecAlterConstrRecurse
3. attlocal -> attislocal
4. before_shmem_access -> before_shmem_exit
5. bodys -> bodies
6. can_getnextslot_tidrange -> scan_getnextslot_tidrange
7. DISABLE_ATOMICS -> HAVE_ATOMICS
8. FETCH_H -> REWIND_SOURCE_H
9. filed -> field
10. find_minmax_aggs_walker -> can_minmax_aggs // renamed in 0a2bc5d61e

11. GroupExprInfo ->  GroupVarInfo  a4d75c86b
12. LD_DEAD -> LP_DEAD
13. libpq-trace.c -> fe-trace.c
14. lowerItem -> lowestItem  bb437f995
15. has_privs -> has_privs_of_role
16. heap_hot_prune_opt -> heap_page_prune_opt
17. MAX_CONVERSION_LENGTH -> MAX_CONVERSION_INPUT_LENGTH  ea1b99a66
18. MAX_FLUSH_BUFFERS -> MAX_WRITEALL_BUFFERS // renamed in dee663f78
19. myscheam -> myschema // doc/ -- maybe should be backpatched
20. pgbestat_beinit -> pgstat_beinit

21. pgWALUsage -> pgWalUsage
22. point-in-time-recovery -> point-in-time recovery
23. PQnotify -> PGnotify
24. QUERYJUBLE_H -> QUERYJUMBLE_H
25. rd_partdesc_nodetach -> rd_partdesc_nodetached
26. ReadNewTransactionid -> GetNewTransactionId
27. RelationBuildDescr -> RelationBuildDesc
28. SnapBuildCommittedTxn -> SnapBuildCommitTxn // see DecodeCommit()
29. subscription_rel -> pg_subscription_rel
30. tap_rep -> tab_rep

31. total_heap_blks -> heap_blks_total
32. tuple_cids -> tuplecids
33. WatchLatch -> WaitLatch
34. WriteAll -> SimpleLruWriteAll
35. PageIsPrunable -- remove // that define and the PageIsPrunable() check 
above were removed in dc7420c2c

Candidates for removal:
BARRIER_SHOULD_CHECK //unused since a3ed4d1ef
EXE_EXT // unused since f06b1c598
get_toast_for // unused since 860593ec3
SizeOfCommitTsSet // unused since 08aa89b32

v13+:
1. agg_init_trans_check -> agg_trans
2. agg_strict_trans_check -> agg_trans
3. amopclassopts -> amoptsprocnum  since 911e70207
4. CommitTSBuffer -> CommitTsBuffer // the inconsistency exists since 
5da14938f; maybe this change should be 

Re: Fix typos and inconsistencies for v16

2023-04-20 Thread David Rowley
On Wed, 19 Apr 2023 at 07:00, Alexander Lakhin  wrote:
> please look at the similar list for v15+ (596b5af1d..HEAD).

I've now pushed most of these but didn't include the following ones:

> 3. BufFileOpenShared -> BufFileOpenFileSet // see dcac5e7ac

Maybe I need to spend longer, but I just didn't believe the command
that claimed that "BufFiles opened using BufFileOpenFileSet() are
read-only by definition". Looking at the code for that, it seems to
depend on if O_RDONLY is included in the mode flags.

> 19. multidimensional-aware -> multidimension-aware // sync with gistbuild.c

I didn't change this as I didn't think it was an improvement.  I'd
probably have written "multidimensionally aware", but I didn't feel
strongly enough to want to change it.

David




Re: Fix typos and inconsistencies for v16

2023-04-18 Thread Tom Lane
Justin Pryzby  writes:
> On Tue, Apr 18, 2023 at 02:06:43PM +1200, David Rowley wrote:
>> On Tue, 18 Apr 2023 at 10:10, Justin Pryzby  wrote:
>>> and s/evade/avoid/

>> I didn't touch this. You'll need to provide more justification for why
>> you think it's more correct than what's there.  

> I'd noticed that it's a substitution/mistake that's been made in the
> past.

"Evade" doesn't seem like le mot juste there; it's got negative
connotations.  But the code around it is just horrible.  Some offenses:

* No documentation in the function header comment of what the
usersetArray parameter is or does.  Which is bad enough in itself,
but what the parameter actually does is falsify the header comment's
principal claim that the passed context is what is used.  So I don't
find that omission acceptable.

* Non-obvious, and quite unnecessary, dependency on the isnull variable
having been left in a particular state by previous code.

* For me, at least, it'd read better if the if/else arms were swapped,
allowing removal of the negation in the if-condition and bringing
the code this comment comments on closer to said comment.

As for the comment text, maybe say

 * If the value was USER SET, then apply it at PGC_USERSET context
 * rather than the caller-supplied context, to prevent any more-restricted
 * GUCs being set.  Also pass InvalidOid for the role, to ensure any
 * special privileges of the current user aren't applied.

I hesitate to go look at the rest of this commit, but I guess somebody
had better.

regards, tom lane




Re: Fix typos and inconsistencies for v16

2023-04-18 Thread Alexander Lakhin

Hi Justin and David,

18.04.2023 01:10, Justin Pryzby wrote:

Well done.


Thank you for reviewing!


On Mon, Apr 17, 2023 at 09:00:00PM +0300, Alexander Lakhin wrote:

Hello hackers,

Please consider fixing the following unique words/identifiers introduced in v16:

Note that your patches are overlapping:
...
It'd make sense if the changes to each file were isolated to a single
patch (especially 004_load and acl.c).


I'd hoped that most of the proposed fixes will be accepted, so conflicts due
to skipping of some changes seemed unlikely to me. So if you are not
strongly disagree, I would continue presenting my findings the same way.


...
You missed "boostrap" :)


Yes, that's because "boostrap" was not unique, but my semi-automatic approach
is based on `uniq -u`, so I'm sure that there are typos that can't be found
this way.


But hadn't yet convinced myself to start the process of defending each
one of the fixes.  Attached some others that I found.


Yeah, those are good catches too, but e. g. "privilges" is not new in v16,
so it's fallen out of my "hot errors" category. If we're going to fix not so
hot ones too now, please look at the similar list for v15+ (596b5af1d..HEAD).

1. abbrevated -> abbreviated
2. ArchiveModeRequested -> ArchiveRecoveryRequested
3. BufFileOpenShared -> BufFileOpenFileSet // see dcac5e7ac
4. check_publication_columns -> pub_collist_contains_invalid_column // see note 
1
5. configuation -> configuration
6. copyAclUserName -> dequoteAclUserName // see 0c9d84427
7. EndWalRecovery -> FinishWalRecovery
8. HaveRegisteredOrActiveSnapshots -> HaveRegisteredOrActiveSnapshot
9. idiosyncracies -> idiosyncrasies
10. iif -> iff

11. initpriv -> initprivs
12. inserted_destrel -> insert_destrel
13. Intialize -> Initialize
14. invtrans -> invtransfn
15. isolation-level -> isolation level
16. lefthasheqoperator -> left_hasheqoperator + righthasheqoperator -> 
right_hasheqoperator
17. LRQ_NO_IO -> LRQ_NEXT_NO_IO
18. minRecovery point -> minRecoveryPoint
19. multidimensional-aware -> multidimension-aware // sync with gistbuild.c
20. ParalleVacuumState -> ParallelVacuumState

21. PgStatShm_Stat*Entry -> PgStatShared_* // see note 2
22. plpython_call_handler -> plpython3_call_handler // see 9b7e24a2c
23. pulications -> publications
24. ReadCheckPointRecord -> ReadCheckpointRecord
25. relkkinds -> relkinds
26. separare -> separate // though perhaps it's not the most suitable word here
27. setup_formatted_log_time -> get_formatted_log_time // see ac7c80758
28. SPI_abort -> SPI_rollback
29. ssup_datum_int32_compare -> ssup_datum_int32_cmp
30. ssup_datum_signed_compare -> ssup_datum_signed_cmp

31. ssup_datum_unsigned_compare -> ssup_datum_unsigned_cmp
32. SUBSCRITPION -> SUBSCRIPTION
33. tabelspaces -> tablespaces
34. table_state_not_ready -> table_states_not_ready
35. underling -> underlying
36. WalRecoveryResult -> EndOfWalRecoveryInfo

Also, I'd like to note that the following entities/references are orphaned now,
so maybe some of them could be removed too:
1. gen-rtab (in pgcrypto/Makefile) // orphaned since db7d1a7b0
2. pgstat_temp_directory // was left by b3abca681 for v15, but maybe it's time 
to remove it for v16
3. pgstat_write_statsfiles (in valgrind.supp)
4. quote_system_arg (in vcregress.pl) // unused since d2a2ce418
5. standard_initdb (in vcregress.pl) // unused since 322becb60
/* though maybe vcregress.pl will be removed completely soon */
6. int pstat;  /* mcrypt uses it */ (in 
contrib/pgcrypto/px.h)
/* "mcrypt" became unique after abe81ee08, support for libmcrypt was removed at 
2005
(3cc866123) */

Note 1. A check that was located in check_publication_columns() in
v13-0003-Add-column-filtering-to-logical-replication.patch [1],
can be found in pub_collist_contains_invalid_column() now (see also [2]).

Note 2. The inconsistency appeared in [3],
v67-0007-pgstat-store-statistics-in-shared-memory.patch was correct in
this aspect.


18.04.2023 04:35, David Rowley wrote:

Please consider fixing the following unique words/identifiers introduced in v16:

Thanks, I've pushed all of these apart from the following 2.

Thank you!

[1] 
https://www.postgresql.org/message-id/202112302021.ca7ihogysgh3%40alvherre.pgsql
[2] 
https://www.postgresql.org/message-id/CAA4eK1K5pkrPT9z5TByUPptExian5c18g6GnfNf9Cr97QdPbjw%40mail.gmail.com
[3] 
https://www.postgresql.org/message-id/20220404041516.cctrvpadhuriawlq%40alap3.anarazel.de

Best regards,
Alexanderdiff --git a/contrib/basebackup_to_shell/t/001_basic.pl b/contrib/basebackup_to_shell/t/001_basic.pl
index a278df3f91..84ad93f614 100644
--- a/contrib/basebackup_to_shell/t/001_basic.pl
+++ b/contrib/basebackup_to_shell/t/001_basic.pl
@@ -49,7 +49,7 @@ $node->command_fails_like(
 	qr/shell command for backup is not configured/,
 	'fails if basebackup_to_shell.command is not set');
 
-# Configure basebackup_to_shell.command and reload the configuation file.
+# Configure basebackup_to_shell.command and reload the 

Re: Fix typos and inconsistencies for v16

2023-04-18 Thread Justin Pryzby
On Tue, Apr 18, 2023 at 02:06:43PM +1200, David Rowley wrote:
> On Tue, 18 Apr 2023 at 10:10, Justin Pryzby  wrote:
> > > -  * USER SET values are appliciable only for PGC_USERSET 
> > > parameters. We
> > > +  * USER SET values are applicable only for PGC_USERSET 
> > > parameters. We
> > >* use InvalidOid as role in order to evade possible 
> > > privileges of the
> >
> > and s/evade/avoid/
> 
> I didn't touch this. You'll need to provide more justification for why
> you think it's more correct than what's there.  

I'd noticed that it's a substitution/mistake that's been made in the
past.  I dug up:

9436041ed848debb3d64fb5fbff6cdb35bc46d04
8e12f4a250d250a89153da2eb9b91c31bb80c483
cd9479af2af25d7fa9bfd24dd4dcf976b360f077
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
911e70207703799605f5a0e8aad9f06cff067c63

> It might not be worth too much discussion, however.

+many.  I may resend the patch at some later date.

> > Attached some others that I found.
> 
> Pushed the rest.  Thanks

Thanks!

-- 
Justin 




Re: Fix typos and inconsistencies for v16

2023-04-17 Thread Tom Lane
David Rowley  writes:
> On Tue, 18 Apr 2023 at 06:00, Alexander Lakhin  wrote:
>> Also, maybe OID_MAX should be removed from src/include/postgres_ext.h as 
>> it's unused since eb8312a22.

> I didn't touch this. It seems like it could be useful for extensions
> and client apps even if it's not used in core.

Agreed, bad idea.  For better or worse, that's part of our client API now.

>> Beside that, this simple script:
>> for w in $(cat src/tools/pgindent/typedefs.list); do grep -q -P "\b$w\b" -r 
>> * --exclude typedefs.list || echo "$w"; done
>> detects 58 identifiers that don't exist in the source tree anymore (see 
>> typedefs.lost attached).
>> Maybe they should be removed from typedefs.list too.

> I didn't touch this either.  typedefs.list normally gets some work
> done during the pgindent run, which is likely going to happen around
> May or June.

Yeah, it will get refreshed from the buildfarm output [1] pretty soon.
A quick check says that as of today, that refresh would add 81 names
and remove 94.  (Seems like a remarkably high number of removals,
but I didn't dig further than counting the diff output.)

regards, tom lane

[1] https://buildfarm.postgresql.org/cgi-bin/typedefs.pl?show_list




Re: Fix typos and inconsistencies for v16

2023-04-17 Thread David Rowley
On Tue, 18 Apr 2023 at 10:10, Justin Pryzby  wrote:
> > -  * USER SET values are appliciable only for PGC_USERSET 
> > parameters. We
> > +  * USER SET values are applicable only for PGC_USERSET 
> > parameters. We
> >* use InvalidOid as role in order to evade possible 
> > privileges of the
>
> and s/evade/avoid/

I didn't touch this. You'll need to provide more justification for why
you think it's more correct than what's there.  It might not be worth
too much discussion, however.

> Attached some others that I found.

Pushed the rest.  Thanks

David




Re: Fix typos and inconsistencies for v16

2023-04-17 Thread David Rowley
On Tue, 18 Apr 2023 at 06:00, Alexander Lakhin  wrote:
> Please consider fixing the following unique words/identifiers introduced in 
> v16:

Thanks, I've pushed all of these apart from the following 2.

> 45. tar_set_error -- remove (obsolete since ebfb814f7)
> 46. test_tranche_name -- remove (not used, see 006b69fd9)

These didn't quite fit in with the "typo fixes" category of the
commit, so I left them off the commit I just pushed.

> Also, maybe OID_MAX should be removed from src/include/postgres_ext.h as it's 
> unused since eb8312a22.

I didn't touch this. It seems like it could be useful for extensions
and client apps even if it's not used in core.

> Beside that, this simple script:
> for w in $(cat src/tools/pgindent/typedefs.list); do grep -q -P "\b$w\b" -r * 
> --exclude typedefs.list || echo "$w"; done
> detects 58 identifiers that don't exist in the source tree anymore (see 
> typedefs.lost attached).
> Maybe they should be removed from typedefs.list too.

I didn't touch this either.  typedefs.list normally gets some work
done during the pgindent run, which is likely going to happen around
May or June.  Maybe you can check back after that's done and make sure
all these unused ones were removed. I'm not sure if the process that's
done for that only finds new ones that are now required or if it
completely generates a new list.

David




Re: Fix typos and inconsistencies for v16

2023-04-17 Thread Justin Pryzby
On Mon, Apr 17, 2023 at 09:00:00PM +0300, Alexander Lakhin wrote:
> Hello hackers,
> 
> Please consider fixing the following unique words/identifiers introduced in 
> v16:

Well done.

Note that your patches are overlapping:

  3 --- a/src/backend/utils/misc/guc.c
  2 --- a/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm
  2 --- a/src/test/ldap/LdapServer.pm
  2 --- a/src/interfaces/libpq/t/004_load_balance_dns.pl
  2 --- a/src/backend/utils/adt/acl.c

It'd make sense if the changes to each file were isolated to a single
patch (especially 004_load and acl.c).

> -  * USER SET values are appliciable only for PGC_USERSET 
> parameters. We
> +  * USER SET values are applicable only for PGC_USERSET 
> parameters. We
>* use InvalidOid as role in order to evade possible privileges 
> of the

and s/evade/avoid/

> +++ b/src/bin/pg_dump/pg_dumpall.c

You missed "boostrap" :)

I independently found 11 of the same typos you did:

> 1. addresess -> addresses
> 3. appeneded -> appended
> 4. appliciable -> applicable
> 8. containsthe ->  contains the
> 15. execpt -> except
> 19. happend -> happened
> 27. optionn -> option
> 30. permissons -> permissions
> 37. remaing -> remaining
> 42. sentinal -> sentinel
> 47. varilables -> variables

But hadn't yet convinced myself to start the process of defending each
one of the fixes.  Attached some others that I found.

-- 
Justin
diff --git a/contrib/test_decoding/expected/ddl.out 
b/contrib/test_decoding/expected/ddl.out
index 9a28b5ddc5a..d55fb3a667f 100644
--- a/contrib/test_decoding/expected/ddl.out
+++ b/contrib/test_decoding/expected/ddl.out
@@ -428,7 +428,7 @@ SELECT data FROM 
pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
 -- test whether a known, but not yet logged toplevel xact, followed by a
 -- subxact commit is handled correctly
 BEGIN;
-SELECT pg_current_xact_id() != '0'; -- so no fixed xid apears in the outfile
+SELECT pg_current_xact_id() != '0'; -- so no fixed xid appears in the outfile
  ?column? 
 --
  t
diff --git a/contrib/test_decoding/sql/ddl.sql 
b/contrib/test_decoding/sql/ddl.sql
index 4f76bed72c1..57285a828c7 100644
--- a/contrib/test_decoding/sql/ddl.sql
+++ b/contrib/test_decoding/sql/ddl.sql
@@ -236,7 +236,7 @@ SELECT data FROM 
pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
 -- test whether a known, but not yet logged toplevel xact, followed by a
 -- subxact commit is handled correctly
 BEGIN;
-SELECT pg_current_xact_id() != '0'; -- so no fixed xid apears in the outfile
+SELECT pg_current_xact_id() != '0'; -- so no fixed xid appears in the outfile
 SAVEPOINT a;
 INSERT INTO tr_sub(path) VALUES ('4-top-1-#1');
 RELEASE SAVEPOINT a;
diff --git a/doc/src/sgml/user-manag.sgml b/doc/src/sgml/user-manag.sgml
index b5e0392ad27..b6c37ccef26 100644
--- a/doc/src/sgml/user-manag.sgml
+++ b/doc/src/sgml/user-manag.sgml
@@ -346,7 +346,7 @@ ALTER ROLE myname SET enable_indexscan TO off;
role using SET ROLE. However, since any user who has
ADMIN OPTION on a role can grant membership in that
role to any other user, the CREATEROLE user can gain
-   access to the created role by simplying granting that role back to
+   access to the created role by simply granting that role back to
themselves with the INHERIT and/or SET
options. Thus, the fact that privileges are not inherited by default nor
is SET ROLE granted by default is a safeguard against
diff --git a/src/backend/optimizer/path/allpaths.c 
b/src/backend/optimizer/path/allpaths.c
index 244957a2483..9bdc70c702e 100644
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -4051,7 +4051,7 @@ recurse_push_qual(Node *setOp, Query *topquery,
  *
  * extra_used_attrs can be passed as non-NULL to mark any columns (offset by
  * FirstLowInvalidHeapAttributeNumber) that we should not remove.  This
- * parameter is modifed by the function, so callers must make a copy if they
+ * parameter is modified by the function, so callers must make a copy if they
  * need to use the passed in Bitmapset after calling this function.
  *
  * To avoid affecting column numbering in the targetlist, we don't physically
diff --git a/src/backend/optimizer/util/plancat.c 
b/src/backend/optimizer/util/plancat.c
index e3824efe9b5..65adf04c4eb 100644
--- a/src/backend/optimizer/util/plancat.c
+++ b/src/backend/optimizer/util/plancat.c
@@ -436,7 +436,7 @@ get_relation_info(PlannerInfo *root, Oid relationObjectId, 
bool inhparent,
 * the number-of-tuples estimate to equal the parent 
table; if it
 * is partial then we have to use the same methods as 
we would for
 * a table, except we can be sure that the index is not 
larger
-* than the table.  We must ignore partitioned indexes 
here as as
+* than the table.  We must ignore partitioned indexes 
here as

Fix typos and inconsistencies for v16

2023-04-17 Thread Alexander Lakhin

Hello hackers,

Please consider fixing the following unique words/identifiers introduced in v16:
1. addresess -> addresses
2. adminstrator -> administrator // the same typo found in src/backend/po/id.po, but perhaps it should be fixed via 
pgsql-translators

3. appeneded -> appended
4. appliciable -> applicable
5. BackroundPsql -> BackgroundPsql
6. binaies -> binaries
7. compresion -> compression
8. containsthe ->  contains the
9. contextes -> contexts
10. deparseAnalyzeTuplesSql -> deparseAnalyzeInfoSql // that function was 
renamed in 57d11ef0

11. DO_LARGE_OJECT_DATA -> DO_LARGE_OBJECT_DATA
12. doesnt't -> doesn't
13. dst_perminfo -> dst_perminfos
14. eror -> error
15. execpt -> except
16. forech -> foreach
17. GetResultRelCheckAsUser -> ExecGetResultRelCheckAsUser
18. GUCS -> GUCs
19. happend -> happened
20. immitated -> imitated

21. insert_xid -> tuple_xid // see bfcf1b348
22. ldap_add -> ldapadd_file
23. ldapbindpassw -> ldapbindpasswd
24. MemoryChunkSetExternal -> MemoryChunkSetHdrMaskExternal
25. non-encyrpted -> non-encrypted
26. --no-process_main -> --no-process-main
27. optionn -> option
28. Othewise -> Otherwise
29. parellel -> parallel
30. permissons -> permissions

31. pg_pwrite_zeroes -> pg_pwrite_zeros
32. pg_writev -> pg_pwritev
33. possbile -> possible
34. pqsymlink -> pgsymlink
35. PG_GET_WAL_FPI_BLOCK_COLS -> PG_GET_WAL_BLOCK_INFO_COLS
36. RangeVarCallbackOwnsTable -> RangeVarCallbackMaintainsTable // see 60684dd83
37. remaing -> remaining
38. ResourceOwnerForgetBufferIOs -> ResourceOwnerForgetBufferIO
39. RMGRDESC_UTILS_H -> RMGRDESC_UTILS_H_ // or may be the other way
40. rolenamehash -> rolename_hash

41. ROLERECURSE_SETROLe -> ROLERECURSE_SETROLE
42. sentinal -> sentinel
43. smgzerorextend -> smgrzeroextend
44. stacktoodeep -> rstacktoodeep // an excessive character was deleted with 
db4f21e4a?
45. tar_set_error -- remove (obsolete since ebfb814f7)
46. test_tranche_name -- remove (not used, see 006b69fd9)
47. varilables -> variables
48. xid_commit_status -> xmin_commit_status

Also, maybe OID_MAX should be removed from src/include/postgres_ext.h as it's 
unused since eb8312a22.

Beside that, this simple script:
for w in $(cat src/tools/pgindent/typedefs.list); do grep -q -P "\b$w\b" -r * --exclude 
typedefs.list || echo "$w"; done
detects 58 identifiers that don't exist in the source tree anymore (see 
typedefs.lost attached).
Maybe they should be removed from typedefs.list too.

Best regards,
Alexanderdiff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c
index d728bd70b3..95dbe8b06c 100644
--- a/contrib/postgres_fdw/postgres_fdw.c
+++ b/contrib/postgres_fdw/postgres_fdw.c
@@ -5016,7 +5016,7 @@ postgresGetAnalyzeInfoForForeignTable(Relation relation, bool *can_tablesample)
 			pgfdw_report_error(ERROR, res, conn, false, sql.data);
 
 		if (PQntuples(res) != 1 || PQnfields(res) != 2)
-			elog(ERROR, "unexpected result from deparseAnalyzeTuplesSql query");
+			elog(ERROR, "unexpected result from deparseAnalyzeInfoSql query");
 		reltuples = strtod(PQgetvalue(res, 0, 0), NULL);
 		relkind = *(PQgetvalue(res, 0, 1));
 	}
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 7d3b20168a..f6c0c5ca1a 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -6272,7 +6272,7 @@ ProcessGUCArray(ArrayType *array, ArrayType *usersetArray,
 			userSetDatum = BoolGetDatum(false);
 
 		/*
-		 * USER SET values are appliciable only for PGC_USERSET parameters. We
+		 * USER SET values are applicable only for PGC_USERSET parameters. We
 		 * use InvalidOid as role in order to evade possible privileges of the
 		 * current user.
 		 */
diff --git a/src/backend/utils/misc/ps_status.c b/src/backend/utils/misc/ps_status.c
index 3894a017f3..104c01d966 100644
--- a/src/backend/utils/misc/ps_status.c
+++ b/src/backend/utils/misc/ps_status.c
@@ -87,7 +87,7 @@ static size_t ps_buffer_cur_len;	/* nominal strlen(ps_buffer) */
 static size_t ps_buffer_fixed_size; /* size of the constant prefix */
 
 /*
- * Length of ps_buffer before the suffix was appeneded to the end, or 0 if we
+ * Length of ps_buffer before the suffix was appended to the end, or 0 if we
  * didn't set a suffix.
  */
 static size_t ps_buffer_nosuffix_len;
diff --git a/src/bin/pg_dump/compress_lz4.c b/src/bin/pg_dump/compress_lz4.c
index 5aca9c1f06..423e1b7976 100644
--- a/src/bin/pg_dump/compress_lz4.c
+++ b/src/bin/pg_dump/compress_lz4.c
@@ -342,7 +342,7 @@ LZ4Stream_get_error(CompressFileHandle *CFH)
 /*
  * Initialize an already alloc'ed LZ4State struct for subsequent calls.
  *
- * Creates the necessary contexts for either compresion or decompression. When
+ * Creates the necessary contexts for either compression or decompression. When
  * compressing data (indicated by compressing=true), it additionally writes the
  * LZ4 header in the output stream.
  *
diff --git a/src/include/utils/tuplesort.h b/src/include/utils/tuplesort.h
index 395abfe596..656a2e9897 

Re: pgsql: Fix typos and bump catversion.

2022-11-19 Thread Joe Conway

On 11/19/22 17:24, Tom Lane wrote:

Andres Freund  writes:

On 2022-11-19 17:10:57 -0500, Joe Conway wrote:

Rishu Bagga pointed out to me offlist that this catversion bump seems
flawed:
 /* mmddN */
-#define CATALOG_VERSION_NO 202211121
+#define CATALOG_VERSION_NO 202211821



I think that should be 202211181, no? I am not clear on the desirable way to
fix though :-/



I think it's fine to just update to a "normal" catversion.


Yeah, just fix it --- and the sooner the better, to avoid the risk
that this becomes a value that someone needs to care about.



WFM, done

--
Joe Conway
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com





Re: pgsql: Fix typos and bump catversion.

2022-11-19 Thread Tom Lane
Andres Freund  writes:
> On 2022-11-19 17:10:57 -0500, Joe Conway wrote:
>> Rishu Bagga pointed out to me offlist that this catversion bump seems
>> flawed:
>>  /* mmddN */
>> -#define CATALOG_VERSION_NO 202211121
>> +#define CATALOG_VERSION_NO 202211821

>> I think that should be 202211181, no? I am not clear on the desirable way to
>> fix though :-/

> I think it's fine to just update to a "normal" catversion.

Yeah, just fix it --- and the sooner the better, to avoid the risk
that this becomes a value that someone needs to care about.

regards, tom lane




Re: pgsql: Fix typos and bump catversion.

2022-11-19 Thread Andres Freund
Hi,

On 2022-11-19 17:10:57 -0500, Joe Conway wrote:
> Rishu Bagga pointed out to me offlist that this catversion bump seems
> flawed:
> 
> diff --git a/src/include/catalog/catversion.h
> b/src/include/catalog/catversion.h
> index 
> c6ef593207c227ce10b0c897379476b553974f67..b3a57136b755fed182b4518330e65786032db870
> 100644 (file)
> --- a/src/include/catalog/catversion.h
> +++ b/src/include/catalog/catversion.h
> @@ -57,6 +57,6 @@
>   */
> 
>  /* mmddN */
> -#define CATALOG_VERSION_NO 202211121
> +#define CATALOG_VERSION_NO 202211821
> 
>  #endif
> 
> I think that should be 202211181, no? I am not clear on the desirable way to
> fix though :-/

I think it's fine to just update to a "normal" catversion. We really just
match for an exact match with a few exceptions (somewhere in pg_upgrade IIRC),
and those exceptions don't really matter for some individual commit on the
development branch.

Greetings,

Andres Freund




Re: pgsql: Fix typos and bump catversion.

2022-11-19 Thread Joe Conway

On 11/18/22 16:18, Robert Haas wrote:

Fix typos and bump catversion.

Typos reported by Álvaro Herrera and Erik Rijkers.

Catversion bump for 3d14e171e9e2236139e8976f3309a588bcc8683b was
inadvertently omitted.

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/2fb6154fcd769b2d4ea1226788e0ec2fc3522cb8

Modified Files
--
doc/src/sgml/ref/grant.sgml  | 2 +-
src/bin/pg_dump/pg_dumpall.c | 1 -
src/include/catalog/catversion.h | 2 +-


Rishu Bagga pointed out to me offlist that this catversion bump seems 
flawed:


diff --git a/src/include/catalog/catversion.h 
b/src/include/catalog/catversion.h
index 
c6ef593207c227ce10b0c897379476b553974f67..b3a57136b755fed182b4518330e65786032db870 
100644 (file)

--- a/src/include/catalog/catversion.h
+++ b/src/include/catalog/catversion.h
@@ -57,6 +57,6 @@
  */

 /* mmddN */
-#define CATALOG_VERSION_NO 202211121
+#define CATALOG_VERSION_NO 202211821

 #endif

I think that should be 202211181, no? I am not clear on the desirable 
way to fix though :-/


Joe
--
Joe Conway
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com





Re: Fix typos in code comments

2022-09-26 Thread Amit Kapila
On Sat, Sep 24, 2022 at 4:00 AM Justin Pryzby  wrote:
>
> On Mon, Sep 19, 2022 at 06:10:00AM -0500, Justin Pryzby wrote:
> > On Mon, Sep 19, 2022 at 11:05:24AM +0800, Zhang Mingli wrote:
> > > Good catch. There is a similar typo in doc, runtime.sgml.
> > > ```using TLS protocols enabled by by setting the parameter```
> >
> > That one should be backpatched to v15.
>
> This is still needed -- "by by"
>

Thanks for the reminder. I have pushed the fix.

-- 
With Regards,
Amit Kapila.




Re: Fix typos in code comments

2022-09-23 Thread Justin Pryzby
On Mon, Sep 19, 2022 at 06:10:00AM -0500, Justin Pryzby wrote:
> On Mon, Sep 19, 2022 at 11:05:24AM +0800, Zhang Mingli wrote:
> > Good catch. There is a similar typo in doc, runtime.sgml.
> > ```using TLS protocols enabled by by setting the parameter```
> 
> That one should be backpatched to v15.

This is still needed -- "by by"

-- 
Justin




Re: Fix typos in code comments

2022-09-19 Thread David Rowley
On Mon, 19 Sept 2022 at 23:10, Justin Pryzby  wrote:
> Find below some others.

Thanks. Pushed.

David




Re: Fix typos in code comments

2022-09-19 Thread Justin Pryzby
On Mon, Sep 19, 2022 at 02:44:12AM +, houzj.f...@fujitsu.com wrote:
> While working on some other patches, I found serval typos(duplicate words and
> incorrect function name reference) in the code comments. Here is a small patch
> to fix them.

Thanks.

On Mon, Sep 19, 2022 at 11:05:24AM +0800, Zhang Mingli wrote:
> Good catch. There is a similar typo in doc, runtime.sgml.
> ```using TLS protocols enabled by by setting the parameter```

That one should be backpatched to v15.

Find below some others.

diff --git a/src/backend/executor/execPartition.c 
b/src/backend/executor/execPartition.c
index 901dd435efd..160296e1daf 100644
--- a/src/backend/executor/execPartition.c
+++ b/src/backend/executor/execPartition.c
@@ -2155,7 +2155,7 @@ InitPartitionPruneContext(PartitionPruneContext *context,
  * Current values of the indexes present in PartitionPruneState count all the
  * subplans that would be present before initial pruning was done.  If initial
  * pruning got rid of some of the subplans, any subsequent pruning passes will
- * will be looking at a different set of target subplans to choose from than
+ * be looking at a different set of target subplans to choose from than
  * those in the pre-initial-pruning set, so the maps in PartitionPruneState
  * containing those indexes must be updated to reflect the new indexes of
  * subplans in the post-initial-pruning set.
diff --git a/src/backend/utils/activity/pgstat.c 
b/src/backend/utils/activity/pgstat.c
index 6224c498c21..5b0f26e3b07 100644
--- a/src/backend/utils/activity/pgstat.c
+++ b/src/backend/utils/activity/pgstat.c
@@ -556,7 +556,7 @@ pgstat_initialize(void)
  * suggested idle timeout is returned. Currently this is always
  * PGSTAT_IDLE_INTERVAL (1ms). Callers can use the returned time to set up
  * a timeout after which to call pgstat_report_stat(true), but are not
- * required to to do so.
+ * required to do so.
  *
  * Note that this is called only when not within a transaction, so it is fair
  * to use transaction stop time as an approximation of current time.
diff --git a/src/backend/utils/activity/pgstat_replslot.c 
b/src/backend/utils/activity/pgstat_replslot.c
index b77c05ab5fa..9a59012a855 100644
--- a/src/backend/utils/activity/pgstat_replslot.c
+++ b/src/backend/utils/activity/pgstat_replslot.c
@@ -8,7 +8,7 @@
  * storage implementation and the details about individual types of
  * statistics.
  *
- * Replication slot stats work a bit different than other other
+ * Replication slot stats work a bit different than other
  * variable-numbered stats. Slots do not have oids (so they can be created on
  * physical replicas). Use the slot index as object id while running. However,
  * the slot index can change when restarting. That is addressed by using the
diff --git a/src/test/ssl/t/SSL/Server.pm b/src/test/ssl/t/SSL/Server.pm
index 62f54dcbf16..0a9e5da01e4 100644
--- a/src/test/ssl/t/SSL/Server.pm
+++ b/src/test/ssl/t/SSL/Server.pm
@@ -257,7 +257,7 @@ The certificate file to use. Implementation is SSL backend 
specific.
 
 =item keyfile => B
 
-The private key to to use. Implementation is SSL backend specific.
+The private key file to use. Implementation is SSL backend specific.
 
 =item crlfile => B
 




Re: Fix typos in code comments

2022-09-18 Thread Zhang Mingli
Hi
On Sep 19, 2022, 10:57 +0800, Amit Kapila , wrote:
> On Mon, Sep 19, 2022 at 8:14 AM houzj.f...@fujitsu.com
>  wrote:
> >
> > While working on some other patches, I found serval typos(duplicate words 
> > and
> > incorrect function name reference) in the code comments. Here is a small 
> > patch
> > to fix them.
> >
>
> Thanks, the patch looks good to me. I'll push this.
>
> --
> With Regards,
> Amit Kapila.
>
>
Good catch. There is a similar typo in doc, runtime.sgml.

```using TLS protocols enabled by by setting the parameter```


Re: Fix typos in code comments

2022-09-18 Thread Amit Kapila
On Mon, Sep 19, 2022 at 8:14 AM houzj.f...@fujitsu.com
 wrote:
>
> While working on some other patches, I found serval typos(duplicate words and
> incorrect function name reference) in the code comments. Here is a small patch
> to fix them.
>

Thanks, the patch looks good to me. I'll push this.

-- 
With Regards,
Amit Kapila.




Fix typos in code comments

2022-09-18 Thread houzj.f...@fujitsu.com
Hi,

While working on some other patches, I found serval typos(duplicate words and
incorrect function name reference) in the code comments. Here is a small patch
to fix them.

Best regards,
Hou zhijie



0001-fix-typos.patch
Description: 0001-fix-typos.patch


Re: fix typos

2022-08-17 Thread John Naylor
On Tue, Aug 16, 2022 at 8:48 AM John Naylor
 wrote:
>
> On Fri, Aug 12, 2022 at 8:55 PM Tom Lane  wrote:
> >
> > John Naylor  writes:
> > > This is really a straw-man proposal, since I'm not volunteering to do
> > > the work, or suggest anybody else should do the same. That being the
> > > case, it seems we should just go ahead with Justin's patch for
> > > consistency. Possibly we could also change the messages to say "ID"?
> >
> > I'd be content if we change the user-facing messages (and documentation
> > if any) to say "ID" not "OID".
>
> The documentation has both, so it makes sense to standardize on "ID".
> The messages all had oid/OID, which I changed in the attached. I think
> I got all the places.
>
> I'm thinking it's not wrong enough to confuse people, but consistency
> is good, so backpatch to v15 and no further. Does anyone want to make
> a case otherwise?

This is done.

-- 
John Naylor
EDB: http://www.enterprisedb.com




Re: fix typos

2022-08-15 Thread John Naylor
On Fri, Aug 12, 2022 at 8:55 PM Tom Lane  wrote:
>
> John Naylor  writes:
> > This is really a straw-man proposal, since I'm not volunteering to do
> > the work, or suggest anybody else should do the same. That being the
> > case, it seems we should just go ahead with Justin's patch for
> > consistency. Possibly we could also change the messages to say "ID"?
>
> I'd be content if we change the user-facing messages (and documentation
> if any) to say "ID" not "OID".

The documentation has both, so it makes sense to standardize on "ID".
The messages all had oid/OID, which I changed in the attached. I think
I got all the places.

I'm thinking it's not wrong enough to confuse people, but consistency
is good, so backpatch to v15 and no further. Does anyone want to make
a case otherwise?

-- 
John Naylor
EDB: http://www.enterprisedb.com
diff --git a/doc/src/sgml/replication-origins.sgml b/doc/src/sgml/replication-origins.sgml
index 7e02c4605b..bb0fb624d2 100644
--- a/doc/src/sgml/replication-origins.sgml
+++ b/doc/src/sgml/replication-origins.sgml
@@ -27,12 +27,12 @@
  
 
  
-  Replication origins have just two properties, a name and an OID. The name,
+  Replication origins have just two properties, a name and an ID. The name,
   which is what should be used to refer to the origin across systems, is
   free-form text. It should be used in a way that makes conflicts
   between replication origins created by different replication solutions
   unlikely; e.g., by prefixing the replication solution's name to it.
-  The OID is used only to avoid having to store the long version
+  The ID is used only to avoid having to store the long version
   in situations where space efficiency is important. It should never be shared
   across systems.
  
diff --git a/src/backend/replication/logical/origin.c b/src/backend/replication/logical/origin.c
index c72ad6b93d..9eb97fac58 100644
--- a/src/backend/replication/logical/origin.c
+++ b/src/backend/replication/logical/origin.c
@@ -328,7 +328,7 @@ replorigin_create(const char *roname)
 	if (tuple == NULL)
 		ereport(ERROR,
 (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
- errmsg("could not find free replication origin OID")));
+ errmsg("could not find free replication origin ID")));
 
 	heap_freetuple(tuple);
 	return roident;
@@ -364,7 +364,7 @@ restart:
 if (nowait)
 	ereport(ERROR,
 			(errcode(ERRCODE_OBJECT_IN_USE),
-			 errmsg("could not drop replication origin with OID %d, in use by PID %d",
+			 errmsg("could not drop replication origin with ID %u, in use by PID %d",
 	state->roident,
 	state->acquired_by)));
 
@@ -408,7 +408,7 @@ restart:
 	 */
 	tuple = SearchSysCache1(REPLORIGIDENT, ObjectIdGetDatum(roident));
 	if (!HeapTupleIsValid(tuple))
-		elog(ERROR, "cache lookup failed for replication origin with oid %u",
+		elog(ERROR, "cache lookup failed for replication origin with ID %u",
 			 roident);
 
 	CatalogTupleDelete(rel, >t_self);
@@ -485,7 +485,7 @@ replorigin_by_oid(RepOriginId roident, bool missing_ok, char **roname)
 		if (!missing_ok)
 			ereport(ERROR,
 	(errcode(ERRCODE_UNDEFINED_OBJECT),
-	 errmsg("replication origin with OID %u does not exist",
+	 errmsg("replication origin with ID %u does not exist",
 			roident)));
 
 		return false;
@@ -937,7 +937,7 @@ replorigin_advance(RepOriginId node,
 		{
 			ereport(ERROR,
 	(errcode(ERRCODE_OBJECT_IN_USE),
-	 errmsg("replication origin with OID %d is already active for PID %d",
+	 errmsg("replication origin with ID %u is already active for PID %d",
 			replication_state->roident,
 			replication_state->acquired_by)));
 		}
@@ -948,7 +948,7 @@ replorigin_advance(RepOriginId node,
 	if (replication_state == NULL && free_state == NULL)
 		ereport(ERROR,
 (errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
- errmsg("could not find free replication state slot for replication origin with OID %u",
+ errmsg("could not find free replication state slot for replication origin with ID %u",
 		node),
  errhint("Increase max_replication_slots and try again.")));
 
@@ -1126,7 +1126,7 @@ replorigin_session_setup(RepOriginId node)
 		{
 			ereport(ERROR,
 	(errcode(ERRCODE_OBJECT_IN_USE),
-	 errmsg("replication origin with OID %d is already active for PID %d",
+	 errmsg("replication origin with ID %u is already active for PID %d",
 			curstate->roident, curstate->acquired_by)));
 		}
 
@@ -1138,7 +1138,7 @@ replorigin_session_setup(RepOriginId node)
 	if (session_replication_state == NULL && free_slot == -1)
 		ereport(ERROR,
 (errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
- errmsg("could not find free replication state slot for replication origin with OID %u",
+ errmsg("could not find free replication state slot for replication origin with ID %u",
 		node),
  errhint("Increase max_replication_slots and try again.")));
 	else if (session_replication_state == NULL)


Re: fix typos

2022-08-12 Thread Tom Lane
John Naylor  writes:
> This is really a straw-man proposal, since I'm not volunteering to do
> the work, or suggest anybody else should do the same. That being the
> case, it seems we should just go ahead with Justin's patch for
> consistency. Possibly we could also change the messages to say "ID"?

I'd be content if we change the user-facing messages (and documentation
if any) to say "ID" not "OID".

regards, tom lane




Re: fix typos

2022-08-12 Thread Euler Taveira
On Fri, Aug 12, 2022, at 3:59 AM, John Naylor wrote:
> This is really a straw-man proposal, since I'm not volunteering to do
> the work, or suggest anybody else should do the same. That being the
> case, it seems we should just go ahead with Justin's patch for
> consistency. Possibly we could also change the messages to say "ID"?
... or say

could not drop replication origin %u, in use by PID %d

AFAICS there is no "with ID" but there is "with identifier". I personally
prefer to omit these additional words; it seems clear without them.


--
Euler Taveira
EDB   https://www.enterprisedb.com/


Re: fix typos

2022-08-12 Thread John Naylor
I wrote:

> On Thu, Aug 4, 2022 at 8:41 PM Tom Lane  wrote:
> >
> > John Naylor  writes:
>
> > > RepOriginId is a typedef for uint16, so this can't print the wrong answer,
> > > but it is inconsistent with other uses. So it seems we don't need to
> > > backpatch this one?
> >
> > Um ... if it's int16, then it can't be an OID, so I'd say this message has
> > far worse problems than %d vs %u.  It should not use that terminology.
>
> The catalog has the following. Since it's not a real oid, maybe this column 
> should be rethought?

This is really a straw-man proposal, since I'm not volunteering to do
the work, or suggest anybody else should do the same. That being the
case, it seems we should just go ahead with Justin's patch for
consistency. Possibly we could also change the messages to say "ID"?

> CATALOG(pg_replication_origin,6000,ReplicationOriginRelationId) 
> BKI_SHARED_RELATION
> {
> /*
> * Locally known id that get included into WAL.
> *
> * This should never leave the system.
> *
> * Needs to fit into an uint16, so we don't waste too much space in WAL
> * records. For this reason we don't use a normal Oid column here, since
> * we need to handle allocation of new values manually.
> */
> Oid roident;

-- 
John Naylor
EDB: http://www.enterprisedb.com




Re: fix typos

2022-08-04 Thread John Naylor
On Thu, Aug 4, 2022 at 8:41 PM Tom Lane  wrote:
>
> John Naylor  writes:

> > RepOriginId is a typedef for uint16, so this can't print the wrong
answer,
> > but it is inconsistent with other uses. So it seems we don't need to
> > backpatch this one?
>
> Um ... if it's int16, then it can't be an OID, so I'd say this message has
> far worse problems than %d vs %u.  It should not use that terminology.

The catalog has the following. Since it's not a real oid, maybe this column
should be rethought?

CATALOG(pg_replication_origin,6000,ReplicationOriginRelationId)
BKI_SHARED_RELATION
{
/*
* Locally known id that get included into WAL.
*
* This should never leave the system.
*
* Needs to fit into an uint16, so we don't waste too much space in WAL
* records. For this reason we don't use a normal Oid column here, since
* we need to handle allocation of new values manually.
*/
Oid roident;
[...]

--
John Naylor
EDB: http://www.enterprisedb.com


Re: fix typos

2022-08-04 Thread Tom Lane
John Naylor  writes:
> On Tue, Aug 2, 2022 at 1:11 AM Justin Pryzby  wrote:
>   ereport(ERROR,
>   (errcode(ERRCODE_OBJECT_IN_USE),
> - errmsg("could not drop replication origin with OID %d, in use by PID %d",
> + errmsg("could not drop replication origin with OID %u, in use by PID %d",

> RepOriginId is a typedef for uint16, so this can't print the wrong answer,
> but it is inconsistent with other uses. So it seems we don't need to
> backpatch this one?

Um ... if it's int16, then it can't be an OID, so I'd say this message has
far worse problems than %d vs %u.  It should not use that terminology.

regards, tom lane




Re: fix typos

2022-08-04 Thread John Naylor
On Tue, Aug 2, 2022 at 1:11 AM Justin Pryzby  wrote:
>
> On Mon, Aug 01, 2022 at 08:04:54PM +0200, Erik Rijkers wrote:
> > Recent typos...
>
> LGTM, thanks.
>
> Here are some others I've been sitting on, mostly in .c files.

I pushed Robert's suggestion, then pushed the rest of Erik's changes and
two of Justin's. For Justin's 0004:

--- a/src/backend/replication/logical/origin.c
+++ b/src/backend/replication/logical/origin.c
@@ -364,7 +364,7 @@ restart:
  if (nowait)
  ereport(ERROR,
  (errcode(ERRCODE_OBJECT_IN_USE),
- errmsg("could not drop replication origin with OID %d, in use by PID %d",
+ errmsg("could not drop replication origin with OID %u, in use by PID %d",

RepOriginId is a typedef for uint16, so this can't print the wrong answer,
but it is inconsistent with other uses. So it seems we don't need to
backpatch this one?

For patch 0002, the whitespace issue in the top comment in inval.c, I'm
inclined to just change all the out-of-place tabs in a single commit, so we
can add that to the list of whitespace commits.

--
John Naylor
EDB: http://www.enterprisedb.com


Re: fix typos

2022-08-04 Thread John Naylor
On Wed, Aug 3, 2022 at 11:41 PM Robert Haas  wrote:
>
> I think that it's talking about this (documented) syntax:
>
> ALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]
> [ NO ] DEPENDS ON EXTENSION extension_name
>
> So the change from "depends" to "depend" here is incorrect. Maybe we
> can say something like:
>
> the DEPENDS ON EXTENSION
> extension_name action
>
> (I haven't tested whether this markup works.)

Makes sense, I'll go make it happen.

--
John Naylor
EDB: http://www.enterprisedb.com


Re: fix typos

2022-08-03 Thread Robert Haas
On Tue, Aug 2, 2022 at 4:32 AM Erik Rijkers  wrote:
> > The part of the sentence inside parentheses is not clear to me, before
> > or after the patch:
> >
> >  Dropping an extension causes its component objects, and other
> > explicitly
> >  dependent routines (see ,
> > -   the depends on extension action), to be dropped as well.
> > +   that depend on extension action), to be dropped as well.
> > 
> >
>
> Hm, I see what you mean, I did not notice that earlier and I won't make
> a guess as to intention.  Maybe Bruce can have another look? (commit
> 5fe2d4c56e)

I think that it's talking about this (documented) syntax:

ALTER ROUTINE name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ]
[ NO ] DEPENDS ON EXTENSION extension_name

So the change from "depends" to "depend" here is incorrect. Maybe we
can say something like:

the DEPENDS ON EXTENSION
extension_name action

(I haven't tested whether this markup works.)

-- 
Robert Haas
EDB: http://www.enterprisedb.com




Re: fix typos

2022-08-02 Thread Erik Rijkers

Op 02-08-2022 om 07:28 schreef John Naylor:


On Tue, Aug 2, 2022 at 1:05 AM Erik Rijkers > wrote:

 >
 > Recent typos...

The part of the sentence inside parentheses is not clear to me, before 
or after the patch:


     Dropping an extension causes its component objects, and other 
explicitly

     dependent routines (see ,
-   the depends on extension action), to be dropped as well.
+   that depend on extension action), to be dropped as well.
    



Hm, I see what you mean, I did not notice that earlier and I won't make 
a guess as to intention.  Maybe Bruce can have another look? (commit 
5fe2d4c56e)




--
John Naylor
EDB: http://www.enterprisedb.com 





Re: fix typos

2022-08-01 Thread John Naylor
On Tue, Aug 2, 2022 at 1:11 AM Justin Pryzby  wrote:
>
> Here are some others I've been sitting on, mostly in .c files.

0002:
weird since c91560defc57f89f7e88632ea14ae77b5cec78ee

It was weird long before that, maybe we should instead change most of those
tabs in the top comment to single space, as is customary? The rest LGTM.

--
John Naylor
EDB: http://www.enterprisedb.com


Re: fix typos

2022-08-01 Thread John Naylor
On Tue, Aug 2, 2022 at 1:05 AM Erik Rijkers  wrote:
>
> Recent typos...

The part of the sentence inside parentheses is not clear to me, before or
after the patch:

Dropping an extension causes its component objects, and other explicitly
dependent routines (see ,
-   the depends on extension action), to be dropped as well.
+   that depend on extension action), to be dropped as well.
   

--
John Naylor
EDB: http://www.enterprisedb.com


Re: fix typos

2022-08-01 Thread Justin Pryzby
On Mon, Aug 01, 2022 at 08:04:54PM +0200, Erik Rijkers wrote:
> Recent typos...

LGTM, thanks.

Here are some others I've been sitting on, mostly in .c files.

-- 
Justin
>From 19f320438476aff2773440447f167d06051a0a47 Mon Sep 17 00:00:00 2001
From: Justin Pryzby 
Date: Tue, 5 Jul 2022 14:12:26 -0500
Subject: [PATCH 1/4] typos

---
 doc/src/sgml/brin.sgml  | 2 +-
 src/backend/commands/dbcommands.c   | 6 +++---
 src/include/replication/reorderbuffer.h | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/src/sgml/brin.sgml b/doc/src/sgml/brin.sgml
index 4ee8908b65a..71697155d7c 100644
--- a/doc/src/sgml/brin.sgml
+++ b/doc/src/sgml/brin.sgml
@@ -75,7 +75,7 @@
summarized will cause the summary information to be updated with data
from the new tuples.
When a new page is created that does not fall within the last
-   summarized range, the range that the new page belongs into
+   summarized range, the range that the new page belongs to
does not automatically acquire a summary tuple;
those tuples remain unsummarized until a summarization run is
invoked later, creating the initial summary for that range.
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index 7bc53f3a0bb..9f990a8d68f 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -188,7 +188,7 @@ CreateDatabaseUsingWalLog(Oid src_dboid, Oid dst_dboid,
 
 		/*
 		 * If the relation is from the source db's default tablespace then we
-		 * need to create it in the destinations db's default tablespace.
+		 * need to create it in the destination db's default tablespace.
 		 * Otherwise, we need to create in the same tablespace as it is in the
 		 * source database.
 		 */
@@ -1351,8 +1351,8 @@ createdb(ParseState *pstate, const CreatedbStmt *stmt)
 	/*
 	 * If we're going to be reading data for the to-be-created database into
 	 * shared_buffers, take a lock on it. Nobody should know that this
-	 * database exists yet, but it's good to maintain the invariant that a
-	 * lock an AccessExclusiveLock on the database is sufficient to drop all
+	 * database exists yet, but it's good to maintain the invariant that an
+	 * AccessExclusiveLock on the database is sufficient to drop all
 	 * of its buffers without worrying about more being read later.
 	 *
 	 * Note that we need to do this before entering the
diff --git a/src/include/replication/reorderbuffer.h b/src/include/replication/reorderbuffer.h
index d109d0baede..2c9206ace41 100644
--- a/src/include/replication/reorderbuffer.h
+++ b/src/include/replication/reorderbuffer.h
@@ -262,7 +262,7 @@ typedef struct ReorderBufferTXN
 	 * aborted. This can be a
 	 * * plain commit record
 	 * * plain commit record, of a parent transaction
-	 * * prepared tansaction
+	 * * prepared transaction
 	 * * prepared transaction commit
 	 * * plain abort record
 	 * * prepared transaction abort
-- 
2.17.1

>From 57b1a6001b2910c9a8002e72f22391255e8b8bb9 Mon Sep 17 00:00:00 2001
From: Justin Pryzby 
Date: Sat, 23 Jul 2022 15:10:01 -0500
Subject: [PATCH 2/4] fix whitespace

weird since c91560defc57f89f7e88632ea14ae77b5cec78ee
---
 src/backend/utils/cache/inval.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c
index eb5782f82a4..c0e33c0f177 100644
--- a/src/backend/utils/cache/inval.c
+++ b/src/backend/utils/cache/inval.c
@@ -9,8 +9,8 @@
  *	consider that it is *still valid* so long as we are in the same command,
  *	ie, until the next CommandCounterIncrement() or transaction commit.
  *	(See access/heap/heapam_visibility.c, and note that system catalogs are
- *  generally scanned under the most current snapshot available, rather than
- *  the transaction snapshot.)	At the command boundary, the old tuple stops
+ *	generally scanned under the most current snapshot available, rather than
+ *	the transaction snapshot.)  At the command boundary, the old tuple stops
  *	being valid and the new version, if any, becomes valid.  Therefore,
  *	we cannot simply flush a tuple from the system caches during heap_update()
  *	or heap_delete().  The tuple is still good at that point; what's more,
-- 
2.17.1

>From 6fc057ae26567f39b85902933e4eddc9cbd9c915 Mon Sep 17 00:00:00 2001
From: Justin Pryzby 
Date: Tue, 26 Jul 2022 18:34:08 -0500
Subject: [PATCH 3/4] f!newline

---
 src/backend/commands/explain.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c
index e29c2ae206f..e078456b191 100644
--- a/src/backend/commands/explain.c
+++ b/src/backend/commands/explain.c
@@ -3284,7 +3284,6 @@ show_hashagg_info(AggState *aggstate, ExplainState *es)
 
 	if (es->format != EXPLAIN_FORMAT_TEXT)
 	{
-
 		if (es->costs)
 			ExplainPropertyInteger("Planned Partitions", NULL,
    aggstate->hash_planned_partitions, es);
-- 
2.17.1

>From 050de51a3018ed4e609a9f77385708af1692b720 

fix typos

2022-08-01 Thread Erik Rijkers

Recent typos...
--- ./doc/src/sgml/ref/drop_extension.sgml.orig 2022-08-01 19:38:18.249729884 
+0200
+++ ./doc/src/sgml/ref/drop_extension.sgml  2022-08-01 19:40:33.312359069 
+0200
@@ -32,7 +32,7 @@
DROP EXTENSION removes extensions from the database.
Dropping an extension causes its component objects, and other explicitly
dependent routines (see ,
-   the depends on extension action), to be dropped as well.
+   that depend on extension action), to be dropped as well.
   
 
   
@@ -80,8 +80,8 @@
 
  
   This option prevents the specified extensions from being dropped
-  if there exists non-extension-member objects that depends on any
-  the extensions.  This is the default.
+  if there exist non-extension-member objects that depend on any
+  of the extensions.  This is the default.
  
 

--- ./doc/src/sgml/ref/psql-ref.sgml.orig   2022-08-01 19:58:21.000644788 
+0200
+++ ./doc/src/sgml/ref/psql-ref.sgml2022-08-01 19:59:00.417285655 +0200
@@ -2864,7 +2864,7 @@
   
 
   
-   page: truncate the the header line at the 
terminal
+   page: truncate the header line at the terminal
width.
   
 


Re: fix typos in storing statistics in shared memory

2022-05-23 Thread Michael Paquier
On Mon, May 23, 2022 at 10:22:36AM -0700, Nathan Bossart wrote:
> On Mon, May 23, 2022 at 10:46:22PM +0900, torikoshia wrote:
>> It seems like there are some duplications of 'the' in pgstat.c and
>> pgstat_internal.h.
>> Attaching a tiny patch to fix them.
> 
> LGTM

Thanks Torikoshi-san, fixed.
--
Michael


signature.asc
Description: PGP signature


Re: fix typos in storing statistics in shared memory

2022-05-23 Thread Nathan Bossart
On Mon, May 23, 2022 at 10:46:22PM +0900, torikoshia wrote:
> It seems like there are some duplications of 'the' in pgstat.c and
> pgstat_internal.h.
> Attaching a tiny patch to fix them.

LGTM

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com




fix typos in storing statistics in shared memory

2022-05-23 Thread torikoshia

Hi,

It seems like there are some duplications of 'the' in pgstat.c and 
pgstat_internal.h.

Attaching a tiny patch to fix them.

--
Regards,

--
Atsushi Torikoshi
NTT DATA CORPORATIONFrom fabf3bc5da8e5ebd4f600b6ba762d4413cbdcd6b Mon Sep 17 00:00:00 2001
From: Atsushi Torikoshi 
Date: Mon, 23 May 2022 17:11:54 +0900
Subject: [PATCH v1] Fix duplications of 'the' in pgstat.c and
 pgstat_internal.h

---
 src/backend/utils/activity/pgstat.c | 4 ++--
 src/include/utils/pgstat_internal.h | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/backend/utils/activity/pgstat.c b/src/backend/utils/activity/pgstat.c
index 3c3fd0e9b7..05f2d9e9bd 100644
--- a/src/backend/utils/activity/pgstat.c
+++ b/src/backend/utils/activity/pgstat.c
@@ -32,9 +32,9 @@
  * backend-local hashtable (pgStatEntryRefHash) in front of the shared
  * hashtable, containing references (PgStat_EntryRef) to shared hashtable
  * entries. The shared hashtable only needs to be accessed when no prior
- * reference is found in the local hashtable. Besides pointing to the the
+ * reference is found in the local hashtable. Besides pointing to the
  * shared hashtable entry (PgStatShared_HashEntry) PgStat_EntryRef also
- * contains a pointer to the the shared statistics data, as a process-local
+ * contains a pointer to the shared statistics data, as a process-local
  * address, to reduce access costs.
  *
  * The names for structs stored in shared memory are prefixed with
diff --git a/src/include/utils/pgstat_internal.h b/src/include/utils/pgstat_internal.h
index 0eccaea6c1..7d13310fe6 100644
--- a/src/include/utils/pgstat_internal.h
+++ b/src/include/utils/pgstat_internal.h
@@ -296,9 +296,9 @@ static const char *const slru_names[] = {
  * values in a copy of the stats data, which is protected by ->lock. See
  * pgstat_fetch_stat_(archiver|bgwriter|checkpointer) for the reader side.
  *
- * The only exception to that is the the stat_reset_timestamp in these
- * structs, which is protected by ->lock, because it has to be written by
- * another backend while resetting
+ * The only exception to that is the stat_reset_timestamp in these structs,
+ * which is protected by ->lock, because it has to be written by another
+ * backend while resetting
  * --
  */
 
-- 
2.27.0



Re: Fix typos - "an" instead of "a"

2021-12-09 Thread Peter Smith
On Thu, Dec 9, 2021 at 5:22 PM Michael Paquier  wrote:
>
> On Wed, Dec 08, 2021 at 05:47:39PM -0700, David G. Johnston wrote:
> > Yeah, I was treating the leading dash as being silent...the syntax dash(es)
> > for single and multi-character arguments seems unimportant to read aloud in
> > the general sense.  If one does read them then yes, "a" is correct.
> > Lacking any documented preference I would then just go with what is
> > prevalent in existing usage.
>
> Interesting, I would have thought that the dash should be silent.
> Anyway, I missed that as this comes from ./configure we don't need to
> change anything as this file is generated by autoconf.  I have applied
> the rest.

Thanks for pushing.

--
Kind Regards,
Peter Smith.
Fujitsu Australia




Re: Fix typos - "an" instead of "a"

2021-12-08 Thread Michael Paquier
On Wed, Dec 08, 2021 at 05:47:39PM -0700, David G. Johnston wrote:
> Yeah, I was treating the leading dash as being silent...the syntax dash(es)
> for single and multi-character arguments seems unimportant to read aloud in
> the general sense.  If one does read them then yes, "a" is correct.
> Lacking any documented preference I would then just go with what is
> prevalent in existing usage.

Interesting, I would have thought that the dash should be silent.
Anyway, I missed that as this comes from ./configure we don't need to
change anything as this file is generated by autoconf.  I have applied
the rest.
--
Michael


signature.asc
Description: PGP signature


Re: Fix typos - "an" instead of "a"

2021-12-08 Thread David G. Johnston
On Wed, Dec 8, 2021 at 5:32 PM Greg Nancarrow  wrote:

> On Thu, Dec 9, 2021 at 11:25 AM David G. Johnston
>  wrote:
> >
> >> -   # safe: cross compilers may not add the suffix if given an `-o'
> >> +   # safe: cross compilers may not add the suffix if given a `-o'
> >> # argument, so we may need to know it at that point already.
> >> On this one, I think that you are right, and I can see that this is
> >> the most common practice (aka grep --oids).  But my brain also tells
> >> me that this is not completely wrong either.  Thoughts?
> >>
> >
> > I would read that aloud most comfortably using "an".  I found an article
> that seems to further support this since it both sounds like a vowel (oh)
> and is also a letter (oh).
> >
> > https://www.grammar.com/a-vs-an-when-to-use
> >
>
> What about the "-" before the "o"?
> Wouldn't it be read as "dash o" or "minus o"? This would mean "a" is
> correct, not "an", IMHO.
>

Yeah, I was treating the leading dash as being silent...the syntax dash(es)
for single and multi-character arguments seems unimportant to read aloud in
the general sense.  If one does read them then yes, "a" is correct.
Lacking any documented preference I would then just go with what is
prevalent in existing usage.

David J.


Re: Fix typos - "an" instead of "a"

2021-12-08 Thread Peter Smith
On Thu, Dec 9, 2021 at 11:12 AM Michael Paquier  wrote:
>
> On Thu, Dec 09, 2021 at 07:30:48AM +1100, Peter Smith wrote:
> > Some regex exposed a bunch of typos scattered across PG comments and docs.
> >
> > They are all of the "uses-an-instead-of-a" (or vice versa) variety.
> >
> > PSA a small patch to fix them.
>
> Good catches.
>
> -   # safe: cross compilers may not add the suffix if given an `-o'
> +   # safe: cross compilers may not add the suffix if given a `-o'
> # argument, so we may need to know it at that point already.
> On this one, I think that you are right, and I can see that this is
> the most common practice (aka grep --oids).  But my brain also tells
> me that this is not completely wrong either.  Thoughts?

Personally. I read "-o" as "dash oh" and so the "a" instead of "an"
seemed right for me.

YMMV.

(But it is not worth spending more than 30 seconds debating on this so
I really don't care whatever is decided)

--
Kind Regards,
Peter Smith
Fujitsu Australia




Re: Fix typos - "an" instead of "a"

2021-12-08 Thread Greg Nancarrow
On Thu, Dec 9, 2021 at 11:25 AM David G. Johnston
 wrote:
>
>> -   # safe: cross compilers may not add the suffix if given an `-o'
>> +   # safe: cross compilers may not add the suffix if given a `-o'
>> # argument, so we may need to know it at that point already.
>> On this one, I think that you are right, and I can see that this is
>> the most common practice (aka grep --oids).  But my brain also tells
>> me that this is not completely wrong either.  Thoughts?
>>
>
> I would read that aloud most comfortably using "an".  I found an article that 
> seems to further support this since it both sounds like a vowel (oh) and is 
> also a letter (oh).
>
> https://www.grammar.com/a-vs-an-when-to-use
>

What about the "-" before the "o"?
Wouldn't it be read as "dash o" or "minus o"? This would mean "a" is
correct, not "an", IMHO.


Regards,
Greg Nancarrow
Fujitsu Australia




Re: Fix typos - "an" instead of "a"

2021-12-08 Thread David G. Johnston
On Wed, Dec 8, 2021 at 5:12 PM Michael Paquier  wrote:

> On Thu, Dec 09, 2021 at 07:30:48AM +1100, Peter Smith wrote:
>
> -   # safe: cross compilers may not add the suffix if given an `-o'
> +   # safe: cross compilers may not add the suffix if given a `-o'
> # argument, so we may need to know it at that point already.
> On this one, I think that you are right, and I can see that this is
> the most common practice (aka grep --oids).  But my brain also tells
> me that this is not completely wrong either.  Thoughts?
>
>
I would read that aloud most comfortably using "an".  I found an article
that seems to further support this since it both sounds like a vowel (oh)
and is also a letter (oh).

https://www.grammar.com/a-vs-an-when-to-use

David J.


Re: Fix typos - "an" instead of "a"

2021-12-08 Thread Michael Paquier
On Thu, Dec 09, 2021 at 07:30:48AM +1100, Peter Smith wrote:
> Some regex exposed a bunch of typos scattered across PG comments and docs.
> 
> They are all of the "uses-an-instead-of-a" (or vice versa) variety.
>
> PSA a small patch to fix them.

Good catches.

-   # safe: cross compilers may not add the suffix if given an `-o'
+   # safe: cross compilers may not add the suffix if given a `-o'
# argument, so we may need to know it at that point already.
On this one, I think that you are right, and I can see that this is
the most common practice (aka grep --oids).  But my brain also tells
me that this is not completely wrong either.  Thoughts?
--
Michael


signature.asc
Description: PGP signature


Fix typos - "an" instead of "a"

2021-12-08 Thread Peter Smith
Hi.

Some regex exposed a bunch of typos scattered across PG comments and docs.

They are all of the "uses-an-instead-of-a" (or vice versa) variety.

PSA a small patch to fix them.

--
Kind Regards,
Peter Smith.
Fujitsu Australia


v1-0001-Fix-typos-for-an-versus-a.patch
Description: Binary data


Re: Fix typos

2021-11-29 Thread Michael Paquier
On Mon, Nov 29, 2021 at 01:01:55AM +, qianglj.f...@fujitsu.com wrote:
> I found several typos in comments and README. See patch attached.

Thanks, fixed.
--
Michael


signature.asc
Description: PGP signature


Fix typos

2021-11-29 Thread qianglj.f...@fujitsu.com
Hi,

I found several typos in comments and README. See patch attached.

Best regards,
Lingjie Qiang



0001-fix-typos.patch
Description: 0001-fix-typos.patch


Re: Fix typos in commments (3x repeated lettters)

2021-10-27 Thread Daniel Gustafsson
> On 27 Oct 2021, at 22:34, Peter Smith  wrote:
> 
> PSA a smalll patch to fix some typos (acccidental 3x repeated
> lettters) in code commments.

Applied, thanks.

--
Daniel Gustafsson   https://vmware.com/





Fix typos in commments (3x repeated lettters)

2021-10-27 Thread Peter Smith
PSA a smalll patch to fix some typos (acccidental 3x repeated
lettters) in code commments.

--
Kind Regards,
Peter Smith.
Fujitsu Australia


v1-0001-Fix-PG-comment-typos.patch
Description: Binary data


Re: Fix typos in reorderbuffer.c

2020-10-08 Thread Amit Kapila
On Thu, Oct 8, 2020 at 2:40 PM Masahiko Sawada
 wrote:
>
> On Thu, 8 Oct 2020 at 17:37, Amit Kapila  wrote:
> >
>
> > So, I feel the
> > comments should be accordingly updated.
>
> +1 for this change.
>

Thanks, I have pushed this and along with it pushed a typo-fix in logical.c.

-- 
With Regards,
Amit Kapila.




Re: Fix typos in reorderbuffer.c

2020-10-08 Thread Masahiko Sawada
On Thu, 8 Oct 2020 at 17:37, Amit Kapila  wrote:
>
> @@ -1432,7 +1432,7 @@ ReorderBufferCleanupTXN(ReorderBuffer *rb,
> ReorderBufferTXN *txn)
>   ReorderBufferCleanupTXN(rb, subtxn);
>   }
>
> - /* cleanup changes in the toplevel txn */
> + /* cleanup changes in the txn */
>   dlist_foreach_modify(iter, >changes)
>   {
>   ReorderBufferChange *change;
> @@ -1533,7 +1533,7 @@ ReorderBufferTruncateTXN(ReorderBuffer *rb,
> ReorderBufferTXN *txn)
>   ReorderBufferTruncateTXN(rb, subtxn);
>   }
>
> - /* cleanup changes in the toplevel txn */
> + /* cleanup changes in the txn */
>   dlist_foreach_modify(iter, >changes)
>   {
>   ReorderBufferChange *change;
>
> Both the above functions are recursive and will clean the changes for
> both the top-level transaction and subtransactions.

Right.

> So, I feel the
> comments should be accordingly updated.

+1 for this change.

Regards,

-- 
Masahiko Sawadahttp://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




Fix typos in reorderbuffer.c

2020-10-08 Thread Amit Kapila
@@ -1432,7 +1432,7 @@ ReorderBufferCleanupTXN(ReorderBuffer *rb,
ReorderBufferTXN *txn)
  ReorderBufferCleanupTXN(rb, subtxn);
  }

- /* cleanup changes in the toplevel txn */
+ /* cleanup changes in the txn */
  dlist_foreach_modify(iter, >changes)
  {
  ReorderBufferChange *change;
@@ -1533,7 +1533,7 @@ ReorderBufferTruncateTXN(ReorderBuffer *rb,
ReorderBufferTXN *txn)
  ReorderBufferTruncateTXN(rb, subtxn);
  }

- /* cleanup changes in the toplevel txn */
+ /* cleanup changes in the txn */
  dlist_foreach_modify(iter, >changes)
  {
  ReorderBufferChange *change;

Both the above functions are recursive and will clean the changes for
both the top-level transaction and subtransactions. So, I feel the
comments should be accordingly updated.

-- 
With Regards,
Amit Kapila.


v1-0001-Fix-typos-in-reorderbuffer.c.patch
Description: Binary data


Re: Fix typos and inconsistencies for HEAD (take 11)

2019-08-21 Thread Michael Paquier
On Tue, Aug 20, 2019 at 04:47:41PM -0400, Alvaro Herrera wrote:
> Yeah, Alexander proposed change is correct.  I just pushed it.

Thanks, Alvaro.
--
Michael


signature.asc
Description: PGP signature


Re: Fix typos and inconsistencies for HEAD (take 11)

2019-08-20 Thread Alvaro Herrera
On 2019-Aug-19, Michael Paquier wrote:

> On Mon, Aug 19, 2019 at 07:04:04AM +0300, Alexander Lakhin wrote:
> > 11.23 TupleLockUpdate -> LockTupleNoKeyExclusive
> 
> Not sure about this one, so discarded for now.  Alvaro?

Yeah, Alexander proposed change is correct.  I just pushed it.

> > 11.33 visca -> vice
> 
> This one is interesting latin.

Well, it's a regular Haasism.

-- 
Álvaro Herrerahttps://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




Re: Fix typos and inconsistencies for HEAD (take 11)

2019-08-19 Thread Michael Paquier
On Mon, Aug 19, 2019 at 04:22:44PM +0900, Michael Paquier wrote:
> On Mon, Aug 19, 2019 at 07:04:04AM +0300, Alexander Lakhin wrote:
>> 11.57 PASSBYVALUE -> PASSEDBYVALUE
> 
> Will fix this one separately and back-patch.

No need to, actually, as the error comes from 7bdc655.
--
Michael


signature.asc
Description: PGP signature


Re: Fix typos and inconsistencies for HEAD (take 11)

2019-08-19 Thread Michael Paquier
On Mon, Aug 19, 2019 at 07:04:04AM +0300, Alexander Lakhin wrote:
> 11.23 TupleLockUpdate -> LockTupleNoKeyExclusive

Not sure about this one, so discarded for now.  Alvaro?

> 11.25 typstore -> tupstore

This one is cute.  It actually does not cause a compilation failure as
tuplestore_donestoring() is a no-op.

> 11.33 visca -> vice

This one is interesting latin.

> 11.57 PASSBYVALUE -> PASSEDBYVALUE

Will fix this one separately and back-patch.
--
Michael


signature.asc
Description: PGP signature


Fix typos and inconsistencies for HEAD (take 11)

2019-08-18 Thread Alexander Lakhin
Hello hackers,

Please consider fixing the last group (for now) of typos and
inconsistencies in the tree:

11.1 peforming -> performing
11.2 table_freeze_age -> freeze_table_age
11.3 TableInfoData -> TableDataInfo
11.4 TableStatus -> PgStat_TableStatus
11.5 TAG_VALID -> BM_TAG_VALID
11.6 TarDirectoryMethod -> WalTarMethod
11.7 targetss -> targets
11.8 tarReadRaw -> _tarReadRaw
11.9 Tcl_SetVar2 -> Tcl_SetVar2Ex
11.10 tcvn_to_utf8, utf8_to_tcvn -> windows_1258_to_utf8,
utf8_to_windows_1258
11.11 test_rls_hook_permissive, test_rls_hook_restrictive ->
test_rls_hooks_permissive, test_rls_hooks_restrictive
11.12 test_thread_funcs.c -> thread_test.c
11.13 threated -> treated
11.14 TidNode -> TidScan
11.15 tidPtr -> tss_TidPtr
11.16 TimestampTZ -> TimestampTz
11.17 TM_ZONE -> tm_zone
11.18 TOAST_DEBUG -> remove (orphaned since the introduction in 57d8080a)
11.19 TopTransactionState -> TopTransactionStateData
11.20 tpe -> type
11.21 tranasctions -> transactions
11.22 TransactionOid -> TransactionId
11.23 TupleLockUpdate -> LockTupleNoKeyExclusive
11.24 TUPLES_OK -> PGRES_TUPLES_OK
11.25 typstore -> tupstore
11.26 uniquePairs -> hstoreUniquePairs
11.27 upperIndex -> upperIndx
11.28 USER_NAME_SIZE -> remove (not used since the introduction in
c2e9b2f28)
11.29 VacLimit -> xidVacLimit
11.30 verfies -> verifies
11.31 verifymbstr -> pg_verifymbstr
11.32 VfdArray -> VfdCache
11.33 visca -> vice
11.34 v_spl_left, v_spl_right -> v-spl_left, v-spl_right
11.35 WaitforMultipleObjects -> WaitForMultipleObjects
11.36 walrcv_query -> walrcv_exec
11.37 max wal_size_mb -> max_wal_size_mb
11.38 WalWriteDelay -> WalWriterDelay
11.39 whichChkpti -> whichChkpt
11.40 win32_crashdump.c -> crashdump.c
11.41 worker_i -> worker_num
11.42 WorkingDirectorY -> WorkingDirectory
11.43 XactLockTableWaitErrorContextCb -> XactLockTableWaitErrorCb
11.44 xlblock -> xlblocks
11.45 xl_multi_insert -> xl_multi_insert_tuple
11.46 xlog_brin_update -> xl_brin_insert
11.47 XLogFakeRelcacheEntry -> CreateFakeRelcacheEntry
11.48 XLOGFileSlop -> XLOGfileslop
11.49 XLogreader -> XLogReader
11.50 XLogReadPage -> XLogRead
11.51 xl_rem_len -> xlp_rem_len
11.52 XMAX_EXCL_LOCK, XMAX_KEYSHR_LOCK -> HEAP_XMAX_EXCL_LOCK,
HEAP_XMAX_KEYSHR_LOCK
11.53 yyscanner_t -> yyscan_t
11.54 cdir -> cidr
11.55 examine_operator_expression -> examine_opclause_expression
11.56 list_qsort_comparator -> list_sort_comparator (renamed in 569ed7f4)
11.57 PASSBYVALUE -> PASSEDBYVALUE

Best regards,
Alexander
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index f1d1005ae2..a7abf8c2ee 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -2875,7 +2875,7 @@
   
 
   
-   tcvn_to_utf8
+   windows_1258_to_utf8
WIN1258
UTF8
   
@@ -3037,7 +3037,7 @@
   
 
   
-   utf8_to_tcvn
+   utf8_to_windows_1258
UTF8
WIN1258
   
diff --git a/src/backend/access/nbtree/nbtsplitloc.c b/src/backend/access/nbtree/nbtsplitloc.c
index a7882fd874..c83016af71 100644
--- a/src/backend/access/nbtree/nbtsplitloc.c
+++ b/src/backend/access/nbtree/nbtsplitloc.c
@@ -814,7 +814,7 @@ _bt_bestsplitloc(FindSplitData *state, int perfectpenalty,
 		final->firstoldonright < state->newitemoff + MAX_LEAF_INTERVAL)
 	{
 		/*
-		 * Avoid the problem by peforming a 50:50 split when the new item is
+		 * Avoid the problem by performing a 50:50 split when the new item is
 		 * just to the right of the would-be "many duplicates" split point.
 		 */
 		final = >splits[0];
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index 7d6c50b49d..e154507ecd 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -863,7 +863,7 @@ get_all_vacuum_rels(int options)
  *	 DEAD or RECENTLY_DEAD (see HeapTupleSatisfiesVacuum).
  * - freezeLimit is the Xid below which all Xids are replaced by
  *	 FrozenTransactionId during vacuum.
- * - xidFullScanLimit (computed from table_freeze_age parameter)
+ * - xidFullScanLimit (computed from freeze_table_age parameter)
  *	 represents a minimum Xid value; a table whose relfrozenxid is older than
  *	 this will have a full-table vacuum applied to it, to freeze tuples across
  *	 the whole table.  Vacuuming a table younger than this value can use a
diff --git a/src/backend/executor/execExpr.c b/src/backend/executor/execExpr.c
index 58e2432aac..20ee1d3fb4 100644
--- a/src/backend/executor/execExpr.c
+++ b/src/backend/executor/execExpr.c
@@ -1776,7 +1776,7 @@ ExecInitExprRec(Expr *node, ExprState *state,
 scratch.d.rowcompare_final.rctype = rcexpr->rctype;
 ExprEvalPushStep(state, );
 
-/* adjust jump targetss */
+/* adjust jump targets */
 foreach(lc, adjust_jumps)
 {
 	ExprEvalStep *as = >steps[lfirst_int(lc)];
diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c
index 2bb14cdd02..d362e7f7d7 100644
--- a/src/backend/postmaster/pgstat.c
+++ b/src/backend/postmaster/pgstat.c
@@ -893,7 +893,7 @@ 

Re: Fix typos and inconsistencies for HEAD (take 10)

2019-08-12 Thread Michael Paquier
On Sun, Aug 11, 2019 at 11:00:00AM +0300, Alexander Lakhin wrote:
> 10.44. serendipitiously -> serendipitously

I didn't know that this even was a word:
https://www.thefreedictionary.com/serendipitously
But it seems to come from Horace Walpole.

> 10.50. sigsetmask -> pgsigsetmask

It should be pqsigsetmask.

> 10.81. SUE -> ShareUpdateExclusive

Your new comment had a typo here.

Please note that I have discarded the portion about the isolation
tests for now.  I need to have a second look at that part, and there
were already a lot of changes to review.
--
Michael


signature.asc
Description: PGP signature


Re: Fix typos and inconsistencies for HEAD (take 10)

2019-08-11 Thread Alexander Lakhin
Hello hackers,

Please consider fixing the next heap of typos and inconsistencies in the
tree:

10.1. query_txt -> query text
10.2. quote_object_names -> quote_object_name
10.3. ragetypes_typanalyze.c -> rangetypes_typanalyze.c
10.4. RAISE_EXCEPTION -> ERRCODE_RAISE_EXCEPTION
10.5. rb_lower -> remove (orphaned since introduction in f0e44751)
10.6. rd_newRelfilenode -> rd_newRelfilenodeSubid
10.7. readfs -> readfds
10.8. readInt -> ReadInt
10.9. recoder, dst -> record, page
10.10. recync -> resync
10.11. RedoRecptr -> RedoRecPtr
10.12. referenting -> referencing
10.13. REG_PEND -> remove (orphaned since 7bcc6d98)
10.14. regreesion -> regression
10.15. REG_STARTEND -> remove (not used since the introduction in 985acb8e)
10.16. RelationGetOidIndex -> remove a comment (irrelevant since 578b2297)
10.17. relcheck -> relchecks
10.18. releasebuf -> unlockbuf
10.19. releaseOk -> RELEASE_OK flag
10.20. relevants -> relevant
10.21. relfile -> file
10.22. RelID -> Relation ID
10.23. ReplicationSlotShmemInit -> ReplicationSlotsShmemInit
10.24. res_items -> res_nitems
10.25. restablish -> reestablish
10.26. REWRITE_H -> PRS2LOCK_H
10.27. rfmt.c -> remove (as irrelevant)
10.28. rmbuf -> buf
10.29. RunningXacts -> RunningTransactionsData (and remove a nearby
comment) (orphaned since 8431e296)
10.30. rvsToCluster -> RelToCluster
10.31. s1_delete -> remove (not used since the introduction in 8b21b416)
10.32. s1_reindex, s1_vacuum, s3_vacuum -> remove (not used since the
introduction in 9c2f0a6c)
10.33. s1reset -> s1restart
10.34. s1setval -> remove (not used since the introduction in 3d79013b)
10.35. s2_alter_tbl1_text, s2_alter_tbl1_add_int,
s2_alter_tbl1_add_float, s2_alter_tbl1_add_char,
s2_alter_tbl1_add_boolean, s2_alter_tbl1_add_text, 
s2_alter_tbl2_add_boolean -> remove (not used since the introduction in
b89e1510)
10.36. saop_leftop -> leftop
10.37. ScalarArrayOps -> ScalarArrayOpExprs
10.38. seekPos -> remove (orphaned since c24dcd0c)
10.39. segv -> SIGSEGV
10.40. semphores -> semaphores
10.41. sepgsql_audit_hook -> remove (and remove a comment) (not present
since the introduction in 968bc6fa)
10.42. seqNo -> commitSeqNo
10.43. seqtable -> seqhashtab
10.44. serendipitiously -> serendipitously
10.45. serializefn, deserializefn -> serialfn, deserialfn
10.46. setstmt -> altersysstmt
10.47. serv, servlen, host, hostlen -> service, servicelen, node, nodelen
10.48. server_version_int -> server_version_num
10.49. session_timestamp -> session_timezone
10.50. sigsetmask -> pgsigsetmask
10.51. SimpleLRU -> SimpleLru
10.52. SIXBIT -> PGSIXBIT
10.53. SizeOfHashCreateIdx, xl_hash_createidx -> remove (not used since
the introduction in c11453ce)
10.54. SizeOfXlogRecord -> SizeOfXLogRecord
10.55. sk_flag -> sk_flags
10.56. SLAB_CHUNKHDRSZ -> sizeof(SlabChunk) (orphaned after 7e3aa03b)
10.57. SlotAcquire -> ReplicationSlotAcquire
10.58. SM_DATABASE_USER -> remove (with a wrong nearby comment)
(orphaned since cb7fb3ca)
10.59. smgrscheduleunlink -> RelationDropStorage (orphaned since 33960006)
10.60. SnapBuildProcessRecord -> SnapBuildProcessRunningXacts
10.61. snapshotname -> snapshot_id
10.62. snap_state -> fctx
10.63. SO_EXLUSIVEADDRUSE -> SO_EXCLUSIVEADDRUSE
10.64. sortTuple -> SortTuple
10.65. sourcexid -> sourcevxid
10.66. spcpath -> spclocation
10.67. SPI_plan -> _SPI_plan
10.68. SPI_stack -> _SPI_stack
10.69. splited -> splitted
10.70. sqlcabc -> sqlabc
10.71. standbydef.h -> standbydefs.h
10.72. _StaticAssert -> _Static_assert
10.73. StdRdOption -> StdRdOptions
10.74. StringSortSupport -> VarStringSortSupport
10.75. STrNCpy -> StrNCpy
10.76. stxid -> relid
10.77. subtransactiony -> subtransaction
10.78. subtransations -> subtransactions
10.79. SubtransSetParent -> SubTransSetParent
10.80. succeeeded -> succeeded
10.81. SUE -> ShareUpdateExclusive
10.82. SYMENC_MDC -> SYMENCRYPTED_DATA_MDC
10.83. SYMENCRYPTED_MDC -> SYMENCRYPTED_DATA_MDC
10.84. symkey -> sym_key
10.85. synchroniation -> synchronization
10.86. system_id -> system_identifier
10.87. sysdate -> now()
10.88. SYSTEM_RESEED_* -> remove (orphaned since fe0a0b59)
10.89. http://www.cs.auckland.ac.nz/software/AlgAnim/niemann/s_man.htm
-> https://www.epaperpress.com/sortsearch/
10.90. www.pgbuildfarm.org -> buildfarm.postgresql.org
10.91. oft -> of
10.92. It the username successfully retrieved (fix_for_fix_8.15)

Best regards,
Alexander

diff --git a/contrib/ltree/ltxtquery_io.c b/contrib/ltree/ltxtquery_io.c
index b576676746..054c5d9335 100644
--- a/contrib/ltree/ltxtquery_io.c
+++ b/contrib/ltree/ltxtquery_io.c
@@ -166,7 +166,7 @@ pushquery(QPRS_STATE *state, int32 type, int32 val, int32 distance, int32 lenval
 }
 
 /*
- * This function is used for query_txt parsing
+ * This function is used for query text parsing
  */
 static void
 pushval_asis(QPRS_STATE *state, int type, char *strval, int lenval, uint16 flag)
diff --git a/contrib/pgcrypto/pgp.h b/contrib/pgcrypto/pgp.h
index 7c97fa398f..f338523b7a 100644
--- a/contrib/pgcrypto/pgp.h
+++ b/contrib/pgcrypto/pgp.h
@@ 

Re: Fix typos and inconsistencies for HEAD (take 9)

2019-08-05 Thread Alexander Lakhin
05.08.2019 8:40, Michael Paquier wrote:
> On Mon, Aug 05, 2019 at 06:44:46AM +0300, Alexander Lakhin wrote:
>> I believe that all the fixes in doc/ should be back-patched too. If it's
>> not too late, I can produce such patches for the nearest releases.
> I think that's unfortunately a bit too late for this release.  Those
> things have been around for years, so three months to make them appear
> on the website is not a big deal IMO.  If you have something which
> could be used as a base for back-branches with the most obvious typos,
> that would be welcome (if you could group everything into a single
> patch file, that would be even better...).
OK, I will make the desired patches for all the supported branches upon
reaching the end of my unique journey.

Best regards,
Alexander




Re: Fix typos and inconsistencies for HEAD (take 9)

2019-08-04 Thread Michael Paquier
On Mon, Aug 05, 2019 at 06:44:46AM +0300, Alexander Lakhin wrote:
> I believe that all the fixes in doc/ should be back-patched too. If it's
> not too late, I can produce such patches for the nearest releases.

I think that's unfortunately a bit too late for this release.  Those
things have been around for years, so three months to make them appear
on the website is not a big deal IMO.  If you have something which
could be used as a base for back-branches with the most obvious typos,
that would be welcome (if you could group everything into a single
patch file, that would be even better...).
--
Michael


signature.asc
Description: PGP signature


Re: Fix typos and inconsistencies for HEAD (take 9)

2019-08-04 Thread Michael Paquier
On Mon, Aug 05, 2019 at 12:15:21PM +0900, Michael Paquier wrote:
> On Mon, Aug 05, 2019 at 12:33:34AM +0300, Alexander Lakhin wrote:
>> 9.41. OWNER_TO -> OWNER TO
> 
> This one needs a back-patch.  I'll fix that separately.

Done separately as of 05ba837, and back-patched down to 9.6 as this
has been introduced by d37b816.
--
Michael


signature.asc
Description: PGP signature


Re: Fix typos and inconsistencies for HEAD (take 9)

2019-08-04 Thread Alexander Lakhin
Hello Michael,

05.08.2019 6:15, Michael Paquier wrote:
>> 9.41. OWNER_TO -> OWNER TO
> This one needs a back-patch.  I'll fix that separately.
>
I believe that all the fixes in doc/ should be back-patched too. If it's
not too late, I can produce such patches for the nearest releases.
>> 9.75. Point-in-Time -> Point-In-Time
> Why?  The original looks correct to me.
acronyms.sgml contains such spelling:
    PITR
    
 
  Point-In-Time
  Recovery (Continuous Archiving)
 
>> Also, please fix my typo (from the previous set), that was somehow
>> silted through a double check.
> Which one is that, please?  It is likely possible that some obvious
> stuff has been forgotten.
"It the username successfully retrieved,..." (fix_for_fix_8.15.patch)
> Committed a large bunch of this stuff.  Please note that the
> indentation was incorrect in a couple of places, including the change
> in src/tools/msvc/.
Thank you. I will check my Tab settings next time.

Best regards,
Alexander
diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c
index 5fb1f1b7d7..3713dd2884 100644
--- a/src/backend/libpq/auth.c
+++ b/src/backend/libpq/auth.c
@@ -1797,7 +1797,7 @@ interpret_ident_response(const char *ident_response,
 /*
  *	Talk to the ident server on "remote_addr" and find out who
  *	owns the tcp connection to "local_addr"
- *	It the username successfully retrieved, check the usermap.
+ *	If the username successfully retrieved, check the usermap.
  *
  *	XXX: Using WaitLatchOrSocket() and doing a CHECK_FOR_INTERRUPTS() if the
  *	latch was set would improve the responsiveness to timeouts/cancellations.


Re: Fix typos and inconsistencies for HEAD (take 9)

2019-08-04 Thread Michael Paquier
On Mon, Aug 05, 2019 at 12:33:34AM +0300, Alexander Lakhin wrote:
> 9.1. NAMESPACE_SQLXML -> remove (not used since the introduction in
> 355e05ab)

Looks important to keep as a matter of documentation.

> 9.12. not_point -> is_point (a contradiction with the check and a
> comment, appeared in 4c1383ef)

That would mean a breakage for anybody relying on it, so I would not
change that.

> 9.17. ntzones, zp -> zonecount, zpfirst

Nope, this is upstream code.

> 9.41. OWNER_TO -> OWNER TO

This one needs a back-patch.  I'll fix that separately.

> 9.43. PageClearPrunable -> remove (not used since 6f10eb21)

Better to keep it.  Some extensions may rely on it, and it costs
nothing to keep around.

> 9.75. Point-in-Time -> Point-In-Time

Why?  The original looks correct to me.

> 9.76. PO_FILES, ALL_PO_FILES -> remove (orphaned since 4e1c7207, 5dd41f35)

I am wondering if there are external things relying on that.  So I
have let them.

> 9.88. PRETTY_SCHEMA -> remove (not used since the introduction in 3d2aed66)

This should be kept for consistent IMO.  Even if not used yet, it
could be used for future patches.

> 9.94. px_hmac_block_size, px_hmac_reset -> remove (not used since the
> introduction in df24cb73)

Hm.  I think that it makes sense to keep them for consistency with the
other structures and callback reference lookups, and these macros may
prove to be useful for future patches.

> Also, please fix my typo (from the previous set), that was somehow
> silted through a double check.

Which one is that, please?  It is likely possible that some obvious
stuff has been forgotten.

Committed a large bunch of this stuff.  Please note that the
indentation was incorrect in a couple of places, including the change
in src/tools/msvc/.
--
Michael


signature.asc
Description: PGP signature


Fix typos and inconsistencies for HEAD (take 9)

2019-08-04 Thread Alexander Lakhin
Hello hackers,

Please consider fixing the next truss of typos and inconsistencies in
the tree:

9.1. NAMESPACE_SQLXML -> remove (not used since the introduction in
355e05ab)
9.2. NBXLOG_H -> NBTXLOG_H
9.3. NEWPAGE -> XLOG_FPI (orphaned since 54685338)
9.4. newXlogId, newXlogSeg -> newXlogSegNo (orphaned since dfda6eba)
9.5. nextblno -> nextblkno
9.6. noCatalogs -> arg
9.7. nodeWindowFunc.c -> nodeWindowAgg.c
9.8. NOINHERITS -> NOINHERIT
9.9. NO_RESPONSE -> PQPING_NO_RESPONSE
9.10. Normalizationdata.txt- > NormalizationTest.txt
9.11. NOT_AVAIL -> LOCKACQUIRE_NOT_AVAIL
9.12. not_point -> is_point (a contradiction with the check and a
comment, appeared in 4c1383ef)
9.13. nptrs, ptrs -> nipd, ipd
9.14. nbuffers, nrdatas -> max_block_id, ndatas
9.15. nrow -> nrows
9.16. nsubxcnt -> subxcnt
9.17. ntzones, zp -> zonecount, zpfirst
9.18. nvmblocks -> vm_nblocks
9.19. objAddress -> objAddr
9.20. ObjectWithArg -> ObjectWithArgs
9.21. objOid, relOid -> objectId, classId, subId
9.22. ObjType -> ObjectType
9.23. OffsetNumberMask -> remove (not used since PG95-1_01)
9.24. oid_in_function -> remove (orphaned since 578b2297)
9.25. oidzero, oidge -> remove (not used since the introduction in 8dc42a3a)
9.26. oidle -> remove (orphaned since 9f0ae0c8)
9.27. oideq -> remove (orphaned since 005a1217)
9.28. OldestMemberMXactID -> OldestMemberMXactId
9.29. oldestXidDb -> oldestXactDb
9.30. oldest-Xmin -> oldestXmin
9.31. old_key_tup -> old_key_tuple
9.32. on_dsm_callback -> on_dsm_detach callback
9.33. ONE_PAGE -> TBM_ONE_PAGE
9.34. opt_boolean -> opt_boolean_or_string (renamed in 5c84fe46)
9.35. OptimizableStmt -> PreparableStmt (orphaned since aa83bc04)
9.36. optType -> remove (not used since the introduction in 500b62b0)
9.37. organizationUnitName -> organizationalUnitName (see
https://github.com/openssl/openssl/issues/1843)
9.38. origTupDesc -> origTupdesc
9.39. outputvariables -> output variables
9.40. ovflpgs -> ovflpages
9.41. OWNER_TO -> OWNER TO
9.42. PackedPostingList -> GinPostingList (an inconsistency since 36a35c55)
9.43. PageClearPrunable -> remove (not used since 6f10eb21)
9.44. pageLSN -> curPageLSN
9.45. paramListInfo -> ParamListInfo
9.46. PARSER_FUNC_H -> PARSE_FUNC_H
9.47. parse_hba -> parse_hba_line (renamed in 98723810)
9.48. parse_json -> pg_parse_json
9.49. pathkeys_contain_in -> pathkeys_contained_in
9.50. pattern1 -> pattern
9.51. patters -> patterns
9.52. PerAggData -> WindowStatePerAggData
9.53. PerFuncData -> WindowStatePerFuncData
9.54. pgaddtup -> this function
9.55. pg_atomic_test_and_set_flag -> pg_atomic_test_set_flag
9.56. pg_binary_read_file -> pg_read_binary_file
9.57. pgcommonfiles -> remove (orphaned since a7301839)
9.58. pgcontrolvalue, xlrecvalue -> oldvalue, newvalue
9.59. pg_dlsym -> dlsym (orphaned since 842cb9fa)
9.60. pg_encconv_tbl -> pg_enc2name_tbl (orphaned since eb335a03)
9.61. PGgetline -> PQgetline
9.62. pghackers -> pgsql-hackers
9.63. _pg_keysequal -> remove (not used since d26e1eba)
9.64. pg_language_metadata -> pg_largeobject_metadata
9.65. pgp_armor -> pg_armor
9.66. PGresTuple -> PGresult tuple
9.67. pgstat_recv_resetshared -> pgstat_recv_resetsharedcounter
9.68. pgtypes_date_months_short -> months (abbreviations)
9.69. PgXact -> MyPgXact
9.70. PlaceholderVars -> PlaceHolderVars
9.71. placeToPage -> beginPlaceToPage
9.72. PLpgSQL_dynfors -> PLpgSQL_stmt_dynfors
9.73. plpgsql_init -> _PG_init (orphaned since b09bfcaa)
9.74. PLy_munge_source -> PLy_procedure_munge_source
9.75. Point-in-Time -> Point-In-Time
9.76. PO_FILES, ALL_PO_FILES -> remove (orphaned since 4e1c7207, 5dd41f35)
9.77. pop_size -> pool_size
9.78. posid -> ip_posid, blkid -> ip_blkid
9.79. pq_close, pq_comm_reset -> socket_close, socket_comm_reset
(renamed in 2bd9e412)
9.80. pqcomprim.c -> pqformat.c (orphaned since 95cc41b)
9.81. PQescapeByte()a -> PQescapeBytea()
9.82. PQSetenv -> pqSetenv
9.83. PreCommit_CheckForSerializableConflicts ->
PreCommit_CheckForSerializationFailure
9.84. PREFER -> remove (not used since the introduction in 7bcc6d98)
9.85. prepared_transactions -> prepared-transactions
9.86. pressurel -> pressure
9.87. prettyprint -> pretty-print
9.88. PRETTY_SCHEMA -> remove (not used since the introduction in 3d2aed66)
9.89. printAttName, terseOutput, width -> PrintAttNames, TerseOutput,
colWidth
9.90. priorWALFileName -> remove (not used since the introduction in
51be14e9)
9.91. PROC_H -> _PROC_H_
9.92. ProcLWLockTranche -> remove (orphaned since 3761fe3c and
non-informational)
9.93. PUTBYTE -> remove (not used since the introduction in 0c0dde61)
9.94. px_hmac_block_size, px_hmac_reset -> remove (not used since the
introduction in df24cb73)
9.95. PX_MAX_NAMELEN -> remove (not used since 3cc86612)

Also, please fix my typo (from the previous set), that was somehow
silted through a double check.

Best regards,
Alexander

diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c
index 5fb1f1b7d7..3713dd2884 100644
--- a/src/backend/libpq/auth.c
+++ b/src/backend/libpq/auth.c
@@ -1797,7 

Re: Fix typos

2019-08-02 Thread Sehrope Sarkuni
On Fri, Aug 2, 2019 at 12:11 AM Michael Paquier  wrote:

> On Thu, Aug 01, 2019 at 11:01:59PM -0400, Alvaro Herrera wrote:
> > I think slight variations don't really detract from the value of the
> > product, and consider the odd variation a reminder of the diversity of
> > the project.  I don't suggest that we purposefully introduce spelling
> > variations, or that we refrain from fixing ones that appear in code
> > we're changing, but I don't see the point in changing a line for the
> > sole reason of standardising the spelling of a word.
>
> Agreed.  This always reminds me of ANALYZE vs. ANALYSE where we don't
> actually document the latter :)
>

I didn't know about that. That's a fun one!

>
> > That said, I'm not a native English speaker.
>
> Neither am I.
>

I am. Consistency is nice but either reads fine to me. Only brought it up
as I didn't see many other usages so seemed out of place.

Regards,
-- Sehrope Sarkuni
Founder & CEO | JackDB, Inc. | https://www.jackdb.com/


Re: Fix typos

2019-08-02 Thread Sehrope Sarkuni
On Thu, Aug 1, 2019 at 10:18 PM Tom Lane  wrote:

> It's British vs. American spelling.  For the most part, Postgres
> follows American spelling, but there's the odd Briticism here and
> there.


Thanks for the explanation. I thought that might be the case but didn't
find any other usages of "serialise" so was not sure.


>   I'm not sure whether it's worth trying to standardize.
> I think the most recent opinion on this was Munro's:
>
>
> https://www.postgresql.org/message-id/ca+hukgjz-pdmgwxroiwvn-aeg4-ajdwj3gwdqkosa8g65sp...@mail.gmail.com


Either reads fine to me and the best rationale I can think of for going
with one spelling is to not have the same "fix" come up again.

If there is a desire to change this, attached is updated to include one
more instance of "materialise" and a change to the commit message to match
some similar ones I found in the past.

Regards,
-- Sehrope Sarkuni
Founder & CEO | JackDB, Inc. | https://www.jackdb.com/
From 20c018b9350cb17e87930cebb66b715bc4b9fcf4 Mon Sep 17 00:00:00 2001
From: Sehrope Sarkuni 
Date: Fri, 2 Aug 2019 05:58:35 -0400
Subject: [PATCH] Use American spelling for "serialize" and "materalize"

---
 contrib/pgstattuple/pgstatapprox.c  | 2 +-
 contrib/xml2/xpath.c| 2 +-
 src/backend/access/transam/README   | 4 ++--
 src/backend/storage/buffer/bufmgr.c | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/contrib/pgstattuple/pgstatapprox.c b/contrib/pgstattuple/pgstatapprox.c
index 636c8d40ac..83b3270554 100644
--- a/contrib/pgstattuple/pgstatapprox.c
+++ b/contrib/pgstattuple/pgstatapprox.c
@@ -278,7 +278,7 @@ pgstattuple_approx_internal(Oid relid, FunctionCallInfo fcinfo)
  errmsg("cannot access temporary tables of other sessions")));
 
 	/*
-	 * We support only ordinary relations and materialised views, because we
+	 * We support only ordinary relations and materialized views, because we
 	 * depend on the visibility map and free space map for our estimates about
 	 * unscanned pages.
 	 */
diff --git a/contrib/xml2/xpath.c b/contrib/xml2/xpath.c
index 1e5b71d9a0..11749b6c47 100644
--- a/contrib/xml2/xpath.c
+++ b/contrib/xml2/xpath.c
@@ -573,7 +573,7 @@ xpath_table(PG_FUNCTION_ARGS)
  errmsg("xpath_table must be called as a table function")));
 
 	/*
-	 * We want to materialise because it means that we don't have to carry
+	 * We want to materialize because it means that we don't have to carry
 	 * libxml2 parser state between invocations of this function
 	 */
 	if (!(rsinfo->allowedModes & SFRM_Materialize))
diff --git a/src/backend/access/transam/README b/src/backend/access/transam/README
index ad4083eb6b..49b6809c82 100644
--- a/src/backend/access/transam/README
+++ b/src/backend/access/transam/README
@@ -609,8 +609,8 @@ or more buffer locks be held concurrently, you must lock the pages in
 appropriate order, and not release the locks until all the changes are done.
 
 Note that we must only use PageSetLSN/PageGetLSN() when we know the action
-is serialised. Only Startup process may modify data blocks during recovery,
-so Startup process may execute PageGetLSN() without fear of serialisation
+is serialized. Only Startup process may modify data blocks during recovery,
+so Startup process may execute PageGetLSN() without fear of serialization
 problems. All other processes must only call PageSet/GetLSN when holding
 either an exclusive buffer lock or a shared lock plus buffer header lock,
 or be writing the data block directly rather than through shared buffers
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index 6f3a402854..3d9e0a3488 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -3519,7 +3519,7 @@ MarkBufferDirtyHint(Buffer buffer, bool buffer_std)
 			/*
 			 * Set the page LSN if we wrote a backup block. We aren't supposed
 			 * to set this when only holding a share lock but as long as we
-			 * serialise it somehow we're OK. We choose to set LSN while
+			 * serialize it somehow we're OK. We choose to set LSN while
 			 * holding the buffer header lock, which causes any reader of an
 			 * LSN who holds only a share lock to also obtain a buffer header
 			 * lock before using PageGetLSN(), which is enforced in
-- 
2.17.1



Re: Fix typos

2019-08-01 Thread Michael Paquier
On Thu, Aug 01, 2019 at 11:01:59PM -0400, Alvaro Herrera wrote:
> I think slight variations don't really detract from the value of the
> product, and consider the odd variation a reminder of the diversity of
> the project.  I don't suggest that we purposefully introduce spelling
> variations, or that we refrain from fixing ones that appear in code
> we're changing, but I don't see the point in changing a line for the
> sole reason of standardising the spelling of a word.

Agreed.  This always reminds me of ANALYZE vs. ANALYSE where we don't
actually document the latter :)

> That said, I'm not a native English speaker.

Neither am I.
--
Michael


signature.asc
Description: PGP signature


Re: Fix typos

2019-08-01 Thread Alvaro Herrera
On 2019-Aug-01, Tom Lane wrote:

> It's British vs. American spelling.  For the most part, Postgres
> follows American spelling, but there's the odd Briticism here and
> there.  I'm not sure whether it's worth trying to standardize.
> I think the most recent opinion on this was Munro's:
> 
> https://www.postgresql.org/message-id/ca+hukgjz-pdmgwxroiwvn-aeg4-ajdwj3gwdqkosa8g65sp...@mail.gmail.com

I think slight variations don't really detract from the value of the
product, and consider the odd variation a reminder of the diversity of
the project.  I don't suggest that we purposefully introduce spelling
variations, or that we refrain from fixing ones that appear in code
we're changing, but I don't see the point in changing a line for the
sole reason of standardising the spelling of a word.

That said, I'm not a native English speaker.

-- 
Álvaro Herrerahttps://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




Re: Fix typos

2019-08-01 Thread Tom Lane
Michael Paquier  writes:
> On Thu, Aug 01, 2019 at 08:24:17AM -0400, Sehrope Sarkuni wrote:
>> Attached fixes some typos for "serialise" => "serialize" and "materialise"
>> => "materialize".

> These don't seem to be typos:
> https://en.wiktionary.org/wiki/materialise
> https://en.wiktionary.org/wiki/serialise

It's British vs. American spelling.  For the most part, Postgres
follows American spelling, but there's the odd Briticism here and
there.  I'm not sure whether it's worth trying to standardize.
I think the most recent opinion on this was Munro's:

https://www.postgresql.org/message-id/ca+hukgjz-pdmgwxroiwvn-aeg4-ajdwj3gwdqkosa8g65sp...@mail.gmail.com

regards, tom lane




Re: Fix typos

2019-08-01 Thread Michael Paquier
On Thu, Aug 01, 2019 at 08:24:17AM -0400, Sehrope Sarkuni wrote:
> Attached fixes some typos for "serialise" => "serialize" and "materialise"
> => "materialize".

These don't seem to be typos:
https://en.wiktionary.org/wiki/materialise
https://en.wiktionary.org/wiki/serialise
--
Michael


signature.asc
Description: PGP signature


Fix typos

2019-08-01 Thread Sehrope Sarkuni
Hi,

Attached fixes some typos for "serialise" => "serialize" and "materialise"
=> "materialize".

Regards,
-- Sehrope Sarkuni
Founder & CEO | JackDB, Inc. | https://www.jackdb.com/
From 30d34d082120ac2c041a4ad45e9d6e31b0ea9c9d Mon Sep 17 00:00:00 2001
From: Sehrope Sarkuni 
Date: Thu, 1 Aug 2019 08:00:23 -0400
Subject: [PATCH] Fix typos

---
 contrib/xml2/xpath.c| 2 +-
 src/backend/access/transam/README   | 4 ++--
 src/backend/storage/buffer/bufmgr.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/contrib/xml2/xpath.c b/contrib/xml2/xpath.c
index 1e5b71d9a0..11749b6c47 100644
--- a/contrib/xml2/xpath.c
+++ b/contrib/xml2/xpath.c
@@ -573,7 +573,7 @@ xpath_table(PG_FUNCTION_ARGS)
  errmsg("xpath_table must be called as a table function")));
 
 	/*
-	 * We want to materialise because it means that we don't have to carry
+	 * We want to materialize because it means that we don't have to carry
 	 * libxml2 parser state between invocations of this function
 	 */
 	if (!(rsinfo->allowedModes & SFRM_Materialize))
diff --git a/src/backend/access/transam/README b/src/backend/access/transam/README
index ad4083eb6b..49b6809c82 100644
--- a/src/backend/access/transam/README
+++ b/src/backend/access/transam/README
@@ -609,8 +609,8 @@ or more buffer locks be held concurrently, you must lock the pages in
 appropriate order, and not release the locks until all the changes are done.
 
 Note that we must only use PageSetLSN/PageGetLSN() when we know the action
-is serialised. Only Startup process may modify data blocks during recovery,
-so Startup process may execute PageGetLSN() without fear of serialisation
+is serialized. Only Startup process may modify data blocks during recovery,
+so Startup process may execute PageGetLSN() without fear of serialization
 problems. All other processes must only call PageSet/GetLSN when holding
 either an exclusive buffer lock or a shared lock plus buffer header lock,
 or be writing the data block directly rather than through shared buffers
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index 6f3a402854..3d9e0a3488 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -3519,7 +3519,7 @@ MarkBufferDirtyHint(Buffer buffer, bool buffer_std)
 			/*
 			 * Set the page LSN if we wrote a backup block. We aren't supposed
 			 * to set this when only holding a share lock but as long as we
-			 * serialise it somehow we're OK. We choose to set LSN while
+			 * serialize it somehow we're OK. We choose to set LSN while
 			 * holding the buffer header lock, which causes any reader of an
 			 * LSN who holds only a share lock to also obtain a buffer header
 			 * lock before using PageGetLSN(), which is enforced in
-- 
2.17.1



Re: Fix typos and inconsistencies for HEAD (take 8)

2019-07-28 Thread Michael Paquier
On Sun, Jul 28, 2019 at 07:44:44AM +0300, Alexander Lakhin wrote:
> 8.3. lag_with_offset_and_default, * ->
> window_lag_with_offset_and_default, window_* (in windowfuncs.c)

The intention here is to refer to the SQL-visible names.

> In passing, I found a legacy script, FAQ2txt, that should be deleted as
> unusable.

Right.  This got forgotten with the cleanup from f3f45c87 and
bf4497cc.

Applied.  Thanks, as usual.
--
Michael


signature.asc
Description: PGP signature


Fix typos and inconsistencies for HEAD (take 8)

2019-07-27 Thread Alexander Lakhin
Hello hackers,

Please consider fixing the next set of typos and inconsistencies in the
tree:
8.1. LABORT -> LIKE_ABORT
8.2. LagTrackerWriter -> LagTrackerWrite
8.3. lag_with_offset_and_default, * ->
window_lag_with_offset_and_default, window_* (in windowfuncs.c)
8.4. language-name -> language_name
8.5. lastOverflowedXID -> lastOverflowedXid
8.6. last_processed -> last_processing
8.7. last-query -> last_query
8.8. lastsysoid -> datlastsysoid
8.9. lastUsedPage -> lastUsedPages
8.10. lbv -> lbsv
8.11. leafSegment -> leafSegmentInfo
8.12. LibraryName/SymbolName -> remove (orphaned after f9143d10)
8.13. licence -> license
8.14. LINE_ALLOC -> remove (orphaned since 12ee6ec7)
8.15. local_ip_addr, local_port_addr -> remove and update a comment
(orphaned since b4cea00a)
8.16. local_passwd.c -> update a comment (see
http://cvsweb.netbsd.org/bsdweb.cgi/src/usr.bin/passwd/local_passwd.c.diff?r1=1.19=1.20
)
8.17. localTransactionid -> localTransactionId
8.18. LocalTransactionID -> localTransactionId
8.19. LOCKDEF_H_ -> LOCKDEFS_H_
8.20. LOCK_H -> LOCK_H_
8.21. lockid -> lock
8.22. LOGICAL_PROTO_VERSION_NUM, PGLOGICAL_PROTO_MIN_VERSION_NUM ->
LOGICALREP_PROTO_VERSION_NUM, LOGICALREP_PROTO_MIN_VERSION_NUM
8.23. LOGICALREP_PROTO_H -> LOGICAL_PROTO_H
8.24. LogicalRewriteHeapCheckpoint -> CheckPointLogicalRewriteHeap
8.25. log_snap_interval_ms -> LOG_SNAPSHOT_INTERVAL_MS
8.26. from LVT -> form LVT
8.27. lwlockMode -> lwWaitMode
8.28. LWLockWait -> LWLockWaitForVar
8.29. MacroAssert -> AssertMacro
8.30. maintainer-check -> remove (orphaned after 5dd41f35)
8.31. manip.c -> remove (not present since PG95-1_01)
8.32. markleftchild -> markfollowright
8.33. mask_page_lsn -> mask_page_lsn_and_checksum
8.34. mdfd_seg_fds -> md_seg_fds
8.35. md_update -> px_md_update
8.36. meg -> 1 MB
8.37. MIGRATOR_API_VERSION -> remove (orphaned after 6f56b41a)
8.38. min_apply_delay -> recovery_min_apply_delay
8.39. min_multi -> cutoff_multi
8.40. minwg -> mingw
8.41. missingok -> missing_ok
8.42. mksafefunc/mkunsafefunc -> mkfunc (orphaned after 1f474d29)
8.43. MSG01.bin -> MSG1.bin
8.44. MSPACE -> MSSPACE
8.45. mtransfunc -> mtransfn
8.46. MULTI_QUERY -> PORTAL_MULTI_QUERY
8.47. MultixactId -> MultiXactId
8.48. MVDistinctItem -> MVNDistinctItem

In passing, I found a legacy script, FAQ2txt, that should be deleted as
unusable.

Best regards,
Alexander
diff --git a/doc/src/sgml/xplang.sgml b/doc/src/sgml/xplang.sgml
index d215ce82d0..60e0430751 100644
--- a/doc/src/sgml/xplang.sgml
+++ b/doc/src/sgml/xplang.sgml
@@ -137,7 +137,7 @@ CREATE FUNCTION validator_function_name(oid)
  
   Finally, the PL must be declared with the command
 
-CREATE TRUSTED LANGUAGE language-name
+CREATE TRUSTED LANGUAGE language_name
 HANDLER handler_function_name
 INLINE inline_function_name
 VALIDATOR validator_function_name ;
diff --git a/src/backend/access/spgist/spgvacuum.c b/src/backend/access/spgist/spgvacuum.c
index 2b1662a267..478d4c0d61 100644
--- a/src/backend/access/spgist/spgvacuum.c
+++ b/src/backend/access/spgist/spgvacuum.c
@@ -842,7 +842,7 @@ spgvacuumscan(spgBulkDeleteState *bds)
 		}
 	}
 
-	/* Propagate local lastUsedPage cache to metablock */
+	/* Propagate local lastUsedPages cache to metablock */
 	SpGistUpdateMetaPage(index);
 
 	/*
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index e7a59b0a92..e172dad07f 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -2259,7 +2259,7 @@ WalSndLoop(WalSndSendDataCallback send_data)
 WL_SOCKET_READABLE;
 
 			/*
-			 * Use fresh timestamp, not last_processed, to reduce the chance
+			 * Use fresh timestamp, not last_processing, to reduce the chance
 			 * of reaching wal_sender_timeout before sending a keepalive.
 			 */
 			sleeptime = WalSndComputeSleeptime(GetCurrentTimestamp());
@@ -2666,7 +2666,7 @@ XLogSendPhysical(void)
 	 * very close to together here so that we'll get a later position if it is
 	 * still moving.
 	 *
-	 * Because LagTrackerWriter ignores samples when the LSN hasn't advanced,
+	 * Because LagTrackerWrite ignores samples when the LSN hasn't advanced,
 	 * this gives us a cheap approximation for the WAL flush time for this
 	 * LSN.
 	 *
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index ae6780011b..fadab62950 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -3169,7 +3169,7 @@ DisplayXidCache(void)
  *
  * When we throw away subXIDs from KnownAssignedXids, we need to keep track of
  * that, similarly to tracking overflow of a PGPROC's subxids array.  We do
- * that by remembering the lastOverflowedXID, ie the last thrown-away subXID.
+ * that by remembering the lastOverflowedXid, ie the last thrown-away subXID.
  * As long as that is within the range of interesting XIDs, we have to assume
  * that subXIDs are missing from snapshots.  (Note that subXID overflow occurs
  * on primary when 

Re: Fix typos and inconsistencies for HEAD (take 7)

2019-07-21 Thread Alexander Lakhin
Hello Tom,
22.07.2019 7:14, Tom Lane wrote:
>> Fixing both places sounds adapted to me.  An alternative we could use
>> here is just to say something like that:
>> The effective resolution is only 1/HZ, which can be configured with
>> kernel parameter (see man 7 time), and is 4 milliseconds by
>> default.
> Whatever we say here is going to be a lie on some platforms.
>
> Probably best just to say that the sleep resolution is platform-dependent
> and leave it at that.
I think, we can say "on many systems"/ "on most Unixen", and it would
not be a lie.
In my opinion, while a generic reference to platform-dependency is OK
for developer' documentation, it makes the following passage in
config.sgml vague (we don't give user a hint, what "the effective
resolution" can be - several seconds/milliseconds/nanoseconds?):
/The default value is 200 milliseconds (200ms). Note
that on many systems, the//
//effective resolution of sleep delays is 10 milliseconds; setting//
//bgwriter_delay to a value that is not a multiple of
10//
//might have the same results as setting it to the next higher multiple
of 10. /
->
/The default value is 200 milliseconds (200ms). Note
that the//
//effective resolution of sleep delays is paltform-dependent. setting//
//bgwriter_delay to a value that is not a multiple of
the effective resolution,/
/might have the same results as setting it to the next higher multiple./

Best regards,
Alexander


Re: Fix typos and inconsistencies for HEAD (take 7)

2019-07-21 Thread Alexander Lakhin
Hello Michael,
22.07.2019 4:05, Michael Paquier wrote:
>> Also, I found e-mail headers in optimizer/plan/README not relevant, so I
>> propose to remove them.
> Not sure about that part.
I agree that the proposed fix is not complete, but just raises the
demand for a subsequent fix.
If you don't mind, I would return to such questionable and aside items
after finishing with the unicums en masse.

Best regards.
Alexander




Re: Fix typos and inconsistencies for HEAD (take 7)

2019-07-21 Thread Tom Lane
Michael Paquier  writes:
> On Sun, Jul 21, 2019 at 08:28:53AM +0300, Alexander Lakhin wrote:
>> And another finding is related to the sleep effective resolution. `man 7
>> time` says "Since kernel 2.6.13, the HZ value is a kernel configuration 
>> parameter  and  can  be 100, 250 (the default) ...", so the 10
>> milliseconds is not the most common effective resolution nowadays.
>> I propose the corresponding patch for pgsleep.c, but we have a similar
>> statement in doc/.../config.sgml. I think It should be fixed too.

> Fixing both places sounds adapted to me.  An alternative we could use
> here is just to say something like that:
> The effective resolution is only 1/HZ, which can be configured with
> kernel parameter (see man 7 time), and is 4 milliseconds by
> default.

Whatever we say here is going to be a lie on some platforms.

Probably best just to say that the sleep resolution is platform-dependent
and leave it at that.

regards, tom lane




Re: Fix typos and inconsistencies for HEAD (take 7)

2019-07-21 Thread Michael Paquier
On Sun, Jul 21, 2019 at 08:28:53AM +0300, Alexander Lakhin wrote:
> Please consider fixing the next pack of typos and inconsistencies in the
> tree:

Thanks, all those things look fine.  I have noticed one mistake.

> 7.44. json_plperl -> jsonb_plperlu

The path was incorrect here.

> Also, I found e-mail headers in optimizer/plan/README not relevant, so I
> propose to remove them.

Not sure about that part.

> And another finding is related to the sleep effective resolution. `man 7
> time` says "Since kernel 2.6.13, the HZ value is a kernel configuration 
> parameter  and  can  be 100, 250 (the default) ...", so the 10
> milliseconds is not the most common effective resolution nowadays.
> I propose the corresponding patch for pgsleep.c, but we have a similar
> statement in doc/.../config.sgml. I think It should be fixed too.

Fixing both places sounds adapted to me.  An alternative we could use
here is just to say something like that:
The effective resolution is only 1/HZ, which can be configured with
kernel parameter (see man 7 time), and is 4 milliseconds by
default.
--
Michael


signature.asc
Description: PGP signature


Re: Fix typos and inconsistencies for HEAD (take 7)

2019-07-21 Thread Tom Lane
Alexander Lakhin  writes:
> Also, I found e-mail headers in optimizer/plan/README not relevant, so I
> propose to remove them.

FWIW, I think they're highly relevant, because they put a date on
that text.  I've not gone through that README lately, but I wouldn't
be surprised if it's largely obsolete --- it hasn't been maintained
in any meaningful way since Vadim wrote it.  Without the headers, a
reader would have no warning of that.

What really ought to happen, likely, is for somebody to extract
whatever is still useful there into a new(?) section in the parent
directory's README.

regards, tom lane




Fix typos and inconsistencies for HEAD (take 7)

2019-07-20 Thread Alexander Lakhin
Hello hackers,

Please consider fixing the next pack of typos and inconsistencies in the
tree:
7.1. h04m05s06 -> h04mm05s06 (in fact it's broken since 6af04882, but
h04mm05s06.789 still accepted)
7.2. hasbucketcleanup -> hashbucketcleanup
7.3. _hashm_spare -> hashm_spares
7.4. hashtbl -> hash table
7.5. HAS_RELFILENODES -> XINFO_HAS_RELFILENODES
7.6. HAS_SUBXACT -> XINFO_HAS_SUBXACT
7.7. HAVE_FCVT -> remove (survived after ff4628f3)
7.8. HAVE_FINITE -> remove (orphaned after cac2d912)
7.9. HAVE_STRUCT_SOCKADDR_UN -> remove (not used since introduction in
399a36a7)
7.10. HAVE_SYSCONF -> remove (survived after ff4628f3)
7.11. HAVE_ZLIB -> HAVE_LIBZ
7.12. HEAP_CLEAN -> XLOG_HEAP2_CLEAN
7.13. HEAP_CONTAINS_NEW_TUPLE_DATA -> XLH_UPDATE_CONTAINS_NEW_TUPLE,
XLOG_HEAP_CONTAINS_OLD_TUPLE -> XLH_UPDATE_CONTAINS_OLD_TUPLE,
XLOG_HEAP_CONTAINS_OLD_KEY -> XLH_UPDATE_CONTAINS_OLD_KEY,
XLOG_HEAP_PREFIX_FROM_OLD -> XLH_UPDATE_PREFIX_FROM_OLD,
XLOG_HEAP_SUFFIX_FROM_OLD -> XLH_UPDATE_SUFFIX_FROM_OLD (renamed in
168d5805)
7.14. HEAP_FREEZE -> FREEZE_PAGE (an inconsistency since introduction in
48188e16)
7.15. heapio.c -> hio.c
7.16. heap_newpage -> XLOG_FPI (orphaned since 54685338)
7.17. heaxadecimal -> hexadecimal
7.18. hostlen -> nodelen, host -> node, serv -> service, servlen ->
servicelen
7.19. i386s -> x86_64
7.20. IConst/FConst  -> ICONST/FCONST
7.21. imit -> limit
7.22. IN_ARCHIVE_RECOVERY -> DB_IN_ARCHIVE_RECOVERY
7.23. ind_arraysize, ind_value -> ind_arrsize, ind_pointer
7.24. index_getnext -> index_getnext_slot
7.25. IndexTupleVector -> IndexTuple vector
7.26. innerConsistent -> innerConsistentFn
7.27. in-progres -> in-progress
7.28. inspire with -> inspired by the (sync with 192b0c94)
7.29. internalerrpos -> internalerrposition
7.30. internal_procname -> internal_proname
7.31. interruptOK -> remove (orphaned after d0699571)
7.32. intratransaction -> intra-transaction
7.33. InvalidOffset -> InvalidOffsetNumber
7.34. invtrans -> invtransfn
7.35. isbuiltin -> fmgr_isbuiltin
7.36. iself -> itself
7.37. isnoinherit -> noinherit
7.38. ISO_DATES -> USE_ISO_DATES
7.39. isParentRoot -> remove (orphaned after 218f5158)
7.40. isPrefix -> prefix
7.41. ItemPointerIsMax -> remove (orphaned after e20c70cb)
7.42. itemsin -> items in
7.43. jbVal -> jbval
7.44. json_plperl -> jsonb_plperlu
7.45. jvbBinary -> jbvBinary
7.46. keyAttrs -> attrKind
7.47. keyinfo -> key info
7.48. key_modified -> key_changed
7.49. killitems -> killedItems
7.50. KnownAssignedTransactions -> KnownAssignedTransactionIds

Also, I found e-mail headers in optimizer/plan/README not relevant, so I
propose to remove them.
And another finding is related to the sleep effective resolution. `man 7
time` says "Since kernel 2.6.13, the HZ value is a kernel configuration 
parameter  and  can  be 100, 250 (the default) ...", so the 10
milliseconds is not the most common effective resolution nowadays.
I propose the corresponding patch for pgsleep.c, but we have a similar
statement in doc/.../config.sgml. I think It should be fixed too.

Best regards,
Alexander
diff --git a/src/backend/access/hash/hashovfl.c b/src/backend/access/hash/hashovfl.c
index a07bd27a0e..487103fb79 100644
--- a/src/backend/access/hash/hashovfl.c
+++ b/src/backend/access/hash/hashovfl.c
@@ -793,7 +793,7 @@ _hash_initbitmapbuffer(Buffer buf, uint16 bmsize, bool initpage)
  *	be confused into returning the same tuple more than once or some tuples
  *	not at all by the rearrangement we are performing here.  To prevent
  *	any concurrent scan to cross the squeeze scan we use lock chaining
- *	similar to hasbucketcleanup.  Refer comments atop hashbucketcleanup.
+ *	similar to hashbucketcleanup.  Refer comments atop hashbucketcleanup.
  *
  *	We need to retain a pin on the primary bucket to ensure that no concurrent
  *	split can start.
diff --git a/src/backend/access/hash/hashpage.c b/src/backend/access/hash/hashpage.c
index 376ee2a63b..defdc9b408 100644
--- a/src/backend/access/hash/hashpage.c
+++ b/src/backend/access/hash/hashpage.c
@@ -509,7 +509,7 @@ _hash_init_metabuffer(Buffer buf, double num_tuples, RegProcedure procid,
 	 * Choose the number of initial bucket pages to match the fill factor
 	 * given the estimated number of tuples.  We round up the result to the
 	 * total number of buckets which has to be allocated before using its
-	 * _hashm_spare element. However always force at least 2 bucket pages. The
+	 * hashm_spares element. However always force at least 2 bucket pages. The
 	 * upper limit is determined by considerations explained in
 	 * _hash_expandtable().
 	 */
diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c
index 54ea69f7f1..4d8db1a060 100644
--- a/src/backend/utils/adt/datetime.c
+++ b/src/backend/utils/adt/datetime.c
@@ -1855,7 +1855,7 @@ DecodeTimeOnly(char **field, int *ftype, int nf,
 
 /*
  * Was this an "ISO time" with embedded field labels? An
- * example is "h04m05s06" - thomas 2001-02-04
+ * example is "h04mm05s06" - 

Re: Fix typos and inconsistencies for HEAD (take 6)

2019-07-15 Thread Michael Paquier
On Sun, Jul 14, 2019 at 08:24:01AM +0300, Alexander Lakhin wrote:
> 6.10. fildes -> fd

Not sure that this one was worth bothering.

And the rest looks correct after review, so applied!  Thanks!

> As a side note, while looking at dt_common.c (fixing 6.47), I've got a
> feeling that the datetktbl is largely outdated and thus mostly unuseful
> (e.g. USSR doesn't exist for almost 30 years).

Perhaps this could be discussed in its own thread?
--
Michael


signature.asc
Description: PGP signature


Fix typos and inconsistencies for HEAD (take 6)

2019-07-13 Thread Alexander Lakhin
Hello hackers,

Please consider fixing the next batch of typos and inconsistencies in
the tree:
6.1. FADVISE_WILLNEED -> POSIX_FADV_WILLNEED
6.2. failOK -> missing_ok
6.3. failOnerror -> failOnSignal
6.4. fakebits -> remove (irrelevant since introduction in 945543d9)
6.5. FastPathGetLockEntry -> FastPathGetRelationLockEntry
6.6. FAST_PATH_HASH_BUCKETS -> FAST_PATH_STRONG_LOCK_HASH_PARTITIONS
6.7. FastPathTransferLocks -> FastPathTransferRelationLocks
6.8. GenericOptionFlags -> remove (unused since 090173a3)
6.9. fetch_data -> fetched_data
6.10. fildes -> fd
6.11. filedescriptors -> file descriptors
6.12. fillatt -> remove (orphaned since 8609d4ab)
6.13. finalfunction -> finalfn
6.14. flail -> fail
6.15. FlushBuffers -> FlushBuffer & rephrase a comment (incorrectly
updated in 6f5c38dc)
6.16. flush_context -> wb_context
6.17. followon -> follow-on
6.18. force_quotes -> remove (orphaned since e18d900d)
6.19. formatstring -> format-string
6.20. formarray, formfloat -> remove (orphaned since a237dd2b)
6.21. found_row_type -> found_whole_row
6.22. freeScanStack -> remove a comment (irrelevant since 2a636834)
6.23. free_segment_counter -> freed_segment_counter
6.24. FreeSpace Map -> FreeSpaceMap
6.25. user friendly-operand -> user-friendly operand
6.26. frozenids -> frozenxids
6.27. fsm_internal.h -> fsm_internals.h
6.28. fsm_size_to_avail_cat -> fsm_space_avail_to_cat
6.29. full_result -> full_results
6.30. FULL_SIZ -> remove (orphaned since 65b731bd)
6.31. funxtions -> functions
6.32. generate_nonunion_plan, generate_union_plan ->
generate_nonunion_paths, generate_union_paths
6.33. getaddinfo -> getaddrinfo
6.34. get_expr, get_indexdef, get_ruledef, get_viewdef, get_triggerdef,
get_userbyid -> pg_get_*
6.35. GetHashPageStatis -> GetHashPageStats
6.36. GetNumShmemAttachedBgworkers -> remove (orphaned since 6bc8ef0b)
6.37. get_one_range_partition_bound_string -> get_range_partbound_string
6.38. getPartitions -> remove a comment (irrelevant since 44c52881)
6.39. GetRecordedFreePage -> GetRecordedFreeSpace
6.40. get_special_varno -> resolve_special_varno
6.41. gig -> GB
6.42. GinITupIsCompressed -> GinItupIsCompressed
6.43. GinPostingListSegmentMaxSize-bytes -> GinPostingListSegmentMaxSize
bytes
6.44. gistfindCorrectParent -> gistFindCorrectParent
6.45. gistinserthere -> gistinserttuple
6.46. GISTstate -> giststate
6.47. GlobalSerializableXmin, SerializableGlobalXmin -> SxactGlobalXmin
6.48. Greenwish -> Greenwich
6.49. groupClauseVars -> groupClauseCommonVars

As a side note, while looking at dt_common.c (fixing 6.47), I've got a
feeling that the datetktbl is largely outdated and thus mostly unuseful
(e.g. USSR doesn't exist for almost 30 years).

Best regards,
Alexander
diff --git a/doc/src/sgml/gist.sgml b/doc/src/sgml/gist.sgml
index 763b8cf7fd..c95776eb75 100644
--- a/doc/src/sgml/gist.sgml
+++ b/doc/src/sgml/gist.sgml
@@ -921,7 +921,7 @@ my_fetch(PG_FUNCTION_ARGS)
  * Convert 'fetched_data' into the a Datum of the original datatype.
  */
 
-/* fill *retval from fetch_data. */
+/* fill *retval from fetched_data. */
 gistentryinit(*retval, PointerGetDatum(converted_datum),
   entry->rel, entry->page, entry->offset, FALSE);
 
diff --git a/src/backend/access/transam/clog.c b/src/backend/access/transam/clog.c
index 47db7a8a88..d78f706ff7 100644
--- a/src/backend/access/transam/clog.c
+++ b/src/backend/access/transam/clog.c
@@ -155,7 +155,7 @@ static void TransactionIdSetPageStatusInternal(TransactionId xid, int nsubxids,
  * NB: this is a low-level routine and is NOT the preferred entry point
  * for most uses; functions in transam.c are the intended callers.
  *
- * XXX Think about issuing FADVISE_WILLNEED on pages that we will need,
+ * XXX Think about issuing POSIX_FADV_WILLNEED on pages that we will need,
  * but aren't yet in cache, as well as hinting pages not to fall out of
  * cache yet.
  */
diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c
index 05c6ca81b9..0aa12e8dde 100644
--- a/src/backend/catalog/namespace.c
+++ b/src/backend/catalog/namespace.c
@@ -2399,7 +2399,7 @@ TSParserIsVisible(Oid prsId)
 /*
  * get_ts_dict_oid - find a TS dictionary by possibly qualified name
  *
- * If not found, returns InvalidOid if failOK, else throws error
+ * If not found, returns InvalidOid if missing_ok, else throws error
  */
 Oid
 get_ts_dict_oid(List *names, bool missing_ok)
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c
index 6745a2432e..e2bed96b9b 100644
--- a/src/backend/storage/lmgr/lock.c
+++ b/src/backend/storage/lmgr/lock.c
@@ -216,9 +216,9 @@ static PROCLOCK *FastPathGetRelationLockEntry(LOCALLOCK *locallock);
 
 /*
  * To make the fast-path lock mechanism work, we must have some way of
- * preventing the use of the fast-path when a conflicting lock might be
- * present.  We partition* the locktag space into FAST_PATH_HASH_BUCKETS
- * partitions, and maintain an integer count of the number of "strong" lockers

Re: Fix typos and inconsistencies for HEAD (take 5)

2019-07-07 Thread Michael Paquier
On Sun, Jul 07, 2019 at 08:03:01AM +0300, Alexander Lakhin wrote:
> 5.8. dictlexize -> thesaurus_lexize

There could be other dictionaries.

> 5.9. regression.diffsregression.planregress/inh -> regression.diffs
> planregress/diffs.inh

I am wondering if we should not just nuke that...  For now I have
included your change as the mistake is obvious, but I am starting a
new thread.  The history around this script does not play in favor of
it:
commit: 2fc80e8e8304913c8dd1090bb2976632c0f4a8c3
author: Bruce Momjian 
date: Wed, 12 Feb 2014 17:29:19 -0500
Rename 'gmake' to 'make' in docs and recommended commands

This simplifies the docs and makes it easier to cut/paste command
lines.

commit: c77e2e42fb4cf5c90a7562b9df289165ff164df1
author: Tom Lane 
date: Mon, 18 Dec 2000 02:45:47 +
Tweak regressplans.sh to use any already-set PGOPTIONS.

And looking closer it seems that there are other issues linked to
it...

> 5.27. equivalentOpersAfterPromotion -> remove (irrelevant since
> 8536c962, but the whole comments is too old to be informational too)

It seems to me that this could be much more reworked.  So discarded
for now.

> 5.29. ExclusiveRowLock -> RowExclusiveLock

Grammar mistake here.

> 5.31. ExecBitmapHeapNext -> BitmapHeapNext

Well, BitmapHeapRecheck is not listed in the interface routines
either..  

> 5.37. ExecSeqNext -> SeqNext
> 5.40. ExecSubqueryNext -> SubqueryNext
> 5.41. ExecValuesNext -> ValuesNext

Here as well these sets are incomplete.  Instead for those series I'd
like to think that it would be better to do a larger cleanup and just
remove all these in the executor "INTERFACE ROUTINES".  Your proposed
patches don't make things better either, as the interfaces are listed
in alphabetical order.

> 5.39. exec_subplan_get_plan -> remove (not used since 1cc29fe7)

This could be used by extensions.  So let's not remove it.

And committed most of the rest.  Thanks.
--
Michael


signature.asc
Description: PGP signature


Fix typos and inconsistencies for HEAD (take 5)

2019-07-06 Thread Alexander Lakhin
Hello hackers,

Please consider fixing the next cluster of typos and inconsistencies in
the tree:
5.1. datetkntbl -> datetktbl
5.2. datminxmid -> datminmxid
5.3. DatumGetP -> DatumGetPointer
5.4. ECPG_COMPILE, DECPG_COMPILE -> remove (orphaned since 328d235)
5.5. defer_cleanup_age -> vacuum_defer_cleanup_age
5.6. descriptor_index -> remove (orphaned since 991b974)
5.7. DestroyBuilder, InitBuilder, SetDoc -> DestroyOpaque, InitOpaque,
SetDocument
5.8. dictlexize -> thesaurus_lexize
5.9. regression.diffsregression.planregress/inh -> regression.diffs
planregress/diffs.inh
5.10. dllist -> dlist
5.11. DocRepresentaion -> DocRepresentation
5.12. dosplit -> remove (such function is not present since introduction
in 9892ddf)
5.13. DOWN_MEM_FENCE -> _DOWN_MEM_FENCE
5.14. dp_pg_stop_backup -> do_pg_stop_backup
5.15. DropRelFileNodeAllBuffers -> DropRelFileNodesAllBuffers
5.16. dshash_release -> dshash_release_lock
5.17. EACCESS -> remove (not used since introduction in 12c94238)
5.18. ECPGcheck_PQresult -> ecpg_check_PQresult (renamed in 7793c6ec,
referenced code moved in ecpg_execute() in 61bee9f7)
5.19. ecpg_compatlib -> libecpg_compat
5.20. ECPGerrmsg -> remove (not used since introduction in 244d2d67)
5.21. ecpg_free_auto_mem -> remove (not used since introduction in 7793c6ec)
5.22. ecpggetdescp -> remove (not used since introduction in 90326c01)
5.23. endBlk -> numBlks
5.24. endMemb, startMemb, endOff, startOff -> endTruncMemb,
startTruncMemb, endTruncOff, startTruncOff
5.25. EndPlan -> ExecEndPlan
5.26. EndResult -> ExprEndResult
5.27. equivalentOpersAfterPromotion -> remove (irrelevant since
8536c962, but the whole comments is too old to be informational too)
5.28. es_jit_combined_instr -> es_jit_worker_instr (renamed in c03c1449)
5.29. ExclusiveRowLock -> RowExclusiveLock
5.30. exdended -> extended (user-visible, I would fix it in
REL_12_STABLE too)
5.31. ExecBitmapHeapNext -> BitmapHeapNext
5.32. ExecBuildProjectInfo -> ExecBuildProjectionInfo
5.33. ExecDirection -> remove (this variable is not present since PG95-1_01)
5.34. ExecEndRecursiveUnionScan -> ExecEndRecursiveUnion
5.35. ExecGrantStmt -> ExecuteGrantStmt
5.36. ExecInitRecursiveUnionScan -> ExecInitRecursiveUnion
5.37. ExecSeqNext -> SeqNext
5.38. exec_statement_return -> exec_stmt_return
5.39. exec_subplan_get_plan -> remove (not used since 1cc29fe7)
5.40. ExecSubqueryNext -> SubqueryNext
5.41. ExecValuesNext -> ValuesNext
5.42. existing_oid -> existing_relation_id
5.43. exit_fatal -> fatal
5.44. expectedTLIs -> expectedTLEs
5.45. ExprEvalExpr -> ExecEvalExpr
5.46. exprhasexecparam -> remove (orphaned since 6630ccad)
5.47. ExprReadyExpr -> ExecReadyExpr
5.48. EXTENSION_REALLY_RETURN_NULL -> remove (the behaviour changed with
a7124870)

There are some other ancient comments like spotted in 5.27, e.g. for
textcat(), text_substr() in varlena.c...  It seems that they serve more 
historic than informational purposes today.

Best regards,
Alexander
diff --git a/doc/src/sgml/gist.sgml b/doc/src/sgml/gist.sgml
index 44a3b2c03c..763b8cf7fd 100644
--- a/doc/src/sgml/gist.sgml
+++ b/doc/src/sgml/gist.sgml
@@ -910,7 +910,7 @@ Datum
 my_fetch(PG_FUNCTION_ARGS)
 {
 GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
-input_data_type *in = DatumGetP(entry->key);
+input_data_type *in = DatumGetPointer(entry->key);
 fetched_data_type *fetched_data;
 GISTENTRY  *retval;
 
diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c
index fad859a812..7f127e2339 100644
--- a/src/backend/access/transam/multixact.c
+++ b/src/backend/access/transam/multixact.c
@@ -2784,7 +2784,7 @@ ReadMultiXactCounts(uint32 *multixacts, MultiXactOffset *members)
 
 /*
  * Multixact members can be removed once the multixacts that refer to them
- * are older than every datminxmid.  autovacuum_multixact_freeze_max_age and
+ * are older than every datminmxid.  autovacuum_multixact_freeze_max_age and
  * vacuum_multixact_freeze_table_age work together to make sure we never have
  * too many multixacts; we hope that, at least under normal circumstances,
  * this will also be sufficient to keep us from using too many offsets.
diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c
index fd85b9c8f4..073f313337 100644
--- a/src/backend/postmaster/autovacuum.c
+++ b/src/backend/postmaster/autovacuum.c
@@ -1069,7 +1069,7 @@ rebuild_database_list(Oid newdb)
 		current_time = GetCurrentTimestamp();
 
 		/*
-		 * move the elements from the array into the dllist, setting the
+		 * move the elements from the array into the dlist, setting the
 		 * next_worker while walking the array
 		 */
 		for (i = 0; i < nelems; i++)
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index 18a0f62ba6..6c22cbfa29 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -1428,8 +1428,8 @@ GetOldestXmin(Relation rel, int flags)
 		result = 

Re: Fix typos and inconsistencies for HEAD

2019-06-30 Thread Michael Paquier
On Sun, Jun 30, 2019 at 04:06:47PM +0300, Alexander Lakhin wrote:
> 4.33. close_ - > closept_

This one is incorrect as it refers to the various close_* routines
below.

> 4.36. combinedproj -> remove (orphaned after 69c3936a)

This looks intentional?

> I've split proposed patch to make the fixes checking simpler.

Agreed with the rest, and applied.  Thanks!
--
Michael


signature.asc
Description: PGP signature


Fix typos and inconsistencies for HEAD

2019-06-30 Thread Alexander Lakhin
Hello hackers,

Please consider fixing the next bunch of typos and inconsistencies in
the tree:
4.1. AccesShareLock -> AccessShareLock
4.2. AdjustTimestampForTypemod -> AdjustTimestampForTypmod
4.3. AExprConst -> AexprConst
4.4. AlterExtensionOwner_oid - remove (orphaned after 994c36e0)
4.5. AlterTableDropColumn -> ATExecDropColumn (renamed in 077db40f)
4.6. ApplySortComparatorFull -> ApplySortAbbrevFullComparator
4.7. arracontjoinsel -> arraycontjoinsel
4.8. ArrayNItems -> ArrayGetNItems
4.9. ArrayRef -> SubscriptingRef (renamed by 558d77f2)
4.10. AtPrepare_Inval - remove (orphaned after efc16ea52)

4.11. AttributeOffsetGetAttributeNumber - > AttrOffsetGetAttrNumber
4.12. AttInMetaData -> AttInMetadata
4.13. AuthenticationMD5 -> AuthenticationMD5Password (for the sake of
consistency with the docs)
4.14. AUTH_REQ_GSSAPI -> AUTH_REQ_GSS
4.15. autogened -> autogenerated
4.16. BarrierWait -> BarrierArriveAndWait()
4.17. bgprocno -> bgwprocno
4.18. BGW_NVER_RESTART -> BGW_NEVER_RESTART
4.19. BloomInitBuffer -> BloomInitPage
4.20. br_deconstruct_tuple -> brin_deconstruct_tuple

4.21. brin_tuples.c -> brin_tuple.c
4.22. bt_parallel_done -> _bt_parallel_done
4.23. bt_parallel_release -> _bt_parallel_release
4.24. btree_insert_redo -> btree_xlog_insert
4.25. bucket_has_garbage -> split_cleanup
4.26. byta -> bytea
4.27. CachePlan -> CachedPlan
4.28. CheckBufferLeaks -> CheckForBufferLeaks
4.29. check_for_free_segments -> check_for_freed_segments
4.30. chunkbit -> schunkbit

4.31. cking -> remove (the comment is old and irrelevant since PG95-1_01)
4.32. ClearPgTM -> ClearPgTm
4.33. close_ - > closept_
4.34. CloseTransient File -> CloseTransientFile
4.35. colorTrigramsGroups -> colorTrigramGroups
4.36. combinedproj -> remove (orphaned after 69c3936a)
4.37. contigous_pages -> contiguous_pages
4.38. cookies_len -> cookies_size
4.39. cost_tableexprscan -> remove (not used since introduction in fcec6caa)
4.40. create_custom_plan -> create_customscan_plan

4.41. CreateInitialDecodingContext -> CreateInitDecodingContext
4.42. CreateSlot -> CreateSlotOnDisk
4.43. create_tablexprscan_path -> remove (not used since introduction in
fcec6caa)
4.44. crypt_des -> px_crypt_des
4.45. ctrigOid -> trigOid
4.46. curCollations -> colCollations
4.47. cur_mem & prev_mem -> cur_em & prev_em
4.48. customer_id_indexdex -> customer_id_index
4.49. custom_scan -> cscan

I've split proposed patch to make the fixes checking simpler.

Best regards,
Alexander
diff --git a/contrib/bloom/blutils.c b/contrib/bloom/blutils.c
index ee3bd56274..cc1670934f 100644
--- a/contrib/bloom/blutils.c
+++ b/contrib/bloom/blutils.c
@@ -341,7 +341,7 @@ BloomPageAddItem(BloomState *state, Page page, BloomTuple *tuple)
 /*
  * Allocate a new page (either by recycling, or by extending the index file)
  * The returned buffer is already pinned and exclusive-locked
- * Caller is responsible for initializing the page by calling BloomInitBuffer
+ * Caller is responsible for initializing the page by calling BloomInitPage
  */
 Buffer
 BloomNewBuffer(Relation index)
diff --git a/src/backend/access/brin/brin_tuple.c b/src/backend/access/brin/brin_tuple.c
index 5abb472ee4..7e9e73d2cf 100644
--- a/src/backend/access/brin/brin_tuple.c
+++ b/src/backend/access/brin/brin_tuple.c
@@ -207,7 +207,7 @@ brin_form_tuple(BrinDesc *brdesc, BlockNumber blkno, BrinMemTuple *tuple,
 		/*
 		 * Note that we reverse the sense of null bits in this module: we
 		 * store a 1 for a null attribute rather than a 0.  So we must reverse
-		 * the sense of the att_isnull test in br_deconstruct_tuple as well.
+		 * the sense of the att_isnull test in brin_deconstruct_tuple as well.
 		 */
 		bitP = ((bits8 *) ((char *) rettuple + SizeOfBrinTuple)) - 1;
 		bitmask = HIGHBIT;
diff --git a/src/backend/postmaster/bgworker.c b/src/backend/postmaster/bgworker.c
index f5db5a8c4a..b66b517aca 100644
--- a/src/backend/postmaster/bgworker.c
+++ b/src/backend/postmaster/bgworker.c
@@ -525,7 +525,7 @@ ResetBackgroundWorkerCrashTimes(void)
 		if (rw->rw_worker.bgw_restart_time == BGW_NEVER_RESTART)
 		{
 			/*
-			 * Workers marked BGW_NVER_RESTART shouldn't get relaunched after
+			 * Workers marked BGW_NEVER_RESTART shouldn't get relaunched after
 			 * the crash, so forget about them.  (If we wait until after the
 			 * crash to forget about them, and they are parallel workers,
 			 * parallel_terminate_count will get incremented after we've
diff --git a/src/backend/storage/buffer/freelist.c b/src/backend/storage/buffer/freelist.c
index 06659ab265..c8d4e6f9e4 100644
--- a/src/backend/storage/buffer/freelist.c
+++ b/src/backend/storage/buffer/freelist.c
@@ -220,7 +220,7 @@ StrategyGetBuffer(BufferAccessStrategy strategy, uint32 *buf_state)
 	 * If asked, we need to waken the bgwriter. Since we don't want to rely on
 	 * a spinlock for this we force a read from shared memory once, and then
 	 * set the latch based on that value. We need to go through that length
-	 * because otherwise bgprocno might be reset 

Re: Fix typos and inconsistencies for v11+

2019-06-17 Thread Michael Paquier
On Mon, Jun 17, 2019 at 10:32:13AM +0300, Alexander Lakhin wrote:
> Then I will go deeper for v10 and beyond. If older versions are not
> going to be fixed, I will prepare patches only for the master branch.

When it comes to fixing typos in in anything which is not directly
user-visible like the documentation or error strings, my take is to
bother only about HEAD.  There is always a risk of conflicts with
back-branches, but I have never actually bumped into this as being a
problem.  There is an argument for me to be less lazy of course..
--
Michael


signature.asc
Description: PGP signature


Re: Fix typos and inconsistencies for v11+

2019-06-17 Thread Alexander Lakhin
17.06.2019 10:16, Michael Paquier wrote:
> On Sat, Jun 15, 2019 at 06:00:00PM +0300, Alexander Lakhin wrote:
>> Two summary patches for REL_11_STABLE and master are attached.
> Thanks.  I have committed to HEAD most of the inconsistencies you have
> pointed out.
Thank you, Michael.
Then I will go deeper for v10 and beyond. If older versions are not
going to be fixed, I will prepare patches only for the master branch.

Best regards,
Alexander





Re: Fix typos and inconsistencies for v11+

2019-06-17 Thread Michael Paquier
On Sat, Jun 15, 2019 at 06:00:00PM +0300, Alexander Lakhin wrote:
> Two summary patches for REL_11_STABLE and master are attached.

Thanks.  I have committed to HEAD most of the inconsistencies you have
pointed out.
--
Michael


signature.asc
Description: PGP signature


Fix typos and inconsistencies for v11+

2019-06-15 Thread Alexander Lakhin
Hello hackers,

Please consider fixing the following typos and inconsistencies living in
the source code starting from v11:
3.1 add_placeholders_to_child_joinrel -> remove (orphaned after 7cfdc770)
3.2 AttachIndexInfo -> IndexAttachInfo (an internal inconsistency)
3.3 BlockRecordInfo -> BlockInfoRecord (an internal inconsistency)
3.4 bount -> bound (a typo)
3.5 CopyBoth -> CopyBothResponse (an internal inconsistency)
3.6 directy -> directory (a typo)
3.7 ExecCreateSlotFromOuterPlan -> ExecCreateScanSlotFromOuterPlan (an
internal inconsistency)
3.8 es_epqTuple -> es_epqTupleSlot (an internal inconsistency)
3.9 ExecHashTableParallelInsert -> ExecParallelHashTableInsert (an
internal inconsistency)
3.10 ExecMakeFunctionResult -> ExecMakeFunctionResultSet (an internal
inconsistency)
3.11 fmgr_builtins_oid_index -> fmgr_builtin_oid_index (an internal
inconsistency)
3.12 freeScanStack -> remove (irrelevant after 2a636834, v12 only)
3.13 GetTupleTrigger -> GetTupleForTrigger (an internal inconsistency)
3.14 grow_barrier -> grow_batches_barrier (an internal inconsistency)
3.15 HAVE__BUIILTIN_CLZ -> HAVE__BUILTIN_CLZ (a typo, v12 only)
3.16 ignored_killed_tuples -> ignore_killed_tuples (a typo)
3.17 intset_tests_stats -> intset_test_stats (an internal inconsistency,
v12 only)
3.18 is_aggregate -> objtype (needed to determine error handling and
required result type) (an internal inconsistency)
3.19 iterate_json_string_values -> iterate_json_values (renamed in 1c1791e0)
3.20 $log_number -> remove (not used since introduction in ed8a7c6f)
3.21 mechinism -> mechanism (a typo)
3.22 new_node, new_node_item -> child, child_key (an internal
inconsistency, v12 only)
3.23 new_part_constaints -> new_part_constraints (a typo)
3.24 parentIndexOid -> parentIndexId (for the sake of consistency, but
this argument is still unused since 8b08f7d4)
3.25 particiant -> participant (a typo)
3.26 PathNameCreateShared -> SharedFileSetCreate (an internal inconsistency)
3.27 PathnameCreateTemporaryDir -> PathNameCreateTemporaryDir (an
inconsistent case)
3.28 pg_access_server_files -> pg_read_server_files or
pg_write_server_files (non-existing role referenced)
3.29 pg_beginmessage_reuse -> pq_beginmessage_reuse (a typo)
3.30 Form_pg_fdw & pg_fdw -> Form_pg_foreign_data_wrapper &
pg_foreign_data_wrapper (an internal inconsistency)
3.31 PG_MCV_LIST -> pg_mcv_list (an internal inconsistency, v12 only)
3.32 pg_partition_table -> pg_partitioned_table (an internal inconsistency)
3.33 pg_write -> pg_pwrite (an internal inconsistency, v12 only)
3.34 PLyObject_FromJsonb -> PLyObject_FromJsonbContainer (an internal
inconsistency)
3.35 port_win32.h -> win32_port.h (an internal inconsistency)
3.36 PruneCtxStateIdx -> PruneCxtStateIdx (an internal inconsistency)
3.37 SetErrormode -> SetErrorMode (an internal inconsistency)
3.38 SharedRecordTypemodRegistry -> SharedRecordTypmodRegistry (an
internal inconsistency)
3.39 SharedTupleStore -> SharedTuplestore (an internal inconsistency)
3.40 shm_mq_get_receive_bytes -> shm_mq_receive_bytes (an internal
inconsistency)
3.41 t_natts -> number-of-attributes (questionable) (renamed in
storage.sgml with 3e23b68d, but one reference is left)
3.42 tts_buffer -> remove (orphaned after 4da597ed, v12 only)
3.43 tts_flag -> tts_flags (an internal inconsistency, v12 only)
3.44 tts_off -> remove (orphaned after 4da597ed, v12 only)
3.45 _vaues -> _values (a typo)
3.46 wait_event_class -> wait_event_type (an internal inconsistency)
3.47 WarnNoTranactionBlock -> WarnNoTransactionBlock (a typo)
3.48 with-wal-segsize -> remove (orphaned after fc49e24f)
3.49 XLOG_SEG_SIZE -> WAL segment size (orphaned after fc49e24fa)

Two summary patches for REL_11_STABLE and master are attached.

Best regards,
Alexander

diff --git a/contrib/jsonb_plpython/jsonb_plpython.c b/contrib/jsonb_plpython/jsonb_plpython.c
index 1bc984d5c4..1c93a80fbc 100644
--- a/contrib/jsonb_plpython/jsonb_plpython.c
+++ b/contrib/jsonb_plpython/jsonb_plpython.c
@@ -133,7 +133,7 @@ PLyObject_FromJsonbValue(JsonbValue *jsonbValue)
 }
 
 /*
- * PLyObject_FromJsonb
+ * PLyObject_FromJsonbContainer
  *
  * Transform JsonbContainer to PyObject.
  */
diff --git a/contrib/pg_prewarm/autoprewarm.c b/contrib/pg_prewarm/autoprewarm.c
index 3bd0010bf8..1fd65f30df 100644
--- a/contrib/pg_prewarm/autoprewarm.c
+++ b/contrib/pg_prewarm/autoprewarm.c
@@ -360,7 +360,7 @@ apw_load_buffers(void)
 		Oid			current_db = blkinfo[j].database;
 
 		/*
-		 * Advance the prewarm_stop_idx to the first BlockRecordInfo that does
+		 * Advance the prewarm_stop_idx to the first BlockInfoRecord that does
 		 * not belong to this database.
 		 */
 		j++;
@@ -369,7 +369,7 @@ apw_load_buffers(void)
 			if (current_db != blkinfo[j].database)
 			{
 /*
- * Combine BlockRecordInfos for global objects with those of
+ * Combine BlockInfoRecords for global objects with those of
  * the database.
  */
 if (current_db != InvalidOid)
@@ -382,7 +382,7 @@ apw_load_buffers(void)
 
 		/*
 		 

Re: Fix typos for v12

2019-05-26 Thread David Fetter
On Sun, May 26, 2019 at 06:43:41PM +0300, Alexander Lakhin wrote:
> 26.05.2019 16:49, Amit Kapila wrote:
> > This occurred to me as well while reviewing, but I thought typo fixes
> > should be fine.  Anyway, I have excluded those before pushing.  So, if
> > we want to fix these, then maybe one has to first get this fixed in
> > upstream first and then take from there.
> >
> >>  The rest of this looks fine.
> >>
> > Thanks, pushed.
> Thank you Amit!
> I've filed a Pull Request in the imath project:
> https://github.com/creachadair/imath/pull/39

I noticed that it's gone from upstream.  I also noticed that upstream
did a release in January since the previous pull. Is it worth trying
to merge those in as they arrive?

Best,
David.
-- 
David Fetter  http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate




Re: Fix typos for v12

2019-05-26 Thread Alexander Lakhin
26.05.2019 16:49, Amit Kapila wrote:
> This occurred to me as well while reviewing, but I thought typo fixes
> should be fine.  Anyway, I have excluded those before pushing.  So, if
> we want to fix these, then maybe one has to first get this fixed in
> upstream first and then take from there.
>
>>  The rest of this looks fine.
>>
> Thanks, pushed.
Thank you Amit!
I've filed a Pull Request in the imath project:
https://github.com/creachadair/imath/pull/39

Best regards,
Alexander




Re: Fix typos for v12

2019-05-26 Thread Amit Kapila
On Sat, May 25, 2019 at 8:36 PM Tom Lane  wrote:
>
> Amit Kapila  writes:
> > I have taken one pass over it and all fixes seem to be correct and got
> > introduced in v12.  I will re-verify them once again and then commit
> > your patch if I don't found any problem.  In the meantime, if anyone
> > else wants to look at it, that would be great.
>
> FWIW, I'd counsel against applying the changes in imath.h/.c, as that
> is not our code, and unnecessary variations from upstream will just
> make it harder to track upstream.
>

This occurred to me as well while reviewing, but I thought typo fixes
should be fine.  Anyway, I have excluded those before pushing.  So, if
we want to fix these, then maybe one has to first get this fixed in
upstream first and then take from there.

>  The rest of this looks fine.
>

Thanks, pushed.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com




Re: Fix typos for v12

2019-05-25 Thread Tom Lane
Amit Kapila  writes:
> I have taken one pass over it and all fixes seem to be correct and got
> introduced in v12.  I will re-verify them once again and then commit
> your patch if I don't found any problem.  In the meantime, if anyone
> else wants to look at it, that would be great.

FWIW, I'd counsel against applying the changes in imath.h/.c, as that
is not our code, and unnecessary variations from upstream will just
make it harder to track upstream.  The rest of this looks fine.

regards, tom lane




Re: Fix typos for v12

2019-05-25 Thread Amit Kapila
On Sat, May 25, 2019 at 4:23 PM Alexander Lakhin  wrote:
>
> Hello Amit,
>
> 25.05.2019 13:42, Amit Kapila wrote:
> > I think it is good to fix these.  I haven't verified all but I can
> > review them.  Isn't it better to fix them as one patch instead of
> > multiple patches?
>
> If a single patch is more convenient, then here it is.
> I thought that separate patches would be more handy in case of any doubts.
>

I have taken one pass over it and all fixes seem to be correct and got
introduced in v12.  I will re-verify them once again and then commit
your patch if I don't found any problem.  In the meantime, if anyone
else wants to look at it, that would be great.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com




Re: Fix typos for v12

2019-05-25 Thread Alexander Lakhin
Hello Amit,

25.05.2019 13:42, Amit Kapila wrote:
> I think it is good to fix these.  I haven't verified all but I can
> review them.  Isn't it better to fix them as one patch instead of
> multiple patches?

If a single patch is more convenient, then here it is.
I thought that separate patches would be more handy in case of any doubts.

Best regards,
Alexander

diff --git a/contrib/pgcrypto/imath.c b/contrib/pgcrypto/imath.c
index 6936d2cdca..30dd4c9313 100644
--- a/contrib/pgcrypto/imath.c
+++ b/contrib/pgcrypto/imath.c
@@ -723,7 +723,7 @@ mp_int_add(mp_int a, mp_int b, mp_int c)
 	else
 	{
 		/* Different signs -- subtract magnitudes, preserve sign of greater */
-		int			cmp = s_ucmp(a, b); /* magnitude comparision, sign ignored */
+		int			cmp = s_ucmp(a, b); /* magnitude comparison, sign ignored */
 
 		/*
 		 * Set x to max(a, b), y to min(a, b) to simplify later code. A
@@ -3373,7 +3373,7 @@ s_udiv_knuth(mp_int u, mp_int v)
 		 * decrease qhat one more time before we get a value that is smaller
 		 * than r.
 		 *
-		 * This way is less efficent than Knuth becuase we do more multiplies,
+		 * This way is less efficent than Knuth because we do more multiplies,
 		 * but we do not need to worry about underflow this way.
 		 */
 		/* t = qhat * v */
diff --git a/contrib/pgcrypto/imath.h b/contrib/pgcrypto/imath.h
index 0e1676d04e..7b4497b3c6 100644
--- a/contrib/pgcrypto/imath.h
+++ b/contrib/pgcrypto/imath.h
@@ -107,7 +107,7 @@ extern const mp_result MP_MINERR;
 void		mp_int_default_precision(mp_size ndigits);
 
 /** Sets the number of digits below which multiplication will use the standard
-	quadratic "schoolbook" multiplcation algorithm rather than Karatsuba-Ofman.
+	quadratic "schoolbook" multiplication algorithm rather than Karatsuba-Ofman.
 	Requires `ndigits >= sizeof(mp_word)`. */
 void		mp_int_multiply_threshold(mp_size ndigits);
 
diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c
index 02c81ce7a9..1b09aa5a01 100644
--- a/contrib/postgres_fdw/postgres_fdw.c
+++ b/contrib/postgres_fdw/postgres_fdw.c
@@ -3064,7 +3064,7 @@ estimate_path_cost_size(PlannerInfo *root,
 	total_cost += cpu_tuple_cost * retrieved_rows;
 
 	/*
-	 * If we have LIMIT, we should perfer performing the restriction remotely
+	 * If we have LIMIT, we should prefer performing the restriction remotely
 	 * rather than locally, as the former avoids extra row fetches from the
 	 * remote that the latter might cause.  But since the core code doesn't
 	 * account for such fetches when estimating the costs of the local
diff --git a/doc/src/sgml/charset.sgml b/doc/src/sgml/charset.sgml
index 555d1b4ac6..a2a46c6ab3 100644
--- a/doc/src/sgml/charset.sgml
+++ b/doc/src/sgml/charset.sgml
@@ -896,7 +896,7 @@ CREATE COLLATION french FROM "fr-x-icu";
  equal only if they consist of the same byte sequence.  Nondeterministic
  comparison may determine strings to be equal even if they consist of
  different bytes.  Typical situations include case-insensitive comparison,
- accent-insensitive comparison, as well as comparion of strings in
+ accent-insensitive comparison, as well as comparison of strings in
  different Unicode normal forms.  It is up to the collation provider to
  actually implement such insensitive comparisons; the deterministic flag
  only determines whether ties are to be broken using bytewise comparison.
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index a179d6111e..570ac5e06f 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -3556,7 +3556,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
   
  
  
-  current_locked_pid
+  current_locker_pid
   bigint
   
 Process ID of the locker currently being waited for.
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index c4bac87e80..1047c77a63 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -960,7 +960,7 @@ data. Empty in ordinary tables.
   (that is, t_natts bits altogether). In this list of bits, a
   1 bit indicates not-null, a 0 bit is a null.  When the bitmap is not
   present, all columns are assumed not-null.
-  The object ID is only present if the HEAP_HASOID bit
+  The object ID is only present if the HEAP_HASOID_OLD bit
   is set in t_infomask.  If present, it appears just
   before the t_hoff boundary.  Any padding needed to make
   t_hoff a MAXALIGN multiple will appear between the null
diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c
index 2eccc99023..602f8849d4 100644
--- a/src/backend/access/nbtree/nbtinsert.c
+++ b/src/backend/access/nbtree/nbtinsert.c
@@ -663,7 +663,7 @@ _bt_check_unique(Relation rel, BTInsertState insertstate, Relation heapRel,
  *		(In a !heapkeyspace index, there can be multiple pages with the same
  *		high key, where the new tuple could legitimately be placed on.  In
  *		that case, the caller 

  1   2   >