Re: [HACKERS] inherit support for foreign tables

2014-03-27 Thread Kyotaro HORIGUCHI
Hello, analyze.c: In function ‘acquire_inherited_sample_rows’: analyze.c:1461: warning: unused variable ‘saved_rel’ I've fixed this in the latest version (v8) of the patch. Mmm. sorry. I missed v8 patch. Then I had a look on that and have a question. You've added a check for relkind of

[HACKERS] datistemplate of pg_database does not behave as per description in documentation

2014-03-27 Thread Rajeev rastogi
As per the documentation, datistemplate of pg_database is used in following way: datistemplate Bool If true then this database can be used in the TEMPLATE clause of CREATE DATABASE to create a new database as a clone of this one But current code does not behave in this manner. Even if

Re: [HACKERS] datistemplate of pg_database does not behave as per description in documentation

2014-03-27 Thread Magnus Hagander
On Thu, Mar 27, 2014 at 9:12 AM, Rajeev rastogi rajeev.rast...@huawei.comwrote: As per the documentation, datistemplate of pg_database is used in following way: datistemplate Bool If true then this database can be used in the TEMPLATE clause of CREATE DATABASE to create a new database

Re: [HACKERS] inherit support for foreign tables

2014-03-27 Thread Etsuro Fujita
Hi Horiguchi-san, (2014/03/27 17:09), Kyotaro HORIGUCHI wrote: analyze.c: In function ‘acquire_inherited_sample_rows’: analyze.c:1461: warning: unused variable ‘saved_rel’ I've fixed this in the latest version (v8) of the patch. Mmm. sorry. I missed v8 patch. Then I had a look on that and

Re: [HACKERS] Few new warnings have been introduced in windows build (jsonb_util.c)

2014-03-27 Thread Heikki Linnakangas
On 03/27/2014 06:35 AM, Amit Kapila wrote: Few new warnings have been introduced in windows build. 1e:\workspace\postgresql\master\postgresql\src\backend\utils\adt\jsonb_util.c(802): warning C4715: 'JsonbIteratorNext' : not all control paths return a value

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Christoph Berg
Re: Bruce Momjian 2014-03-26 20140326161056.ga...@momjian.us The attached patch matches your suggestion. It is basically back to what the code originally had, except it skips system tables, and shows ??? for invalid values. Fwiw, make check-world is currently broken:

Re: [HACKERS] datistemplate of pg_database does not behave as per description in documentation

2014-03-27 Thread Stephen Frost
* Magnus Hagander (mag...@hagander.net) wrote: However, that also raises a third option. We could just drop the idea if datistemplate completely, and remove the column. Since clearly it's not actually doing anything, and people seem to have been happy with that for a while, why do we need it

Re: [HACKERS] datistemplate of pg_database does not behave as per description in documentation

2014-03-27 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Thu, Mar 27, 2014 at 9:12 AM, Rajeev rastogi rajeev.rast...@huawei.comwrote: But current code does not behave in this manner. Even if dbistemplate of database is false, still it allows to be used as template database. AFAICT, the *only* thing

[HACKERS] Something flaky in the relfilenode mapping infrastructure

2014-03-27 Thread Tom Lane
Buildfarm member prairiedog thinks there's something unreliable about commit f01d1ae3a104019d6d68aeff85c4816a275130b3: http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prairiedogdt=2014-03-27%2008%3A12%3A11 == pgsql.13462/src/test/regress/regression.diffs

Re: [HACKERS] datistemplate of pg_database does not behave as per description in documentation

2014-03-27 Thread Magnus Hagander
On Mar 27, 2014 12:45 PM, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: On Thu, Mar 27, 2014 at 9:12 AM, Rajeev rastogi rajeev.rast...@huawei.comwrote: But current code does not behave in this manner. Even if dbistemplate of database is false, still it

Re: [HACKERS] Missing pfree in logical_heap_rewrite_flush_mappings()

2014-03-27 Thread Stephen Frost
* Andres Freund (and...@2ndquadrant.com) wrote: On 2014-03-26 13:41:27 -0400, Stephen Frost wrote: Good catch. There's actually no need for explicitly using the context, we're in the appropriate one. The only other MemoryContextAlloc() caller in there should be converted to a palloc as

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Bruce Momjian
On Thu, Mar 27, 2014 at 10:02:20AM +0100, Christoph Berg wrote: Re: Bruce Momjian 2014-03-26 20140326161056.ga...@momjian.us The attached patch matches your suggestion. It is basically back to what the code originally had, except it skips system tables, and shows ??? for invalid values.

[HACKERS] psql \d+ and oid display

2014-03-27 Thread Bruce Momjian
When we made OIDs optional, we added an oid status display to \d+: test= \d+ test Table public.test Column | Type | Modifiers | Storage | Stats target | Description +-+---+-+--+-

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Christoph Berg
Re: Bruce Momjian 2014-03-27 20140327131048.ga11...@momjian.us On Thu, Mar 27, 2014 at 10:02:20AM +0100, Christoph Berg wrote: Re: Bruce Momjian 2014-03-26 20140326161056.ga...@momjian.us The attached patch matches your suggestion. It is basically back to what the code originally had,

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Bruce Momjian
On Thu, Mar 27, 2014 at 02:41:40PM +0100, Christoph Berg wrote: Re: Bruce Momjian 2014-03-27 20140327131048.ga11...@momjian.us On Thu, Mar 27, 2014 at 10:02:20AM +0100, Christoph Berg wrote: Re: Bruce Momjian 2014-03-26 20140326161056.ga...@momjian.us The attached patch matches your

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: On Thu, Mar 27, 2014 at 02:41:40PM +0100, Christoph Berg wrote: I meant to say what's actually in git HEAD at the moment is broken. Uh, I thought that might be what you were saying, but I am not seeing any failures here. The buildfarm isn't complaining,

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Andrew Dunstan
On 03/27/2014 10:13 AM, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: On Thu, Mar 27, 2014 at 02:41:40PM +0100, Christoph Berg wrote: I meant to say what's actually in git HEAD at the moment is broken. Uh, I thought that might be what you were saying, but I am not seeing any

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Bruce Momjian
On Thu, Mar 27, 2014 at 10:13:36AM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: On Thu, Mar 27, 2014 at 02:41:40PM +0100, Christoph Berg wrote: I meant to say what's actually in git HEAD at the moment is broken. Uh, I thought that might be what you were saying, but I am

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Bruce Momjian
On Thu, Mar 27, 2014 at 10:30:59AM -0400, Bruce Momjian wrote: On Thu, Mar 27, 2014 at 10:13:36AM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: On Thu, Mar 27, 2014 at 02:41:40PM +0100, Christoph Berg wrote: I meant to say what's actually in git HEAD at the moment is

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Andrew Dunstan
On 03/27/2014 10:31 AM, Andrew Dunstan wrote: On 03/27/2014 10:13 AM, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: On Thu, Mar 27, 2014 at 02:41:40PM +0100, Christoph Berg wrote: I meant to say what's actually in git HEAD at the moment is broken. Uh, I thought that might be what

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: I guess we'd better add a make-contrib-check step to the buildfarm. I was just prepping a release, so I'll delay that while I add this. BTW, won't that obsolete the need for the separate check-pg_upgrade step? regards, tom

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Andrew Dunstan
On 03/27/2014 11:27 AM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: I guess we'd better add a make-contrib-check step to the buildfarm. I was just prepping a release, so I'll delay that while I add this. BTW, won't that obsolete the need for the separate check-pg_upgrade step?

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Alvaro Herrera
Tom Lane wrote: Bruce Momjian br...@momjian.us writes: On Thu, Mar 27, 2014 at 02:41:40PM +0100, Christoph Berg wrote: I meant to say what's actually in git HEAD at the moment is broken. Uh, I thought that might be what you were saying, but I am not seeing any failures here. The

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Christoph Berg
Re: Andrew Dunstan 2014-03-27 53344465.6010...@dunslane.net On 03/27/2014 11:27 AM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: I guess we'd better add a make-contrib-check step to the buildfarm. I was just prepping a release, so I'll delay that while I add this. BTW, won't

Re: [HACKERS] [PATCH] Negative Transition Aggregate Functions (WIP)

2014-03-27 Thread Dean Rasheed
On 26 March 2014 19:43, David Rowley dgrowle...@gmail.com wrote: On Thu, Mar 27, 2014 at 7:33 AM, Tom Lane t...@sss.pgh.pa.us wrote: David Rowley dgrowle...@gmail.com writes: I've attached an updated invtrans_strictstrict_base patch which has the feature removed. What is the state of play

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Andrew Dunstan
On 03/27/2014 11:34 AM, Christoph Berg wrote: Re: Andrew Dunstan 2014-03-27 53344465.6010...@dunslane.net On 03/27/2014 11:27 AM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: I guess we'd better add a make-contrib-check step to the buildfarm. I was just prepping a release, so

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Alvaro Herrera
Andrew Dunstan wrote: For several reasons. It's not simply a matter of running that command. You also have to bundle up the various log files. Also, if all we do is check-world and it fails that fact gives us relatively little information, whereas if it passes make check but fails make -C

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Andres Freund
On 2014-03-27 11:12:41 -0400, Andrew Dunstan wrote: No, unless you're building with some options the buildfarm doesn't exercise. (Well, the buildfarm does installcheck rather than check for contrib, but that should not matter.) And I see it does. I missed that, and I don't think anyone

Re: [HACKERS] four minor proposals for 9.5

2014-03-27 Thread Pavel Stehule
Hello 2014-03-20 1:28 GMT+01:00 Josh Berkus j...@agliodbs.com: Pavel, I wrote a few patches, that we use in our production. These patches are small, but I hope, so its can be interesting for upstream: 1. cancel time - we log a execution time cancelled statements Manually cancelled?

Re: [HACKERS] four minor proposals for 9.5

2014-03-27 Thread Pavel Stehule
Hello After week, I can to evaluate a community reflection: 2014-03-19 16:34 GMT+01:00 Pavel Stehule pavel.steh...@gmail.com: Hello I wrote a few patches, that we use in our production. These patches are small, but I hope, so its can be interesting for upstream: 1. cancel time - we log a

Re: [HACKERS] [patch] Adding EXTRA_REGRESS_OPTS to all pg_regress invocations

2014-03-27 Thread Christoph Berg
Re: Bruce Momjian 2013-12-04 20131204151533.gb17...@momjian.us On Mon, May 6, 2013 at 11:51:47PM -0700, Christoph Berg wrote: make check supports EXTRA_REGRESS_OPTS to pass extra options to pg_regress, but all the other places where pg_regress is used do not allow this. The attached patch

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Note that make check in contrib is substantially slower than make installcheck --- it creates a temporary installation for each contrib module. If we make buildfarm run installcheck for all modules, that might be a problem for some animals.

Re: [HACKERS] using arrays within structure in ECPG

2014-03-27 Thread Michael Meskes
On Mon, Mar 24, 2014 at 11:52:30AM +0530, Ashutosh Bapat wrote: For all the members of struct employee, except arr_col, the size of array is set to 14 and next member offset is set of sizeof (struct employee). But for arr_col they are set to 3 and sizeof(int) resp. So, for the next row

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Noah Misch
On Thu, Mar 27, 2014 at 12:56:02PM -0300, Alvaro Herrera wrote: Also, there's the vcregress.pl business. The way it essentially duplicates pg_upgrade/test.sh is rather messy; and now that test_decoding also needs similar treatment, it's not looking so good. Should we consider redoing that

Re: [HACKERS] psql \d+ and oid display

2014-03-27 Thread Euler Taveira
On 27-03-2014 10:15, Bruce Momjian wrote: When we made OIDs optional, we added an oid status display to \d+: test= \d+ test Table public.test Column | Type | Modifiers | Storage | Stats target | Description

Re: [HACKERS] psql \d+ and oid display

2014-03-27 Thread Stephen Frost
* Euler Taveira (eu...@timbira.com.br) wrote: On 27-03-2014 10:15, Bruce Momjian wrote: When we made OIDs optional, we added an oid status display to \d+: test= \d+ test Table public.test Column | Type | Modifiers | Storage | Stats target |

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Andrew Dunstan
On 03/27/2014 11:56 AM, Alvaro Herrera wrote: Also, there's the vcregress.pl business. The way it essentially duplicates pg_upgrade/test.sh is rather messy; and now that test_decoding also needs similar treatment, it's not looking so good. Should we consider redoing that stuff in a way that

[HACKERS] Doing better at HINTing an appropriate column within errorMissingColumn()

2014-03-27 Thread Peter Geoghegan
With the addition of LATERAL subqueries, Tom fixed up the mechanism for keeping track of which relations are visible for column references while the FROM clause is being scanned. That allowed errorMissingColumn() to give a more useful error to the one produced by the prior coding of that

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 03/27/2014 11:56 AM, Alvaro Herrera wrote: Also, there's the vcregress.pl business. The way it essentially duplicates pg_upgrade/test.sh is rather messy; and now that test_decoding also needs similar treatment, it's not looking so good. Should we

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Andrew Dunstan
On 03/27/2014 04:31 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 03/27/2014 11:56 AM, Alvaro Herrera wrote: Also, there's the vcregress.pl business. The way it essentially duplicates pg_upgrade/test.sh is rather messy; and now that test_decoding also needs similar

Re: [HACKERS] psql \d+ and oid display

2014-03-27 Thread David Johnston
Bruce Momjian wrote When we made OIDs optional, we added an oid status display to \d+: test= \d+ test Table public.test Column | Type | Modifiers | Storage | Stats target | Description

Re: [HACKERS] psql \d+ and oid display

2014-03-27 Thread Andrew Dunstan
On 03/27/2014 04:43 PM, David Johnston wrote: Bruce Momjian wrote When we made OIDs optional, we added an oid status display to \d+: test= \d+ test Table public.test Column | Type | Modifiers | Storage | Stats target | Description

Re: [HACKERS] Minimum supported version of Python?

2014-03-27 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: You backpatched this change, but that can't be right, because the feature that requires the cdecimal module was added in 9.4 (7919398bac8bacd75ec5d763ce8b15ffaaa3e071). Ah. I saw that the failing tests were quite old, but did not realize that we'd only

Re: [HACKERS] [PATCH] Negative Transition Aggregate Functions (WIP)

2014-03-27 Thread Florian Pflug
First, sorry guys for letting this slide - I was overwhelmed by other works, and this kind of slipped my mind :-( On Mar27, 2014, at 09:04 , Dean Rasheed dean.a.rash...@gmail.com wrote: On 26 March 2014 19:43, David Rowley dgrowle...@gmail.com wrote: On Thu, Mar 27, 2014 at 7:33 AM, Tom Lane

Re: [HACKERS] psql \d+ and oid display

2014-03-27 Thread Andres Freund
On 2014-03-27 09:15:52 -0400, Bruce Momjian wrote: When we made OIDs optional, we added an oid status display to \d+: test= \d+ test Table public.test Column | Type | Modifiers | Storage | Stats target | Description

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Andres Freund
On 2014-03-27 13:52:19 -0400, Noah Misch wrote: On Thu, Mar 27, 2014 at 12:56:02PM -0300, Alvaro Herrera wrote: Also, there's the vcregress.pl business. The way it essentially duplicates pg_upgrade/test.sh is rather messy; and now that test_decoding also needs similar treatment, it's not

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Andres Freund
On 2014-03-27 12:56:02 -0300, Alvaro Herrera wrote: Also, there's the vcregress.pl business. The way it essentially duplicates pg_upgrade/test.sh is rather messy; and now that test_decoding also needs similar treatment, it's not looking so good. Should we consider redoing that stuff in a way

Re: [HACKERS] History of WAL_LEVEL (archive vs hot_standby)

2014-03-27 Thread David Johnston
shamccoy wrote Hello. I've been doing some benchmarks on performance / size differences between actions when wal_level is set to either archive or hot_standby. I'm not seeing a ton of difference. I've read some posts about discussions as to whether this parameter should be simplified and

Re: [HACKERS] Cube extension kNN support

2014-03-27 Thread Sergey Konoplev
Hi everyone, On Sun, Sep 22, 2013 at 4:38 PM, Stas Kelvich stas.kelv...@gmail.com wrote: Here is the patch that introduces kNN search for cubes with euclidean, taxicab and chebyshev distances. What is the status of this patch? -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA

Re: [HACKERS] History of WAL_LEVEL (archive vs hot_standby)

2014-03-27 Thread Josh Berkus
On 03/27/2014 03:06 PM, David Johnston wrote: As I think both can be used for PITR I don't believe there is much downside, technically or with resources, to using hot_standby instead of archive; but I do not imagine it having any practical benefit either. Actually, hot_standby does have to

Re: [HACKERS] Useless Replica Identity: NOTHING noise from psql \d

2014-03-27 Thread Andrew Dunstan
On 03/27/2014 05:15 PM, Andres Freund wrote: On 2014-03-27 12:56:02 -0300, Alvaro Herrera wrote: Also, there's the vcregress.pl business. The way it essentially duplicates pg_upgrade/test.sh is rather messy; and now that test_decoding also needs similar treatment, it's not looking so good.

Re: [HACKERS] History of WAL_LEVEL (archive vs hot_standby)

2014-03-27 Thread Noah Misch
On Thu, Mar 27, 2014 at 03:06:02PM -0700, David Johnston wrote: shamccoy wrote Hello. I've been doing some benchmarks on performance / size differences between actions when wal_level is set to either archive or hot_standby. I'm not seeing a ton of difference. I've read some posts about

[HACKERS] PATCH: decreasing memory needlessly consumed by array_agg

2014-03-27 Thread Tomas Vondra
Hi, this is a patch for issue reported in October 2013 in pgsql-bugs: http://www.postgresql.org/message-id/3839201.nfa2rvc...@techfox.foxi Frank van Vugt reported that a simple query with array_agg() and large number of groups (1e7) fails because of OOM even on machine with 32GB of RAM. So

Re: [HACKERS] History of WAL_LEVEL (archive vs hot_standby)

2014-03-27 Thread David Johnston
Noah Misch-2 wrote On Thu, Mar 27, 2014 at 03:06:02PM -0700, David Johnston wrote: shamccoy wrote Hello. I've been doing some benchmarks on performance / size differences between actions when wal_level is set to either archive or hot_standby. I'm not seeing a ton of difference. I've

Re: [HACKERS] History of WAL_LEVEL (archive vs hot_standby)

2014-03-27 Thread David Johnston
David Johnston wrote Noah Misch-2 wrote On Thu, Mar 27, 2014 at 03:06:02PM -0700, David Johnston wrote: shamccoy wrote Hello. I've been doing some benchmarks on performance / size differences between actions when wal_level is set to either archive or hot_standby. I'm not seeing a

Re: [HACKERS] inherit support for foreign tables

2014-03-27 Thread Kyotaro HORIGUCHI
Hi, ForeignPath *pathnode = makeNode(ForeignPath); + Assert(rel-rtekind == RTE_RELATION); pathnode-path.pathtype = T_ForeignScan; .. Maybe I'm missing the point, but I don't think it'd be better to put the assertion in create_foreignscan_path(). And I think it'd be the

Re: [HACKERS] Archive recovery won't be completed on some situation.

2014-03-27 Thread Kyotaro HORIGUCHI
Hello, After all, pmState changes to PM_NO_CHILDREN via PM_WAIT_DEAD_END by SIGCHLDs from non-significant processes, then CancelBackup(). Judging from what was being said on the thread, it seems that running CancelBackup() after an immediate shutdown is better than not doing it, correct?

Re: [HACKERS] Archive recovery won't be completed on some situation.

2014-03-27 Thread Kyotaro HORIGUCHI
Hello, At Wed, 19 Mar 2014 19:34:10 +0900, Fujii Masao wrote Agreed. Attached patches do that and I could recover the database state with following steps, Adding new option looks like new feature rather than bug fix. I'm afraid that the backpatch of such a change to 9.3 or before

Re: [HACKERS] History of WAL_LEVEL (archive vs hot_standby)

2014-03-27 Thread Kyotaro HORIGUCHI
Hi, Went looking for this in the docs... http://www.postgresql.org/docs/9.3/interactive/runtime-config-wal.html#GUC-WAL-LEVEL So I guess, no-restore/offline/online would be good names (and maybe wal_restore_mode instead of wal_level) if we started from scratch. Note that