> I have a table with metric, imperial, fraction columns.
Have "metric_equivalent_magnitude" and "metric_equivalent_unit"
columns and do all your sorting &c. via those columns. Use the
relatively new generated (or computed/calculated) columns to calculate
these. That way, you get the conversion c
Hi all,
I have a rather contrived example, but I just can't get this to work.
A fiddle with all my code is available here:
https://dbfiddle.uk/?rdbms=postgres_12&fiddle=9a89ea79ffc617a11c36d63123d2f987
CREATE TABLE t1
(
user_id SMALLINT NOT NULL,
activity_id SMALLINT NOT NULL,
sort_or
How measure table total pages (block) count? would be this correct way? :
SELECT pg_table_size('my_table'::regclass) /
current_setting('block_size')::BIGINT;
On Sun, Aug 15, 2021 at 12:49 PM otar shavadze wrote:
> How measure table total pages (block) count? would be this correct way? :
>
> SELECT pg_table_size('my_table'::regclass) /
> current_setting('block_size')::BIGINT;
>
> Did you try:
SELECT relpages FROM pg_class WHERE relname='my_table';
B
Thank you.
On Sun, Aug 15, 2021 at 2:15 PM Michael Goldberg
wrote:
>
> On Sun, Aug 15, 2021 at 12:49 PM otar shavadze
> wrote:
>
>> How measure table total pages (block) count? would be this correct way?
>> :
>>
>> SELECT pg_table_size('my_table'::regclass) /
>> current_setting('block_size')
Hi all,
Could I get recommendations on how to convert an existing
database to a single-master replica setup?
I'm running on RHEL 8 (pgsql version 10.17). I'd like to
replicate the existing database to 1 (maybe 2) other hosts,
synchronously ideally thou
On Sun, 15 Aug 2021 at 22:15, Michael Goldberg wrote:
>
>
> On Sun, Aug 15, 2021 at 12:49 PM otar shavadze wrote:
>>
>> How measure table total pages (block) count? would be this correct way? :
>>
>> SELECT pg_table_size('my_table'::regclass) /
>> current_setting('block_size')::BIGINT;
>
> Did
Thanks Simon
Setting wal_level to minimal has indeed allowed it to work. Thanks for the
suggestion!
We aren't easily able to change the number of partitions - it consists of a
large number of partitioned tables each having a reasonable number of
partitions, but they multiply up to a huge numbe