Do we have any email discussions related to SQL rate limiting?

2024-05-17 Thread Benjamin Mitchell
Dears,


I have been researching SQL rate limiting functionality recently. I want to 
support limiting the maximum concurrency of SQL queries for specific keywords, 
where queries exceeding the maximum concurrency would be queued for 
execution. 


I would like to know if we have any email discussions regarding this issue.


Regards,
Benjamin Mitchell

Re: Do we have any email discussions related to SQL rate limiting?

2024-05-17 Thread Laurenz Albe
On Fri, 2024-05-17 at 14:59 +0800, Benjamin Mitchell wrote:
> I have been researching SQL rate limiting functionality recently. I want
> to support limiting the maximum concurrency of SQL queries for specific
> keywords, where queries exceeding the maximum concurrency would be queued
> for execution. 
> 
> I would like to know if we have any email discussions regarding this issue.

I am not aware of any, but search here:
https://www.postgresql.org/search/?m=1

Yours,
Laurenz Albe




utf8 vs UTF-8

2024-05-17 Thread Troels Arvin

Hello,

In a Postgres installation, I have databases where the locale is 
slightly different. Which one is correct? Excerpt from "psql --list":


 test1   | loc_test | UTF8 | libc    | en_US.UTF-8 | 
en_US.UTF-8
 test3   | troels   | UTF8 | libc    | en_US.utf8 | 
en_US.utf8


OS is Ubuntu.

--
Kind regards,
Troels Arvin





Re: utf8 vs UTF-8

2024-05-17 Thread Hans Schou
> test3   | troels   | UTF8 | libc| en_US.utf8 |
en_US.utf8

It is wrong but I guess it's working?

how did you create test3?

On Fri, May 17, 2024 at 2:44 PM Troels Arvin  wrote:

> Hello,
>
> In a Postgres installation, I have databases where the locale is
> slightly different. Which one is correct? Excerpt from "psql --list":
>
>   test1   | loc_test | UTF8 | libc| en_US.UTF-8 |
> en_US.UTF-8
>   test3   | troels   | UTF8 | libc| en_US.utf8 |
> en_US.utf8
>
> OS is Ubuntu.
>
> --
> Kind regards,
> Troels Arvin
>
>
>
>

-- 
𝕳𝖆𝖓𝖘 𝕾𝖈𝖍𝖔𝖚
☏ ➁➁ ➅➃ ➇⓪ ➁⓪


Re: utf8 vs UTF-8

2024-05-17 Thread Tom Lane
Troels Arvin  writes:
> In a Postgres installation, I have databases where the locale is 
> slightly different. Which one is correct? Excerpt from "psql --list":

>   test1   | loc_test | UTF8 | libc    | en_US.UTF-8 | 
> en_US.UTF-8
>   test3   | troels   | UTF8 | libc    | en_US.utf8 | 
> en_US.utf8

On most if not all platforms, both those spellings of the locale names
will be taken as valid.  You might try running "locale -a" to get an
idea of which one is preferred according to your current libc
installation ... but TBH, I doubt it's worth worrying about.

regards, tom lane




Execution history of a single query

2024-05-17 Thread arun chirappurath
Hi All,

>From pg_stat_statements we can get the overall execution details of queries.

Can we get the execution details of a single queryid ?

Like today it took 6 seconds,yesterday 5 and so on..just for one query.

Thanks,
Arun


Re: Execution history of a single query

2024-05-17 Thread Greg Sabino Mullane
Not directly through pg_stat_statements, no. But you can:

* Use log_min_duration_statement to spy on individual runs
* Periodically copy pg_stat_statements to another table, reset the stats,
and then you have some time-based buckets to play with.

Cheers,
Greg


Re: Execution history of a single query

2024-05-17 Thread Julien Rouhaud
On Sat, 18 May 2024, 00:42 arun chirappurath,  wrote:

> Hi All,
>
> From pg_stat_statements we can get the overall execution details of
> queries.
>
> Can we get the execution details of a single queryid ?
>
> Like today it took 6 seconds,yesterday 5 and so on..just for one query.
>

you can use PoWA for that: https://powa.readthedocs.io/en/latest/

>