Hi
Thanks, you solution works for most of the databases. But now I noticed
that we have single 9.5 version also.
And seems like this function *pg_size_bytes* came from 9.6
# psql -U postgres -Atc "select
> pg_size_bytes(current_setting('shared_buffers'));"
> ERROR: function pg_size_bytes(text) d
On Wed, Oct 14, 2020 at 5:23 PM Tom Lane wrote:
> Magnus Hagander writes:
> > On Wed, Oct 14, 2020 at 5:10 PM Tom Lane wrote:
> >> It's fairly annoying that this doesn't work:
> >> regression=# select pg_size_bytes(setting||' '||unit) from pg_settings
> >> where name = 'shared_buffers';
>
> > A
Hi
Thanks for all the replies.
So at first, I did this:
select (pg_size_bytes(setting) * (select setting from pg_settings where
name = 'block_size')::int) as shared_buffers from pg_settings where name =
'shared_buffers';
But as I understood, that the preferred way would be this, correct..? (at
Magnus Hagander writes:
> On Wed, Oct 14, 2020 at 5:10 PM Tom Lane wrote:
>> It's fairly annoying that this doesn't work:
>> regression=# select pg_size_bytes(setting||' '||unit) from pg_settings
>> where name = 'shared_buffers';
> Actually thinking though, surely *this* particular case can be s
On Wed, Oct 14, 2020 at 5:10 PM Tom Lane wrote:
> Magnus Hagander writes:
> > On Wed, Oct 14, 2020 at 3:57 PM Thomas Kellerer wrote:
> >> select pg_size_bytes(setting) * 8192
> >> from pg_settings
> >> where name = 'shared_buffers';
>
> > Actually, it doesn't have to be in 8k pages, that depend
## Magnus Hagander (mag...@hagander.net):
> Actually, it doesn't have to be in 8k pages, that depends on the build
> options. So if you want to be perfectly correct, you should probably
> multiply with current_setting('block_size') instead of a hardcoded 8192 :)
More self-contained:
select pg_s
st 14. 10. 2020 v 17:10 odesílatel Tom Lane napsal:
> Magnus Hagander writes:
> > On Wed, Oct 14, 2020 at 3:57 PM Thomas Kellerer wrote:
> >> select pg_size_bytes(setting) * 8192
> >> from pg_settings
> >> where name = 'shared_buffers';
>
> > Actually, it doesn't have to be in 8k pages, that de
Magnus Hagander writes:
> On Wed, Oct 14, 2020 at 3:57 PM Thomas Kellerer wrote:
>> select pg_size_bytes(setting) * 8192
>> from pg_settings
>> where name = 'shared_buffers';
> Actually, it doesn't have to be in 8k pages, that depends on the build
> options. So if you want to be perfectly correc
On Wed, Oct 14, 2020 at 3:57 PM Thomas Kellerer wrote:
> Thomas Kellerer schrieb am 14.10.2020 um 15:55:
> > Raul Kaubi schrieb am 14.10.2020 um 12:22:
> >> Is there a simple way to dynamically get for example parameter
> >> „shared buffers“ value (megabytes or gigabytes) to bytes, for
> >> monit
Thomas Kellerer schrieb am 14.10.2020 um 15:55:
> Raul Kaubi schrieb am 14.10.2020 um 12:22:
>> Is there a simple way to dynamically get for example parameter
>> „shared buffers“ value (megabytes or gigabytes) to bytes, for
>> monitoring perspective..?>
>>
>>
>> At the moment, this gives me value
Raul Kaubi schrieb am 14.10.2020 um 12:22:
> Is there a simple way to dynamically get for example parameter
> „shared buffers“ value (megabytes or gigabytes) to bytes, for
> monitoring perspective..?>
>
>
> At the moment, this gives me value in GB.
>
> # psql -U postgres -Atc "show shared_buffers
11 matches
Mail list logo