Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hAMhX-0008Dc-2W for pgsql-hackers@arkaria.postgresql.org; Sat, 30 Mar 2019 22:43:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hAMhV-0002XG-Ag for pgsql-hackers@arkaria.postgresql.org; Sat, 30 Mar 2019 22:43:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hAMhU-0002Ri-P6 for pgsql-hackers@lists.postgresql.org; Sat, 30 Mar 2019 22:43:45 +0000 Received: from mail-it1-x12e.google.com ([2607:f8b0:4864:20::12e]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hAMhP-0002GZ-8P for pgsql-hackers@postgresql.org; Sat, 30 Mar 2019 22:43:44 +0000 Received: by mail-it1-x12e.google.com with SMTP id y204so9295179itf.3 for ; Sat, 30 Mar 2019 15:43:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=GYl8uOYQIFWSnjIJxGEe62Ei+9S8tKSlo7WH3oMlodo=; b=uSNgMLO+H1x2ox7Zbt+/14OZRRj1lBEaeMh8SZrPCFyK8vf99i6PVkfOtK4PusDlg4 oyfB4DFWMLwnJdJycPAELmnmw9K3cIeplevIpKaDqinl2dee3WUeG2EzYIm85GQeZwOc ETOlzaWVlnnbGvixE4VgkynfWsXpTKf3cDPkmEBqXSFgXYzhlSANtGy0FV8SdYs/SZob Vzs3SQHivmeHwwOlCwoXIFyl1xsFoDEFGBSKUED53XSRO3WOrDIT3+izkz7dkidBob3B PKjxqNj7e3SFOMwCVRV6PMM2pO052x6F0c7b3Cm9UZ0ZBF2u+xwGeE3B3V7SWoSUfQAE /hUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=GYl8uOYQIFWSnjIJxGEe62Ei+9S8tKSlo7WH3oMlodo=; b=h6YJzkwoNQsdou152oPxVdGk1U/pA6p2Noa0RX/ukr/Q8XUTPfoGibbo5s3UqbImFY b5WkM0y6QCB9eZbgIXZmvX9I1nV2TrN+/V4kQoY/vsZLuHGbvS+tfk7awDTyljwLTdAE aCaCoOBL2KjgR2+R+j0P1dWHolztc9xGe86l8cn3uRmFwr7TxfP9uhGETksTaX6hyMVm h0Wn0p3gXXM9oC90vIsl/Hr/jPt6TS6x3XTU0ovCzQYeh+y9+On2913y7PsNKaKpfLPn LSwP/IhnCurd7YwL6kGNqlPny5HYmnBWF8pwQvgpaEOkutHinfe7XVk/jRY8fcaOREDh 6i0g== X-Gm-Message-State: APjAAAVrjX1x+Roc/VvewzWi3NYUIyTof6kZ0hBQ8NmAl7OpTsQa7uXU P1MfkDvHP71ifDl19bXfFmLO/4i3uSk= X-Google-Smtp-Source: APXvYqwNoAS9D2gBMX5qpTyd9MD6EQD9/owR4FiLvGM5CS6yI9tfUyC5ED2VcxOVWQ/fz8Q++P5XBA== X-Received: by 2002:a24:c842:: with SMTP id w63mr9521690itf.17.1553985816828; Sat, 30 Mar 2019 15:43:36 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id e10sm2362991iok.85.2019.03.30.15.43.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Mar 2019 15:43:35 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id B1DE3800BA5; Sat, 30 Mar 2019 17:43:33 -0500 (CDT) Date: Sat, 30 Mar 2019 17:43:33 -0500 From: Justin Pryzby To: pgsql-hackers@postgresql.org Subject: clean up docs for v12 Message-ID: <20190330224333.GQ5815@telsasoft.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="IMjqdzrDRly81ofr" Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --IMjqdzrDRly81ofr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I reviewed docs like this: git log -p remotes/origin/REL_11_STABLE..HEAD -- doc And split some into separate patches, which may be useful at least for reviewing. I'm mailing now rather than after feature freeze to avoid duplicative work and see if there's any issue. Note, I also/already mailed this one separately: |Clean up docs for log_statement_sample_rate.. https://www.postgresql.org/message-id/flat/20190328135918.GA27808%40telsasoft.com Justin --IMjqdzrDRly81ofr Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v1-0001-Clean-up-docs-for-log_statement_sample_rate.patch" From fb712dfe3cb3d64ac7d297ca5217193327f8b547 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Thu, 28 Mar 2019 08:53:26 -0500 Subject: [PATCH v1 1/8] Clean up docs for log_statement_sample_rate.. ..which was added at commit 88bdbd3f746049834ae3cc972e6e650586ec3c9d --- doc/src/sgml/config.sgml | 18 +++++++++--------- src/backend/utils/misc/guc.c | 4 ++-- src/backend/utils/misc/postgresql.conf.sample | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index d383de2..9b66e7f 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -5786,9 +5786,9 @@ local0.* /var/log/postgresql Causes the duration of each completed statement to be logged if the statement ran for at least the specified number of milliseconds, modulated by log_statement_sample_rate. - Setting this to zero prints all statement durations. Minus-one (the default) - disables logging statement durations. For example, if you set it to - 250ms then all SQL statements that run 250ms or longer + Setting this to zero prints all statement durations. -1 (the default) + disables logging statements due to exceeding duration threshold. For example, if you set it to + 250ms, then all SQL statements that run 250ms or longer will be logged. Enabling this parameter can be helpful in tracking down unoptimized queries in your applications. Only superusers can change this setting. @@ -5824,13 +5824,13 @@ local0.* /var/log/postgresql - Determines the fraction of the statements that exceed - which to log. - The default is 1, meaning log to all such + Determines the fraction of statements that exceed + to be logged. + The default is 1.0, meaning log all such statements. - Setting this to zero disables logging, same as setting + Setting this to zero disables logging by duration, same as setting log_min_duration_statement - to minus-one. log_statement_sample_rate + to -1. log_statement_sample_rate is helpful when the traffic is too high to log all queries. @@ -6083,7 +6083,7 @@ local0.* /var/log/postgresql - The difference between setting this option and setting + The difference between enabling log_duration and setting to zero is that exceeding log_min_duration_statement forces the text of the query to be logged, but this option doesn't. Thus, if diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index aa564d1..415cd78 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -3357,8 +3357,8 @@ static struct config_real ConfigureNamesReal[] = { {"log_statement_sample_rate", PGC_SUSET, LOGGING_WHEN, - gettext_noop("Fraction of statements over log_min_duration_statement to log."), - gettext_noop("If you only want a sample, use a value between 0 (never " + gettext_noop("Fraction of statements exceeding log_min_duration_statement to be logged."), + gettext_noop("If you only want a sample, use a value between 0.0 (never " "log) and 1.0 (always log).") }, &log_statement_sample_rate, diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index cccb5f1..684f5e7 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -489,9 +489,9 @@ # 0 logs all statement, > 0 logs only statements running at # least this number of milliseconds. -#log_statement_sample_rate = 1 # Fraction of logged statements over - # log_min_duration_statement. 1.0 logs all statements, - # 0 never logs. +#log_statement_sample_rate = 1.0 # Fraction of logged statements exceeding + # log_min_duration_statement to be logged + # 1.0 logs all statements, 0.0 never logs # - What to Log - -- 2.1.4 --IMjqdzrDRly81ofr Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v1-0002-review-docs-for-pg12dev.patch" From 4b5cc00e25c3abc601f48bfae0cc69a8729cd041 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Thu, 28 Mar 2019 18:50:03 -0500 Subject: [PATCH v1 2/8] review docs for pg12dev --- doc/src/sgml/bloom.sgml | 2 +- doc/src/sgml/catalogs.sgml | 4 ++-- doc/src/sgml/config.sgml | 13 ++++++----- doc/src/sgml/ecpg.sgml | 18 +++++++------- doc/src/sgml/libpq.sgml | 2 +- doc/src/sgml/monitoring.sgml | 30 ++++++++++++------------ doc/src/sgml/perform.sgml | 8 +++---- doc/src/sgml/ref/alter_table.sgml | 4 ++-- doc/src/sgml/ref/create_index.sgml | 4 ++-- doc/src/sgml/ref/pg_rewind.sgml | 15 ++++++------ doc/src/sgml/ref/pgbench.sgml | 6 ++--- doc/src/sgml/ref/reindex.sgml | 2 +- doc/src/sgml/sources.sgml | 48 +++++++++++++++++++------------------- doc/src/sgml/xfunc.sgml | 12 +++++----- 14 files changed, 82 insertions(+), 86 deletions(-) diff --git a/doc/src/sgml/bloom.sgml b/doc/src/sgml/bloom.sgml index 6eeadde..c341b65 100644 --- a/doc/src/sgml/bloom.sgml +++ b/doc/src/sgml/bloom.sgml @@ -65,7 +65,7 @@ Number of bits generated for each index column. Each parameter's name refers to the number of the index column that it controls. The default - is 2 bits and maximum is 4095. Parameters for + is 2 bits and the maximum is 4095. Parameters for index columns not actually used are ignored. diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index f4aabf5..ad4d150 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -3051,7 +3051,7 @@ SCRAM-SHA-256$<iteration count>:&l simplifies ATTACH/DETACH PARTITION operations: the partition dependencies need only be added or removed. Example: a child partitioned index is made partition-dependent - on both the partition table it is on and the parent partitioned + on both the table partition and the parent partitioned index, so that it goes away if either of those is dropped, but not otherwise. The dependency on the parent index is primary, so that if the user tries to drop the child partitioned index, @@ -3114,7 +3114,7 @@ SCRAM-SHA-256$<iteration count>:&l Note that it's quite possible for two objects to be linked by more than one pg_depend entry. For example, a child partitioned index would have both a partition-type dependency on its - associated partition table, and an auto dependency on each column of + associated table partition, and an auto dependency on each column of that table that it indexes. This sort of situation expresses the union of multiple dependency semantics. A dependent object can be dropped without CASCADE if any of its dependencies satisfies diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 9b66e7f..5f6873d 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -112,7 +112,7 @@ For example, 30.1 GB will be converted to 30822 MB not 32319628902 B. If the parameter is of integer type, a final rounding to integer - occurs after any units conversion. + occurs after any unit conversion. @@ -3408,7 +3408,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows current when the base backup was taken. The value latest recovers to the latest timeline found in the archive, which is useful in - a standby server. latest is the default. + a standby server. The default is latest. @@ -3515,7 +3515,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows servers or streaming base backup clients (i.e., the maximum number of simultaneously running WAL sender processes). The default is 10. The value 0 means - replication is disabled. Abrupt streaming client disconnection might + replication is disabled. Abrupt disconnection of a streaming client might leave an orphaned connection slot behind until a timeout is reached, so this parameter should be set slightly higher than the maximum number of expected clients so disconnected clients can immediately @@ -4135,8 +4135,9 @@ ANY num_sync ( bytea - The handling of the bytea type is also similar to - the VARCHAR. The definition on an array of type + The handling of the bytea type is similar to + the VARCHAR. The definition of an array of type bytea is converted into a named struct for every variable. A declaration like: @@ -1220,9 +1220,8 @@ bytea var[180]; struct bytea_var { int len; char arr[180]; } var; - The member arr hosts binary format - data. It also can handle even '\0' as part of - data unlike VARCHAR. + The member arr stores binary format + data, which can include zero bytes, unlike VARCHAR. The data is converted from/to hex format and sent/received by ecpglib. @@ -7571,8 +7570,7 @@ PREPARE name FROM A literal C string or a host variable containing a preparable - statement, one of the SELECT, INSERT, UPDATE, or - DELETE. + statement (SELECT, INSERT, UPDATE, or DELETE). diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index c1d1b6b..06b0076 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -1122,7 +1122,7 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname connect_timeout - Maximum wait for connection, in seconds (write as a decimal integer, + Maximum time to wait while connecting, in seconds (write as a decimal integer, e.g. 10). Zero, negative, or not specified means wait indefinitely. The minimum allowed timeout is 2 seconds, therefore a value of 1 is interpreted as 2. diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index f1df14b..a5bf49c 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -271,13 +271,13 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser Some of the information in the dynamic statistics views shown in is security restricted. - Ordinary users can only see all the information about their own sessions - (sessions belonging to a role that they are a member of). In rows about + Ordinary users can only see all information about their own sessions + (sessions belonging to a role of which they are a member). In rows for other sessions, many columns will be null. Note, however, that the existence of a session and its general properties such as its sessions user and database are visible to all users. Superusers and members of the built-in role pg_read_all_stats (see also ) can see all the information about all sessions. + linkend="default-roles"/>) can see all information about all sessions. @@ -3411,16 +3411,16 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, VACUUM Progress Reporting - Whenever VACUUM is running, the - pg_stat_progress_vacuum view will contain - one row for each backend (including autovacuum worker processes) that is - currently vacuuming. The tables below describe the information + The pg_stat_progress_vacuum view will contain one + row for each backend that is running VACUUM, including + autovacuum worker processes. + The tables below describe the information that will be reported and provide information about how to interpret it. - Progress for VACUUM FULL commands is reported via - pg_stat_progress_cluster - because both VACUUM FULL and CLUSTER - rewrite the table, while regular VACUUM only modifies it - in place. See . + Progress for VACUUM FULL commands is instead reported via + pg_stat_progress_cluster, + because VACUUM FULL rewrites the table, like CLUSTER, + while regular VACUUM modifies it in place. See . +
@@ -3603,9 +3603,9 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, CLUSTER Progress Reporting - Whenever CLUSTER or VACUUM FULL is - running, the pg_stat_progress_cluster view will - contain a row for each backend that is currently running either command. + The pg_stat_progress_cluster view will contain a + row for each backend that is running either + CLUSTER or VACUUM FULL. The tables below describe the information that will be reported and provide information about how to interpret it. diff --git a/doc/src/sgml/perform.sgml b/doc/src/sgml/perform.sgml index a84be85..65c161b 100644 --- a/doc/src/sgml/perform.sgml +++ b/doc/src/sgml/perform.sgml @@ -899,10 +899,10 @@ EXPLAIN ANALYZE SELECT * FROM tenk1 WHERE unique1 < 100 AND unique2 > 9000 Generally, the EXPLAIN output will display details for every plan node which was generated by the query planner. However, there are cases where the executor is able to determine that certain nodes are - not required; currently, the only node types to support this are the - Append and MergeAppend nodes. These - node types have the ability to discard subnodes which they are able to - determine won't contain any records required by the query. It is possible + not required; currently, the only node types to support this are + Append and MergeAppend, which + are able to discard subnodes when it's deduced that + they will not contain any records required by the query. It is possible to determine that nodes have been removed in this way by the presence of a "Subplans Removed" property in the EXPLAIN output. diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index e360728..679e51a 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -219,7 +219,7 @@ WITH ( MODULUS numeric_literal, REM SET NOT NULL may only be applied to a column - providing none of the records in the table contain a + provided none of the records in the table contain a NULL value for the column. Ordinarily this is checked during the ALTER TABLE by scanning the entire table; however, if a valid CHECK constraint is @@ -642,7 +642,7 @@ WITH ( MODULUS numeric_literal, REM When applied to a partitioned table, nothing is moved, but any partitions created afterwards with CREATE TABLE PARTITION OF will use that tablespace, - unless the TABLESPACE clause is used to override it. + unless overridden by its TABLESPACE clause. diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml index d9d95b2..14a557a 100644 --- a/doc/src/sgml/ref/create_index.sgml +++ b/doc/src/sgml/ref/create_index.sgml @@ -181,8 +181,8 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] - Currently, the B-tree and the GiST index access methods supports this - feature. In B-tree and the GiST indexes, the values of columns listed + Currently, only the B-tree and GiST index access methods support this + feature. In B-tree and GiST indexes, the values of columns listed in the INCLUDE clause are included in leaf tuples which correspond to heap tuples, but are not included in upper-level index entries used for tree navigation. diff --git a/doc/src/sgml/ref/pg_rewind.sgml b/doc/src/sgml/ref/pg_rewind.sgml index 53a64ee..cf77552 100644 --- a/doc/src/sgml/ref/pg_rewind.sgml +++ b/doc/src/sgml/ref/pg_rewind.sgml @@ -106,15 +106,14 @@ PostgreSQL documentation - pg_rewind will fail immediately if it finds - files it cannot write directly to. This can happen for example when - the source and the target server use the same file mapping for read-only - SSL keys and certificates. If such files are present on the target server + pg_rewind will fail immediately if it experiences + a write error. This can happen for example when + the source and target server use the same file mapping for read-only + SSL keys and certificates. If such files are present on the target server, it is recommended to remove them before running - pg_rewind. After doing the rewind, some of + pg_rewind. After performing the rewind, some of those files may have been copied from the source, in which case it may - be necessary to remove the data copied and restore back the set of links - used before the rewind. + be necessary to remove them and restore the files removed beforehand. @@ -183,7 +182,7 @@ PostgreSQL documentation pg_rewind to return without waiting, which is faster, but means that a subsequent operating system crash can leave the synchronized data folder corrupt. Generally, this option is - useful for testing but should not be used when creating a production + useful for testing but should not be used on a production installation. diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml index f11d366..b4c7629 100644 --- a/doc/src/sgml/ref/pgbench.sgml +++ b/doc/src/sgml/ref/pgbench.sgml @@ -474,10 +474,8 @@ pgbench options d - Because in "prepared" mode pgbench reuses - the parse analysis result for the second and subsequent query - iteration, pgbench runs faster in the - prepared mode than in other modes. + pgbench runs faster in prepared mode because the + parse analysis happens only during the first query. The default is simple query protocol. (See diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml index e05a76c..a5a6eba 100644 --- a/doc/src/sgml/ref/reindex.sgml +++ b/doc/src/sgml/ref/reindex.sgml @@ -241,7 +241,7 @@ REINDEX [ ( VERBOSE ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } [ CONCURR Reindexing a single index or table requires being the owner of that index or table. Reindexing a schema or database requires being the - owner of that schema or database. Note that is therefore sometimes + owner of that schema or database. Note specifically that it's possible for non-superusers to rebuild indexes of tables owned by other users. However, as a special exception, when REINDEX DATABASE, REINDEX SCHEMA diff --git a/doc/src/sgml/sources.sgml b/doc/src/sgml/sources.sgml index 419f753..79f5322 100644 --- a/doc/src/sgml/sources.sgml +++ b/doc/src/sgml/sources.sgml @@ -103,7 +103,7 @@ less -x4 message text. In addition there are optional elements, the most common of which is an error identifier code that follows the SQL spec's SQLSTATE conventions. - ereport itself is just a shell function, that exists + ereport itself is just a shell function that exists mainly for the syntactic convenience of making message generation look like a function call in the C source code. The only parameter accepted directly by ereport is the severity level. @@ -359,7 +359,7 @@ ereport(ERROR, specify suppression of the CONTEXT: portion of a message in the postmaster log. This should only be used for verbose debugging messages where the repeated inclusion of context would bloat the log - volume too much. + too much. @@ -452,8 +452,8 @@ Hint: the addendum enough for error messages. Detail and hint messages can be relegated to a verbose mode, or perhaps a pop-up error-details window. Also, details and hints would normally be suppressed from the server log to save - space. Reference to implementation details is best avoided since users - aren't expected to know the details. + space. References to implementation details are best avoided since users + aren't expected to know them. @@ -504,14 +504,14 @@ Hint: the addendum Use of Quotes - Use quotes always to delimit file names, user-supplied identifiers, and + Always use quotes to delimit file names, user-supplied identifiers, and other variables that might contain words. Do not use them to mark up variables that will not contain words (for example, operator names). There are functions in the backend that will double-quote their own output - at need (for example, format_type_be()). Do not put + as needed (for example, format_type_be()). Do not put additional quotes around the output of such functions. @@ -872,7 +872,7 @@ BETTER: unrecognized node type: 42 from a few platform dependent pieces. - A few features included in the C99 standard are, at this time, not be + A few features included in the C99 standard are, at this time, not permitted to be used in core PostgreSQL code. This currently includes variable length arrays, intermingled declarations and code, // comments, universal @@ -880,16 +880,16 @@ BETTER: unrecognized node type: 42 practices. - Features from later revision of the C standard or compiler specific + Features from later revisions of the C standard or compiler specific features can be used, if a fallback is provided. - For example _StaticAssert() and + For example, _StaticAssert() and __builtin_constant_p are currently used, even though - they are from newer revisions of the C standard and a - GCC extension respectively. If not available - we respectively fall back to using a C99 compatible replacement that - performs the same checks, but emits rather cryptic messages and do not + they are from a newer revision of the C standard and a + GCC extension, respectively. If not available, in the first case, + we fall back to using a C99 compatible replacement that + performs the same checks, but emits rather cryptic messages; in the second case, we do not use __builtin_constant_p. @@ -897,14 +897,14 @@ BETTER: unrecognized node type: 42 Function-Like Macros and Inline Functions - Both, macros with arguments and static inline - functions, may be used. The latter are preferable if there are + Both macros with arguments and static inline + functions may be used. The latter are preferable if there are multiple-evaluation hazards when written as a macro, as e.g. the case with #define Max(x, y) ((x) > (y) ? (x) : (y)) - or when the macro would be very long. In other cases it's only + or when the macro would be very long. In other cases, it's only possible to use macros, or at least easier. For example because expressions of various types need to be passed to the macro. @@ -936,19 +936,19 @@ MemoryContextSwitchTo(MemoryContext context) Writing Signal Handlers - To be suitable to run inside a signal handler code has to be + To be suitable to run inside a signal handler, code has to be written very carefully. The fundamental problem is that, unless blocked, a signal handler can interrupt code at any time. If code - inside the signal handler uses the same state as code outside - chaos may ensue. As an example consider what happens if a signal + inside the signal handler uses the same state as code outside, + chaos may ensue. As an example, consider what happens if a signal handler tries to acquire a lock that's already held in the interrupted code. - Barring special arrangements code in signal handlers may only + Barring special arrangements, code in signal handlers may only call async-signal safe functions (as defined in POSIX) and access variables of type volatile sig_atomic_t. A few - functions in postgres are also deemed signal safe, importantly + functions in postgres are also deemed signal safe; specifically, SetLatch(). @@ -969,9 +969,9 @@ handle_sighup(SIGNAL_ARGS) } errno is saved and restored because - SetLatch() might change it. If that were not done - interrupted code that's currently inspecting errno might see the wrong - value. + SetLatch() might change it. If that were not done, + code interrupted by a signal might see the wrong value of + errno. diff --git a/doc/src/sgml/xfunc.sgml b/doc/src/sgml/xfunc.sgml index 3403269..5c17b10 100644 --- a/doc/src/sgml/xfunc.sgml +++ b/doc/src/sgml/xfunc.sgml @@ -3364,11 +3364,11 @@ if (!ptr) - By default, a function is just a black box that the - database system knows very little about the behavior of. However, - that means that queries using the function may be executed much less + By default, a function is a black box that the + database system knows very little about, which + means queries calling the function may be executed less efficiently than they could be. It is possible to supply additional - knowledge that helps the planner optimize function calls. + information that helps the planner optimize function calls. @@ -3381,7 +3381,7 @@ if (!ptr) The parallel safety property (PARALLEL UNSAFE, PARALLEL RESTRICTED, or PARALLEL SAFE) must also be specified if you hope - to use the function in parallelized queries. + queries calling the function to use parallel query. It can also be useful to specify the function's estimated execution cost, and/or the number of rows a set-returning function is estimated to return. However, the declarative way of specifying those two @@ -3393,7 +3393,7 @@ if (!ptr) It is also possible to attach a planner support function to a SQL-callable function (called its target function), and thereby provide - knowledge about the target function that is too complex to be + information about the target function that is too complex to be represented declaratively. Planner support functions have to be written in C (although their target functions might not be), so this is an advanced feature that relatively few people will use. -- 2.1.4 --IMjqdzrDRly81ofr Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v1-0003-JIT-typos.patch" From 888d86c352dc0fe9efc7f16ec0dd405d4e4f61f3 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Sat, 30 Mar 2019 17:24:35 -0500 Subject: [PATCH v1 3/8] JIT typos.. ..which I sent to Andres some time ago and which I noticed were never applied (nor rejected). https://www.postgresql.org/message-id/20181127184133.GM10913%40telsasoft.com --- src/backend/jit/llvm/llvmjit_deform.c | 22 +++++++++++----------- src/backend/jit/llvm/llvmjit_inline.cpp | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/backend/jit/llvm/llvmjit_deform.c b/src/backend/jit/llvm/llvmjit_deform.c index 94b4635..e4a430f 100644 --- a/src/backend/jit/llvm/llvmjit_deform.c +++ b/src/backend/jit/llvm/llvmjit_deform.c @@ -103,7 +103,7 @@ slot_compile_deform(LLVMJitContext *context, TupleDesc desc, funcname = llvm_expand_funcname(context, "deform"); /* - * Check which columns do have to exist, so we don't have to check the + * Check which columns have to exist, so we don't have to check the * rows natts unnecessarily. */ for (attnum = 0; attnum < desc->natts; attnum++) @@ -298,7 +298,7 @@ slot_compile_deform(LLVMJitContext *context, TupleDesc desc, } /* - * Check if's guaranteed the all the desired attributes are available in + * Check if it's guaranteed that all the desired attributes are available in * tuple. If so, we can start deforming. If not, need to make sure to * fetch the missing columns. */ @@ -383,7 +383,7 @@ slot_compile_deform(LLVMJitContext *context, TupleDesc desc, /* * If this is the first attribute, slot->tts_nvalid was 0. Therefore - * reset offset to 0 to, it be from a previous execution. + * also reset offset to 0, it may be from a previous execution. */ if (attnum == 0) { @@ -413,7 +413,7 @@ slot_compile_deform(LLVMJitContext *context, TupleDesc desc, /* * Check for nulls if necessary. No need to take missing attributes - * into account, because in case they're present the heaptuple's natts + * into account, because if they're present, the heaptuple's natts * would have indicated that a slot_getmissingattrs() is needed. */ if (!att->attnotnull) @@ -500,13 +500,13 @@ slot_compile_deform(LLVMJitContext *context, TupleDesc desc, (known_alignment < 0 || known_alignment != TYPEALIGN(alignto, known_alignment))) { /* - * When accessing a varlena field we have to "peek" to see if we + * When accessing a varlena field, we have to "peek" to see if we * are looking at a pad byte or the first byte of a 1-byte-header * datum. A zero byte must be either a pad byte, or the first - * byte of a correctly aligned 4-byte length word; in either case + * byte of a correctly aligned 4-byte length word; in either case, * we can align safely. A non-zero byte must be either a 1-byte * length word, or the first byte of a correctly aligned 4-byte - * length word; in either case we need not align. + * length word; in either case, we need not align. */ if (att->attlen == -1) { @@ -600,8 +600,8 @@ slot_compile_deform(LLVMJitContext *context, TupleDesc desc, else if (att->attnotnull && attguaranteedalign && known_alignment >= 0) { /* - * If the offset to the column was previously known a NOT NULL & - * fixed width column guarantees that alignment is just the + * If the offset to the column was previously known, a NOT NULL & + * fixed-width column guarantees that alignment is just the * previous alignment plus column width. */ Assert(att->attlen > 0); @@ -642,8 +642,8 @@ slot_compile_deform(LLVMJitContext *context, TupleDesc desc, LLVMBuildGEP(b, v_tts_nulls, &l_attno, 1, "")); /* - * Store datum. For byval datums copy the value, extend to Datum's - * width, and store. For byref types, store pointer to data. + * Store datum. For byval datums: copy the value, extend to Datum's + * width, and store. For byref types: store pointer to data. */ if (att->attbyval) { diff --git a/src/backend/jit/llvm/llvmjit_inline.cpp b/src/backend/jit/llvm/llvmjit_inline.cpp index 96fc68a..07b5fc7 100644 --- a/src/backend/jit/llvm/llvmjit_inline.cpp +++ b/src/backend/jit/llvm/llvmjit_inline.cpp @@ -9,7 +9,7 @@ * for an external function is found - not guaranteed! - the index will then * be used to judge their instruction count / inline worthiness. After doing * so for all external functions, all the referenced functions (and - * prerequisites) will be imorted. + * prerequisites) will be imported. * * Copyright (c) 2016-2019, PostgreSQL Global Development Group * -- 2.1.4 --IMjqdzrDRly81ofr Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v1-0004-Add-comma-for-readability.patch" From 825ad8ebf9bdd1eab07bf5bedde35f349a75687e Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Fri, 29 Mar 2019 19:37:35 -0500 Subject: [PATCH v1 4/8] Add comma for readability --- doc/src/sgml/bki.sgml | 2 +- doc/src/sgml/config.sgml | 4 ++-- doc/src/sgml/indices.sgml | 2 +- doc/src/sgml/installation.sgml | 2 +- doc/src/sgml/ref/create_table.sgml | 2 +- doc/src/sgml/ref/create_table_as.sgml | 2 +- doc/src/sgml/ref/pgupgrade.sgml | 4 ++-- doc/src/sgml/ref/psql-ref.sgml | 2 +- doc/src/sgml/sources.sgml | 4 ++-- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/src/sgml/bki.sgml b/doc/src/sgml/bki.sgml index aa3d6f8..e27fa76 100644 --- a/doc/src/sgml/bki.sgml +++ b/doc/src/sgml/bki.sgml @@ -403,7 +403,7 @@ 8000—9999. This minimizes the risk of OID collisions with other patches being developed concurrently. To keep the 8000—9999 range free for development purposes, after a patch has been committed - to the master git repository its OIDs should be renumbered into + to the master git repository, its OIDs should be renumbered into available space below that range. Typically, this will be done near the end of each development cycle, moving all OIDs consumed by patches committed in that cycle at the same time. The script diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 5f6873d..72f03c0 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -3433,7 +3433,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows reached. The default is pause, which means recovery will be paused. promote means the recovery process will finish and the server will start to accept connections. - Finally shutdown will stop the server after reaching the + Finally, shutdown will stop the server after reaching the recovery target. @@ -4128,7 +4128,7 @@ ANY num_sync ( , REM This clause specifies optional storage parameters for a table or index; see for more - information. For backward-compatibility the WITH + information. For backward-compatibility, the WITH clause for a table can also include OIDS=FALSE to specify that rows of the new table should not contain OIDs (object identifiers), OIDS=TRUE is not supported anymore. diff --git a/doc/src/sgml/ref/create_table_as.sgml b/doc/src/sgml/ref/create_table_as.sgml index 679e8f5..ececc4a 100644 --- a/doc/src/sgml/ref/create_table_as.sgml +++ b/doc/src/sgml/ref/create_table_as.sgml @@ -127,7 +127,7 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXI This clause specifies optional storage parameters for the new table; see for more - information. For backward-compatibility the WITH + information. For backward-compatibility, the WITH clause for a table can also include OIDS=FALSE to specify that rows of the new table should contain no OIDs (object identifiers), OIDS=TRUE is not supported anymore. diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml index c896882..7fee896 100644 --- a/doc/src/sgml/ref/pgupgrade.sgml +++ b/doc/src/sgml/ref/pgupgrade.sgml @@ -726,7 +726,7 @@ psql --username=postgres --file=script.sql postgres pg_upgrade launches short-lived postmasters in the old and new data directories. Temporary Unix socket files for communication with these postmasters are, by default, made in the current - working directory. In some situations the path name for the current + working directory. In some situations, the path name for the current directory might be too long to be a valid socket name. In that case you can use the option to put the socket files in some directory with a shorter path name. For security, be sure that that @@ -793,7 +793,7 @@ psql --username=postgres --file=script.sql postgres - In PostgreSQL 12 and later small tables by + In PostgreSQL 12 and later, small tables by default don't have a free space map, as a space optimization. If you are upgrading a pre-12 cluster, the free space maps of small tables will likewise not be transferred to the new cluster. diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 1b5d82e..2f86885 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -1053,7 +1053,7 @@ testdb=> These operations are not as efficient as the SQL COPY command with a file or program data source or destination, because all data must pass through the client/server - connection. For large amounts of data the SQL + connection. For large amounts of data, the SQL command might be preferable. diff --git a/doc/src/sgml/sources.sgml b/doc/src/sgml/sources.sgml index 79f5322..520bbae 100644 --- a/doc/src/sgml/sources.sgml +++ b/doc/src/sgml/sources.sgml @@ -100,7 +100,7 @@ less -x4 There are two required elements for every message: a severity level (ranging from DEBUG to PANIC) and a primary - message text. In addition there are optional elements, the most + message text. In addition, there are optional elements, the most common of which is an error identifier code that follows the SQL spec's SQLSTATE conventions. ereport itself is just a shell function that exists @@ -473,7 +473,7 @@ Hint: the addendum Rationale: Messages are not necessarily displayed on terminal-type - displays. In GUI displays or browsers these formatting instructions are + displays. In GUI displays or browsers, these formatting instructions are at best ignored. -- 2.1.4 --IMjqdzrDRly81ofr Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v1-0005-Consistent-language-must-be-superuser.patch" From 2a5c79d684f7b0ff61014d5df23779acdf5b9f02 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Fri, 29 Mar 2019 19:40:49 -0500 Subject: [PATCH v1 5/8] Consistent language: "must be superuser" --- src/backend/storage/ipc/signalfuncs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/storage/ipc/signalfuncs.c b/src/backend/storage/ipc/signalfuncs.c index 4769b1b..ab26328 100644 --- a/src/backend/storage/ipc/signalfuncs.c +++ b/src/backend/storage/ipc/signalfuncs.c @@ -115,7 +115,7 @@ pg_cancel_backend(PG_FUNCTION_ARGS) if (r == SIGNAL_BACKEND_NOSUPERUSER) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - (errmsg("must be a superuser to cancel superuser query")))); + (errmsg("must be superuser to cancel superuser query")))); if (r == SIGNAL_BACKEND_NOPERMISSION) ereport(ERROR, @@ -139,12 +139,12 @@ pg_terminate_backend(PG_FUNCTION_ARGS) if (r == SIGNAL_BACKEND_NOSUPERUSER) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - (errmsg("must be a superuser to terminate superuser process")))); + (errmsg("must be superuser to terminate superuser process")))); if (r == SIGNAL_BACKEND_NOPERMISSION) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - (errmsg("must be a member of the role whose process is being terminated or member of pg_signal_backend")))); + (errmsg("must be member of role whose process is being terminated or member of pg_signal_backend")))); PG_RETURN_BOOL(r == SIGNAL_BACKEND_SUCCESS); } -- 2.1.4 --IMjqdzrDRly81ofr Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v1-0006-Consistent-spelling-timestamp.patch" From 991664fb385ee824113d08e6f85f7d1bcca8301e Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Fri, 29 Mar 2019 19:52:22 -0500 Subject: [PATCH v1 6/8] Consistent spelling: "timestamp" --- doc/src/sgml/config.sgml | 14 ++++++------- doc/src/sgml/datatype.sgml | 6 +++--- doc/src/sgml/ecpg.sgml | 4 ++-- doc/src/sgml/func.sgml | 30 +++++++++++++-------------- doc/src/sgml/logicaldecoding.sgml | 4 ++-- doc/src/sgml/plpgsql.sgml | 2 +- doc/src/sgml/ref/pgbench.sgml | 6 +++--- doc/src/sgml/replication-origins.sgml | 2 +- doc/src/sgml/trigger.sgml | 2 +- doc/src/sgml/uuid-ossp.sgml | 2 +- src/backend/utils/misc/guc.c | 4 ++-- src/backend/utils/misc/postgresql.conf.sample | 2 +- src/include/catalog/pg_control.h | 4 ++-- src/interfaces/ecpg/pgtypeslib/timestamp.c | 4 ++-- 14 files changed, 43 insertions(+), 43 deletions(-) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 72f03c0..3a58e4d 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -3319,7 +3319,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows - This parameter specifies the time stamp up to which recovery + This parameter specifies the timestamp up to which recovery will proceed. The precise stopping point is also influenced by . @@ -4111,7 +4111,7 @@ ANY num_sync ( @@ -6241,7 +6241,7 @@ local0.* /var/log/postgresql %s - Process start time stamp + Process start timestamp no @@ -6296,7 +6296,7 @@ FROM pg_stat_activity; Syslog produces its own - time stamp and process ID information, so you probably do not want to + timestamp and process ID information, so you probably do not want to include those escapes if you are logging to syslog. @@ -6445,7 +6445,7 @@ log_line_prefix = '%m [%p] %q%u@%d/%a ' This option emits log lines in comma-separated-values (CSV) format, with these columns: - time stamp with milliseconds, + timestamp with milliseconds, user name, database name, process ID, @@ -7854,7 +7854,7 @@ SET XML OPTION { DOCUMENT | CONTENT }; - Sets the time zone for displaying and interpreting time stamps. + Sets the time zone for displaying and interpreting timestamps. The built-in default is GMT, but that is typically overridden in postgresql.conf; initdb will install a setting there corresponding to its system environment. diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 52c28e7..10ae238 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -2031,7 +2031,7 @@ MINUTE TO SECOND - Valid input for the time stamp types consists of the concatenation + Valid input for the timestamp types consists of the concatenation of a date and a time, followed by an optional time zone, followed by an optional AD or BC. (Alternatively, AD/BC can appear @@ -2159,12 +2159,12 @@ January 8 04:05:06 1999 PST infinity date, timestamp - later than all other time stamps + later than all other timestamps -infinity date, timestamp - earlier than all other time stamps + earlier than all other timestamps now diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml index 798aae4..c2d29c9 100644 --- a/doc/src/sgml/ecpg.sgml +++ b/doc/src/sgml/ecpg.sgml @@ -1030,7 +1030,7 @@ struct varchar_var { int len; char arr[180]; } var; the pgtypes library. The pgtypes library, described in detail in contains basic functions to deal with those types, such that you do not need to send a query to - the SQL server just for adding an interval to a time stamp for + the SQL server just for adding an interval to a timestamp for example. @@ -3622,7 +3622,7 @@ void PGTYPESdecimal_free(decimal *var); PGTYPESInvalidTimestamp - A value of type timestamp representing an invalid time stamp. This is + A value of type timestamp representing an invalid timestamp. This is returned by the function PGTYPEStimestamp_from_asc on parse error. Note that due to the internal representation of the timestamp data type, diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index d249011..df47ec2 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -5964,7 +5964,7 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); to_char(timestamp, text) text - convert time stamp to string + convert timestamp to string to_char(current_timestamp, 'HH12:MI:SS') @@ -6022,7 +6022,7 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); to_timestamp(text, text) timestamp with time zone - convert string to time stamp + convert string to timestamp to_timestamp('05 Dec 2000', 'DD Mon YYYY') @@ -7357,7 +7357,7 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); isfinite(timestamp) boolean - Test for finite time stamp (not +/-infinity) + Test for finite timestamp (not +/-infinity) isfinite(timestamp '2001-02-16 21:28:30') true @@ -7647,8 +7647,8 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); This expression yields true when two time periods (defined by their endpoints) overlap, false when they do not overlap. The endpoints - can be specified as pairs of dates, times, or time stamps; or as - a date, time, or time stamp followed by an interval. When a pair + can be specified as pairs of dates, times, or timestamps; or as + a date, time, or timestamp followed by an interval. When a pair of values is provided, either the start or the end can be written first; OVERLAPS automatically takes the earlier value of the pair as the start. Each time period is considered to @@ -7881,7 +7881,7 @@ SELECT EXTRACT(EPOCH FROM INTERVAL '5 days 3 hours'); - You can convert an epoch value back to a time stamp + You can convert an epoch value back to a timestamp with to_timestamp: @@ -8288,7 +8288,7 @@ SELECT date_trunc('hour', INTERVAL '3 days 02:47:33'); The AT TIME ZONE converts time stamp without time zone to/from - time stamp with time zone, and + timestamp with time zone, and time values to different time zones. shows its variants. @@ -8310,7 +8310,7 @@ SELECT date_trunc('hour', INTERVAL '3 days 02:47:33'); timestamp without time zone AT TIME ZONE zone timestamp with time zone - Treat given time stamp without time zone as located in the specified time zone + Treat given timestamp without time zone as located in the specified time zone @@ -8318,7 +8318,7 @@ SELECT date_trunc('hour', INTERVAL '3 days 02:47:33'); timestamp with time zone AT TIME ZONE zone timestamp without time zone - Convert given time stamp with time zone to the new time + Convert given timestamp with time zone to the new time zone, with no time zone designation @@ -8355,7 +8355,7 @@ SELECT TIMESTAMP '2001-02-16 20:38:40-05' AT TIME ZONE 'Asia/Tokyo' AT TIME ZONE The first example adds a time zone to a value that lacks it, and displays the value using the current TimeZone - setting. The second example shifts the time stamp with time zone value + setting. The second example shifts the timestamp with time zone value to the specified time zone, and returns the value without a time zone. This allows storage and display of values different from the current TimeZone setting. The third example converts @@ -8448,7 +8448,7 @@ SELECT LOCALTIMESTAMP; the intent is to allow a single transaction to have a consistent notion of the current time, so that multiple modifications within the same transaction bear the same - time stamp. + timestamp. @@ -20099,7 +20099,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); pg_last_xact_replay_timestamp() timestamp with time zone - Get time stamp of last transaction replayed during recovery. + Get timestamp of last transaction replayed during recovery. This is the time at which the commit or abort WAL record for that transaction was generated on the primary. If no transactions have been replayed during recovery, this function @@ -21516,9 +21516,9 @@ SELECT convert_from(pg_read_binary_file('file_in_utf8.txt'), 'UTF8'); pg_stat_file returns a record containing the file - size, last accessed time stamp, last modified time stamp, - last file status change time stamp (Unix platforms only), - file creation time stamp (Windows only), and a boolean + size, last accessed timestamp, last modified timestamp, + last file status change timestamp (Unix platforms only), + file creation timestamp (Windows only), and a boolean indicating if it is a directory. Typical usages include: SELECT * FROM pg_stat_file('filename'); diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml index 8db9686..01eacf7 100644 --- a/doc/src/sgml/logicaldecoding.sgml +++ b/doc/src/sgml/logicaldecoding.sgml @@ -536,7 +536,7 @@ typedef void (*LogicalDecodeBeginCB) (struct LogicalDecodingContext *ctx, ReorderBufferTXN *txn); The txn parameter contains meta information about - the transaction, like the time stamp at which it has been committed and + the transaction, like the timestamp at which it has been committed and its XID. @@ -660,7 +660,7 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx, const char *message); The txn parameter contains meta information about - the transaction, like the time stamp at which it has been committed and + the transaction, like the timestamp at which it has been committed and its XID. Note however that it can be NULL when the message is non-transactional and the XID was not assigned yet in the transaction which logged the message. The lsn has WAL diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml index 50f1884..27dc1c7 100644 --- a/doc/src/sgml/plpgsql.sgml +++ b/doc/src/sgml/plpgsql.sgml @@ -4855,7 +4855,7 @@ $$ LANGUAGE plpgsql; PL/pgSQL interpreter casts this string to the timestamp type by calling the text_out and timestamp_in - functions for the conversion. So, the computed time stamp is updated + functions for the conversion. So, the computed timestamp is updated on each execution as the programmer expects. Even though this happens to work as expected, it's not terribly efficient, so use of the now() function would still be a better idea. diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml index b4c7629..dbeec28 100644 --- a/doc/src/sgml/ref/pgbench.sgml +++ b/doc/src/sgml/ref/pgbench.sgml @@ -1665,9 +1665,9 @@ END; script_no identifies which script file was used (useful when multiple scripts were specified with or ), and time_epoch/time_us are a - Unix-epoch time stamp and an offset + Unix-epoch timestamp and an offset in microseconds (suitable for creating an ISO 8601 - time stamp with fractional seconds) showing when + timestamp with fractional seconds) showing when the transaction completed. The schedule_lag field is the difference between the transaction's scheduled start time, and the time it actually started, in @@ -1723,7 +1723,7 @@ END; where interval_start is the start of the interval (as a Unix - epoch time stamp), + epoch timestamp), num_transactions is the number of transactions within the interval, sum_latency is the sum of the transaction diff --git a/doc/src/sgml/replication-origins.sgml b/doc/src/sgml/replication-origins.sgml index a03ce76..aaa3705 100644 --- a/doc/src/sgml/replication-origins.sgml +++ b/doc/src/sgml/replication-origins.sgml @@ -61,7 +61,7 @@ marked as replaying from a remote node (using the pg_replication_origin_session_setup() function). Additionally the LSN and commit - time stamp of every source transaction can be configured on a per + timestamp of every source transaction can be configured on a per transaction basis using pg_replication_origin_xact_setup(). If that's done replication progress will persist in a crash safe diff --git a/doc/src/sgml/trigger.sgml b/doc/src/sgml/trigger.sgml index 67e1861..1bd69f2 100644 --- a/doc/src/sgml/trigger.sgml +++ b/doc/src/sgml/trigger.sgml @@ -335,7 +335,7 @@ requirements to call the same function. As an example, there could be a generalized trigger function that takes as its arguments two column names and puts the current user in one and - the current time stamp in the other. Properly written, this + the current timestamp in the other. Properly written, this trigger function would be independent of the specific table it is triggering on. So the same function could be used for INSERT events on any table with suitable diff --git a/doc/src/sgml/uuid-ossp.sgml b/doc/src/sgml/uuid-ossp.sgml index b3b816c..db8871b 100644 --- a/doc/src/sgml/uuid-ossp.sgml +++ b/doc/src/sgml/uuid-ossp.sgml @@ -41,7 +41,7 @@ This function generates a version 1 UUID. This involves the MAC - address of the computer and a time stamp. Note that UUIDs of this + address of the computer and a timestamp. Note that UUIDs of this kind reveal the identity of the computer that created the identifier and the time at which it did so, which might make it unsuitable for certain security-sensitive applications. diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 415cd78..1c18969 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -3445,7 +3445,7 @@ static struct config_string ConfigureNamesString[] = }, { {"recovery_target_time", PGC_POSTMASTER, WAL_RECOVERY_TARGET, - gettext_noop("Sets the time stamp up to which recovery will proceed."), + gettext_noop("Sets the timestamp up to which recovery will proceed."), NULL }, &recovery_target_time_string, @@ -3827,7 +3827,7 @@ static struct config_string ConfigureNamesString[] = { {"TimeZone", PGC_USERSET, CLIENT_CONN_LOCALE, - gettext_noop("Sets the time zone for displaying and interpreting time stamps."), + gettext_noop("Sets the time zone for displaying and interpreting timestamps."), NULL, GUC_REPORT }, diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index 684f5e7..d6f209f 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -255,7 +255,7 @@ # (change requires restart) #recovery_target_name = '' # the named restore point to which recovery will proceed # (change requires restart) -#recovery_target_time = '' # the time stamp up to which recovery will proceed +#recovery_target_time = '' # the timestamp up to which recovery will proceed # (change requires restart) #recovery_target_xid = '' # the transaction ID up to which recovery will proceed # (change requires restart) diff --git a/src/include/catalog/pg_control.h b/src/include/catalog/pg_control.h index ff98d9e..06fbe76 100644 --- a/src/include/catalog/pg_control.h +++ b/src/include/catalog/pg_control.h @@ -48,7 +48,7 @@ typedef struct CheckPoint Oid oldestXidDB; /* database with minimum datfrozenxid */ MultiXactId oldestMulti; /* cluster-wide minimum datminmxid */ Oid oldestMultiDB; /* database with minimum datminmxid */ - pg_time_t time; /* time stamp of checkpoint */ + pg_time_t time; /* timestamp of checkpoint */ TransactionId oldestCommitTsXid; /* oldest Xid with valid commit * timestamp */ TransactionId newestCommitTsXid; /* newest Xid with valid commit @@ -125,7 +125,7 @@ typedef struct ControlFileData * System status data */ DBState state; /* see enum above */ - pg_time_t time; /* time stamp of last pg_control update */ + pg_time_t time; /* timestamp of last pg_control update */ XLogRecPtr checkPoint; /* last check point record ptr */ CheckPoint checkPointCopy; /* copy of last check point record */ diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c index a7e0fe6..35697e2 100644 --- a/src/interfaces/ecpg/pgtypeslib/timestamp.c +++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c @@ -854,7 +854,7 @@ PGTYPEStimestamp_defmt_asc(const char *str, const char *fmt, timestamp * d) } /* -* add an interval to a time stamp +* add an interval to a timestamp * * *tout = tin + span * @@ -913,7 +913,7 @@ PGTYPEStimestamp_add_interval(timestamp * tin, interval * span, timestamp * tout /* -* subtract an interval from a time stamp +* subtract an interval from a timestamp * * *tout = tin - span * -- 2.1.4 --IMjqdzrDRly81ofr Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v1-0007-overridden-vs-overwritten.patch" From d517351a5ff63cc0fb63fb5c94e3635efa80e39e Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Fri, 29 Mar 2019 13:18:12 -0500 Subject: [PATCH v1 7/8] overridden vs overwritten --- doc/src/sgml/ref/pgbench.sgml | 2 +- doc/src/sgml/ref/psql-ref.sgml | 2 +- src/test/regress/expected/create_table.out | 2 +- src/test/regress/sql/create_table.sql | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml index dbeec28..d0a79b9 100644 --- a/doc/src/sgml/ref/pgbench.sgml +++ b/doc/src/sgml/ref/pgbench.sgml @@ -941,7 +941,7 @@ pgbench options d random_seed - random generator seed (unless overwritten with ) + random generator seed (unless overridden with ) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 2f86885..ff32981 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -478,7 +478,7 @@ EOF leave off the equal sign. To set a variable with an empty value, use the equal sign but leave off the value. These assignments are done during command line processing, so variables that reflect - connection state will get overwritten later. + connection state will be overridden later. diff --git a/src/test/regress/expected/create_table.out b/src/test/regress/expected/create_table.out index ad0cb32..44c7864 100644 --- a/src/test/regress/expected/create_table.out +++ b/src/test/regress/expected/create_table.out @@ -874,7 +874,7 @@ create table parted_notnull_inh_test1 partition of parted_notnull_inh_test (a no insert into parted_notnull_inh_test (b) values (null); ERROR: null value in column "b" violates not-null constraint DETAIL: Failing row contains (1, null). --- note that while b's default is overriden, a's default is preserved +-- note that while b's default is overridden, a's default is preserved \d parted_notnull_inh_test1 Table "public.parted_notnull_inh_test1" Column | Type | Collation | Nullable | Default diff --git a/src/test/regress/sql/create_table.sql b/src/test/regress/sql/create_table.sql index 751c0d3..36222c2 100644 --- a/src/test/regress/sql/create_table.sql +++ b/src/test/regress/sql/create_table.sql @@ -720,7 +720,7 @@ CREATE TABLE part_c_1_10 PARTITION OF part_c FOR VALUES FROM (1) TO (10); create table parted_notnull_inh_test (a int default 1, b int not null default 0) partition by list (a); create table parted_notnull_inh_test1 partition of parted_notnull_inh_test (a not null, b default 1) for values in (1); insert into parted_notnull_inh_test (b) values (null); --- note that while b's default is overriden, a's default is preserved +-- note that while b's default is overridden, a's default is preserved \d parted_notnull_inh_test1 drop table parted_notnull_inh_test; -- 2.1.4 --IMjqdzrDRly81ofr Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v1-0008-Clean-up-language-in-cf984672.patch" From d8bbad7d21c79047f760a6c8b6ce1441077acfbf Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Sat, 30 Mar 2019 03:42:35 -0500 Subject: [PATCH v1 8/8] Clean up language in cf984672 --- doc/src/sgml/func.sgml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index df47ec2..32b23f3 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -6399,19 +6399,19 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); exceeds the number of separators in the template. - If FX is specified, separator in template string - matches to exactly one character in input string. Notice we don't insist - input string character to be the same as template string separator. + If FX is specified, a separator in the template string + matches exactly one character in the input string. But note that the + character in the input string is not required to be the same character in the template string. For example, to_timestamp('2000/JUN', 'FXYYYY MON') works, but to_timestamp('2000/JUN', 'FXYYYY  MON') - returns an error because a space second template string space consumed - letter J from the input string. + returns an error because a space in its template string consumes + the letter J from the input string. - TZH template pattern can match a signed number. + The TZH template pattern can match a signed number. Without the FX option, it may lead to ambiguity in interpretation of the minus sign, which can also be interpreted as a separator. This ambiguity is resolved as follows. If the number of separators before -- 2.1.4 --IMjqdzrDRly81ofr--