Re: count(*) vs count(id)

2021-02-02 Thread Cherio
I just ran a few practical tests on large (~14mil rows) tables that have multiple indexes. SELECT COUNT(id) forces PostgreSQL to use the primary key index. SELECT COUNT(*) allows PostgreSQL to chose an index to use and it seems to be choosing one of smaller size which leads to less IO and hence re

Re: pg_restore fails when psql succeeds

2020-12-13 Thread Cherio
ings to leave a little wiggle room; postgresqltuner.pl report was clear. On Sun, Dec 13, 2020 at 1:00 PM Adrian Klaver wrote: > On 12/12/20 12:39 PM, Cherio wrote: > > I install PostgreSQL from "apt.postgresql.org > > <http://apt.postgresql.org>" repository: >

Re: pg_restore fails when psql succeeds

2020-12-12 Thread Cherio
12, 2020 at 3:18 PM Adrian Klaver wrote: > On 12/12/20 12:10 PM, Cherio wrote: > > I am facing a consistent issue with pg_restore when moving databases > > with large tables from PostgreSQL 10 to 13. pg_restore fails to restore > > indexes on some large table

pg_restore fails when psql succeeds

2020-12-12 Thread Cherio
I am facing a consistent issue with pg_restore when moving databases with large tables from PostgreSQL 10 to 13. pg_restore fails to restore indexes on some large tables (anything over 20 million records). pg_restore: error: could not execute query: ERROR: out of memory DETAIL: Failed on request