Should the WAIT FOR command tag be "WAIT" or "WAIT FOR"?
Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.
This thread has been committed, so CI has stopped here. Anything below is the last result it produced.
You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:
docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t253594psql -h localhost -U postgresBuilt from patchset v6 (message #6), September 14, 2026 at 04:31 AM.
Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:
git clone --branch t253594_6 https://github.com/hackorum-dev/postgres.gitIn a checkout you already have, add the fork once:
git remote add hackorum https://github.com/hackorum-dev/postgres.gitthen, for this patchset and every later one:
git fetch hackorum t253594_6 && git checkout t253594_6Patchset v6 (message #6) is on t253594_6
Hi all,
While reviewing a patch for the WAIT FOR command I noticed that its
command tag is "WAIT" rather than "WAIT FOR". I could not find this
discussed in the main thread, although I have not read all of them, so
I might miss something. I want to confirm it because a command tag is
not something we can revisit later when we release v19.0.
There are some command tags that are shorter than the command they
name: RELEASE, ROLLBACK, SET and WAIT. While the first three commands
make sense as they have some variants or some keywords are omittable
such as RELEASE [SAVEPOINT], ROLLBACK [TRANSACTION], ROLLBACK TO
[SAVEPOINT], SET ROLE, and SET TRANSACTION, the WAIT FOR has a single
spelling, "WAIT FOR LSN ...". Strictly the same rule would argue for
"WAIT FOR LSN", but "WAIT FOR" is the name the manual gives the
command, and it leaves room if other things become waitable in the
future.
If it was a deliberate choice I am happy to leave it alone. Otherwise
I would slightly prefer "WAIT FOR", and I can post the one-line patch.
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
Masahiko Sawada <sawada.mshk@gmail.com> writes:
While reviewing a patch for the WAIT FOR command I noticed that its
command tag is "WAIT" rather than "WAIT FOR". I could not find this
discussed in the main thread, although I have not read all of them, so
I might miss something. I want to confirm it because a command tag is
not something we can revisit later when we release v19.0.
I think it's fine. The FOR is a noise word that's useful only to
make the command's grammar vaguely resemble English. For precedent,
consider INSERT, which must have INTO but that's not part of the
command tag.
Strictly the same rule would argue for
"WAIT FOR LSN", but "WAIT FOR" is the name the manual gives the
command, and it leaves room if other things become waitable in the
future.
If anything, I'd change the manual. "WAIT FOR" is neither short
nor a useful description of what's being waited for. Either "WAIT"
or "WAIT FOR LSN" would be more plausible as a page heading.
regards, tom lane
On Fri, Aug 28, 2026 at 1:11 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Masahiko Sawada <sawada.mshk@gmail.com> writes:
While reviewing a patch for the WAIT FOR command I noticed that its
command tag is "WAIT" rather than "WAIT FOR". I could not find this
discussed in the main thread, although I have not read all of them, so
I might miss something. I want to confirm it because a command tag is
not something we can revisit later when we release v19.0.I think it's fine. The FOR is a noise word that's useful only to
make the command's grammar vaguely resemble English. For precedent,
consider INSERT, which must have INTO but that's not part of the
command tag.
Good point. A difference between INSERT and WAIT is that the doc uses
"WAIT FOR" as its command name instead of "WAIT" whereas it uses
"INSERT" for INSERT statements:
% git grep -e "<command>WAIT.*</command>"
doc/src/sgml/ref/wait_for.sgml: <command>WAIT FOR</command> must be
executed as a top-level command.
doc/src/sgml/ref/wait_for.sgml: <command>WAIT FOR</command> waits
until the specified
doc/src/sgml/ref/wait_for.sgml: <command>WAIT FOR</command> compares
only the numeric
doc/src/sgml/ref/wait_for.sgml: <command>WAIT FOR</command> will
return <literal>success</literal>
doc/src/sgml/ref/wait_for.sgml: On a standby server, <command>WAIT
FOR</command> sessions may be
doc/src/sgml/ref/wait_for.sgml: doing. Applications using
<command>WAIT FOR</command> on a standby
doc/src/sgml/ref/wait_for.sgml: You can use <command>WAIT
FOR</command> command to wait for
doc/src/sgml/ref/wait_for.sgml: Then an application could run
<command>WAIT FOR</command>
doc/src/sgml/ref/wait_for.sgml: The same example uses <command>WAIT
FOR</command> with
doc/src/sgml/release-19.sgml: A new <link
linkend="sql-wait-for"><command>WAIT FOR</command></link>
doc/src/sgml/release-19.sgml:Add <link
linkend="sql-wait-for"><command>WAIT FOR</command></link> command to
allow standbys to wait for <link
linkend="wal-internals"><acronym>LSN</acronym></link> values to be
written, flushed, or replayed (Kartyshov Ivan, Alexander Korotkov,
Xuneng Zhou)
Strictly the same rule would argue for
"WAIT FOR LSN", but "WAIT FOR" is the name the manual gives the
command, and it leaves room if other things become waitable in the
future.If anything, I'd change the manual. "WAIT FOR" is neither short
nor a useful description of what's being waited for. Either "WAIT"
or "WAIT FOR LSN" would be more plausible as a page heading.
Agreed.
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
Hi Sawada-san, Tom,
On Sat, Aug 29, 2026 at 5:40 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
On Fri, Aug 28, 2026 at 1:11 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Masahiko Sawada <sawada.mshk@gmail.com> writes:
While reviewing a patch for the WAIT FOR command I noticed that its
command tag is "WAIT" rather than "WAIT FOR". I could not find this
discussed in the main thread, although I have not read all of them, so
I might miss something. I want to confirm it because a command tag is
not something we can revisit later when we release v19.0.I think it's fine. The FOR is a noise word that's useful only to
make the command's grammar vaguely resemble English. For precedent,
consider INSERT, which must have INTO but that's not part of the
command tag.Good point. A difference between INSERT and WAIT is that the doc uses
"WAIT FOR" as its command name instead of "WAIT" whereas it uses
"INSERT" for INSERT statements:% git grep -e "<command>WAIT.*</command>"
doc/src/sgml/ref/wait_for.sgml: <command>WAIT FOR</command> must be
executed as a top-level command.
doc/src/sgml/ref/wait_for.sgml: <command>WAIT FOR</command> waits
until the specified
doc/src/sgml/ref/wait_for.sgml: <command>WAIT FOR</command> compares
only the numeric
doc/src/sgml/ref/wait_for.sgml: <command>WAIT FOR</command> will
return <literal>success</literal>
doc/src/sgml/ref/wait_for.sgml: On a standby server, <command>WAIT
FOR</command> sessions may be
doc/src/sgml/ref/wait_for.sgml: doing. Applications using
<command>WAIT FOR</command> on a standby
doc/src/sgml/ref/wait_for.sgml: You can use <command>WAIT
FOR</command> command to wait for
doc/src/sgml/ref/wait_for.sgml: Then an application could run
<command>WAIT FOR</command>
doc/src/sgml/ref/wait_for.sgml: The same example uses <command>WAIT
FOR</command> with
doc/src/sgml/release-19.sgml: A new <link
linkend="sql-wait-for"><command>WAIT FOR</command></link>
doc/src/sgml/release-19.sgml:Add <link
linkend="sql-wait-for"><command>WAIT FOR</command></link> command to
allow standbys to wait for <link
linkend="wal-internals"><acronym>LSN</acronym></link> values to be
written, flushed, or replayed (Kartyshov Ivan, Alexander Korotkov,
Xuneng Zhou)Strictly the same rule would argue for
"WAIT FOR LSN", but "WAIT FOR" is the name the manual gives the
command, and it leaves room if other things become waitable in the
future.If anything, I'd change the manual. "WAIT FOR" is neither short
nor a useful description of what's being waited for. Either "WAIT"
or "WAIT FOR LSN" would be more plausible as a page heading.Agreed.
Thanks for raising this. The above reasoning makes sense to me. Here's
a patch for it.
--
Regards,
Xuneng Zhou
HighGo Software Co., Ltd.
On Mon, Aug 31, 2026 at 7:52 AM Xuneng Zhou <xunengzhou@gmail.com> wrote:
On Sat, Aug 29, 2026 at 5:40 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
On Fri, Aug 28, 2026 at 1:11 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Masahiko Sawada <sawada.mshk@gmail.com> writes:
While reviewing a patch for the WAIT FOR command I noticed that its
command tag is "WAIT" rather than "WAIT FOR". I could not find this
discussed in the main thread, although I have not read all of them, so
I might miss something. I want to confirm it because a command tag is
not something we can revisit later when we release v19.0.I think it's fine. The FOR is a noise word that's useful only to
make the command's grammar vaguely resemble English. For precedent,
consider INSERT, which must have INTO but that's not part of the
command tag.Good point. A difference between INSERT and WAIT is that the doc uses
"WAIT FOR" as its command name instead of "WAIT" whereas it uses
"INSERT" for INSERT statements:% git grep -e "<command>WAIT.*</command>"
doc/src/sgml/ref/wait_for.sgml: <command>WAIT FOR</command> must be
executed as a top-level command.
doc/src/sgml/ref/wait_for.sgml: <command>WAIT FOR</command> waits
until the specified
doc/src/sgml/ref/wait_for.sgml: <command>WAIT FOR</command> compares
only the numeric
doc/src/sgml/ref/wait_for.sgml: <command>WAIT FOR</command> will
return <literal>success</literal>
doc/src/sgml/ref/wait_for.sgml: On a standby server, <command>WAIT
FOR</command> sessions may be
doc/src/sgml/ref/wait_for.sgml: doing. Applications using
<command>WAIT FOR</command> on a standby
doc/src/sgml/ref/wait_for.sgml: You can use <command>WAIT
FOR</command> command to wait for
doc/src/sgml/ref/wait_for.sgml: Then an application could run
<command>WAIT FOR</command>
doc/src/sgml/ref/wait_for.sgml: The same example uses <command>WAIT
FOR</command> with
doc/src/sgml/release-19.sgml: A new <link
linkend="sql-wait-for"><command>WAIT FOR</command></link>
doc/src/sgml/release-19.sgml:Add <link
linkend="sql-wait-for"><command>WAIT FOR</command></link> command to
allow standbys to wait for <link
linkend="wal-internals"><acronym>LSN</acronym></link> values to be
written, flushed, or replayed (Kartyshov Ivan, Alexander Korotkov,
Xuneng Zhou)Strictly the same rule would argue for
"WAIT FOR LSN", but "WAIT FOR" is the name the manual gives the
command, and it leaves room if other things become waitable in the
future.If anything, I'd change the manual. "WAIT FOR" is neither short
nor a useful description of what's being waited for. Either "WAIT"
or "WAIT FOR LSN" would be more plausible as a page heading.Agreed.
Thanks for raising this. The above reasoning makes sense to me. Here's
a patch for it.
Thank you for the patch. I think we should do some additional renames.
1. Change <command>WAIT FOR</command> to <command>WAIT</command> in
the page body.
2. The two error messages in commands/wait.c: WAIT FOR => WAIT
3. The reference id sql-waitfor => sql-wait
4. File name ref/wait_for.sgml => ref/wait.sgml, and the entity
&waitFor => &wait
------
Regards,
Alexander Korotkov
Supabase
Hi Alexander,
On Fri, Sep 11, 2026 at 6:13 AM Alexander Korotkov <aekorotkov@gmail.com> wrote:
On Mon, Aug 31, 2026 at 7:52 AM Xuneng Zhou <xunengzhou@gmail.com> wrote:
On Sat, Aug 29, 2026 at 5:40 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
On Fri, Aug 28, 2026 at 1:11 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Masahiko Sawada <sawada.mshk@gmail.com> writes:
While reviewing a patch for the WAIT FOR command I noticed that its
command tag is "WAIT" rather than "WAIT FOR". I could not find this
discussed in the main thread, although I have not read all of them, so
I might miss something. I want to confirm it because a command tag is
not something we can revisit later when we release v19.0.I think it's fine. The FOR is a noise word that's useful only to
make the command's grammar vaguely resemble English. For precedent,
consider INSERT, which must have INTO but that's not part of the
command tag.Good point. A difference between INSERT and WAIT is that the doc uses
"WAIT FOR" as its command name instead of "WAIT" whereas it uses
"INSERT" for INSERT statements:% git grep -e "<command>WAIT.*</command>"
doc/src/sgml/ref/wait_for.sgml: <command>WAIT FOR</command> must be
executed as a top-level command.
doc/src/sgml/ref/wait_for.sgml: <command>WAIT FOR</command> waits
until the specified
doc/src/sgml/ref/wait_for.sgml: <command>WAIT FOR</command> compares
only the numeric
doc/src/sgml/ref/wait_for.sgml: <command>WAIT FOR</command> will
return <literal>success</literal>
doc/src/sgml/ref/wait_for.sgml: On a standby server, <command>WAIT
FOR</command> sessions may be
doc/src/sgml/ref/wait_for.sgml: doing. Applications using
<command>WAIT FOR</command> on a standby
doc/src/sgml/ref/wait_for.sgml: You can use <command>WAIT
FOR</command> command to wait for
doc/src/sgml/ref/wait_for.sgml: Then an application could run
<command>WAIT FOR</command>
doc/src/sgml/ref/wait_for.sgml: The same example uses <command>WAIT
FOR</command> with
doc/src/sgml/release-19.sgml: A new <link
linkend="sql-wait-for"><command>WAIT FOR</command></link>
doc/src/sgml/release-19.sgml:Add <link
linkend="sql-wait-for"><command>WAIT FOR</command></link> command to
allow standbys to wait for <link
linkend="wal-internals"><acronym>LSN</acronym></link> values to be
written, flushed, or replayed (Kartyshov Ivan, Alexander Korotkov,
Xuneng Zhou)Strictly the same rule would argue for
"WAIT FOR LSN", but "WAIT FOR" is the name the manual gives the
command, and it leaves room if other things become waitable in the
future.If anything, I'd change the manual. "WAIT FOR" is neither short
nor a useful description of what's being waited for. Either "WAIT"
or "WAIT FOR LSN" would be more plausible as a page heading.Agreed.
Thanks for raising this. The above reasoning makes sense to me. Here's
a patch for it.Thank you for the patch. I think we should do some additional renames.
1. Change <command>WAIT FOR</command> to <command>WAIT</command> in
the page body.
2. The two error messages in commands/wait.c: WAIT FOR => WAIT
3. The reference id sql-waitfor => sql-wait
4. File name ref/wait_for.sgml => ref/wait.sgml, and the entity
&waitFor => &wait
Thanks for adding them. I did not notice that. Also changed the error
lines in the tap test.
--
Regards,
Xuneng Zhou
HighGo Software Co., Ltd.
Hi!
On Fri, Sep 11, 2026 at 6:48 AM Xuneng Zhou <xunengzhou@gmail.com> wrote:
On Fri, Sep 11, 2026 at 6:13 AM Alexander Korotkov <aekorotkov@gmail.com> wrote:
On Mon, Aug 31, 2026 at 7:52 AM Xuneng Zhou <xunengzhou@gmail.com> wrote:
On Sat, Aug 29, 2026 at 5:40 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
On Fri, Aug 28, 2026 at 1:11 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Masahiko Sawada <sawada.mshk@gmail.com> writes:
While reviewing a patch for the WAIT FOR command I noticed that its
command tag is "WAIT" rather than "WAIT FOR". I could not find this
discussed in the main thread, although I have not read all of them, so
I might miss something. I want to confirm it because a command tag is
not something we can revisit later when we release v19.0.I think it's fine. The FOR is a noise word that's useful only to
make the command's grammar vaguely resemble English. For precedent,
consider INSERT, which must have INTO but that's not part of the
command tag.Good point. A difference between INSERT and WAIT is that the doc uses
"WAIT FOR" as its command name instead of "WAIT" whereas it uses
"INSERT" for INSERT statements:% git grep -e "<command>WAIT.*</command>"
doc/src/sgml/ref/wait_for.sgml: <command>WAIT FOR</command> must be
executed as a top-level command.
doc/src/sgml/ref/wait_for.sgml: <command>WAIT FOR</command> waits
until the specified
doc/src/sgml/ref/wait_for.sgml: <command>WAIT FOR</command> compares
only the numeric
doc/src/sgml/ref/wait_for.sgml: <command>WAIT FOR</command> will
return <literal>success</literal>
doc/src/sgml/ref/wait_for.sgml: On a standby server, <command>WAIT
FOR</command> sessions may be
doc/src/sgml/ref/wait_for.sgml: doing. Applications using
<command>WAIT FOR</command> on a standby
doc/src/sgml/ref/wait_for.sgml: You can use <command>WAIT
FOR</command> command to wait for
doc/src/sgml/ref/wait_for.sgml: Then an application could run
<command>WAIT FOR</command>
doc/src/sgml/ref/wait_for.sgml: The same example uses <command>WAIT
FOR</command> with
doc/src/sgml/release-19.sgml: A new <link
linkend="sql-wait-for"><command>WAIT FOR</command></link>
doc/src/sgml/release-19.sgml:Add <link
linkend="sql-wait-for"><command>WAIT FOR</command></link> command to
allow standbys to wait for <link
linkend="wal-internals"><acronym>LSN</acronym></link> values to be
written, flushed, or replayed (Kartyshov Ivan, Alexander Korotkov,
Xuneng Zhou)Strictly the same rule would argue for
"WAIT FOR LSN", but "WAIT FOR" is the name the manual gives the
command, and it leaves room if other things become waitable in the
future.If anything, I'd change the manual. "WAIT FOR" is neither short
nor a useful description of what's being waited for. Either "WAIT"
or "WAIT FOR LSN" would be more plausible as a page heading.Agreed.
Thanks for raising this. The above reasoning makes sense to me. Here's
a patch for it.Thank you for the patch. I think we should do some additional renames.
1. Change <command>WAIT FOR</command> to <command>WAIT</command> in
the page body.
2. The two error messages in commands/wait.c: WAIT FOR => WAIT
3. The reference id sql-waitfor => sql-wait
4. File name ref/wait_for.sgml => ref/wait.sgml, and the entity
&waitFor => &waitThanks for adding them. I did not notice that. Also changed the error
lines in the tap test.
Thank you for your feedback. I'm going to push it if no objections.
------
Regards,
Alexander Korotkov
Supabase