Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-02 Thread Robert Haas
On Wed, May 28, 2014 at 8:22 AM, ash a...@commandprompt.com wrote: None of that involves answering hypothetical questions; but what you want to do does, and that I think is the problem in a nutshell. In a nutshell I'd like PostgreSQL to just re-parse the *current* view definition. Should

Re: [HACKERS] replication protocol documentation inconsistencies

2014-06-02 Thread Robert Haas
On Wed, May 28, 2014 at 6:51 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-05-21 07:29:53 -0400, Peter Eisentraut wrote: Looking at http://www.postgresql.org/docs/devel/static/protocol-replication.html under START_REPLICATION it goes The payload of each CopyData message from

Re: [HACKERS] Documenting the Frontend/Backend Protocol update criteria

2014-06-02 Thread Koichi Suzuki
Jan UrbaƄski made a presentation titled 'Postgres on the wire', subtitle 'A look at the PostgreSQL wire protocol'. I hope this covers some of your interest. Presentation slide deck is available at http://www.pgcon.org/2014/schedule/attachments/330_postgres-for-the-wire.pdf Hope it helps; ---

Re: [HACKERS] Spreading full-page writes

2014-06-02 Thread Fujii Masao
On Wed, May 28, 2014 at 1:10 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Tue, May 27, 2014 at 1:19 PM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, May 27, 2014 at 3:57 PM, Simon Riggs si...@2ndquadrant.com wrote: The requirements we were discussing were around A) reducing WAL

Re: [HACKERS] Compression of full-page-writes

2014-06-02 Thread Fujii Masao
On Thu, May 29, 2014 at 7:21 PM, Simon Riggs si...@2ndquadrant.com wrote: On 29 May 2014 01:07, Bruce Momjian br...@momjian.us wrote: On Wed, May 28, 2014 at 04:04:13PM +0100, Simon Riggs wrote: On 28 May 2014 15:34, Fujii Masao masao.fu...@gmail.com wrote: Also, compress_backup_block GUC

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-02 Thread ash
Robert Haas robertmh...@gmail.com writes: On Wed, May 28, 2014 at 8:22 AM, ash a...@commandprompt.com wrote: None of that involves answering hypothetical questions; but what you want to do does, and that I think is the problem in a nutshell. In a nutshell I'd like PostgreSQL to just

Re: [HACKERS] WAL replay bugs

2014-06-02 Thread Michael Paquier
On Wed, Apr 23, 2014 at 9:43 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: And here is the tool itself. It consists of two parts: 1. Modifications to the backend to write the page images 2. A post-processing tool to compare the logged images between master and standby. Having that

Re: [HACKERS] backup_label revisited

2014-06-02 Thread Fujii Masao
On Thu, May 29, 2014 at 9:12 PM, Greg Stark st...@mit.edu wrote: So I ran into the case again where a system crashed while a hot backup was being taken. Postgres couldn't start up automatically because the backup_label was present. This has come up before e.g.

Re: [HACKERS] replication protocol documentation inconsistencies

2014-06-02 Thread Alvaro Herrera
Robert Haas wrote: On Wed, May 28, 2014 at 6:51 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-05-21 07:29:53 -0400, Peter Eisentraut wrote: More generally, it is weird that the message formats are described there, even though the rest of the protocol documentation only mentions

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-02 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: What exactly do you mean by re-parse the current view definition? The only form of the view definition we actually have is already parsed into an internal form (see pg_rewrite) which, for the reasons I've attempted to explain, is not easy to adapt to

Re: [HACKERS] pg_stat directory and pg_stat_statements

2014-06-02 Thread Fujii Masao
On Thu, May 29, 2014 at 3:02 PM, Peter Geoghegan p...@heroku.com wrote: On Wed, May 28, 2014 at 10:49 PM, Fujii Masao masao.fu...@gmail.com wrote: You're concerned about the scenario using pg_upgrade? I'm not sure the detail of pg_upgrade. But if it doesn't work properly, we should have gotten

Re: [HACKERS] Jsonb: jbvBinary usage in the convertJsonbValue?

2014-06-02 Thread Robert Haas
On Thu, May 29, 2014 at 7:34 AM, Dmitry Dolgov 9erthali...@gmail.com wrote: I'm little confused by the convertJsonbValue functon at jsonb_utils.c Maybe I misunderstood something, so I need help =) if (IsAJsonbScalar(val) || val-type == jbvBinary) convertJsonbScalar(buffer, header, val);

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-02 Thread Robert Haas
On Mon, Jun 2, 2014 at 8:52 AM, ash a...@commandprompt.com wrote: On Wed, May 28, 2014 at 8:22 AM, ash a...@commandprompt.com wrote: None of that involves answering hypothetical questions; but what you want to do does, and that I think is the problem in a nutshell. In a nutshell I'd like

Re: [HACKERS] pg_stat directory and pg_stat_statements

2014-06-02 Thread Andres Freund
On 2014-06-02 22:59:55 +0900, Fujii Masao wrote: On Thu, May 29, 2014 at 3:02 PM, Peter Geoghegan p...@heroku.com wrote: On Wed, May 28, 2014 at 10:49 PM, Fujii Masao masao.fu...@gmail.com wrote: You're concerned about the scenario using pg_upgrade? I'm not sure the detail of pg_upgrade.

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-02 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Jun 2, 2014 at 8:52 AM, ash a...@commandprompt.com wrote: Should this fail, the user will have to work around it, but most of the time it could just work. You're either missing or choosing to ignore the point that I'm making, which is that we

Re: [HACKERS] Jsonb: jbvBinary usage in the convertJsonbValue?

2014-06-02 Thread Andrew Dunstan
On 06/02/2014 10:02 AM, Robert Haas wrote: On Thu, May 29, 2014 at 7:34 AM, Dmitry Dolgov 9erthali...@gmail.com wrote: I'm little confused by the convertJsonbValue functon at jsonb_utils.c Maybe I misunderstood something, so I need help =) if (IsAJsonbScalar(val) || val-type == jbvBinary)

Re: [HACKERS] Allowing join removals for more join types

2014-06-02 Thread Tom Lane
David Rowley dgrowle...@gmail.com writes: I'm not quite there with inner joins yet. I'm still getting my head around just where the join quals are actually stored. TBH I think that trying to do anything at all for inner joins is probably a bad idea. The cases where the optimization could

Re: [HACKERS] Allowing join removals for more join types

2014-06-02 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: David Rowley dgrowle...@gmail.com writes: I'm not quite there with inner joins yet. I'm still getting my head around just where the join quals are actually stored. TBH I think that trying to do anything at all for inner joins is probably a bad idea.

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-02 Thread ash
Tom Lane t...@sss.pgh.pa.us writes: Robert Haas robertmh...@gmail.com writes: On Mon, Jun 2, 2014 at 8:52 AM, ash a...@commandprompt.com wrote: Should this fail, the user will have to work around it, but most of the time it could just work. You're either missing or choosing to ignore the

Re: [HACKERS] Jsonb: jbvBinary usage in the convertJsonbValue?

2014-06-02 Thread Andrew Dunstan
On 06/02/2014 10:22 AM, Andrew Dunstan wrote: On 06/02/2014 10:02 AM, Robert Haas wrote: On Thu, May 29, 2014 at 7:34 AM, Dmitry Dolgov 9erthali...@gmail.com wrote: I'm little confused by the convertJsonbValue functon at jsonb_utils.c Maybe I misunderstood something, so I need help =) if

Re: [HACKERS] Allowing join removals for more join types

2014-06-02 Thread Tom Lane
Stephen Frost sfr...@snowman.net writes: * Tom Lane (t...@sss.pgh.pa.us) wrote: TBH I think that trying to do anything at all for inner joins is probably a bad idea. The cases where the optimization could succeed are so narrow that it's unlikely to be worth adding cycles to every query to

Re: plpython_unicode test (was Re: [HACKERS] buildfarm / handling (undefined) locales)

2014-06-02 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 06/01/2014 05:35 PM, Tom Lane wrote: I did a little bit of experimentation and determined that none of the LATIN1 characters are significantly more portable than what we've got: for instance a-acute fails to convert into 16 of the 33 supported

Re: [HACKERS] recovery testing for beta

2014-06-02 Thread Jeff Janes
On Fri, May 30, 2014 at 8:09 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Sat, May 31, 2014 at 3:51 AM, Jeff Janes jeff.ja...@gmail.com wrote: On Thu, May 29, 2014 at 8:15 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, May 29, 2014 at 10:09 PM, Jeff Janes jeff.ja...@gmail.com

Re: [HACKERS] recovery testing for beta

2014-06-02 Thread Andres Freund
Hi, On 2014-06-02 09:03:25 -0700, Jeff Janes wrote: On Fri, May 30, 2014 at 8:09 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Sat, May 31, 2014 at 3:51 AM, Jeff Janes jeff.ja...@gmail.com wrote: On Thu, May 29, 2014 at 8:15 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu,

Re: [HACKERS] recovery testing for beta

2014-06-02 Thread Jeff Janes
On Mon, Jun 2, 2014 at 9:14 AM, Andres Freund and...@2ndquadrant.com wrote: Hi, On 2014-06-02 09:03:25 -0700, Jeff Janes wrote: GNU make does not realize that pg_xlogdump depends on src/backend/access/rmgrdesc/heapdesc.c. (I don't know how or why it has that dependency, but changes

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-02 Thread Robert Haas
On Mon, Jun 2, 2014 at 10:21 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Jun 2, 2014 at 8:52 AM, ash a...@commandprompt.com wrote: Should this fail, the user will have to work around it, but most of the time it could just work. You're either

Re: [HACKERS] recovery testing for beta

2014-06-02 Thread Andres Freund
Hi, On 2014-06-02 10:15:19 -0700, Jeff Janes wrote: Also, pg_xlogdump -p insists on being given a start position. I would be nice if it could just find the first file in the given directory. Any reason it can't do that, other than just that no one implemented it yet? It

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-02 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Jun 2, 2014 at 10:21 AM, Tom Lane t...@sss.pgh.pa.us wrote: The real problem in my mind is one of user expectations. If the database silently does something behind your back, people expect that that action will be *right* and they don't have

Re: [HACKERS] Jsonb: jbvBinary usage in the convertJsonbValue?

2014-06-02 Thread Peter Geoghegan
On Mon, Jun 2, 2014 at 7:22 AM, Andrew Dunstan and...@dunslane.net wrote: Yes, I've just been looking at that. I think this is probably a hangover from when these routines were recast to some extent. Given that we're not seeing any errors from it, I'd be inclined to remove the the || val-type

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-02 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: On Mon, Jun 2, 2014 at 10:21 AM, Tom Lane t...@sss.pgh.pa.us wrote: The real problem in my mind is one of user expectations. If the database silently does something behind your back, people expect that that action will be *right* and they don't

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-02 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Robert Haas robertmh...@gmail.com writes: I agree, but I think it's important to note that Alex's complaint is not unique - the way things work now is a real source of frustration for users. Oh, I quite agree with that. My concern here has to do

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-02 Thread Josh Berkus
On 06/02/2014 10:40 AM, Stephen Frost wrote: Tom's point goes back to what I was trying to drive at originally- people should have to ask for this. Perhaps we can provide a way for them to ask which is explicit enough that they understand this might not do exactly what you think it does, akin

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-02 Thread Andres Freund
On 2014-06-02 10:48:02 -0700, Josh Berkus wrote: On 06/02/2014 10:40 AM, Stephen Frost wrote: Tom's point goes back to what I was trying to drive at originally- people should have to ask for this. Perhaps we can provide a way for them to ask which is explicit enough that they understand

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-02 Thread Andres Freund
On 2014-06-02 13:40:32 -0400, Stephen Frost wrote: Of course, there is a question about if it's worth it to keep around the exact text of each CREATE VIEW and build all this infrastructure for something which will only work properly in a specific subset of cases and in many others could break

Re: [HACKERS] recovery testing for beta

2014-06-02 Thread Alvaro Herrera
Jeff Janes wrote: GNU make does not realize that pg_xlogdump depends on src/backend/access/rmgrdesc/heapdesc.c. (I don't know how or why it has that dependency, but changes did not take effect with a simple make install) Is that a known issue? Is there someway to fix it? Uh, you're right,

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-02 Thread Alvaro Herrera
Tom Lane wrote: Oh, I quite agree with that. My concern here has to do with automatically and silently making changes that we can't be very sure will meet the user's expectations. Perhaps what we need is some kind of UI/API design whereby the user can inspect/modify/approve the semantic

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-02 Thread Robert Haas
On Mon, Jun 2, 2014 at 1:40 PM, Stephen Frost sfr...@snowman.net wrote: * Robert Haas (robertmh...@gmail.com) wrote: On Mon, Jun 2, 2014 at 10:21 AM, Tom Lane t...@sss.pgh.pa.us wrote: The real problem in my mind is one of user expectations. If the database silently does something behind

Re: [HACKERS] [GSoC] Clustering in MADlib - status update

2014-06-02 Thread Maxence Ahlouche
Hi! 2014-06-02 19:16 GMT+02:00 Hai Qian hq...@gopivotal.com: I like the second option for refactoring the code. I think it is doable. And where is your code on Github? It's not on Github, but on my own Gitlab (a self-hosted open-source alternative to github). You can find it here [0]. I'm

Re: [HACKERS] [PATCH] Replacement for OSSP-UUID for Linux and BSD

2014-06-02 Thread Robert Haas
On Thu, May 29, 2014 at 1:56 PM, Tom Lane t...@sss.pgh.pa.us wrote: Bruce Momjian br...@momjian.us writes: One thing that concerns me is that we already had the problem that users creating the uuid-ossp extension had to double-quote the name because of the dash, and we have regularly

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-02 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Tom Lane wrote: Oh, I quite agree with that. My concern here has to do with automatically and silently making changes that we can't be very sure will meet the user's expectations. Perhaps what we need is some kind of UI/API design whereby the

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-02 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: FWIW, I don't think reparsing the original view-text is even remotely plausible. The fact that views stay glued to the same objects even of those objects are renamed is a pretty handy property of the current system, and any sort of

Re: [HACKERS] [GSoC] Clustering in MADlib - status update

2014-06-02 Thread Hai Qian
I like the second option for refactoring the code. I think it is doable. And where is your code on Github? Hai -- *Pivotal http://www.gopivotal.com/* A new platform for a new era On Sun, Jun 1, 2014 at 1:06 PM, Maxence Ahlouche maxence.ahlou...@gmail.com wrote: Hi all! I've pushed my

Re: [HACKERS] Proposing pg_hibernate

2014-06-02 Thread Gurjeet Singh
On Fri, May 30, 2014 at 5:33 PM, Josh Kupershmidt schmi...@gmail.com wrote: On Tue, May 27, 2014 at 10:01 PM, Gurjeet Singh gurj...@singh.im wrote: When the Postgres server is being stopped/shut down, the `Buffer Saver` scans the shared-buffers of Postgres, and stores the unique block

Re: [HACKERS] pg_stat directory and pg_stat_statements

2014-06-02 Thread Michael Paquier
On Mon, Jun 2, 2014 at 11:07 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-02 22:59:55 +0900, Fujii Masao wrote: On Thu, May 29, 2014 at 3:02 PM, Peter Geoghegan p...@heroku.com wrote: On Wed, May 28, 2014 at 10:49 PM, Fujii Masao masao.fu...@gmail.com wrote: You're concerned

Re: plpython_unicode test (was Re: [HACKERS] buildfarm / handling (undefined) locales)

2014-06-02 Thread Tom Lane
I wrote: Andrew Dunstan and...@dunslane.net writes: Let's just stick to ASCII. The more I think about it, the more I think that using a plain-ASCII character would defeat most of the purpose of the test. Non-breaking space seems like the best bet here, not least because it has several

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-02 Thread Robert Haas
On Mon, Jun 2, 2014 at 2:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: Deparse-and-reparse might be better, but I'll bet that has too many problems to be viable, too (even if I haven't yet thought of what they are). For better or for worse, I think the best we're likely to be able to do is

Re: [HACKERS] Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?

2014-06-02 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Jun 2, 2014 at 2:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: I think deparse-and-reparse is exactly what we have to do, mainly because, if you subscribe to the idea that the user should see and approve semantic changes, what else are we going to

Re: [HACKERS] [BUGS] BUG #9652: inet types don't support min/max

2014-06-02 Thread Haribabu Kommi
On Thu, May 29, 2014 at 3:28 AM, Keith Fiske ke...@omniti.com wrote: On Sun, Mar 23, 2014 at 10:42 PM, Haribabu Kommi kommi.harib...@gmail.com wrote: On Fri, Mar 21, 2014 at 5:17 PM, dar...@dons.net.au wrote: The following bug has been logged on the website: reclog= select * from foo;

Re: [HACKERS] Spreading full-page writes

2014-06-02 Thread Amit Kapila
On Mon, Jun 2, 2014 at 6:04 PM, Fujii Masao masao.fu...@gmail.com wrote: On Wed, May 28, 2014 at 1:10 PM, Amit Kapila amit.kapil...@gmail.com wrote: IIUC in DBW mechanism, we need to have a temporary sequential log file of fixed size which will be used to write data before the data gets