Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hgCGZ-0007CS-7I for pgsql-performance@arkaria.postgresql.org; Wed, 26 Jun 2019 18:03:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hgCGY-00023o-2e for pgsql-performance@arkaria.postgresql.org; Wed, 26 Jun 2019 18:03:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hgCGX-00023h-N9 for pgsql-performance@lists.postgresql.org; Wed, 26 Jun 2019 18:03:29 +0000 Received: from mail-io1-xd35.google.com ([2607:f8b0:4864:20::d35]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hgCGU-0001xa-Na for pgsql-performance@postgresql.org; Wed, 26 Jun 2019 18:03:29 +0000 Received: by mail-io1-xd35.google.com with SMTP id n5so3676818ioc.7 for ; Wed, 26 Jun 2019 11:03:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uS3Q6zru8WhZM/KRCdsUIWBby/m+embXiTeGj44hLoQ=; b=b+anjdIwjzW+Z7o5NP+tBBWTgTwpFLgrS3D4VIvt93pmJWCjBu+xVIFEqlfahgYyrj B1IM+OOOEuxbhUDFhpXlnXcf3hF8BLilkE2ySNUUEMofFur9f20RFRhZEbZ+Rra241zv s/JIVg1Uod4g2oND7HkBiMNsiJH7GGkG8CQgQWLYFG0sU0rHa4GJDB5/YRRL5yCLBJbu q1VjBn6G8m7dSAAz61PUZKb54WSPytX1KG+uStkhg6kZkowXn9eaRXub4F1sr6G5tPWa Dq5sveILAHqzSpr0y78Ky1aMF7joypbRJ6YwffD1r2uPQIt2fMXrtiE38bJcdTPM4YYx X11g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=uS3Q6zru8WhZM/KRCdsUIWBby/m+embXiTeGj44hLoQ=; b=KU+1wGM1AuIUJ86FC1kJMEePzRnaNuGa+KhJl21A6nxPxzFlMknoUfGE4pjADBjIze XcPOjAtMSZTcpMYbTj15GLJFxj1cmcgdFk2HyUVkJPkZgK8tvjQXfe3KakogzHxVmR8F zhksvXiG8o49BxHMH+/UWpBJTdgg2NeIfpyR761YzzunvZBINZ6KZqvwY2Vmy7EROZtP LVYtKUTYoOWl1JzK49U7bnvWE9TwD+4ics5a1wuIW6cZtoixj3rMWJYk6quyvmqi9Taj ddbZjaNooq2fDGPpMUBRh0cM1attDcJ4WIWcVBMETTQx+YUklnj+X01FpkPslxrpHOdt LLvg== X-Gm-Message-State: APjAAAWPRFyzvtiDn3uXQkNfqo5L7Z0NqsMi8Z8OHmd4TE3LJFfn+2q+ AjbUJuEvnXWmEGScvLvlmLgDT4S0gLc= X-Google-Smtp-Source: APXvYqz7ZeezJvuMOBODwqsWppASqrEtlR4fG9J38dhHWQXYnkMVD/9Erp0wG4u48ZOV0YKJfSGe/A== X-Received: by 2002:a6b:8f93:: with SMTP id r141mr6610285iod.145.1561572202986; Wed, 26 Jun 2019 11:03:22 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id o5sm17783164iob.7.2019.06.26.11.03.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Jun 2019 11:03:22 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id 941978007F5; Wed, 26 Jun 2019 13:03:20 -0500 (CDT) Date: Wed, 26 Jun 2019 13:03:20 -0500 From: Justin Pryzby To: Steven Winfield Cc: pgsql-performance@postgresql.org Subject: Re: scans on table fail to be excluded by partition bounds Message-ID: <20190626180320.GA28953@telsasoft.com> References: <20190624173146.GA32632@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Jun 25, 2019 at 10:48:01AM +0000, Steven Winfield wrote: > > ts=# explain SELECT * FROM eric_enodeb_cell_metrics WHERE start_time > > BETWEEN '2019-01-01 04:00' AND '2019-01-01 05:00' OR start_time BETWEEN > > '2019-01-02 04:00' AND '2019-01-02 05:00' > > Maybe it's because of the implicit usage of the local timezone when the strings are cast to (timestamp with time zone) in the values you give for start_time here? > What happens if you specify it using "TIMESTAMP WITH TIME ZONE '2019-01-01 04:00-05'", etc.? It's the same. The timezone in the constraints is the default timezone so the that's correct. Justin