Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-10 Thread Jim Nasby
On 1/10/14, 4:14 PM, Merlin Moncure wrote: On Fri, Jan 10, 2014 at 4:10 PM, Jeff Janes wrote: On Fri, Jan 10, 2014 at 1:26 PM, Jim Nasby wrote: On 1/9/14, 10:58 PM, Tom Lane wrote: Jim Nasby writes: ISTM that allowing users to pick arbitrary lower array bounds was a huge mistake. I've n

Re: [HACKERS] INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2014-01-10 Thread Jim Nasby
On 1/10/14, 4:40 PM, Peter Geoghegan wrote: My problem is that in general I'm not sold on the actual utility of making this kind of row locking work with exclusion constraints. I'm sincerely having a hard time thinking of a practical use-case (although, as I've said, I want to make it work with I

Re: [HACKERS] Add CREATE support to event triggers

2014-01-10 Thread Jim Nasby
On 1/10/14, 3:40 PM, Simon Riggs wrote: Given that CREATE SCHEMA with multiple objects is less well used, its a reasonable restriction to accept for one release, if the alternative is to implement nothing at all of value. Especially since we are now in the third year of development of this set of

Re: [HACKERS] new json funcs

2014-01-10 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> I wonder whether we should add an opr_sanity test verifying that operator >> implementation functions don't have their own comments? The trouble is >> that there are a few that are supposed to, but maybe that list is stable >> enough that it'd be okay t

Re: [HACKERS] Add CREATE support to event triggers

2014-01-10 Thread Jim Nasby
On 1/10/14, 5:22 PM, Alvaro Herrera wrote: Here's one idea: create a contrib module that (somehow, via APIs to be >invented) runs every DDL command that gets executed through the >deparsing code, and then parses the result and executes*that* instead >of the original command. Then, add a build t

Re: [HACKERS] Standalone synchronous master

2014-01-10 Thread Adrian Klaver
On 01/10/2014 03:38 PM, Joshua D. Drake wrote: On 01/10/2014 03:17 PM, Josh Berkus wrote: Any continuous replication should not be a SPOF. The current behavior guarantees that a two node sync cluster is a SPOF. The proposed behavior removes that. Again, if that's your goal, then use async re

Re: [HACKERS] [PATCH] Negative Transition Aggregate Functions (WIP)

2014-01-10 Thread Jim Nasby
On 1/10/14, 1:07 PM, Tom Lane wrote: Florian Pflug writes: >On Jan10, 2014, at 19:08 , Tom Lane wrote: >>Although, having said that ... maybe "build your own aggregate" would >>be a reasonable suggestion for people who need this? I grant that >>it's going to be a minority requirement, maybe

Re: [HACKERS] Standalone synchronous master

2014-01-10 Thread Stephen Frost
Adrian, * Adrian Klaver (adrian.kla...@gmail.com) wrote: > A) Change the existing sync mode to allow the master and standby > fall out of sync should a standby fall over. I'm not sure that anyone is argueing for this.. > B) Create a new mode that does this without changing the existing sync mod

Re: [HACKERS] Standalone synchronous master

2014-01-10 Thread Adrian Klaver
On 01/10/2014 04:25 PM, Stephen Frost wrote: Adrian, * Adrian Klaver (adrian.kla...@gmail.com) wrote: A) Change the existing sync mode to allow the master and standby fall out of sync should a standby fall over. I'm not sure that anyone is argueing for this.. Looks like here, unless I am r

Re: [HACKERS] Standalone synchronous master

2014-01-10 Thread Stephen Frost
Adrian, * Adrian Klaver (adrian.kla...@gmail.com) wrote: > On 01/10/2014 04:25 PM, Stephen Frost wrote: > >* Adrian Klaver (adrian.kla...@gmail.com) wrote: > >>A) Change the existing sync mode to allow the master and standby > >>fall out of sync should a standby fall over. > > > >I'm not sure that

[HACKERS] Re: [bug fix] multibyte messages are displayed incorrectly on the client

2014-01-10 Thread Noah Misch
On Tue, Jan 07, 2014 at 10:56:28PM +0900, MauMau wrote: > From: "Bruce Momjian" > >On Sun, Jan 5, 2014 at 04:40:17PM +0900, MauMau wrote: > >>Then, as a happy medium, how about disabling message localization > >>only if the client encoding differs from the server one? That is, > >>compare the cl

Re: [HACKERS] Standalone synchronous master

2014-01-10 Thread Joshua D. Drake
On 01/10/2014 04:38 PM, Stephen Frost wrote: Adrian, * Adrian Klaver (adrian.kla...@gmail.com) wrote: On 01/10/2014 04:25 PM, Stephen Frost wrote: * Adrian Klaver (adrian.kla...@gmail.com) wrote: A) Change the existing sync mode to allow the master and standby fall out of sync should a stand

Re: [HACKERS] INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2014-01-10 Thread Peter Geoghegan
On Fri, Jan 10, 2014 at 4:09 PM, Jim Nasby wrote: > Well, the usual example for exclusion constraints is resource scheduling > (ie: scheduling what room a class will be held in). In that context is it > hard to believe that you might want to MERGE a set of new classroom > assignments in? So you s

Re: [HACKERS] Standalone synchronous master

2014-01-10 Thread Jim Nasby
On 1/10/14, 6:19 PM, Adrian Klaver wrote: 1) Async. Runs at the speed of the master as it does not have to wait on the standby to signal a successful commit. There is some degree of offset between master and standby(s) due to latency. 2) Sync. Runs at the speed of the standby + latency between

Re: [HACKERS] integrate pg_upgrade analyze_new_cluster.sh into vacuumdb

2014-01-10 Thread Bruce Momjian
On Thu, Jan 9, 2014 at 01:03:08PM -0500, Tom Lane wrote: > Robert Haas writes: > > I was referring to the analyze-in-stages logic, which is not specific > > to 8.4. I don't see a reason not to put that into vacuumdb. > > Right, that's Peter's core proposal, which I agreed with. The issue > was

Re: [HACKERS] INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2014-01-10 Thread Jim Nasby
On 1/10/14, 6:51 PM, Peter Geoghegan wrote: On Fri, Jan 10, 2014 at 4:09 PM, Jim Nasby wrote: >Well, the usual example for exclusion constraints is resource scheduling >(ie: scheduling what room a class will be held in). In that context is it >hard to believe that you might want to MERGE a set

Re: [HACKERS] Re: [bug fix] multibyte messages are displayed incorrectly on the client

2014-01-10 Thread Tom Lane
Noah Misch writes: >> On Sun, Jan 5, 2014 at 04:40:17PM +0900, MauMau wrote: >>> Then, as a happy medium, how about disabling message localization >>> only if the client encoding differs from the server one? That is, >>> compare the client_encoding value in the startup packet with the >>> result

Re: [HACKERS] Standalone synchronous master

2014-01-10 Thread Adrian Klaver
On 01/10/2014 04:48 PM, Joshua D. Drake wrote: On 01/10/2014 04:38 PM, Stephen Frost wrote: Adrian, * Adrian Klaver (adrian.kla...@gmail.com) wrote: On 01/10/2014 04:25 PM, Stephen Frost wrote: * Adrian Klaver (adrian.kla...@gmail.com) wrote: A) Change the existing sync mode to allow the ma

Re: [HACKERS] [PATCH] pg_basebackup: progress report max once per second

2014-01-10 Thread Mika Eloranta
On Thu, Jan 9, 2014, at 20:05, Magnus Hagander wrote: > On Thu, Nov 14, 2013 at 10:27 AM, Mika Eloranta wrote: >> On 13 Nov 2013, at 20:51, Mika Eloranta wrote: >> >> >> > Prevent excessive progress reporting that can grow to gigabytes >> > of output with large databases. >> >> >> Same patc

Re: [HACKERS] integrate pg_upgrade analyze_new_cluster.sh into vacuumdb

2014-01-10 Thread Tom Lane
Bruce Momjian writes: > I assume pg_upgrade would just tell the user what vacuumdb command to > run, rather than create a script to call it. If they have to run two > commands, we will output the two commands. Why would we change the operational procedure of "run this script after pg_upgrade"?

Re: [HACKERS] integrate pg_upgrade analyze_new_cluster.sh into vacuumdb

2014-01-10 Thread Bruce Momjian
On Fri, Jan 10, 2014 at 08:15:53PM -0500, Tom Lane wrote: > Bruce Momjian writes: > > I assume pg_upgrade would just tell the user what vacuumdb command to > > run, rather than create a script to call it. If they have to run two > > commands, we will output the two commands. > > Why would we cha

Re: [HACKERS] Standalone synchronous master

2014-01-10 Thread Peter Eisentraut
On Wed, 2014-01-08 at 17:56 -0500, Stephen Frost wrote: > * Andres Freund (and...@2ndquadrant.com) wrote: > > That's why you should configure a second standby as another (candidate) > > synchronous replica, also listed in synchronous_standby_names. > > Perhaps we should stress in the docs that thi

Re: [HACKERS] integrate pg_upgrade analyze_new_cluster.sh into vacuumdb

2014-01-10 Thread Peter Eisentraut
On Fri, 2014-01-10 at 20:21 -0500, Bruce Momjian wrote: > > Bear in mind also that some may have scripted the call of the script > > already, so you'd be breaking their scripts; to achieve what? > > Uh, I didn't think enough people scripted pg_upgrade to be worth it. I think pg_upgrade has so man

Re: [HACKERS] new json funcs

2014-01-10 Thread Andrew Dunstan
On 01/10/2014 07:16 PM, Tom Lane wrote: Alvaro Herrera writes: Tom Lane wrote: I wonder whether we should add an opr_sanity test verifying that operator implementation functions don't have their own comments? The trouble is that there are a few that are supposed to, but maybe that list is st

Re: [HACKERS] Re: [bug fix] multibyte messages are displayed incorrectly on the client

2014-01-10 Thread Noah Misch
On Fri, Jan 10, 2014 at 08:03:00PM -0500, Tom Lane wrote: > Noah Misch writes: > >> On Sun, Jan 5, 2014 at 04:40:17PM +0900, MauMau wrote: > >>> Then, as a happy medium, how about disabling message localization > >>> only if the client encoding differs from the server one? That is, > >>> compare

Re: [HACKERS] [BUGS] BUG #8782: Segmentation Fault during initialization

2014-01-10 Thread Tom Lane
lcampb...@asascience.com writes: > While attempting to initialize the server as a "postgres" user with: > sudo -u postgres /opt/postgresql-9.3.1/bin/initdb /var/postgres > A segmentation fault occurred. Here's the stack trace from gdb: This looks to be some variant of the problem discussed here:

Re: [HACKERS] new json funcs

2014-01-10 Thread Tom Lane
Andrew Dunstan writes: > Is it better to knock out the DESCR entries totally or make them read > "implementation of foo operator"? Just delete them --- initdb is responsible for inserting that boilerplate where appropriate. regards, tom lane -- Sent via pgsql-hackers

Re: [HACKERS] GIN improvements part 1: additional information

2014-01-10 Thread Tomas Vondra
On 8.1.2014 22:58, Alexander Korotkov wrote: > Thanks for reporting. Fixed version is attached. I've tried to rerun the 'archie' benchmark with the current patch, and once again I got PANIC: could not split GIN page, didn't fit I reran it with '--enable-cassert' and with that I got TRAP: Fa

Re: [HACKERS] integrate pg_upgrade analyze_new_cluster.sh into vacuumdb

2014-01-10 Thread Tom Lane
Bruce Momjian writes: > On Fri, Jan 10, 2014 at 08:15:53PM -0500, Tom Lane wrote: >> Why would we change the operational procedure of "run this script >> after pg_upgrade"? It just complicates life for users. > If it is one command, why use a script? Just give them the command. Because it won

Re: [HACKERS] Standalone synchronous master

2014-01-10 Thread Bruce Momjian
On Fri, Jan 10, 2014 at 03:17:34PM -0800, Josh Berkus wrote: > The purpose of sync rep is to know determinatively whether or not you > have lost data when disaster strikes. If knowing for certain isn't > important to you, then use async. > > BTW, people are using RAID1 as an analogy to 2-node syn

Re: [HACKERS] Standalone synchronous master

2014-01-10 Thread Bruce Momjian
On Fri, Jan 10, 2014 at 03:27:10PM -0800, Josh Berkus wrote: > On 01/10/2014 01:49 PM, Andres Freund wrote: > > On 2014-01-10 10:59:23 -0800, Joshua D. Drake wrote: > >> > >> On 01/10/2014 07:47 AM, Bruce Momjian wrote: > >> > >>> I know there was a desire to remove this TODO item, but I think we h

Re: [HACKERS] [PATCH] Store Extension Options

2014-01-10 Thread Fabrízio de Royes Mello
On Mon, Jan 6, 2014 at 1:50 AM, Tom Lane wrote: > > =?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?= writes: > > You are correct. pg_dump export reloptions using "WITH" clause of CREATE > > TABLE statement. I.e.: > > > CREATE TABLE foo ( > > ) > > WITH (autovacuum_enabled=false, bdr.do_replicate=false)

Re: [HACKERS] [PATCH] Negative Transition Aggregate Functions (WIP)

2014-01-10 Thread Florian Pflug
On Jan10, 2014, at 17:46 , Tom Lane wrote: > Florian Pflug writes: >> On Jan10, 2014, at 15:49 , Tom Lane wrote: >>> Also, it might be reasonable for both the regular and the inverse >>> transition functions to be strict. If a null entering the window >>> does not matter, then a null exiting

Re: [HACKERS] [PATCH] Negative Transition Aggregate Functions (WIP)

2014-01-10 Thread Florian Pflug
On Jan11, 2014, at 01:24 , Jim Nasby wrote: > On 1/10/14, 1:07 PM, Tom Lane wrote: >> Florian Pflug writes: >>> >On Jan10, 2014, at 19:08 , Tom Lane wrote: >>Although, having said that ... maybe "build your own aggregate" would >>be a reasonable suggestion for people who need this? I

Re: [HACKERS] newlines at end of generated SQL

2014-01-10 Thread Peter Eisentraut
On Thu, 2014-01-09 at 15:52 -0200, Fabrízio de Royes Mello wrote: > > On Thu, Jan 9, 2014 at 3:34 PM, Robert Haas > wrote: > > > > On Wed, Jan 8, 2014 at 10:17 PM, Peter Eisentraut > wrote: > > > Is there a reason why the programs in src/bin/scripts all put > newlines > > > at the end of the SQL

Re: [HACKERS] [PATCH] Add transforms feature

2014-01-10 Thread Peter Eisentraut
On Wed, 2013-12-11 at 11:07 -0500, Tom Lane wrote: > We should have learned by now that those are usually a bad idea. > In this case, we've got changes in the behavior of function calling, > which seems like not only a nightmare for debugging but a fertile > source of security issues. I note that

Re: [HACKERS] [PATCH] Add transforms feature

2014-01-10 Thread Peter Eisentraut
On Wed, 2013-12-11 at 09:47 -0500, Robert Haas wrote: > Of course, making everyone decorate their new functions with > references to the transforms they want to use isn't wonderful either, > but it might be good at least to have the option. You could allow the > use of all installed transforms by

Re: [HACKERS] INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2014-01-10 Thread Peter Geoghegan
On Fri, Jan 10, 2014 at 7:09 AM, Heikki Linnakangas wrote: > Nah, that's nothing. I have a patch in the January commitfest that was > already posted for the previous commitfest. It received zero review back > then, and still has no reviewer signed up, let alone anyone actually > reviewing it. And

Re: [HACKERS] [PATCH] Store Extension Options

2014-01-10 Thread Peter Eisentraut
On Sat, 2014-01-11 at 00:48 -0200, Fabrízio de Royes Mello wrote: > > Now, if bdr is installed but the validation doesn't happen unless > bdr > > is "loaded" in some sense, then that is an implementation deficiency > > that I think we can insist be rectified before this feature is > accepted. > >

Re: [HACKERS] INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2014-01-10 Thread Greg Stark
On Sat, Jan 11, 2014 at 12:51 AM, Peter Geoghegan wrote: > On Fri, Jan 10, 2014 at 4:09 PM, Jim Nasby wrote: >> Well, the usual example for exclusion constraints is resource scheduling >> (ie: scheduling what room a class will be held in). In that context is it >> hard to believe that you might w

Re: [HACKERS] Performance Improvement by reducing WAL for Update Operation

2014-01-10 Thread Amit Kapila
On Fri, Jan 10, 2014 at 9:12 PM, Robert Haas wrote: >> 2. Provide a new reloption to specify Wal compression >> for update operation on table >> Create table tbl(c1 char(100)) With (compress_wal = true); >> >> Alternative options: >> a. compress_wal can take input as operation, e.g

Re: [HACKERS] INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2014-01-10 Thread Peter Geoghegan
On Fri, Jan 10, 2014 at 10:01 PM, Greg Stark wrote: >> So you schedule a class that clashes with 3 other classes, and you >> want to update all 3 rows/classes with details from your one row >> proposed for insertion? > > > Well, perhaps you want to mark the events as conflicting with your new even

[HACKERS] [PATCH] Fix double-inclusion of pg_config_os.h when building extensions with Visual Studio

2014-01-10 Thread Craig Ringer
Hi all Related to the earlier comments about building extensions on Windows, I just noticed that we don't treat "WINDLL" as equivalent to "WIN32", and "WIN32" isn't set in a Visual Studio DLL project. We should actually be testing _WIN32, which is the compiler's pre-defined macro. The attached pa

<    1   2