why partition pruning doesn't work?

2018-05-31 Thread Pavel Stehule
Hi CREATE TABLE data(a text, vlozeno date) PARTITION BY RANGE(vlozeno); CREATE TABLE data_2016 PARTITION OF data FOR VALUES FROM ('2016-01-01') TO ('2016-12-31'); CREATE TABLE data_2017 PARTITION OF data FOR VALUES FROM ('2017-01-01') TO ('2017-12-31'); CREATE TABLE data_other PARTITION OF DATA DE

ToDo: show size of partitioned table

2018-05-31 Thread Pavel Stehule
Hi postgres=# SELECT count(*) from data; ┌─┐ │ count │ ╞═╡ │ 100 │ └─┘ (1 row) \dt+ can display actual size of partitioned table data - now zero is displayed postgres=# \dt+ data List of relations ┌┬──┬───┬───┬─┬──

Re: [PATCH] We install pg_regress and isolationtester but not pg_isolation_regress

2018-05-31 Thread Craig Ringer
On 28 May 2018 at 15:06, Craig Ringer wrote: > Hi > > Per topic, the Pg makefiles install pg_regress (for use by extensions) and > htey install the isolationtester, but they don't install > pg_isolation_regress. > > We should install it too. > Now with a patch that isn't brain-dead. I'm wonderi

Re: I'd like to discuss scaleout at PGCon

2018-05-31 Thread MauMau
2018-05-31 22:44 GMT+09:00, Robert Haas : > On Thu, May 31, 2018 at 8:12 AM, MauMau wrote: >> Oh, I didn't know you support FDW approach mainly for analytics. I >> guessed the first target was OLTP read-write scalability. > > That seems like a harder target to me, because you will have an extra >

Re: behave of --create-slot option

2018-05-31 Thread Robert Haas
On Wed, May 30, 2018 at 2:00 PM, Michael Paquier wrote: > Hm. There could be an argument for improving the user experience here > so as some cleanup is at least attempted except if --no-clean is defined > by the caller when --create-slot is used. Do we want an open item for > this issue? Sounds

Re: json results parsing

2018-05-31 Thread Andrew Gierth
> "Chapman" == Chapman Flack writes: >> To clarify, I think my question is functions like json_each or >> json_object_keys() are >> set returning functions ( >> https://www.postgresql.org/docs/9.5/static/functions-srf.html), >> which means it returns a set of results into a Datum. Chap

Re: json results parsing

2018-05-31 Thread Chapman Flack
On 05/31/18 20:20, Charles Cui wrote: > To clarify, I think my question is functions like json_each or > json_object_keys() are > set returning functions ( > https://www.postgresql.org/docs/9.5/static/functions-srf.html), > which means it returns a set of results into a Datum. Well, it returns one

Re: json results parsing

2018-05-31 Thread Andrew Gierth
> "Charles" == Charles Cui writes: Charles> Thanks you guys for answering my questions, and sorry for confusion. Charles> To clarify, I think my question is functions like json_each or Charles> json_object_keys() are Charles> set returning functions ( Charles> https://www.postgresql.org/

Re: json results parsing

2018-05-31 Thread Charles Cui
Thanks you guys for answering my questions, and sorry for confusion. To clarify, I think my question is functions like json_each or json_object_keys() are set returning functions ( https://www.postgresql.org/docs/9.5/static/functions-srf.html), which means it returns a set of results into a Datum.

Re: PostgreSQL 11 beta1 on AIX 7.2 : 2 failures in 32bit mode

2018-05-31 Thread Noah Misch
On Thu, May 31, 2018 at 07:23:57PM -0400, Tom Lane wrote: > Noah Misch writes: > > On Thu, May 31, 2018 at 10:28:12AM -0400, Tom Lane wrote: > >> I wondered why the existing 32-bit AIX buildfarm machines aren't showing > >> problems, but looking closer at them, they are manually forcing > >> _LARG

Re: PostgreSQL 11 beta1 on AIX 7.2 : 2 failures in 32bit mode

2018-05-31 Thread Tom Lane
Noah Misch writes: > On Thu, May 31, 2018 at 10:28:12AM -0400, Tom Lane wrote: >> I wondered why the existing 32-bit AIX buildfarm machines aren't showing >> problems, but looking closer at them, they are manually forcing >> _LARGE_FILES, which probably is masking things: >> 'config_env' => {

Re: PostgreSQL 11 beta1 on AIX 7.2 : 2 failures in 32bit mode

2018-05-31 Thread Noah Misch
On Thu, May 31, 2018 at 10:28:12AM -0400, Tom Lane wrote: > "REIX, Tony" writes: > > It looks like configure does figure out that LARGE_FILES is required, only > > in 32bit. > > No need in 64bit. > > Check ... > > > However, in 32bit, though there is: > >#define _LARGE_FILES 1 > > in file :

Re: Re: [HACKERS] [PATCH] Incremental sort

2018-05-31 Thread James Coleman
I've attached an updated copy of the patch that applies cleanly to current master. commit 6428245702a40b3e3fa11bb64b7611cdd33a0778 Author: Alexander Korotkov Date: Sat Apr 7 18:51:20 2018 +0300 Implement incremental sort Incremental sort is an optimized variant of multikey sort

Re: JIT documentation fixes

2018-05-31 Thread Andres Freund
On 2018-05-31 14:50:04 -0400, Daniel Gustafsson wrote: > When reading the JIT developer documentation, a few small wordsmithing issues > stood out (although this may be due to me not being a native english > speaker). I think it's more likely because *I* am not a native speaker ;) > The attached

Re: pgAgent: ERROR: Couldn't register event handle.

2018-05-31 Thread Robert Haas
On Tue, May 29, 2018 at 8:15 AM, Arturas Mazeika wrote: > I am overseeing a few hundred/thousand postgres/pgagent installations and > on one installation the pgAgent does not start with a message as a service > on a Windows Server: > > ERROR: Couldn't register event handle. I think that this isn

JIT documentation fixes

2018-05-31 Thread Daniel Gustafsson
When reading the JIT developer documentation, a few small wordsmithing issues stood out (although this may be due to me not being a native english speaker). The attached patch fixes these to what I think the sentences inteded to say. cheers ./daniel jit_wordsmithing.patch Description: Binary da

Re: SHOW ALL does not honor pg_read_all_settings membership

2018-05-31 Thread Michael Paquier
On Thu, May 31, 2018 at 07:05:58PM +0100, Simon Riggs wrote: > Any objections to backpatch to v10? A backpatch is acceptable in my opinion. -- Michael signature.asc Description: PGP signature

Re: SHOW ALL does not honor pg_read_all_settings membership

2018-05-31 Thread Simon Riggs
On 17 April 2018 at 04:28, Michael Paquier wrote: > On Mon, Apr 16, 2018 at 02:32:10PM +0200, Laurenz Albe wrote: >> Now that the dust from the last commitfest is settling, I'll make a second >> attempt to attract attention for this small bug fix. >> >> The original commit was Simon's. > > Thanks

Re: pg_replication_slot_advance to return NULL instead of 0/0 if slot not advanced

2018-05-31 Thread Simon Riggs
On 28 May 2018 at 09:57, Michael Paquier wrote: > On Fri, May 25, 2018 at 02:12:32PM +0200, Magnus Hagander wrote: >> I agree that returning 0/0 on this is wrong. >> >> However, can this actually occour for any case other than exactly the case >> of "moving the position to where the position alrea

Re: PostgreSQL 11 beta1 on AIX 7.2 : 2 failures in 32bit mode

2018-05-31 Thread Tom Lane
"REIX, Tony" writes: > v11beta1 brings new json files. Either these files reveal some issue on AIX > 32bit or they contain code that is not compatible with AIX environment and > some change should be applied... One thing I notice is that jsonb_plperl.c starts with #include "postgres.h" #inclu

RE:PostgreSQL 11 beta1 on AIX 7.2 : 2 failures in 32bit mode

2018-05-31 Thread REIX, Tony
Hi Tom, Yes, there is something strange with _LARGE_FILES in 32bit. However, that exists too with version 10.4 and 9.6.9 , and tests are 100% OK. So, it seems that something new appears within v11 v11beta1 brings new json files. Either these files reveal some issue on AIX 32bit or they contain c

Re: Problem while updating a foreign table pointing to a partitioned table on foreign server

2018-05-31 Thread Ashutosh Bapat
On Thu, May 31, 2018 at 7:36 PM, Tom Lane wrote: > Kyotaro HORIGUCHI writes: >> If my understanding about non-system junk columns in a base relation >> and identifiers of a foreign tuples are correct, what is needed here >> is giving base relations the ability to have such junk column. > > The co

Re: PostgreSQL 11 beta1 on AIX 7.2 : 2 failures in 32bit mode

2018-05-31 Thread Tom Lane
"REIX, Tony" writes: > It looks like configure does figure out that LARGE_FILES is required, only in > 32bit. > No need in 64bit. Check ... > However, in 32bit, though there is: >#define _LARGE_FILES 1 > in file : >src/include/pg_config.h > I had to add it at the beg of file by means of

RE:PostgreSQL 11 beta1 on AIX 7.2 : 2 failures in 32bit mode

2018-05-31 Thread REIX, Tony
Hum We build in 64bit and 32bit. It looks like configure does figure out that LARGE_FILES is required, only in 32bit. No need in 64bit. # grep LARGE_FILES postgresql-11beta1-1.spec.res_20180530_101845 checking for CFLAGS recommended by Perl... -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURC

Re: Problem while updating a foreign table pointing to a partitioned table on foreign server

2018-05-31 Thread Tom Lane
Kyotaro HORIGUCHI writes: > If my understanding about non-system junk columns in a base relation > and identifiers of a foreign tuples are correct, what is needed here > is giving base relations the ability to have such junk column. The core of the problem, I think, is the question of exactly wha

Re: I'd like to discuss scaleout at PGCon

2018-05-31 Thread Robert Haas
On Thu, May 31, 2018 at 8:12 AM, MauMau wrote: > I anticipated a decision process at the unconference like this: > "Do we want to build on shared everything architecture?" > "No, because it limits scalability, requires expensive shared storage, > and it won't run on many clouds." > "Then do we wan

Re: PostgreSQL 11 beta1 on AIX 7.2 : 2 failures in 32bit mode

2018-05-31 Thread Tom Lane
"REIX, Tony" writes: > For files: contrib/jsonb_plpython/jsonb_plpython.c and src/common/file_perm.c > , I had to use #define _LARGE_FILES 1 like I did for 14 older files. That > deals with lseek() and lseek64() definitions. I'm not following this. Doesn't configure manage to figure out th

Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)

2018-05-31 Thread Aleksander Alekseev
Hello Moon, I promised to email links to the articles I mentioned during your talk on the PGCon Unconference to this thread. Here they are: * http://cryptowiki.net/index.php?title=Order-preserving_encryption * https://en.wikipedia.org/wiki/Homomorphic_encryption Also I realized that I was wrong

Re: New GUC to sample log queries

2018-05-31 Thread Michael Paquier
On Thu, May 31, 2018 at 02:37:07PM +0200, Adrien Nayrat wrote: > On 05/31/2018 03:34 AM, David Rowley wrote: >> On 31 May 2018 at 06:44, Adrien Nayrat wrote: >>> Here is a naive SELECT only bench with a dataset which fit in ram (scale >>> factor >>> = 100) and PGDATA and log on a ramdisk: >>> sha

RE:PostgreSQL 11 beta1 on AIX 7.2 : 2 failures in 32bit mode

2018-05-31 Thread REIX, Tony
Hi Tom, Hummm About Perl, version 5.24.0 were installed 6 months ago and is still there. And, still on the same AIX 7.2 machine, I've been able to build and test 100%OK version 10.4 before buiding/testing v11beta1, and I've been able to build and test 100%OK version 9.6.9 after v11beta1. v11be

RE:PostgreSQL 11 beta1 on AIX 7.2 : 2 failures in 32bit mode

2018-05-31 Thread REIX, Tony
Hi Álvaro Here is the regression.diffs file. Regards, Cordialement, Tony Reix ATOS / Bull SAS ATOS Expert IBM Coop Architect & Technical Leader Office : +33 (0) 4 76 29 72 67 1 rue de Provence - 38432 Échirolles - France www.atos.net De : Alvaro Herrer

Re: Problem while updating a foreign table pointing to a partitioned table on foreign server

2018-05-31 Thread Kyotaro HORIGUCHI
Thanks. > I don't think this thread has reached a consensus on a design for a fix Right. If my understanding about non-system junk columns in a base relation and identifiers of a foreign tuples are correct, what is needed here is giving base relations the ability to have such junk column. I'm w

Re: New GUC to sample log queries

2018-05-31 Thread Adrien Nayrat
On 05/31/2018 03:34 AM, David Rowley wrote: > On 31 May 2018 at 06:44, Adrien Nayrat wrote: >> Here is a naive SELECT only bench with a dataset which fit in ram (scale >> factor >> = 100) and PGDATA and log on a ramdisk: >> shared_buffers = 4GB >> seq_page_cost = random_page_cost = 1.0 >> logging

RE:PostgreSQL 11 beta1 on AIX 7.2 : 2 failures in 32bit mode

2018-05-31 Thread REIX, Tony
Hi Michael, We have used GCC, version 8.1 . We also can build it with XLC, though I did not tried yet with v11beta1. I know about the 2 threads you have provided. Today, with our own patches, we are able to compile and run 100% OK PostgreSQL v10 or v9 on AIX 6 or AIX7, with GCC and XLC. (I'll su

Re: I'd like to discuss scaleout at PGCon

2018-05-31 Thread MauMau
2018-05-31 11:26 GMT+09:00, Robert Haas : > It was nice to meet you in person. Me too. And it was very kind of you to help me to display the wiki page well and guide the session. When I first heard your voice at the Developer Meeting, I thought Bruce Momjian was speaking, because your voice soun

Re: We still claim "cannot begin/end transactions in PL/pgSQL"

2018-05-31 Thread Peter Eisentraut
On 5/25/18 12:16, Tom Lane wrote: > I notice there are still several places in pl_exec.c like this: > > case SPI_ERROR_TRANSACTION: > ereport(ERROR, > (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), > errmsg("cannot begin/end transactions in PL