Re: [HACKERS] Schema version management

2012-07-11 Thread Joel Jacobson
On Wed, Jul 11, 2012 at 11:20 PM, Alvaro Herrera 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 structure [schema]/[type]/

Re: [HACKERS] Schema version management

2012-07-11 Thread Joel Jacobson
On Wed, Jul 11, 2012 at 8:01 PM, Merlin Moncure 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 --split on already e

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

2012-07-11 Thread Heikki Linnakangas
On 12.07.2012 02:11, Alexander Korotkov wrote: On Thu, Jul 12, 2012 at 3:03 AM, Alexander Korotkovwrote: On Tue, Jul 3, 2012 at 10:51 AM, Jeff Davis wrote: Also, it would be helpful to add a couple tests to rangetypes.sql. New version of patch is attached. Oops, forgot to include one c

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-11 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] has_language_privilege returns incorrect answer for non-superuser

2012-07-11 Thread Tom Lane
Peter Eisentraut writes: > On tis, 2012-07-10 at 15:28 -0700, Joe Conway wrote: >> But historically (and perhaps correctly) these functions have always >> done the former -- so maybe all we need are some words of warning in >> the documentation of these functions? > The second question is much mo

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-11 Thread Daniel Farina
On Wed, Jul 11, 2012 at 6:41 AM, Shaun Thomas wrote: >> Regardless of what DRBD does, I think the problem with the >> async/sync duality as-is is there is no nice way to manage exposure >> to transaction loss under various situations and requirements. > > > Which would be handy. With synchronous c

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-11 Thread Daniel Farina
On Wed, Jul 11, 2012 at 3:03 AM, Dimitri Fontaine wrote: > Daniel Farina writes: >> Notable caveat: one can't very easily measure or bound the amount of >> transaction loss in any graceful way as-is. We only have "unlimited >> lag" and "2-safe or bust". > > ¡per-transaction! > > You can chang

Re: [HACKERS] pgsql_fdw in contrib

2012-07-11 Thread Peter Eisentraut
On tor, 2012-07-12 at 06:25 +0200, Kohei KaiGai wrote: > 2012/7/11 Peter Eisentraut : > > 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,

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-11 Thread Jose Ildefonso Camargo Tolosa
On Wed, Jul 11, 2012 at 11:48 PM, Josh Berkus wrote: > >> 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 asking to change how the things work, we just >> want an option to decided

Re: [HACKERS] pgsql_fdw in contrib

2012-07-11 Thread Kohei KaiGai
2012/7/11 Peter Eisentraut : > 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 dblink? > Thi

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-11 Thread Josh Berkus
> 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 asking to change how the things work, we just > want an option to decided whether we want it to freeze on standby > disconnection, o

Re: [HACKERS] pl/perl and utf-8 in sql_ascii databases

2012-07-11 Thread Kyotaro HORIGUCHI
Very sorry for rotten subject. I resent the message with correct subject. # Our mail server insisted that the message is spam. sigh.. Hmm... Sorry for immature patch.. > ... and this story hasn't ended yet, because one of the new tests is > failing. See here: > > http://buildfarm.postgresql

Re: [SPAM] [MessageLimit][lowlimit] Re: [HACKERS] pl/perl and utf-8 in sql_ascii databases

2012-07-11 Thread Kyotaro HORIGUCHI
Hmm... Sorry for immature patch.. > ... and this story hasn't ended yet, because one of the new tests is > failing. See here: > > http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=magpie&dt=2012-07-11%2010%3A00%3A04 > > The interesting part of the diff is: ... > SELECT encode(perl_utf_in

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-11 Thread Jose Ildefonso Camargo Tolosa
Greetings, On Wed, Jul 11, 2012 at 9:11 AM, Shaun Thomas wrote: > On 07/10/2012 06:02 PM, Daniel Farina wrote: > >> For example, what if DRBD can only complete one page per second for >> some reason? Does it it simply have the primary wait at this glacial >> pace, or drop synchronous replication

Re: [SPAM] [MessageLimit][lowlimit] Re: [HACKERS] pl/perl and utf-8 in sql_ascii databases

2012-07-11 Thread Alex Hunsaker
On Wed, Jul 11, 2012 at 1:42 PM, Alvaro Herrera wrote: > >> I have pushed these changes to HEAD, 9.2 and 9.1. Instead of the games >> with plperl_lc_*.out being copied around, I just used the ASCII version >> as plperl_lc_1.out and the UTF8 one as plperl_lc.out. > > ... and this story hasn't ende

Re: [HACKERS] Event Triggers reduced, v1

2012-07-11 Thread Robert Haas
On Tue, Jul 10, 2012 at 10:38 AM, Dimitri Fontaine wrote: >> Mind you, if I ran the world, this would probably be broken up >> differently: I'd have ddl_command_start covering all the >> CREATE/ALTER/DROP commands and nothing else; and separate firing >> points for anything else I wanted to suppor

[HACKERS] emacs configuration for new perltidy settings

2012-07-11 Thread Peter Eisentraut
This might be useful for some people. Here is an emacs configuration for perl-mode that is compatible with the new perltidy settings. Note that the default perl-mode settings produce indentation that will be completely shredded by the new perltidy settings. (defun pgsql-perl-style () "Perl sty

Re: [HACKERS] Schema version management

2012-07-11 Thread Alvaro Herrera
Excerpts from Peter Eisentraut's message of mié jul 11 17:03:03 -0400 2012: > > On tis, 2012-07-10 at 17:54 -0400, Andrew Dunstan wrote: > > In general, NTFS forbids the use of these printable ASCII chars in > > filenames (see > >

Re: [HACKERS] pgsql_fdw in contrib

2012-07-11 Thread Peter Eisentraut
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 dblink? -- Sent via pgsql-hackers mailing list (

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

2012-07-11 Thread Tom Lane
Alvaro Herrera writes: > Excerpts from Tom Lane's message of mié jul 11 15:47:47 -0400 2012: >> ... that means we need a pretty consistent scheme for >> where to call InitializeTimeouts. But we already have the same issue >> with respect to on_proc_exit callbacks, so we can just add >> Initializ

Re: [HACKERS] Schema version management

2012-07-11 Thread Peter Eisentraut
On tis, 2012-07-10 at 17:54 -0400, Andrew Dunstan wrote: > In general, NTFS forbids the use of these printable ASCII chars in > filenames (see > : > > " * : < > ? \ / | > Many of these could be used in operators. Yeah, t

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

2012-07-11 Thread Tom Lane
I wrote: > I'm starting to look at this patch now. After reading this further, I think that the "sched_next" option is a bad idea and we should get rid of it. AFAICT, what it is meant to do is (if !sched_next) automatically do "disable_all_timeouts(true)" if the particular timeout happens to fire

Re: [HACKERS] HTTP API experimental implementation

2012-07-11 Thread Peter Eisentraut
On tis, 2012-07-10 at 08:59 +0200, Björn Harrtell wrote: > Hey all, > > I've begun an implementation of the proposed HTTP API [1] (with some > changes) using node.js > > The project lives at > https://github.com/bjornharrtell/postgresql-http-server and > basic functionality is in place. > > Feed

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

2012-07-11 Thread Alvaro Herrera
Excerpts from Tom Lane's message of mié jul 11 15:47:47 -0400 2012: > > Boszormenyi Zoltan writes: > > Attached are the refreshed patches. InitializeTimeouts() can be called > > twice and PGSemaphoreTimedLock() returns bool now. This saves > > two calls to get_timeout_indicator(). > > I'm start

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

2012-07-11 Thread Peter Eisentraut
On tis, 2012-07-10 at 15:28 -0700, Joe Conway wrote: > So I think this boils down to what we think the output of the various > has_*_privilege() functions *should* tell you: > > 1) privileges possessed even though they may not >be usable > -or- > 2) privileges possessed and usable > > Person

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

2012-07-11 Thread Tom Lane
Boszormenyi Zoltan writes: > Attached are the refreshed patches. InitializeTimeouts() can be called > twice and PGSemaphoreTimedLock() returns bool now. This saves > two calls to get_timeout_indicator(). I'm starting to look at this patch now. There are a number of cosmetic things I don't care f

Re: [SPAM] [MessageLimit][lowlimit] Re: [HACKERS] pl/perl and utf-8 in sql_ascii databases

2012-07-11 Thread Alvaro Herrera
Excerpts from Alvaro Herrera's message of mar jul 10 16:23:57 -0400 2012: > Excerpts from Kyotaro HORIGUCHI's message of mar jul 03 04:59:38 -0400 2012: > > Hello, Here is regression test runs on pg's also built with > > cygwin-gcc and VC++. > > > > The patches attached following, > > > > - plpe

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-11 Thread Robert Haas
On Tue, Jul 10, 2012 at 12:57 PM, Josh Berkus wrote: > Per your exchange with Heikki, that's not actually how SyncRep works in > 9.1. So it's not giving you what you want anyway. > > This is why we felt that the "sync rep if you can" mode was useless and > didn't accept it into 9.1. The *only* d

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-11 Thread Josh Berkus
On 7/11/12 6:41 AM, Shaun Thomas wrote: > Which would be handy. With synchronous commits, it's given that the > protocol is bi-directional. Then again, PG can detect when clients > disconnect the instant they do so, and having such an event implicitly > disable synchronous_standby_names until recon

Re: [HACKERS] Support for array_remove and array_replace functions

2012-07-11 Thread Tom Lane
Marco Nenciarini writes: > Patch v3 attached. Applied with mostly-but-not-entirely cosmetic adjustments. I left array_remove throwing error for multi-dimensional arrays for the moment, because I realized that changing the dimensionality as I suggested would conflict with the optimization to retu

Re: [HACKERS] Schema version management

2012-07-11 Thread Merlin Moncure
On Tue, Jul 10, 2012 at 5:24 PM, Merlin Moncure wrote: > On Sun, May 20, 2012 at 2:41 PM, Joel Jacobson wrote: >> Hi, >> >> I just read a very interesting post about "schema version management". >> >> Quote: "You could set it up so that every developer gets their own >> test database, sets up the

Re: [HACKERS] Support for array_remove and array_replace functions

2012-07-11 Thread Robert Haas
On Jul 11, 2012, at 11:53 AM, Alex Hunsaker wrote: > On Wed, Jul 11, 2012 at 9:54 AM, Tom Lane wrote: >> Marco Nenciarini writes: >>> Patch v3 attached. >> >> I'm looking at this patch now. The restriction of array_remove to >> one-dimensional arrays seems a bit annoying. I see the difficulty

Re: [HACKERS] Support for array_remove and array_replace functions

2012-07-11 Thread Tom Lane
Alex Hunsaker writes: > On Wed, Jul 11, 2012 at 9:54 AM, Tom Lane wrote: >> I'm looking at this patch now. The restriction of array_remove to >> one-dimensional arrays seems a bit annoying. I see the difficulty: >> if the input is multi-dimensional then removing some elements could >> lead to a

Re: [HACKERS] Support for array_remove and array_replace functions

2012-07-11 Thread Alex Hunsaker
On Wed, Jul 11, 2012 at 9:54 AM, Tom Lane wrote: > Marco Nenciarini writes: >> Patch v3 attached. > > I'm looking at this patch now. The restriction of array_remove to > one-dimensional arrays seems a bit annoying. I see the difficulty: > if the input is multi-dimensional then removing some ele

Re: [HACKERS] Support for array_remove and array_replace functions

2012-07-11 Thread Tom Lane
Marco Nenciarini writes: > Patch v3 attached. I'm looking at this patch now. The restriction of array_remove to one-dimensional arrays seems a bit annoying. I see the difficulty: if the input is multi-dimensional then removing some elements could lead to a non-rectangular array, which isn't sup

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-11 Thread Dimitri Fontaine
Shaun Thomas writes: >> Regardless of what DRBD does, I think the problem with the >> async/sync duality as-is is there is no nice way to manage exposure >> to transaction loss under various situations and requirements. Yeah. > Which would be handy. With synchronous commits, it's given that the

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-11 Thread Shaun Thomas
On 07/10/2012 06:02 PM, Daniel Farina wrote: For example, what if DRBD can only complete one page per second for some reason? Does it it simply have the primary wait at this glacial pace, or drop synchronous replication and go degraded? Or does it do something more clever than just a timeout?

Re: [HACKERS] Ability to listen on two unix sockets

2012-07-11 Thread Honza Horak
On 07/02/2012 09:45 PM, Tom Lane wrote: Honza Horak writes: On 06/15/2012 05:40 PM, Honza Horak wrote: I realized the patch has some difficulties -- namely the socket path in the data dir lock file, which currently uses one port for socket and the same for interface. So to allow users to use

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-11 Thread Dimitri Fontaine
Daniel Farina writes: > Notable caveat: one can't very easily measure or bound the amount of > transaction loss in any graceful way as-is. We only have "unlimited > lag" and "2-safe or bust". ¡per-transaction! You can change your mind mid-transaction and ask for 2-safe or bust. That's the de

Re: [HACKERS] Schema version management

2012-07-11 Thread Joel Jacobson
On Wed, Jul 11, 2012 at 12:24 AM, Merlin Moncure wrote: > What does your patch do that you can't already do with pg_restore? > Please read through the entire thread, think question has already been answered.