Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-12 Thread Amit Kapila
From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Jose Ildefonso Camargo Tolosa Please, stop arguing on all of this: I don't think that adding an option will hurt anybody (specially because the work was already done by someone), we are not

Re: [HACKERS] SP-GiST for ranges based on 2d-mapping and quad-tree

2012-07-12 Thread Heikki Linnakangas
On 12.07.2012 02:11, Alexander Korotkov wrote: On Thu, Jul 12, 2012 at 3:03 AM, Alexander Korotkovaekorot...@gmail.comwrote: On Tue, Jul 3, 2012 at 10:51 AM, Jeff Davispg...@j-davis.com wrote: Also, it would be helpful to add a couple tests to rangetypes.sql. New version of patch is

Re: [HACKERS] Schema version management

2012-07-12 Thread Joel Jacobson
On Wed, Jul 11, 2012 at 8:01 PM, Merlin Moncure mmonc...@gmail.com wrote: After extensive off-list discussion with Joel it became clear that per-object dumping ability really belongs in pg_restore. The only benefit I could see in putting it in pg_restore is you would then be able to do a

Re: [HACKERS] Schema version management

2012-07-12 Thread Joel Jacobson
On Wed, Jul 11, 2012 at 11:20 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: operator_!___numeric.sql (postfix, name does not need escape) operator_%7C%2F_integer__.sql (prefix) operator_%3C_bit_varying__bit_varying.sql (type name with spaces, changed to _) I think the directory

[HACKERS] Logging both start and end of temporary file usage

2012-07-12 Thread Christophe Pettus
In working with s a client to analyze their temp file usage, it became useful to know when a temporary file was created as well as when it was closed. That way, we could process the logs to determine a high water mark of overall temp file usage, to know how high it was safe (in that workload)

Re: [HACKERS] Support for XLogRecPtr in expand_fmt_string?

2012-07-12 Thread Heikki Linnakangas
On 07.07.2012 01:03, Peter Eisentraut wrote: On tis, 2012-07-03 at 14:52 -0400, Tom Lane wrote: Peter Eisentrautpete...@gmx.net writes: On tis, 2012-07-03 at 19:35 +0200, Andres Freund wrote: I wonder if we just should add a format code like %R or something similar as a replacement for the

Re: [HACKERS] Re: [COMMITTERS] pgsql: Fix mapping of PostgreSQL encodings to Python encodings.

2012-07-12 Thread Heikki Linnakangas
On 07.07.2012 00:12, Jan Urbański wrote: On 06/07/12 22:47, Peter Eisentraut wrote: On fre, 2012-07-06 at 18:53 +0300, Heikki Linnakangas wrote: What shall we do about those? Ignore them? Document that if you're sing one of these encodings then PL/Python with Python 2 will be crippled and with

[HACKERS] Scheduled back-branch releases?

2012-07-12 Thread Bernd Helmle
Do we have a schedule for when next back-branch releases are packaged (i hope i didn't miss any announcement...)? -- Thanks Bernd -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Scheduled back-branch releases?

2012-07-12 Thread Magnus Hagander
On Thu, Jul 12, 2012 at 11:41 AM, Bernd Helmle maili...@oopsware.de wrote: Do we have a schedule for when next back-branch releases are packaged (i hope i didn't miss any announcement...)? No, there is no such schedule (yet). -- Magnus Hagander Me: http://www.hagander.net/ Work:

Re: [HACKERS] pgsql_fdw in contrib

2012-07-12 Thread Etsuro Fujita
2012/6/26 Kohei KaiGai kai...@kaigai.gr.jp: Harada-san, I checked your patch, and had an impression that includes many improvements from the previous revision that I looked at the last commit fest. However, I noticed several points to be revised, or investigated. * It seems to

Re: [HACKERS] pgsql_fdw in contrib

2012-07-12 Thread Shigeru HANADA
(2012/07/12 6:04), Peter Eisentraut wrote: On tor, 2012-06-14 at 21:29 +0900, Shigeru HANADA wrote: I'd like to propose pgsql_fdw, FDW for PostgreSQL, as a contrib module in core, again. Do you have any new proposals regarding naming, and how to deal with postgresql_fdw_validator, and

Re: [HACKERS] several problems in pg_receivexlog

2012-07-12 Thread Magnus Hagander
On Tue, Jul 10, 2012 at 6:45 PM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jul 10, 2012 at 6:27 AM, Magnus Hagander mag...@hagander.net wrote: On Mon, Jul 9, 2012 at 8:23 PM, Fujii Masao masao.fu...@gmail.com wrote: Hi, I found several problems in pg_receivexlog, e.g., memory leaks,

Re: [HACKERS] several problems in pg_receivexlog

2012-07-12 Thread Magnus Hagander
On Tue, Jul 10, 2012 at 7:03 PM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jul 10, 2012 at 3:23 AM, Fujii Masao masao.fu...@gmail.com wrote: Hi, I found several problems in pg_receivexlog, e.g., memory leaks, file-descripter leaks, ..etc. The attached patch fixes these problems. ISTM

Re: [HACKERS] pgsql_fdw in contrib

2012-07-12 Thread Kohei KaiGai
2012/7/12 Shigeru HANADA shigeru.han...@gmail.com: (2012/07/12 6:04), Peter Eisentraut wrote: On tor, 2012-06-14 at 21:29 +0900, Shigeru HANADA wrote: I'd like to propose pgsql_fdw, FDW for PostgreSQL, as a contrib module in core, again. Do you have any new proposals regarding naming, and

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-12 Thread Dimitri Fontaine
Hi, Jose Ildefonso Camargo Tolosa ildefonso.cama...@gmail.com writes: environments. And no, it doesn't makes synchronous replication meaningless, because it will work synchronous if it have someone to sync to, and work async (or standalone) if it doesn't: that's perfect for HA environment.

Re: [HACKERS] PG9.2 and FDW query planning.

2012-07-12 Thread Ronan Dunklau
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/07/2012 18:30, Tom Lane wrote: Ronan Dunklau rdunk...@gmail.com writes: Let's say I have an IMAP foreign data wrapper, and I write a query joining the table on itself using the In-Reply-To and Message-ID headers, is there anything I can do

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-12 Thread Shaun Thomas
On 07/12/2012 12:31 AM, Daniel Farina wrote: But RAID-1 as nominally seen is a fundamentally different problem, with much tinier differences in latency, bandwidth, and connectivity. Perhaps useful for study, but to suggest the problem is *that* similar I think is wrong. Well, yes and no. One

Re: [HACKERS] Schema version management

2012-07-12 Thread Tom Lane
Joel Jacobson j...@trustly.com writes: I think the directory structure [schema]/[type]/[name] should be the same for all object types. I don't like operator being part of the filename, it should be the directory name. What are you going to do with objects that don't have schemas? (Including,

Re: [HACKERS] [PATCH] Allow breaking out of hung connection attempts

2012-07-12 Thread Heikki Linnakangas
On 09.07.2012 11:35, Shigeru HANADA wrote: Once the issues above are fixed, IMO this patch can be marked as Ready for committer. Thanks. The docs on async connections says: The connect_timeout connection parameter is ignored when using PQconnectPoll; it is the application's responsibility to

Re: [HACKERS] Schema version management

2012-07-12 Thread Joel Jacobson
On Thursday, July 12, 2012, Tom Lane wrote: What are you going to do with objects that don't have schemas? (Including, but not restricted to, the schemas themselves.) Good question. Maybe something like this? For objects without schema: /global/[type]/[name].sql For objects with schema:

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-12 Thread Aidan Van Dyk
On Thu, Jul 12, 2012 at 9:21 AM, Shaun Thomas stho...@optionshouse.com wrote: So far as transaction durability is concerned... we have a continuous background rsync over dark fiber for archived transaction logs, DRBD for block-level sync, filesystem snapshots for our backups, a redundant async

Re: [HACKERS] Schema version management

2012-07-12 Thread Tom Lane
Joel Jacobson j...@trustly.com writes: On Thursday, July 12, 2012, Tom Lane wrote: What are you going to do with objects that don't have schemas? (Including, but not restricted to, the schemas themselves.) Good question. Maybe something like this? For objects without schema:

Re: [HACKERS] Schema version management

2012-07-12 Thread Joel Jacobson
On Thu, Jul 12, 2012 at 4:01 PM, Tom Lane t...@sss.pgh.pa.us wrote: FWIW, I think you could save a level of naming if you were willing to put the type first, since the type would imply whether the object lives in a schema or not: [type]/[name].sql [type]/[schema]/[name].sql

Re: [HACKERS] Schema version management

2012-07-12 Thread Andrew Dunstan
On 07/12/2012 10:01 AM, Tom Lane wrote: FWIW, I think you could save a level of naming if you were willing to put the type first, since the type would imply whether the object lives in a schema or not: [type]/[name].sql [type]/[schema]/[name].sql

Re: [HACKERS] several problems in pg_receivexlog

2012-07-12 Thread Fujii Masao
On Thu, Jul 12, 2012 at 8:39 PM, Magnus Hagander mag...@hagander.net wrote: On Tue, Jul 10, 2012 at 7:03 PM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jul 10, 2012 at 3:23 AM, Fujii Masao masao.fu...@gmail.com wrote: Hi, I found several problems in pg_receivexlog, e.g., memory leaks,

Re: [HACKERS] several problems in pg_receivexlog

2012-07-12 Thread Magnus Hagander
On Thu, Jul 12, 2012 at 6:07 PM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Jul 12, 2012 at 8:39 PM, Magnus Hagander mag...@hagander.net wrote: On Tue, Jul 10, 2012 at 7:03 PM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jul 10, 2012 at 3:23 AM, Fujii Masao masao.fu...@gmail.com

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-12 Thread Bruce Momjian
On Thu, Jul 12, 2012 at 11:33:26AM +0530, Amit Kapila wrote: From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Jose Ildefonso Camargo Tolosa Please, stop arguing on all of this: I don't think that adding an option will hurt anybody

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-12 Thread Bruce Momjian
On Thu, Jul 12, 2012 at 08:21:08AM -0500, Shaun Thomas wrote: But, putting that aside, why not write a piece of middleware that does precisely this, or whatever you want? It can live on the same machine as Postgres and ack synchronous commit when nobody is home, and notify (e.g. page) you in

Re: [HACKERS] [PATCH] lock_timeout and common SIGALRM framework

2012-07-12 Thread Tom Lane
Here is a revised version of the timeout-infrastructure patch. I whacked it around quite a bit, notably: * I decided that the most convenient way to handle the initialization issue was to combine establishment of the signal handler with resetting of the per-process variables. So handle_sig_alarm

Re: [HACKERS] WIP pgindent replacement

2012-07-12 Thread Bruce Momjian
On Wed, Jun 22, 2011 at 10:16:28AM -0400, Bruce Momjian wrote: Andrew Dunstan wrote: Further research shows that C89 explicitly dropped support for the old KR =- operator, so we probably *should* remove this in case it introduces an unintended bug. Well, the point is if someone does

Re: [HACKERS] WIP Patch: Selective binary conversion of CSV file foreign tables

2012-07-12 Thread Tom Lane
Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: Besides the revision, I modified check_selective_binary_conversion() to run heap_close() in the whole-row-reference case. Attached is an updated version of the patch. Applied with minor, mostly-cosmetic revisions. I did fix

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-12 Thread Shaun Thomas
On 07/12/2012 12:02 PM, Bruce Momjian wrote: Well, the problem also exists if add it as an internal database feature --- how long do we wait to consider the standby dead, how do we inform administrators, etc. True. Though if there is no secondary connected, either because it's not there yet,

[HACKERS] sign mismatch in walreceiver.c

2012-07-12 Thread Peter Eisentraut
This looks suspicious static TimeLineID recvFileTLI = -1; because TimeLineID is uint32. The Solaris compiler complains about the sign mismatch. Maybe 0 would be a better initial value? -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] CREATE FOREGIN TABLE LACUNA

2012-07-12 Thread Peter Eisentraut
On lör, 2012-06-23 at 23:08 +0100, Dean Rasheed wrote: I spotted a couple of other issues during testing: * You're still allowing INCLUDING DEFAULTS and INCLUDING STORAGE, even though these options are not supported on foreign tables. * If I do INCLUDING ALL, I get an error because of the

Re: [HACKERS] compiler warnings on the buildfarm

2012-07-12 Thread Peter Eisentraut
On sön, 2012-07-01 at 19:04 +0200, Stefan Kaltenbrunner wrote: seeing some of the latest commits about fixing compiler warnings I took a look at the buildfarm to see if there are any interesting ones there (in total we have a thousends of warnings on the buildfarm but most of those are from

Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2012-07-12 Thread Peter Eisentraut
On tor, 2012-07-12 at 01:40 -0400, Tom Lane wrote: So it seems arguably reasonable to me for has_language_privilege() to take superuserness and lanpltrusted into account, without thereby concluding that other privilege() functions must do more than they do today. If we don't want it to do

Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2012-07-12 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: As long as we're spending time on this, I'd propose getting rid of lanplistrusted, at least for access checking. Instead, just don't install USAGE privileges by default for those languages. There's definitely something to that idea --- certainly

Re: FW: [HACKERS] Allow replacement of bloated primary key indexes without foreign key rebuilds

2012-07-12 Thread Gurjeet Singh
On Tue, Jul 10, 2012 at 2:40 AM, Amit Kapila amit.kap...@huawei.com wrote: Today I learnt [1,2,3] that the feature ALTER TABLE .. ADD CONSTRAINT ... USING INDEX we added back in the day is not so useful in the field. ** ** Having to drop foreign key constraints before this command, and

Re: [HACKERS] Re: Allow replacement of bloated primary key indexes without foreign key rebuilds

2012-07-12 Thread Gurjeet Singh
On Tue, Jul 10, 2012 at 10:44 AM, Tom Lane t...@sss.pgh.pa.us wrote: Greg Stark st...@mit.edu writes: On Sat, Jul 7, 2012 at 4:53 AM, Gurjeet Singh singh.gurj...@gmail.com wrote: All we need to do is allow swapping of pg_class.relfilenode of two indexes. Fwiw I don't like swapping

Re: [HACKERS] Re: Allow replacement of bloated primary key indexes without foreign key rebuilds

2012-07-12 Thread Gurjeet Singh
On Tue, Jul 10, 2012 at 11:11 AM, Greg Stark st...@mit.edu wrote: On Tue, Jul 10, 2012 at 3:44 PM, Tom Lane t...@sss.pgh.pa.us wrote: The problem you describe is one of constraints and dependencies and not one of indexes. It seems what you really want is a way to alter foreign key

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-12 Thread Jose Ildefonso Camargo Tolosa
On Thu, Jul 12, 2012 at 8:35 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Hi, Jose Ildefonso Camargo Tolosa ildefonso.cama...@gmail.com writes: environments. And no, it doesn't makes synchronous replication meaningless, because it will work synchronous if it have someone to sync to,

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-12 Thread Jose Ildefonso Camargo Tolosa
On Thu, Jul 12, 2012 at 9:28 AM, Aidan Van Dyk ai...@highrise.ca wrote: On Thu, Jul 12, 2012 at 9:21 AM, Shaun Thomas stho...@optionshouse.com wrote: So far as transaction durability is concerned... we have a continuous background rsync over dark fiber for archived transaction logs, DRBD for

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-12 Thread Jose Ildefonso Camargo Tolosa
On Thu, Jul 12, 2012 at 12:17 PM, Bruce Momjian br...@momjian.us wrote: On Thu, Jul 12, 2012 at 11:33:26AM +0530, Amit Kapila wrote: From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Jose Ildefonso Camargo Tolosa Please, stop arguing on all

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-12 Thread Aidan Van Dyk
On Thu, Jul 12, 2012 at 8:27 PM, Jose Ildefonso Camargo Tolosa Yeah, you need that with PostgreSQL, but no with DRBD, for example (sorry, but DRBD is one of the flagships of HA things in the Linux world). Also, I'm not convinced about the 2nd standby thing... I mean, just read this on the

Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2012-07-12 Thread Joe Conway
On 07/12/2012 02:53 PM, Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: As long as we're spending time on this, I'd propose getting rid of lanplistrusted, at least for access checking. Instead, just don't install USAGE privileges by default for those languages. There's definitely

Re: [HACKERS] pgsql_fdw in contrib

2012-07-12 Thread Shigeru HANADA
(2012/07/12 20:48), Kohei KaiGai wrote: It seems to me what postgresql_fdw_validator() is doing looks like a function to be named as libpq_fdw_validator(). How about your opinion? It will help this namespace conflicts. I'd prefer dblink_fdw_validator. The name libpq_fdw_validator impresses

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-12 Thread Jose Ildefonso Camargo Tolosa
On Thu, Jul 12, 2012 at 8:29 PM, Aidan Van Dyk ai...@highrise.ca wrote: On Thu, Jul 12, 2012 at 8:27 PM, Jose Ildefonso Camargo Tolosa Yeah, you need that with PostgreSQL, but no with DRBD, for example (sorry, but DRBD is one of the flagships of HA things in the Linux world). Also, I'm not

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-12 Thread Jose Ildefonso Camargo Tolosa
On Thu, Jul 12, 2012 at 4:10 PM, Shaun Thomas stho...@optionshouse.com wrote: On 07/12/2012 12:02 PM, Bruce Momjian wrote: Well, the problem also exists if add it as an internal database feature --- how long do we wait to consider the standby dead, how do we inform administrators, etc.

Re: [HACKERS] WIP Patch: Selective binary conversion of CSV file foreign tables

2012-07-12 Thread Etsuro Fujita
Thanks! Best regards, Etsuro Fujita -Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Friday, July 13, 2012 5:30 AM To: Etsuro Fujita Cc: 'Kohei KaiGai'; 'Robert Haas'; pgsql-hackers@postgresql.org Subject: Re: [HACKERS] WIP Patch: Selective binary conversion of

Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2012-07-12 Thread Tom Lane
Joe Conway m...@joeconway.com writes: Is it still worth backpatching a change to has_language_privilege as a bug fix? I think back-patching a behavioral change in this area is probably a bad idea. We can fix it (in one way or another) going forward, but changing this sort of thing in a minor

Re: [HACKERS] pgsql_fdw in contrib

2012-07-12 Thread Kohei KaiGai
2012/7/13 Shigeru HANADA shigeru.han...@gmail.com: (2012/07/12 20:48), Kohei KaiGai wrote: It seems to me what postgresql_fdw_validator() is doing looks like a function to be named as libpq_fdw_validator(). How about your opinion? It will help this namespace conflicts. I'd prefer

Re: [HACKERS] pgsql_fdw in contrib

2012-07-12 Thread Etsuro Fujita
Hi Hanada-san, It would be possible to add some more features, such as ORDER BY push-down with index information support, without changing existing APIs, but at first add relatively simple pgsql_fdw and enhance it seems better. In addition, once pgsql_fdw has been merged, it would help

Re: [HACKERS] [PERFORM] DELETE vs TRUNCATE explanation

2012-07-12 Thread Jeff Janes
I've moved this thread from performance to hackers. The topic was poor performance when truncating lots of small tables repeatedly on test environments with fsync=off. On Thu, Jul 12, 2012 at 6:00 PM, Jeff Janes jeff.ja...@gmail.com wrote: I think the problem is in the Fsync Absorption queue.

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-12 Thread Amit Kapila
From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Jose Ildefonso Camargo Tolosa On Thu, Jul 12, 2012 at 9:28 AM, Aidan Van Dyk ai...@highrise.ca wrote: On Thu, Jul 12, 2012 at 9:21 AM, Shaun Thomas stho...@optionshouse.com wrote: As currently