Re: Bug in pg_stat_statements - Mailing list pgsql-hackers

From Sami Imseih
Subject Re: Bug in pg_stat_statements
Date
Msg-id CAA5RZ0uQJU7M2tj16st9dV0YFdpQ2u=8WS7BdjRAPBM2KbcwRg@mail.gmail.com
Whole thread Raw
In response to Re: Bug in pg_stat_statements  (Dmitry Dolgov <9erthalion6@gmail.com>)
Responses Re: Bug in pg_stat_statements
List pgsql-hackers
Thanks for reviewing!

>Not so sure about the
> refactoring in the second patch -- generate_normalized_query is being
> used only in one place, in pg_stat_statements, moving it out somewhere
> else without having other clients seems to be questionable to me.

The excellent question raised earlier is whether the fix should be
applied in pg_stat_statements.c or queryjumblefuncs.c. To me, this
suggests that pg_stat_statements, as an extension, is dealing with code
it should not be responsible for.

generate_normalized_query could be used by other extensions that have
normalization needs; it’s generic and needs to handle squashing, which
is a jumble specific detail.

Therefore, I think both fill_in_constant_lengths and
generate_normalized_query should be moved. We can certainly start a new
thread (0002) if more discussion is needed.

--
Sami Imseih
Amazon Web Services (AWS)



pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: POC: enable logical decoding when wal_level = 'replica' without a server restart
Next
From: Jeff Davis
Date:
Subject: Re: NLS: use gettext() to translate system error messages