Re: Different execution plan between PostgreSQL 8.4 and 12.11

2022-10-09 Thread Tom Lane
gzh writes: > I've run analyze(not vacuum analyze), but it doesn't seem to work. When you're asking for help, please don't give us vague statements like "doesn't seem to work". Did the plan (including rowcount estimates) change at all? To what? How far off is that rowcount estimate, anyway --

Re:Re: Different execution plan between PostgreSQL 8.4 and 12.11

2022-10-09 Thread gzh
Hi Tom, Thank you for your prompt response. I've run analyze(not vacuum analyze), but it doesn't seem to work. Is there any other way to optimize the database? At 2022-10-10 00:02:09, "Tom Lane" wrote: >gzh writes: >> I run following sql in PostgreSQL 8.4 and PostgreSQL 12.11, i

Logical replication/publication question

2022-10-09 Thread Mark Fletcher
Hi, We're migrating from 9.6 to 14, using pglogical. We have several logical slots on the 9.6 instance implementing a change data capture pattern. For the migration, we plan on recreating the slots on the 14 instance, without taking a snapshot of the data. When the migration happens, we will simpl

Re: Different execution plan between PostgreSQL 8.4 and 12.11

2022-10-09 Thread Mladen Gogala
On 10/9/22 05:11, gzh wrote: Hi, I have had a Perl Website working for 7 years and have had no problems until a few weeks ago I replaced my database server with a newer one. Database server (old): PostgreSQL 8.4 32bit Database server (new): PostgreSQL 12.11 64bit I run following sql in P

Re: Different execution plan between PostgreSQL 8.4 and 12.11

2022-10-09 Thread Tom Lane
gzh writes: > I run following sql in PostgreSQL 8.4 and PostgreSQL 12.11, it returns > different execution plan. Have you done an ANALYZE in the new database? The rowcount estimates seem a lot different, leading me to guess that the newer installation doesn't have good statistics yet.

Re: recovery.conf and archive files

2022-10-09 Thread Guillaume Lelarge
Hi, Le dim. 9 oct. 2022 à 13:54, Rita a écrit : > I have primary and standby replication setup. > > On my primary the archive directory is rather large (30GB) and growing. On > my standby I have recovery.conf which has > archive_cleanup_command = 'pg_archivecleanup -d > /var/lib/pgsql/11/data/ar

recovery.conf and archive files

2022-10-09 Thread Rita
I have primary and standby replication setup. On my primary the archive directory is rather large (30GB) and growing. On my standby I have recovery.conf which has archive_cleanup_command = 'pg_archivecleanup -d /var/lib/pgsql/11/data/archive %r' I was under the impression this line would remove d

Re: Different execution plan between PostgreSQL 8.4 and 12.11

2022-10-09 Thread Ron
Did you analyze and vacuum all of the tables in the new database? On 10/9/22 04:11, gzh wrote: Hi, I have had a Perl Website working for 7 years and have had no problems until a few weeks ago I replaced my database server with a newer one. Database server (old): PostgreSQL 8.4 32bit Datab

Different execution plan between PostgreSQL 8.4 and 12.11

2022-10-09 Thread gzh
Hi, I have had a Perl Website working for 7 years and have had no problems until a few weeks ago I replaced my database server with a newer one. Database server (old): PostgreSQL 8.4 32bit Database server (new): PostgreSQL 12.11 64bit I run following sql in PostgreSQL 8.4 and Postgre

Re: Cannot convert partitioned table to a view

2022-10-09 Thread Kouber Saparev
> > The fact that creating a _RETURN rule for a table causes it to be > changed into a view. That's ugly and arguably dangerous. > > Right, thank you. Cheers, -- Kouber Saparev