Re: [PROPOSAL] comments in repl_scanner

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [PROPOSAL] comments in repl_scanner
Дата
Msg-id e59a1a8b-d2a4-4991-9af0-db2a40695387@eisentraut.org
обсуждение исходный текст
Ответ на [PROPOSAL] comments in repl_scanner  (Matěj Klonfar <matej.klonfar@gmail.com>)
Список pgsql-hackers
On 14.10.25 13:13, Matěj Klonfar wrote:
> certain instrumentation tools do prefix each statement with an 
> informational comment, typically to provide some tracing information to 
> logs (datadog for example). While this works for SQL statements, it's 
> not possible with logical replication statements because their grammar 
> doesn't support comments and it is causing unnecessary syntax errors.
> 
> I can imagine this limitation is likely a holdover from the system's 
> evolution from physical replication where comments make no sense. 
> However, in logical replication walsender mode both SQL and replication 
> statements can be issued [1], so the current state brings the necessity 
> to distinguish when to inject the comment and when not to. What do you 
> feel, are there any unexpected impacts of extending the replication 
> grammar with comments?

Another approach could be to get rid of repl_scanner.l and use the main 
scanner.  This would be similar to how plpgsql works.




В списке pgsql-hackers по дате отправления: