Re: [HACKERS] Patch for CREATE RULE sgml -- Was in: [DOCS]

2014-03-22 Thread Michael Paquier
On Sat, Mar 22, 2014 at 11:18 AM, Jaime Casanova ja...@2ndquadrant.com wrote: On Fri, Mar 21, 2014 at 8:15 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Sat, Mar 22, 2014 at 12:56 AM, Emanuel Calvo emanuel.ca...@2ndquadrant.com wrote: I realized that the output of the CREATE RULE

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe Reply-To:

2014-03-22 Thread Simon Riggs
On 21 March 2014 23:36, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: On 21 March 2014 20:58, Noah Misch n...@leadboat.com wrote: It's not the behavior I would choose for a new product, but I can't see benefits sufficient to overturn previous decisions to keep

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe Reply-To:

2014-03-22 Thread Simon Riggs
On 21 March 2014 16:11, Simon Riggs si...@2ndquadrant.com wrote: + * Be careful to ensure this function is called for Tables and Indexes only. + * It is not currently safe to be called for Views because security_barrier + * is listed as an option and so would be allowed to be set at a level

Re: Fwd: [HACKERS] Proposal: variant of regclass

2014-03-22 Thread Amit Kapila
On Wed, Feb 26, 2014 at 11:56 AM, Yugo Nagata nag...@sraoss.co.jp wrote: Thanks for your a lot of comments. I revised the patch according to comments from Robert Haas and Marti Raudsepp. I have started looking into this patch and below are my initial findings: 1. Dependency is not recorded

Re: [HACKERS] Review: plpgsql.extra_warnings, plpgsql.extra_errors

2014-03-22 Thread Piotr Stefaniak
+myextra = (int *) malloc(sizeof(int)); Please consider not casting malloc(). See http://c-faq.com/malloc/mallocnocast.html -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [RFC] What should we do for reliable WAL archiving?

2014-03-22 Thread Martijn van Oosterhout
On Sat, Mar 22, 2014 at 06:22:37AM +0900, MauMau wrote: From: Jeff Janes jeff.ja...@gmail.com Do people really just copy the files from one directory of local storage to another directory of local storage? I don't see the point of that. It makes sense to archive WAL to a directory of local

Re: [HACKERS] Partial index locks

2014-03-22 Thread Thom Brown
On 22 March 2014 05:32, Tom Lane t...@sss.pgh.pa.us wrote: Thom Brown t...@linux.com writes: Is it necessary for a partial index that doesn't include the row to be involved in locking? Yes. You can't determine whether the index needs to get a new entry without examining its metadata, and

Re: [HACKERS] Inheritance of foregn key constraints.

2014-03-22 Thread Andrzej Mazurkiewicz
Good Morning. 1. At the beginning some explanations. I am a lazy person that tries not to reinvent a wheel. So I try to use postgres way of automatic processing, i. e. automatic removing dependent objects (which I consider an elegant solution and I really like it). A a result, I have used the

Re: [HACKERS] Review: plpgsql.extra_warnings, plpgsql.extra_errors

2014-03-22 Thread Tom Lane
Piotr Stefaniak postg...@piotr-stefaniak.me writes: +myextra = (int *) malloc(sizeof(int)); Please consider not casting malloc(). See That code is per project style, and should stay that way. http://c-faq.com/malloc/mallocnocast.html That argument is entirely bogus, as it considers

Re: [HACKERS] Partial index locks

2014-03-22 Thread Tom Lane
Thom Brown t...@linux.com writes: On 22 March 2014 05:32, Tom Lane t...@sss.pgh.pa.us wrote: Yes. You can't determine whether the index needs to get a new entry without examining its metadata, and that's what the lock is mainly about. I see. Why does this apply to deletes too? The executor

Re: [HACKERS] Partial index locks

2014-03-22 Thread Thom Brown
On 22 March 2014 15:04, Tom Lane t...@sss.pgh.pa.us wrote: Thom Brown t...@linux.com writes: On 22 March 2014 05:32, Tom Lane t...@sss.pgh.pa.us wrote: Yes. You can't determine whether the index needs to get a new entry without examining its metadata, and that's what the lock is mainly about.

Re: [HACKERS] Inheritance of foregn key constraints.

2014-03-22 Thread Tom Lane
Andrzej Mazurkiewicz andr...@mazurkiewicz.org writes: So in other words, somebody could (accidentally or maliciously) break the constraint by dropping one of its implementation triggers. I doubt that's acceptable. The present postgres behavior ALLOWS accidental or malicious break the

Re: [HACKERS] Review: plpgsql.extra_warnings, plpgsql.extra_errors

2014-03-22 Thread Piotr Stefaniak
On 03/22/2014 04:00 PM, Tom Lane wrote: That argument is entirely bogus, as it considers only one possible way in which the call could be wrong; a way that is of very low probability in PG usage, since we include stdlib.h in our core headers. Besides which, as noted in the page itself, most

Re: [HACKERS] Review: plpgsql.extra_warnings, plpgsql.extra_errors

2014-03-22 Thread Tom Lane
Piotr Stefaniak postg...@piotr-stefaniak.me writes: Apart from what the page says, I also think of casting malloc() as bad style and felt the need to bring this up. Well, that's a value judgement I don't happen to agree with. Yeah, it'd be better if the language design were such that we could

Re: [HACKERS] Review: plpgsql.extra_warnings, plpgsql.extra_errors

2014-03-22 Thread Piotr Stefaniak
On 03/22/2014 04:00 PM, Tom Lane wrote: On the other side, coding with the explicit cast helps guard against far more dangerous coding errors, which the compiler will*not* help you with. What if myextra is actually of type int64 *? Indeed, neither gcc -Wall -Wextra -std=c89 -pedantic nor clang

Re: [HACKERS] psql blows up on BOM character sequence

2014-03-22 Thread Jim Nasby
On 3/21/14, 8:13 PM, David E. Wheeler wrote: On Mar 21, 2014, at 2:16 PM, Andrew Dunstan and...@dunslane.net wrote: Surely if it were really a major annoyance, someone would have sent code to fix it during the last 4 years and more since the above. I suspect it's a minor annoyance :-) But

Re: [HACKERS] Partial index locks

2014-03-22 Thread Jim Nasby
On 3/21/14, 7:59 PM, Vik Fearing wrote: On 03/22/2014 01:43 AM, Thom Brown wrote: Hi, I've created a table with 1000 partial indexes. Each one matches exactly one row based on the predicate WHERE id = value. However, when I perform an UPDATE of a single row in a transaction, I've noticed

Re: [HACKERS] psql blows up on BOM character sequence

2014-03-22 Thread Jim Nasby
On 3/21/14, 4:54 PM, Tom Lane wrote: Merlin Moncure mmonc...@gmail.com writes: There is no way for psql to handle that case though unless you'd strip *all* BOMs encountered. Compounding this problem is that there's no practical way AFAIK to send multiple file to psql via single command line

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2014-03-22 Thread Jim Nasby
On 2/26/14, 9:15 AM, Simon Riggs wrote: On 26 February 2014 13:38, Andres Freundand...@2ndquadrant.com wrote: Hi, On 2014-02-26 07:32:45 +, Simon Riggs wrote: * This definitely should include isolationtester tests actually performing concurrent ALTER TABLEs. All that's currently

Re: [HACKERS] Partial index locks

2014-03-22 Thread Thom Brown
On 22 March 2014 16:28, Jim Nasby j...@nasby.net wrote: On 3/21/14, 7:59 PM, Vik Fearing wrote: On 03/22/2014 01:43 AM, Thom Brown wrote: Hi, I've created a table with 1000 partial indexes. Each one matches exactly one row based on the predicate WHERE id = value. However, when I perform

Re: [HACKERS] jsonb status

2014-03-22 Thread Bruce Momjian
On Sat, Mar 22, 2014 at 01:53:06PM -0700, Peter Geoghegan wrote: Attached is v12. I think I've brought this as far as I can. This is mostly just bug fixes, and some additional refactoring. I've incorporated Andres' feedback. The only points that I think worth noting are: * The

Re: [HACKERS] jsonb status

2014-03-22 Thread Peter Geoghegan
On Sat, Mar 22, 2014 at 5:22 PM, Bruce Momjian br...@momjian.us wrote: What did you decide about hashing values in indexes vs. putting them in literally? There are two GIN opclasses supplied. There is a default, which supports more operators (various existence operators - see the

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

2014-03-22 Thread Bruce Momjian
On Tue, Dec 17, 2013 at 09:37:09AM -0500, Robert Haas wrote: Patch attached. I vote for showing it only with +, but regardless of whether the value matches the expected default. I'd keep the relkind test, though, because I think I noticed that it currently shows up for indexes, which is

Re: Fwd: [HACKERS] Proposal: variant of regclass

2014-03-22 Thread Amit Kapila
On Sat, Mar 22, 2014 at 1:17 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Wed, Feb 26, 2014 at 11:56 AM, Yugo Nagata nag...@sraoss.co.jp wrote: Thanks for your a lot of comments. I revised the patch according to comments from Robert Haas and Marti Raudsepp. I have started looking into