Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcZMI-0003II-Ey for pgsql-admin@arkaria.postgresql.org; Tue, 01 Aug 2017 15:45:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dcZMI-0003rQ-1Z for pgsql-admin@arkaria.postgresql.org; Tue, 01 Aug 2017 15:45:22 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dcZMH-0003pO-60; Tue, 01 Aug 2017 15:45:21 +0000 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dcZMC-0001Y8-G3; Tue, 01 Aug 2017 15:45:20 +0000 Received: by mail-wm0-x230.google.com with SMTP id m85so18648030wma.0; Tue, 01 Aug 2017 08:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=xIFBTF23gGuM7DygQuysxBRwoBVP4Nf79R81eQaW0E8=; b=PXK6TNqy/zmLSRUIrppg1BVvLQnivCalUddzFb/FzLv3p8XEbGRLjGfROA6GGTKd9S Bfyt6ORSqmtLrG6QEfWr6neUqUDQ4BilZqE8VNT8ygln6JFfmwKQbJHxdLorveCcwWpZ bd6ZFbl5uqWRQb4MAjoZ78GhxNPqPQMb8Hb3O6bFy2hfxuH2HOvSuwNR7+qiFf0n5bOx 5FnzsZRZWNQ4e1vgq/wRTy9S0r5feQlYkB77mMEEoN/LGC0harRLXdsrxy23GKxnyBnD ASjOgp59EO980GYBlXsfOQsYG9x2dPOmSGaknAKX3NTabsjudDBr03n/7ufLkac+tsaH y7cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xIFBTF23gGuM7DygQuysxBRwoBVP4Nf79R81eQaW0E8=; b=rFH3TZz1uEdO5FO87Yl5b9KpeVDqOUXmJ1mMGLisiiTmIFeLaffHUciT6auDcwHl2B 9X2Z7qI3Q+cLvq79cGwQTup5zGotJuwlR27X0gbjPPLQN2WMFYaQp8X1SlGy3lsbMxZl hr9hpeUIg0UMIvN+u0BpXIVG/rTfC3bH7cWTB0jquPzlUUYwQVayApztfbSTalYlOmF5 z6I/d58aKMjN6aLztkSoM/Xm2ezP3sXlqOZwGNCgVH60kyk8XoIifz0F/nhHaOt5wOJe g5Ljp4XgNot/11m9KmkAoJvHYSH2nPcU+1JFq5sRvZ9MX0T959E1/fKET8BQh4qurYU7 7KuA== X-Gm-Message-State: AIVw113KOKXVfaGMVrz3oEHp1Try4F7M19txIws8ji55vlrWM0daWREB ZGu9BsnUY6O9cV1WHODtJv96OsyNmgZP X-Received: by 10.28.225.139 with SMTP id y133mr1757261wmg.41.1501602314568; Tue, 01 Aug 2017 08:45:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.38.197 with HTTP; Tue, 1 Aug 2017 08:45:13 -0700 (PDT) In-Reply-To: References: From: Sumeet Shukla Date: Tue, 1 Aug 2017 21:15:14 +0530 Message-ID: Subject: Re: [PERFORM] 2 server with same configuration but huge difference in performance To: Scott Marlowe Cc: pgsql-admin , "pgsql-performance@postgresql.org" Content-Type: multipart/alternative; boundary="001a114b0d6c8dc7db0555b30836" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org --001a114b0d6c8dc7db0555b30836 Content-Type: text/plain; charset="UTF-8" It seems that it is happening because of the way the database is created. On an old database it runs perfectly fine or if I use the old DB as template to create the new one, it runs fine. But if I create a new DB with same settings and permissions it hangs. I'm now trying to find the difference between these 2 databases. Thanks & Regards, Sumeet Shukla On Tue, Aug 1, 2017 at 9:05 PM, Scott Marlowe wrote: > On Tue, Aug 1, 2017 at 6:41 AM, Sumeet Shukla > wrote: > > Hi, > > > > I have 2 PG servers with same h/w and configuration and they are not in > > replication. > > > > On server A it takes 20 minutes to execute the script. > > On server B it takes more than 20 hours. (Seems to be stuck with create > > index and and create foreign key steps) > > > > Any guidance to troubleshoot this would be highly appreciated. > > There's lots of areas where you could be running into problems. I > suggest reading this wiki page on reporting performance problems. > It'll help you gather more evidence of where and what the problem is. > > https://wiki.postgresql.org/wiki/Guide_to_reporting_problems > --001a114b0d6c8dc7db0555b30836 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
It seems that it is happening because of the way the datab= ase is created. On an old database it runs perfectly fine or if I use the o= ld DB as template to create the new one, it =C2=A0runs fine. But if I creat= e a new DB with same settings and permissions it hangs. I'm now trying = to find the difference between these 2 databases.

Thanks & Regards,<= /div>
Sumeet Shukla

=

On Tue, Aug 1, 2017 at 9:05 PM, Scott Marlow= e <scott.marlowe@gmail.com> wrote:
On Tue, Aug 1, 2017 at 6:41 AM, Sumeet Sh= ukla <sumeet.k.shukla@gmail= .com> wrote:
> Hi,
>
> I have 2 PG servers with same h/w and configuration and they are not i= n
> replication.
>
> On server A it takes 20 minutes to execute the script.
> On server B it takes more than 20 hours. (Seems to be stuck with creat= e
> index and and create foreign key steps)
>
> Any guidance to troubleshoot this would be highly appreciated.

There's lots of areas where you could be running into problems. = I
suggest reading this wiki page on reporting performance problems.
It'll help you gather more evidence of where and what the problem is.
https://wiki.postgresql.org/wiki/Gu= ide_to_reporting_problems

--001a114b0d6c8dc7db0555b30836--