Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-12 Thread Julien Tachoires
On 10/03/2015 13:27, Alvaro Herrera wrote: > Robert Haas wrote: >> On Mon, Mar 9, 2015 at 7:26 PM, Andreas Karlsson wrote: > >>> I think we should allow moving the indexes for consistency. With this patch >>> we can move everything except for TOAST indexes. >> >> It might make sense to always put

Re: [HACKERS] proposal: searching in array function - array_position

2015-03-12 Thread Jim Nasby
On 3/10/15 9:30 AM, Robert Haas wrote: On Sat, Mar 7, 2015 at 1:06 PM, Petr Jelinek wrote: You still duplicate the type cache code, but many other array functions do that too so I will not hold that against you. (Maybe somebody should write separate patch that would put all that duplicate code

Re: [HACKERS] Stateful C-language function with state managed by third-party library

2015-03-12 Thread Tom Lane
Denys Rtveliashvili writes: > My function neeeds to call a third-party library which would create a state > and then that state should be kept for the duration of the current query. The > library can deallocate that state in a correct way. > I understand that fn_extra is normally used for this

Re: [HACKERS] proposal: searching in array function - array_position

2015-03-12 Thread Pavel Stehule
2015-03-10 16:53 GMT+01:00 Jim Nasby : > On 3/10/15 9:30 AM, Robert Haas wrote: > >> On Sat, Mar 7, 2015 at 1:06 PM, Petr Jelinek >> wrote: >> >>> You still duplicate the type cache code, but many other array functions >>> do >>> that too so I will not hold that against you. (Maybe somebody shoul

Re: [HACKERS] proposal: disallow operator "=>" and use it for named parameters

2015-03-12 Thread Pavel Stehule
2015-03-10 17:07 GMT+01:00 Petr Jelinek : > On 10/03/15 17:01, Pavel Stehule wrote: > >> >> >> 2015-03-10 16:50 GMT+01:00 Tom Lane > >: >> >> Robert Haas mailto:robertmh...@gmail.com>> >> writes: >> >> > Committed with a few documentation tweaks. >> >> Wa

Re: [HACKERS] Precedence of standard comparison operators

2015-03-12 Thread Tom Lane
Robert Haas writes: > On Tue, Mar 10, 2015 at 12:45 PM, David G. Johnston > wrote: >> I would vote for Auto meaning On in the .0 release. > I don't think users will appreciate an auto value whose meaning might > change at some point, and I doubt we've have much luck identifying the > correct poi

Re: [HACKERS] proposal: disallow operator "=>" and use it for named parameters

2015-03-12 Thread Kevin Grittner
Tom Lane wrote: > Robert Haas writes: >> On Tue, Mar 10, 2015 at 11:50 AM, Tom Lane wrote: >>> Was there any consideration given to whether ruleutils should start >>> printing NamedArgExprs with "=>"? Or do we think that needs to wait? >> >> I have to admit that I didn't consider that. What do

Re: [HACKERS] proposal: disallow operator "=>" and use it for named parameters

2015-03-12 Thread Tom Lane
Kevin Grittner writes: > Tom Lane wrote: >> Presumably we are going to change it at some point; maybe we >> should just do it rather than waiting another 5 years. > +1 > It has been deprecated long enough that I don't see the point of waiting. Uh, just to clarify, this has nothing to do with h

[HACKERS] timestamp format escape rules

2015-03-12 Thread Rikard Pavelic
Currently Postgres uses DATE WHITESPACE TIME for timestamp/tz datatype. Due whitespace it needs to be escaped when returned as record. How likely is to change WHITESPACE to something more ISO like, like 'T'? This would allow it to be serialized without the need for escaping. I'm asking this sinc

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-03-12 Thread Sawada Masahiko
On Tue, Mar 10, 2015 at 5:05 PM, Jim Nasby wrote: > On 3/9/15 9:43 PM, Sawada Masahiko wrote: >> >> On Fri, Mar 6, 2015 at 11:07 AM, Jim Nasby >> wrote: >>> >>> On 3/2/15 10:58 AM, Sawada Masahiko wrote: On Wed, Feb 25, 2015 at 4:58 PM, Jim Nasby wrote: > > > On 2

Re: [HACKERS] Install shared libs in lib/ and bin/ with MSVC (Was: install libpq.dll in bin directory on Windows / Cygwin)

2015-03-12 Thread Asif Naeem
Thank you Michael overall v3 patch looks good to me, There is one observation that it is not installing following lib files that are required for dev work i.e. > > inst\lib\libpq.lib > inst\lib\libpgtypes.lib > inst\lib\libecpg_compat.lib > inst\lib\libecpg.lib Please do let me know if I missed so

Re: [HACKERS] EvalPlanQual behaves oddly for FDW queries involving system columns

2015-03-12 Thread Etsuro Fujita
On 2015/03/12 13:35, Tom Lane wrote: > I don't like the execMain.c changes much at all. They look somewhat > like they're intended to allow foreign tables to adopt a different > locking strategy, I didn't intend such a thing. My intention is, foreign tables have markType = ROW_MARK_COPY as ever,

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

2015-03-12 Thread Robert Haas
On Tue, Mar 10, 2015 at 4:03 PM, Peter Geoghegan wrote: > On Tue, Mar 10, 2015 at 11:28 AM, Robert Haas wrote: >> I'm prepared to commit this version if nobody finds a problem with it. >> It passes the additional regression tests you wrote. > > Looks good to me. Thanks. OK, committed. -- Rober

Re: [HACKERS] One question about security label command

2015-03-12 Thread Robert Haas
On Tue, Mar 10, 2015 at 6:58 PM, Kohei KaiGai wrote: > ERRCODE_FEATURE_NOT_SUPPORTED is suitable error code here. > Please see the attached one. Committed. I did not bother back-patching this, but I can do that if people think it's important. The sepgsql regression tests don't seem to pass for

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-03-12 Thread Andres Freund
On 2015-03-11 20:55:18 -0400, Peter Eisentraut wrote: > I don't think so. Andres basically wanted a nontrival algorithm to > determine how much pruning to do during a read-only scan. And Robert > basically said, that's not really possible. I don't think either of us made really strong statements

Re: [HACKERS] Precedence of standard comparison operators

2015-03-12 Thread Peter Eisentraut
On 3/10/15 4:34 PM, Tom Lane wrote: > There's one more reason, too: the code I have is designed to give correct > warnings within the context of a parser that parses according to the > spec-compliant rules. It's possible that a similar approach could be used > to generate correct warnings within a

Re: [HACKERS] proposal: searching in array function - array_position

2015-03-12 Thread Jim Nasby
On 3/11/15 1:19 AM, Pavel Stehule wrote: 2015-03-11 2:57 GMT+01:00 Robert Haas mailto:robertmh...@gmail.com>>: On Tue, Mar 10, 2015 at 5:53 PM, Jim Nasby mailto:jim.na...@bluetreble.com>> wrote: > I don't think we need both array_offset and array_offset_start; can't both > SQL functi

[HACKERS] shebang for tcl postgresql modules

2015-03-12 Thread Jozef Mlich
Dear hackers, I would like to ask you if is there any reason to pretend tcl scripts are shell scripts? I am speaking namely about these files http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;f=src/pl/tcl/modules/pltcl_delmod.in;hb=HEAD http://git.postgresql.org/gitweb/?p=postgresq

Re: [HACKERS] Parallel Seq Scan

2015-03-12 Thread Amit Langote
On 10-03-2015 PM 01:09, Amit Kapila wrote: > On Tue, Mar 10, 2015 at 6:50 AM, Haribabu Kommi >> Is this patch handles the cases where the re-scan starts without >> finishing the earlier scan? >> > > Do you mean to say cases like ANTI, SEMI Join (in nodeNestLoop.c) > where we scan the next outer t

[HACKERS] OOM-killer issue when updating a inheritance table which has large number of child tables

2015-03-12 Thread chenhj
Hi In my test(PG9.3.4), i found when update a parent table which has a large number of child tables, the execute plan will consume lots of memory. And possibly cause OOM. For example: create table maintb(id int,name char(10)); create table childtb_1 (CHECK ( id BETWEEN 1 AND 200)) inherits(

Re: [HACKERS] How about to have relnamespace and relrole?

2015-03-12 Thread Jeevan Chalke
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed Looks good. Passing it to committer. The new status of this

Re: [HACKERS] Precedence of standard comparison operators

2015-03-12 Thread Greg Stark
On Wed, Mar 11, 2015 at 8:36 PM, Kevin Grittner wrote: > Right; and they may have millions of lines of code which have been > carefully tested and in production for years, and which may > suddenly start to generate incorrect results on queries *or mangle > existing data* with the fix unless they

Re: [HACKERS] [PATCH] Add transforms feature

2015-03-12 Thread Pavel Stehule
Hi I am looking to code. Some small issues: 1. fix missing semicolon pg_proc.h Oid protrftypes[1]; /* types for which to apply transforms */ 2. strange load lib by in sql scripts: DO '' LANGUAGE plperl; SELECT NULL::hstore; use load plperl; load hstore; instead 3. missi

Re: [HACKERS] Proposal : REINDEX xxx VERBOSE

2015-03-12 Thread Sawada Masahiko
On Thu, Mar 12, 2015 at 6:36 AM, Jim Nasby wrote: > On 3/11/15 6:33 AM, Sawada Masahiko wrote: >>> >>> As a refresher, current commands are: >>> > >>> >VACUUM (ANALYZE, VERBOSE) table1 (col1); >>> >REINDEX INDEX index1 FORCE; >>> >COPY table1 FRO

Re: [HACKERS] alter user/role CURRENT_USER

2015-03-12 Thread Kyotaro HORIGUCHI
Thank you for completing this and very sorry not to respond these days. I understood that it is committed after I noticed that rebasing my code failed.. Although after committed, I found some issues as I looked on it. Please forgive me to comment it now after all this time. Several changes in do

Re: [HACKERS] logical column ordering

2015-03-12 Thread Tomas Vondra
On 12.3.2015 03:16, Tom Lane wrote: > Peter Eisentraut writes: >> Side idea: Let attnum be the logical number, introduce attphysnum >> as the storage position, and add an oid to pg_attribute as the >> eternal identifier. > >> That way you avoid breaking pretty much all user code that looks at >

Re: [HACKERS] logical column ordering

2015-03-12 Thread Alvaro Herrera
Tomas Vondra wrote: > On 12.3.2015 03:16, Tom Lane wrote: > > I agree though that it's worth considering defining > > pg_attribute.attnum as the logical column position so as to minimize > > the effects on client-side code. I doubt there is much stuff > > client-side that cares about column cre

[HACKERS] pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

2015-03-12 Thread Marko Tiikkaja
Hi, My colleague Per Lejontand brought to my attention that when dumping views with circular dependencies from a postgres version older than 9.4 using a recent pg_dump, the SQL looks something like the following: create table qwr(); create rule "_RETURN" as on select to qwr do instead sel

Re: [HACKERS] pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

2015-03-12 Thread Andrew Gierth
> "Marko" == Marko Tiikkaja writes: Marko> Hi, Marko> My colleague Per Lejontand brought to my attention that when Marko> dumping views with circular dependencies from a postgres version Marko> older than 9.4 using a recent pg_dump, the SQL looks something Marko> like the following: M

Re: [HACKERS] OOM-killer issue when updating a inheritance table which has large number of child tables

2015-03-12 Thread David Fetter
On Thu, Mar 12, 2015 at 06:55:48PM +0800, chenhj wrote: > Hi > > In my test(PG9.3.4), i found when update a parent table which has a > large number of child tables, the execute plan will consume lots of > memory. And possibly cause OOM. At the moment, partitioning into thousands of tables is not

Re: [HACKERS] logical column ordering

2015-03-12 Thread Tomas Vondra
On 12.3.2015 14:17, Alvaro Herrera wrote: > Tomas Vondra wrote: >> On 12.3.2015 03:16, Tom Lane wrote: > >>> I agree though that it's worth considering defining >>> pg_attribute.attnum as the logical column position so as to minimize >>> the effects on client-side code. I doubt there is much stu

Re: [HACKERS] Install shared libs in lib/ and bin/ with MSVC (Was: install libpq.dll in bin directory on Windows / Cygwin)

2015-03-12 Thread Michael Paquier
On Wed, Mar 11, 2015 at 10:03 PM, Asif Naeem wrote: > Thank you Michael overall v3 patch looks good to me, There is one > observation that it is not installing following lib files that are required > for dev work i.e. Thanks for your input. >> inst\lib\libpq.lib >> inst\lib\libpgtypes.lib >> ins

Re: [HACKERS] logical column ordering

2015-03-12 Thread Alvaro Herrera
Tomas Vondra wrote: > On 12.3.2015 14:17, Alvaro Herrera wrote: > > Tomas Vondra wrote: > >> On 12.3.2015 03:16, Tom Lane wrote: > > > >>> I agree though that it's worth considering defining > >>> pg_attribute.attnum as the logical column position so as to minimize > >>> the effects on client-si

Re: [HACKERS] shebang for tcl postgresql modules

2015-03-12 Thread Tom Lane
Jozef Mlich writes: > I would like to ask you if is there any reason to pretend tcl scripts > are shell scripts? That is the time-honored standard formatting for tcl scripts, see for example page 2 here: http://www.tcl.tk/doc/styleGuide.pdf While we might get away with ignoring that convention f

Re: [HACKERS] OOM-killer issue when updating a inheritance table which has large number of child tables

2015-03-12 Thread Tom Lane
chenhj writes: > In my test(PG9.3.4), i found when update a parent table which has a large > number of child tables, the execute plan will consume lots of memory. And > possibly cause OOM. See file:///net/sss1/home/postgres/pgsql/doc/src/sgml/html/ddl-partitioning.html#DDL-PARTITIONING-CAVEATS

Re: [HACKERS] logical column ordering

2015-03-12 Thread Andres Freund
Hi, On 2015-03-11 22:16:52 -0400, Tom Lane wrote: > I agree though that it's worth considering defining pg_attribute.attnum as > the logical column position so as to minimize the effects on client-side > code. I actually wonder if it'd not make more sense to define it as the physical column numbe

Re: [HACKERS] pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

2015-03-12 Thread Tom Lane
Andrew Gierth writes: > "Marko" == Marko Tiikkaja writes: > Marko> create table qwr(); > Marko> create rule "_RETURN" as on select to qwr do instead select; > I've wondered for a while whether this wouldn't have been better handled > as: > create view qwr(colnames...) as select null::type

Re: [HACKERS] pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

2015-03-12 Thread Andres Freund
Hi, On 2015-03-12 14:25:24 +0100, Marko Tiikkaja wrote: > My colleague Per Lejontand brought to my attention that when dumping views > with circular dependencies from a postgres version older than 9.4 using a > recent pg_dump, the SQL looks something like the following: > > create table qwr();

Re: [HACKERS] logical column ordering

2015-03-12 Thread Tom Lane
Alvaro Herrera writes: > However, there's a difference between making a query silently given > different results, and breaking it completely forcing the user to > re-study how to write it. I think the latter is better. In that light > we should just drop attnum as a column name, and use somethin

[HACKERS] recovery_target_action doesn't work for anything but shutdown

2015-03-12 Thread Andres Freund
Hi, Unless I'm missing something recovery_target_action = promote/pause don't work. There's the following block of code in readRecoveryCommandFile(): /* * Override any inconsistent requests. Not that this is a change * of behaviour in 9.5; prior to this we simply ignored

Re: [HACKERS] recovery_target_action doesn't work for anything but shutdown

2015-03-12 Thread Andres Freund
On 2015-03-12 15:52:02 +0100, Andres Freund wrote: > I guess what you actually intended to test was StandbyModeRequested? Err, EnableHotStandby. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

Re: [HACKERS] Parallel Seq Scan

2015-03-12 Thread Thom Brown
On 12 March 2015 at 14:46, Amit Kapila wrote: > One additional change (we need to SetLatch() in > HandleParallelMessageInterrupt) > is done to handle the hang issue reported on parallel-mode thread. > Without this change it is difficult to verify the patch (will remove this > change > once new ver

[HACKERS] pg_xlog_replay_resume() considered armed and dangerous

2015-03-12 Thread Andres Freund
Hi, I think it's quite confusing that a function named pg_xlog_replay_resume() can cause a node to be promoted. That this is happened is kind of documented in the recovery.conf section of the manual: "The intended use of the pause setting is to allow queries to be executed against the database to

Re: [HACKERS] assessing parallel-safety

2015-03-12 Thread Robert Haas
[ deferring responses to some points until a later time ] On Thu, Feb 19, 2015 at 1:19 AM, Noah Misch wrote: >> This seems backwards to me. If some hypothetical selectivity >> estimator were PROPARALLEL_UNSAFE, then any operator that uses that >> function would also need to be PROPARALLEL_UNSAFE

Re: [HACKERS] Parallel Seq Scan

2015-03-12 Thread Amit Kapila
On Thu, Mar 12, 2015 at 8:33 PM, Thom Brown wrote: > > On 12 March 2015 at 14:46, Amit Kapila wrote: > > One additional change (we need to SetLatch() in > > HandleParallelMessageInterrupt) > > is done to handle the hang issue reported on parallel-mode thread. > > Without this change it is difficu

Re: [HACKERS] pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

2015-03-12 Thread Andrew Gierth
> "Tom" == Tom Lane writes: >> I've wondered for a while whether this wouldn't have been better >> handled as: >> create view qwr(colnames...) as select null::type1, null::type2, ...; >> /* ... */ >> create or replace view qwr as ...; Tom> Yeah, possibly. The existing pg_dump coding

Re: [HACKERS] EvalPlanQual behaves oddly for FDW queries involving system columns

2015-03-12 Thread Tom Lane
Etsuro Fujita writes: > On 2015/03/12 13:35, Tom Lane wrote: >> I don't like the execMain.c changes much at all. They look somewhat >> like they're intended to allow foreign tables to adopt a different >> locking strategy, > I didn't intend such a thing. My intention is, foreign tables have > m

Re: [HACKERS] Parallel Seq Scan

2015-03-12 Thread Thom Brown
On 12 March 2015 at 15:29, Amit Kapila wrote: > On Thu, Mar 12, 2015 at 8:33 PM, Thom Brown wrote: >> >> On 12 March 2015 at 14:46, Amit Kapila wrote: >> > One additional change (we need to SetLatch() in >> > HandleParallelMessageInterrupt) >> > is done to handle the hang issue reported on paral

Re: [HACKERS] pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

2015-03-12 Thread Alvaro Herrera
Andrew Gierth wrote: > > "Tom" == Tom Lane writes: > Tom> Yeah, possibly. The existing pg_dump coding dates from before we > Tom> had CREATE OR REPLACE VIEW. > > As it happens it does not; the issue came up originally because of a > hack I came up with, and I've never used any pg version

Re: [HACKERS] pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

2015-03-12 Thread Tom Lane
Andrew Gierth writes: > "Tom" == Tom Lane writes: > Tom> Yeah, possibly. The existing pg_dump coding dates from before we > Tom> had CREATE OR REPLACE VIEW. > As it happens it does not; the issue came up originally because of a > hack I came up with, and I've never used any pg version so old

Re: [HACKERS] pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

2015-03-12 Thread Robert Haas
On Thu, Mar 12, 2015 at 12:46 PM, Tom Lane wrote: >> As it happens it does not; the issue came up originally because of a >> hack I came up with, and I've never used any pg version so old it didn't >> have CREATE OR REPLACE VIEW. Nor does it look like the change was ever >> backpatched (or at leas

Re: [HACKERS] Parallel Seq Scan

2015-03-12 Thread Thom Brown
On 12 March 2015 at 16:20, Thom Brown wrote: > On 12 March 2015 at 15:29, Amit Kapila wrote: >> On Thu, Mar 12, 2015 at 8:33 PM, Thom Brown wrote: >>> >>> On 12 March 2015 at 14:46, Amit Kapila wrote: >>> > One additional change (we need to SetLatch() in >>> > HandleParallelMessageInterrupt) >>

Re: [HACKERS] pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

2015-03-12 Thread Tom Lane
Robert Haas writes: > On Thu, Mar 12, 2015 at 12:46 PM, Tom Lane wrote: >> Sorry, that's mere historical revisionism. > Can we please keep this a little more civil? Saying it that way > implies bad faith. You could instead write "I think you are > mistaken". Hmm, I take that phrase as being a

Re: [HACKERS] Cube extension kNN support

2015-03-12 Thread Stas Kelvich
Documentation along with style fix. distances2r3.patch Description: Binary data > On 08 Feb 2015, at 00:32, Alexander Korotkov wrote: > > Hi! > > On Sat, Feb 7, 2015 at 12:45 PM, Stas Kelvich wrote: > I had updated old patch with kNN operators for cube data structures. Copying > descripti

Re: [HACKERS] Documentation of bt_page_items()'s ctid field

2015-03-12 Thread Tom Lane
Jeff Janes writes: > I think we do want this. It was asked how much we want to include > internals of the btree code into pageinspect documentation, but I think the > nature of pageinspect makes that unavoidable. Yeah. Committed with a little bit of additional wordsmithing.

Re: [HACKERS] get_object_address support for additional object types

2015-03-12 Thread Alvaro Herrera
Stephen Frost wrote: > I thought the rest of it looked alright. I agree it's a bit odd how the > opfamily is handled but I agree with your assessment that there's not > much better we can do with this object representation. Actually, on second thought I revisited this and changed the representat

Re: [HACKERS] pg_rewind in contrib

2015-03-12 Thread Heikki Linnakangas
On 03/12/2015 08:49 AM, Amit Kapila wrote: With attached modified script, I am able to reproduce the error (I have used the latest pg_rewind patch (pg_rewind-bin-8)) Thanks! That reproduced the error for me too. Not sure why I couldn't reproduce it earlier. The cause was a silly typo in trun

Re: [HACKERS] logical column ordering

2015-03-12 Thread Peter Eisentraut
On 3/11/15 10:16 PM, Tom Lane wrote: > I think using an OID would break more stuff than it fixes in dependency > tracking; in particular you would now need an explicit dependency link > from each column to its table, because the "sub-object" knowledge would > no longer work. That might not be a b

Re: [HACKERS] logical column ordering

2015-03-12 Thread Peter Eisentraut
On 3/12/15 10:07 AM, Andres Freund wrote: > I actually wonder if it'd not make more sense to define it as the > physical column number. That'd reduce the invasiveness and risk of the > patch considerably. Clearly, the number of places where attnum has to be changed to something else is not zero, a

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-03-12 Thread Peter Eisentraut
On 3/12/15 5:41 AM, Andres Freund wrote: > On 2015-03-11 20:55:18 -0400, Peter Eisentraut wrote: >> I don't think so. Andres basically wanted a nontrival algorithm to >> determine how much pruning to do during a read-only scan. And Robert >> basically said, that's not really possible. > > I don'

Re: [HACKERS] forward vs backward slashes in msvc build code

2015-03-12 Thread Peter Eisentraut
On 3/4/15 11:00 PM, Andrew Dunstan wrote: > > On 03/04/2015 10:37 PM, Peter Eisentraut wrote: >> On 2/15/15 6:55 AM, Michael Paquier wrote: >>> I tested quickly the second patch with MS 2010 and I am getting a >>> build failure: chkpass cannot complete because of crypt missing. On >>> master build

Re: [HACKERS] OOM-killer issue when updating a inheritance table which has large number of child tables

2015-03-12 Thread Tom Lane
Stephen Frost writes: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> See >> file:///net/sss1/home/postgres/pgsql/doc/src/sgml/html/ddl-partitioning.html#DDL-PARTITIONING-CAVEATS > Or perhaps, if you're on the Internet, this instead: > http://www.postgresql.org/docs/9.4/static/ddl-partitioning.html#D

Re: [HACKERS] OOM-killer issue when updating a inheritance table which has large number of child tables

2015-03-12 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > chenhj writes: > > In my test(PG9.3.4), i found when update a parent table which has a large > > number of child tables, the execute plan will consume lots of memory. And > > possibly cause OOM. > > See > file:///net/sss1/home/postgres/pgsql/doc/src/sgml

Re: [HACKERS] Turning off HOT/Cleanup sometimes

2015-03-12 Thread Robert Haas
On Thu, Mar 12, 2015 at 3:48 PM, Peter Eisentraut wrote: > On 3/12/15 5:41 AM, Andres Freund wrote: >> On 2015-03-11 20:55:18 -0400, Peter Eisentraut wrote: >>> I don't think so. Andres basically wanted a nontrival algorithm to >>> determine how much pruning to do during a read-only scan. And Ro

Re: [HACKERS] Reduce pinning in btree indexes

2015-03-12 Thread Kevin Grittner
Kevin Grittner wrote: > Because these changes are just to a comment and a README file, > I'm posting a patch-on-patch v3a (to be applied on top of v3). Here is some additional comment work that I hope will make things easier to understand for whoever next visits this code. There is also a minor

Re: Custom/Foreign-Join-APIs (Re: [HACKERS] [v9.5] Custom Plan API)

2015-03-12 Thread Robert Haas
On Mon, Mar 9, 2015 at 11:18 PM, Kouhei Kaigai wrote: > The attached patch integrates a suggestion from Ashutosh Bapat. > It allows to track set of relations involved in a join, but > replaced by foreign-/custom-scan. It enables to make correct > EXPLAIN output, if FDW/CSP driver makes human reada

Re: [HACKERS] forward vs backward slashes in msvc build code

2015-03-12 Thread Alvaro Herrera
Peter Eisentraut wrote: > On 3/4/15 11:00 PM, Andrew Dunstan wrote: > > > > On 03/04/2015 10:37 PM, Peter Eisentraut wrote: > >> I can't tell from just looking at the code how chkpass would normally > >> find crypt. The msvc tools neither parse SHLIB_LINK nor have hardcoded > >> knowledge. Any

Re: Custom/Foreign-Join-APIs (Re: [HACKERS] [v9.5] Custom Plan API)

2015-03-12 Thread Tom Lane
Robert Haas writes: > I took a look at this patch today and noticed that it incorporates not > only documentation for the new functionality it adds, but also for the > custom-scan functionality whose documentation I previously excluded > from commit on the grounds that it needed more work, especia

[HACKERS] Moving Pivotal's Greenplum work upstream

2015-03-12 Thread Ewan Higgs
Hi all,There has been some press regarding Pivotal's intent to release Greenplum source as part of an Open Development Platform (along with some of their Hadoop projects). Can anyone speak on whether any of Greenplum might find its way upstream? For example, if(!) the work is being released unde

Re: [HACKERS] Reduce pinning in btree indexes

2015-03-12 Thread Peter Geoghegan
On Sat, Feb 14, 2015 at 4:19 PM, Kevin Grittner wrote: > At some point we could consider building on this patch to recheck > index conditions for heap access when a non-MVCC snapshot is used, > check the visibility map for referenced heap pages when the TIDs > are read for an index-only scan, and/

Re: [HACKERS] Moving Pivotal's Greenplum work upstream

2015-03-12 Thread Josh Berkus
On 03/12/2015 03:24 PM, Ewan Higgs wrote: > Hi all, > There has been some press regarding Pivotal's intent to release > Greenplum source as part of an Open Development Platform (along with > some of their Hadoop projects). Can anyone speak on whether any of > Greenplum might find its way upstream?

[HACKERS] Bug in point releases 9.3.6 and 9.2.10?

2015-03-12 Thread Peter Geoghegan
Heroku Postgres runs provisioning code that performs certain actions on roles when creating a new "fork" of an existing database. This often causes the new fork to be on the latest point release, where the database being forked was not. We want to create a new role when this happens, for various r

Re: Custom/Foreign-Join-APIs (Re: [HACKERS] [v9.5] Custom Plan API)

2015-03-12 Thread Thom Brown
On 12 March 2015 at 21:28, Tom Lane wrote: > Robert Haas writes: >> I took a look at this patch today and noticed that it incorporates not >> only documentation for the new functionality it adds, but also for the >> custom-scan functionality whose documentation I previously excluded >> from commi

Re: [HACKERS] Bug in point releases 9.3.6 and 9.2.10?

2015-03-12 Thread Andres Freund
Hi, On 2015-03-12 16:42:24 -0700, Peter Geoghegan wrote: > We want to create a new role when this happens, for various reasons. > This occurs after recovery ends, but before the database has been > "unfenced". The template code that generates various ALTER ROLE > statements in our internal provisi

Re: [HACKERS] Bug in point releases 9.3.6 and 9.2.10?

2015-03-12 Thread Peter Geoghegan
In a hurry right now, so unfortunately I'll need to be brief for now. On Thu, Mar 12, 2015 at 5:21 PM, Andres Freund wrote: > On 2015-03-12 16:42:24 -0700, Peter Geoghegan wrote: >> We want to create a new role when this happens, for various reasons. >> This occurs after recovery ends, but before

Re: [HACKERS] Bug in point releases 9.3.6 and 9.2.10?

2015-03-12 Thread Andres Freund
On 2015-03-12 17:42:33 -0700, Peter Geoghegan wrote: > On Thu, Mar 12, 2015 at 5:21 PM, Andres Freund wrote: > > On 2015-03-12 16:42:24 -0700, Peter Geoghegan wrote: > >> We want to create a new role when this happens, for various reasons. > >> This occurs after recovery ends, but before the datab

Re: [HACKERS] Bug in point releases 9.3.6 and 9.2.10?

2015-03-12 Thread Peter Geoghegan
On Thu, Mar 12, 2015 at 5:56 PM, Andres Freund wrote: > So, no hot standby enabled? Right. > There've been some issues with seek(END) sometimes returning the wrong > length in the past. And I've seen a report that might indicate a similar > bug has been reintroduced. That could certainly cause s

Re: [HACKERS] Parallel Seq Scan

2015-03-12 Thread Amit Kapila
On Thu, Mar 12, 2015 at 4:22 PM, Amit Langote wrote: > > On 10-03-2015 PM 01:09, Amit Kapila wrote: > > On Tue, Mar 10, 2015 at 6:50 AM, Haribabu Kommi < kommi.harib...@gmail.com> > >> Is this patch handles the cases where the re-scan starts without > >> finishing the earlier scan? > >> > > > > Do

Re: [HACKERS] Using 128-bit integers for sum, avg and statistics aggregates

2015-03-12 Thread Andreas Karlsson
On 03/10/2015 02:26 AM, Peter Geoghegan wrote: On Mon, Mar 9, 2015 at 5:37 PM, Andreas Karlsson wrote: int128-agg-v7.patch I see a spelling error: "+ * On platforms which support 128-bit integers some aggergates instead use a" Fixed. I think you should talk about the new thing first (jus

Re: Custom/Foreign-Join-APIs (Re: [HACKERS] [v9.5] Custom Plan API)

2015-03-12 Thread Kouhei Kaigai
> On Mon, Mar 9, 2015 at 11:18 PM, Kouhei Kaigai wrote: > > The attached patch integrates a suggestion from Ashutosh Bapat. > > It allows to track set of relations involved in a join, but > > replaced by foreign-/custom-scan. It enables to make correct > > EXPLAIN output, if FDW/CSP driver makes h

Re: [HACKERS] Providing catalog view to pg_hba.conf file - Patch submission

2015-03-12 Thread Peter Eisentraut
On 3/4/15 1:34 AM, Haribabu Kommi wrote: > On Wed, Mar 4, 2015 at 12:35 PM, Haribabu Kommi > wrote: >> + foreach(line, parsed_hba_lines) >> >> In the above for loop it is better to add "check_for_interrupts" to >> avoid it looping >> if the parsed_hba_lines are more. > > Updated patch is attached

Re: [HACKERS] CATUPDATE confusion?

2015-03-12 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Sat, Mar 7, 2015 at 6:40 PM, Adam Brightwell > wrote: > >> pg_shadow, pg_user and pg_group were added when role support was added, > >> specifically for backwards compatibility. I don't believe there was > >> ever discussion about keeping them bec

Re: [HACKERS] EvalPlanQual behaves oddly for FDW queries involving system columns

2015-03-12 Thread Etsuro Fujita
On 2015/03/13 0:50, Tom Lane wrote: The tableoid problem can be fixed much less invasively as per the attached patch. I think that we should continue to assume that ctid is not meaningful (and hence should read as (4294967295,0)) in FDWs that use ROW_MARK_COPY, and press forward on fixing the lo

Re: [HACKERS] Parallel Seq Scan

2015-03-12 Thread Amit Langote
On 13-03-2015 AM 10:24, Amit Kapila wrote: > On Thu, Mar 12, 2015 at 4:22 PM, Amit Langote >> From Robert's description[1], it looked like the NestLoop with Funnel > would >> have Funnel as either outer plan or topmost plan node or NOT a > parameterised >> plan. In that case, would this case arise

Re: [HACKERS] Parallel Seq Scan

2015-03-12 Thread Amit Langote
On 13-03-2015 PM 01:37, Amit Langote wrote: > By the way, is it right that TupleQueueFunnel.queue has one shm_mq_handle per > initialized parallel worker? If so, how does TupleQueueFunnel.maxqueues relate > to ParallelContext.nworkers (of the corresponding parallel context)? > > Why I asked this i