On 2020-04-08 00:27, Tom Lane wrote:
> Alexander Korotkov <akorotkov@postgresql.org> writes:
» WAIT FOR LSN lsn [ TIMEOUT timeout ]
>
> This seems like a really carelessly chosen syntax —- *three* new
> keywords, when you probably didn't need any. Are you not aware that
> there is distributed overhead in the grammar for every keyword?
> Plus, each new keyword carries the risk of breaking existing
> applications, since it no longer works as an alias-not-preceded-by-AS.
>
To avoid creating new keywords, we could change syntax in the following
way:
WAIT FOR => DEPENDS ON
LSN => EVENT
TIMEOUT => WITH INTERVAL
So
START TRANSACTION WAIT FOR LSN '0/3F07A6B1' TIMEOUT 5000;
would instead look as
START TRANSACTION DEPENDS ON EVENT '0/3F07A6B1' WITH INTERVAL '5
seconds';
[1]
https://www.postgresql.org/message-id/28209.1586294824%40sss.pgh.pa.us
--
Ivan Kartyshov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company