[HACKERS] elog() error, trying CURENT OF with foreign table

2013-04-19 Thread Rushabh Lathia
While trying out CURRENT OF with foreign table, ending up with error. postgres=# select version(); version - PostgreSQL 9.3devel

Re: [HACKERS] Inconsistent DB data in Streaming Replication

2013-04-19 Thread Martijn van Oosterhout
On Wed, Apr 17, 2013 at 12:49:10PM +0200, Florian Pflug wrote: Fixing this on the receive side alone seems quite messy and fragile. So instead, I think we should let the master send a shutdown message after it has sent everything it wants to send, and wait for the client to acknowledge it

Re: [HACKERS] Recovery target 'immediate'

2013-04-19 Thread Robert Haas
On Thu, Apr 18, 2013 at 2:11 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: I just found out that if you use continuous archiving and online backups, it's surprisingly difficult to restore a backup, without replaying any more WAL than necessary. If you don't set a recovery target,

Re: [HACKERS] Fix typo in contrib/hstore/crc32.c comment

2013-04-19 Thread Robert Haas
On Wed, Apr 17, 2013 at 3:58 PM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: The attached patch fix a little typo on contrib/hstore/crc32.c comment. Thanks. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via

Re: [HACKERS] [GENERAL] currval and DISCARD ALL

2013-04-19 Thread Robert Haas
On Wed, Apr 17, 2013 at 6:17 PM, Tom Lane t...@sss.pgh.pa.us wrote: No, it's a critical tool in complexity management. When you're dealing with systems as complicated as a database, every little non-orthogonal detail adds up. DISCARD ALL has a clear definition in terms of simpler commands,

Re: [HACKERS] [GENERAL] currval and DISCARD ALL

2013-04-19 Thread Fabrízio de Royes Mello
On Fri, Apr 19, 2013 at 10:50 AM, Robert Haas robertmh...@gmail.com wrote: [...] So it seems to me that we pretty much already made a decision that the controlling definition of DISCARD ALL is that, as the fine manual says DISCARD ALL resets a session to its original state. Whatever

Re: [HACKERS] elog() error, trying CURENT OF with foreign table

2013-04-19 Thread Tom Lane
Rushabh Lathia rushabh.lat...@gmail.com writes: While trying out CURRENT OF with foreign table, ending up with error. Yeah, that's an unimplemented feature. In principle I think it could be made to work with postgres_fdw (since that uses CTID row identification), but I doubt that it'd be

Re: [HACKERS] event trigger API documentation?

2013-04-19 Thread Peter Eisentraut
On 4/18/13 11:31 AM, Dimitri Fontaine wrote: The only questions in this thread are: - only docs or docs + contrib example? At this point, all that is appropriate is some documentation of the C API. If the contrib example you have in mind is short enough, it might as well become part of the

Re: [HACKERS] [GENERAL] currval and DISCARD ALL

2013-04-19 Thread Robert Haas
On Fri, Apr 19, 2013 at 10:05 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: The attached wip patch do that and introduce a subcommand 'SEQUENCES', but if we decide to don't add a new subcommand to DISCARD, then its easier to modify the patch. This patch is quite wrong. It frees

Re: [HACKERS] elog() error, trying CURENT OF with foreign table

2013-04-19 Thread Robert Haas
On Fri, Apr 19, 2013 at 10:11 AM, Tom Lane t...@sss.pgh.pa.us wrote: Rushabh Lathia rushabh.lat...@gmail.com writes: While trying out CURRENT OF with foreign table, ending up with error. Yeah, that's an unimplemented feature. In principle I think it could be made to work with postgres_fdw

Re: [HACKERS] [GENERAL] currval and DISCARD ALL

2013-04-19 Thread Adrian Klaver
On 04/19/2013 06:50 AM, Robert Haas wrote: On Wed, Apr 17, 2013 at 6:17 PM, Tom Lane t...@sss.pgh.pa.us wrote: No, it's a critical tool in complexity management. When you're dealing with systems as complicated as a database, every little non-orthogonal detail adds up. DISCARD ALL has a clear

Re: [HACKERS] elog() error, trying CURENT OF with foreign table

2013-04-19 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Fri, Apr 19, 2013 at 10:11 AM, Tom Lane t...@sss.pgh.pa.us wrote: Yeah, that's an unimplemented feature. So, should we just make that an ereport(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), ...) instead of elog()? I'm not that excited about the

Re: [HACKERS] elog() error, trying CURENT OF with foreign table

2013-04-19 Thread Robert Haas
On Fri, Apr 19, 2013 at 10:24 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Fri, Apr 19, 2013 at 10:11 AM, Tom Lane t...@sss.pgh.pa.us wrote: Yeah, that's an unimplemented feature. So, should we just make that an

Re: [HACKERS] elog() error, trying CURENT OF with foreign table

2013-04-19 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: My main concern was actually whether we ought to be detecting this earlier in the process, before it gets as far as the executor. Yeah, that might be an appropriate response too. The executor is coded so cavalierly because it expects the planner to

Re: [HACKERS] [GENERAL] currval and DISCARD ALL

2013-04-19 Thread Fabrízio de Royes Mello
On Fri, Apr 19, 2013 at 11:12 AM, Robert Haas robertmh...@gmail.com wrote: On Fri, Apr 19, 2013 at 10:05 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: The attached wip patch do that and introduce a subcommand 'SEQUENCES', but if we decide to don't add a new subcommand to

Re: [HACKERS] [GENERAL] currval and DISCARD ALL

2013-04-19 Thread Alvaro Herrera
Fabrízio de Royes Mello escribió: Ohh sorry... you're all right... I completely forgot to finish the ReleaseSequenceCaches to transverse 'seqtab' linked list and free each node. The attached patch have this correct code. It seems a bad idea to backpatch this; whoever wants this

Re: [HACKERS] [GENERAL] currval and DISCARD ALL

2013-04-19 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: It seems a bad idea to backpatch this; whoever wants this functionality in back branches should probably run a patched server. Surely this is 9.4 material at this point in any case. regards, tom lane -- Sent via

[HACKERS] question about postgres storage management

2013-04-19 Thread Will Childs-Klein
Hello All, I'm writing today to inquire about finding the exact point in the source where postgres writes to disk. I'm trying to implement some compression in postgres. The idea is to compress the data right when its written to disk, to reduce the amount of data written to disk, reducing the

Re: [HACKERS] question about postgres storage management

2013-04-19 Thread Stephen Frost
Will, * Will Childs-Klein (willc...@gmail.com) wrote: I'm writing today to inquire about finding the exact point in the source where postgres writes to disk. I'm trying to implement some compression in postgres. PostgreSQL already does compression in most cases where you'd want it done..

Re: [HACKERS] question about postgres storage management

2013-04-19 Thread Merlin Moncure
On Fri, Apr 19, 2013 at 10:17 AM, Will Childs-Klein willc...@gmail.com wrote: Hello All, I'm writing today to inquire about finding the exact point in the source where postgres writes to disk. I'm trying to implement some compression in postgres. The idea is to compress the data right when its

Re: [HACKERS] [GENERAL] currval and DISCARD ALL

2013-04-19 Thread Robert Haas
On Fri, Apr 19, 2013 at 11:09 AM, Tom Lane t...@sss.pgh.pa.us wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: It seems a bad idea to backpatch this; whoever wants this functionality in back branches should probably run a patched server. Surely this is 9.4 material at this point in any

Re: [HACKERS] question about postgres storage management

2013-04-19 Thread Christopher Browne
I would expect the strategy you have in mind to be more useful to apply at the filesystem level, so that it's not in Postgres altogether. (Ala Stacker, remember DR-DOS?) But, to speak arguable heresy, the demerits of this sort of thing are described nicely in Another Database's Documentation:

Re: [HACKERS] question about postgres storage management

2013-04-19 Thread Merlin Moncure
On Fri, Apr 19, 2013 at 11:17 AM, Christopher Browne cbbro...@gmail.com wrote: I would expect the strategy you have in mind to be more useful to apply at the filesystem level, so that it's not in Postgres altogether. (Ala Stacker, remember DR-DOS?) But, to speak arguable heresy, the

Re: [HACKERS] Inconsistent DB data in Streaming Replication

2013-04-19 Thread Florian Pflug
On Apr19, 2013, at 14:46 , Martijn van Oosterhout klep...@svana.org wrote: On Wed, Apr 17, 2013 at 12:49:10PM +0200, Florian Pflug wrote: Fixing this on the receive side alone seems quite messy and fragile. So instead, I think we should let the master send a shutdown message after it has sent

Re: [HACKERS] elog() error, trying CURENT OF with foreign table

2013-04-19 Thread Tom Lane
I wrote: Robert Haas robertmh...@gmail.com writes: My main concern was actually whether we ought to be detecting this earlier in the process, before it gets as far as the executor. Yeah, that might be an appropriate response too. The executor is coded so cavalierly because it expects the

Re: [HACKERS] confusing message about archive failures

2013-04-19 Thread Daniel Farina
On Wed, Apr 17, 2013 at 7:33 PM, Jeff Janes jeff.ja...@gmail.com wrote: On Wednesday, April 17, 2013, Peter Eisentraut wrote: When archive_command fails three times, it prints this message into the logs: transaction log file \%s\ could not be archived: too many failures This leaves it open

Re: [HACKERS] Multi-pass planner

2013-04-19 Thread Jeff Janes
On Wed, Apr 3, 2013 at 6:40 PM, Greg Stark st...@mit.edu wrote: On Fri, Aug 21, 2009 at 6:54 PM, decibel deci...@decibel.org wrote: Would it? Risk seems like it would just be something along the lines of the high-end of our estimate. I don't think confidence should be that hard either. IE:

Re: [HACKERS] Multi-pass planner

2013-04-19 Thread Claudio Freire
On Fri, Apr 19, 2013 at 6:19 PM, Jeff Janes jeff.ja...@gmail.com wrote: On Wed, Apr 3, 2013 at 6:40 PM, Greg Stark st...@mit.edu wrote: On Fri, Aug 21, 2009 at 6:54 PM, decibel deci...@decibel.org wrote: Would it? Risk seems like it would just be something along the lines of the high-end of

Re: [HACKERS] Multi-pass planner

2013-04-19 Thread Jeff Janes
On Thu, Apr 4, 2013 at 11:53 AM, Dimitri Fontaine dimi...@2ndquadrant.frwrote: Robert Haas robertmh...@gmail.com writes: for estimate_worstcase_fraction. So, when computing the cost of a path, we'd compute our current expected-case estimate, and also a worst-case estimate, and then

Re: [HACKERS] Multi-pass planner

2013-04-19 Thread Jeff Janes
On Fri, Apr 19, 2013 at 2:24 PM, Claudio Freire klaussfre...@gmail.comwrote: Especially if there's some locality of occurrence, since analyze samples pages, not rows. But it doesn't take all rows in each sampled page. It generally takes about one row per page, specifically to avoid the

Re: [HACKERS] Multi-pass planner

2013-04-19 Thread Claudio Freire
On Fri, Apr 19, 2013 at 7:43 PM, Jeff Janes jeff.ja...@gmail.com wrote: On Fri, Apr 19, 2013 at 2:24 PM, Claudio Freire klaussfre...@gmail.com wrote: Especially if there's some locality of occurrence, since analyze samples pages, not rows. But it doesn't take all rows in each sampled