Re: [HACKERS] [COMMITTERS] pgsql: New SQL functons pg_backup_in_progress() and pg_backup_start_tim

2012-06-18 Thread Albe Laurenz
Daniel Farina wrote: After mulling over this some more, I am less on the fence about how unfortunate it is that Postgres cannot restart when doing an exclusive base backup: I think it is a severe anti-feature that should gradually be retired. This anti-feature was introduced with

Re: [HACKERS] Skip checkpoint on promoting from streaming replication

2012-06-18 Thread Kyotaro HORIGUCHI
Hello, This is the new version of the patch. Your patch introduced new WAL record type XLOG_END_OF_RECOVERY to mark the chenge point of TLI. But I think the information is already stored in history files and already ready to use in current code. I looked into your first patch and looked over the

[HACKERS] Libxml2 load error on Windows

2012-06-18 Thread Talha Bin Rizwan
Hi, PostgreSQL 9.2 Windows build is having trouble with the XML support: http://postgresql.1045698.n5.nabble.com/9-2-beta1-libxml2-can-t-be-loaded-on-Windows-td5710672.html postgres=# SELECT xml 'foobar/foo'; ERROR: could not set up XML error handler HINT: This probably indicates that the

Re: [HACKERS] REVIEW: Optimize referential integrity checks (todo item)

2012-06-18 Thread Dean Rasheed
On 17 June 2012 18:30, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Gurjeet Singh  wrote: Dean Rasheed wrote: in HEAD: ... (actual time=1390.037..1390.037 rows=0 loops=1) Trigger for constraint fk_table_e_fkey: time=210.184 calls=9 Total runtime: 1607.626 ms With this patch: ...

Re: [HACKERS] REVIEW: Optimize referential integrity checks (todo item)

2012-06-18 Thread Dean Rasheed
On 17 June 2012 18:48, Tom Lane t...@sss.pgh.pa.us wrote: Gurjeet Singh singh.gurj...@gmail.com writes: On Sat, Jun 16, 2012 at 9:50 AM, Dean Rasheed dean.a.rash...@gmail.comwrote: I find it interesting that 'actual time' for top level 'Update on fk_table' is always higher in patched

Re: [HACKERS] temporal support patch

2012-06-18 Thread Vlad Arkhipov
On 06/15/2012 03:59 PM, Jeff Davis wrote: On Wed, 2012-06-13 at 23:10 +0200, Miroslav Šimulčík wrote: I have working patch for postgresql version 9.0.4, but it needs refactoring before i can submit it, because some parts don't meet formatting requirements yet. And yes, changes are large, so it

Re: [HACKERS] Resource Owner reassign Locks

2012-06-18 Thread Heikki Linnakangas
On 16.06.2012 09:04, Amit kapila wrote: I don't think so. C doesn't ref count its pointers. You are right I have misunderstood. I don't think that lock tags have good human readable formats, and just a pointer dump probably wouldn't be much use when something that can never happen has

Re: [HACKERS] [BUGS] Tab completion of function arguments not working in all cases

2012-06-18 Thread Dean Rasheed
On 18 June 2012 04:21, Josh Kupershmidt schmi...@gmail.com wrote: +1 for the idea. I find the existing behavior rather confusing, particularly the fact that a schema-qualified function name will be tab-completed, i.e. this works.  DROP FUNCTION my_schema.myTAB but then, as your second

Re: [HACKERS] Resource Owner reassign Locks

2012-06-18 Thread Heikki Linnakangas
On 10.06.2012 23:39, Jeff Janes wrote: The attached patch fixes that by remembering up to 10 local locks, and pushing them up specifically rather than digging through the entire lock table. If the list overflows, then it reverts to the old behavior of digging through the entire local lock

[HACKERS] gistchoose vs. bloat

2012-06-18 Thread Alexander Korotkov
Hackers, While experimenting with gistchoose I achieve interesting results about relation of gistchoose behaviour and gist index bloat. I've created following testcase for reproducing gist index bloating: 1) Create test table with 100 points from geonames # create table geotest (id serial,

Re: [HACKERS] [PATCH 10/16] Introduce the concept that wal has a 'origin' node

2012-06-18 Thread Andres Freund
On Monday, June 18, 2012 02:43:26 AM Steve Singer wrote: On 12-06-13 01:27 PM, Andres Freund wrote: The previous mail contained a patch with a mismerge caused by reording commits. Corrected version attached. Thanks to Steve Singer for noticing this quickly. Attached is a more complete

Re: [HACKERS] s/UNSPECIFIED/SIMPLE/ in foreign key code?

2012-06-18 Thread Gurjeet Singh
On Sat, Jun 16, 2012 at 5:38 PM, Tom Lane t...@sss.pgh.pa.us wrote: A small flaw in this plan is that in pg_constraint.confmatchtype, MATCH_UNSPECIFIED is stored as 'u'. In a green field I'd just rename that to 's' for SIMPLE, but it seems possible that this would confuse client-side code

Re: [HACKERS] [PATCH 06/16] Add support for a generic wal reading facility dubbed XLogReader

2012-06-18 Thread Heikki Linnakangas
On 15.06.2012 00:38, Andres Freund wrote: On Thursday, June 14, 2012 11:19:00 PM Heikki Linnakangas wrote: On 13.06.2012 14:28, Andres Freund wrote: Features: - streaming reading/writing - filtering - reassembly of records Reusing the ReadRecord infrastructure in situations where the code

Re: [HACKERS] s/UNSPECIFIED/SIMPLE/ in foreign key code?

2012-06-18 Thread Tom Lane
Gurjeet Singh singh.gurj...@gmail.com writes: The other candidate to look for possible breakage would be pgAdmin. As Amit says, there might be code out in the wild that does look at this column, so not worth breaking them for this small gain. Well, I already did it the other way ;-). It's

Re: [HACKERS] REVIEW: Optimize referential integrity checks (todo item)

2012-06-18 Thread Tom Lane
Dean Rasheed dean.a.rash...@gmail.com writes: I think that the patch already covers the most common use case (in my experience) but we may as well get as much out of it as we can while we're here. Yeah. The cases involving nulls are probably really rather unlikely altogether, but it seems a

Re: [HACKERS] [PATCH 06/16] Add support for a generic wal reading facility dubbed XLogReader

2012-06-18 Thread Andres Freund
On Monday, June 18, 2012 01:51:45 PM Heikki Linnakangas wrote: On 15.06.2012 00:38, Andres Freund wrote: On Thursday, June 14, 2012 11:19:00 PM Heikki Linnakangas wrote: On 13.06.2012 14:28, Andres Freund wrote: Features: - streaming reading/writing - filtering - reassembly of records

Re: [HACKERS] Standbys, txid_current_snapshot, wraparound

2012-06-18 Thread Daniel Farina
On Thu, Mar 22, 2012 at 5:26 PM, Daniel Farina dan...@heroku.com wrote: Some time ago I reported bug 6291[0], which reported a Xid wraparound, both as reported in pg_controldata and by txid_current_snapshot. Unfortunately, nobody could reproduce it. Today, the same system of ours just passed

Re: [HACKERS] Resource Owner reassign Locks

2012-06-18 Thread Amit Kapila
A better error message would be nice, but I don't think it's worth that much. resowner.c doesn't currently know about the internals of LOCALLOCk struct or lock tags, and I'd prefer to keep it that way. Let's just print the pointer's address, that's what we do in many other corresponding

Re: [HACKERS] [PATCH] Support for foreign keys with arrays

2012-06-18 Thread Kevin Grittner
Misa Simic misa.si...@gmail.com wrote: 2012/6/17 Kevin Grittner kevin.gritt...@wicourts.gov Can someone provide a practical example of a foreign key with array use case? The only situations I'm able to think of right now are the same cases where you would now use a table with primary keys

Re: [HACKERS] transforms

2012-06-18 Thread Andres Freund
Hi Peter, On Friday, June 15, 2012 12:42:12 AM Peter Eisentraut wrote: Here is my first patch for the transforms feature. This is a mechanism to adapt data types to procedural languages. The previous proposal was here: http://archives.postgresql.org/pgsql-hackers/2012-05/msg00728.php At

Re: [HACKERS] [PATCH 10/16] Introduce the concept that wal has a 'origin' node

2012-06-18 Thread Simon Riggs
On 13 June 2012 19:28, Andres Freund and...@2ndquadrant.com wrote: This adds a new configuration parameter multimaster_node_id which determines the id used for wal originating in one cluster. Looks good and it seems this aspect at least is commitable in this CF. Design decisions I think we

Re: [HACKERS] [BUGS] Tab completion of function arguments not working in all cases

2012-06-18 Thread Josh Kupershmidt
On Mon, Jun 18, 2012 at 3:56 AM, Dean Rasheed dean.a.rash...@gmail.com wrote: On 18 June 2012 04:21, Josh Kupershmidt schmi...@gmail.com wrote: As a side note unrelated to this patch, I also dislike how function name tab-completions will not fill in the opening parenthesis, which makes for

Re: [HACKERS] [PATCH 10/16] Introduce the concept that wal has a 'origin' node

2012-06-18 Thread Andres Freund
Hi Simon, On Monday, June 18, 2012 05:35:40 PM Simon Riggs wrote: On 13 June 2012 19:28, Andres Freund and...@2ndquadrant.com wrote: This adds a new configuration parameter multimaster_node_id which determines the id used for wal originating in one cluster. Looks good and it seems this

Re: [HACKERS] [PATCH 02/16] Add zeroRecPtr as a shortcut for initializing a local variable to {0, 0}

2012-06-18 Thread Andres Freund
On Thursday, June 14, 2012 03:50:28 PM Robert Haas wrote: On Wed, Jun 13, 2012 at 7:28 AM, Andres Freund and...@2ndquadrant.com wrote: This is locally defined in lots of places and would get introduced frequently in the next commits. It is expected that this can be defined in a header-only

Re: [HACKERS] sortsupport for text

2012-06-18 Thread Peter Geoghegan
On 18 June 2012 00:38, Tom Lane t...@sss.pgh.pa.us wrote: The only reason we test a = b and not a b || a b is that the latter is at least twice as expensive to evaluate. Perhaps I've been unclear. I meant to write (!(a b) !(b a)), and not (a b b a). The former is not tautological when

Re: [HACKERS] sortsupport for text

2012-06-18 Thread Peter Geoghegan
On 18 June 2012 16:59, Peter Geoghegan pe...@2ndquadrant.com wrote: Perhaps more importantly, I cannot recreate any of these problems on my Fedora 16 machine. Even with hu_HU on LATIN2, Tom's original test case (from 2005, on a Fedora 4 machine) cannot be recreated. So it may be that they've

Re: [HACKERS] initdb and fsync

2012-06-18 Thread Andres Freund
On Wednesday, June 13, 2012 06:53:17 PM Jeff Davis wrote: On Wed, 2012-06-13 at 13:53 +0300, Peter Eisentraut wrote: The --help output for the -N option was copy-and-pasted wrongly. The message issued when using -N is also a bit content-free. Maybe something like Running in nosync

Re: [HACKERS] pgsql_fdw in contrib

2012-06-18 Thread Merlin Moncure
On Thu, Jun 14, 2012 at 7:29 AM, Shigeru HANADA shigeru.han...@gmail.com wrote: I'd like to propose pgsql_fdw, FDW for PostgreSQL, as a contrib module in core, again.  This patch is basically rebased version of the patches proposed in 9.2 development cycle, and contains some additional changes

Re: [HACKERS] Skip checkpoint on promoting from streaming replication

2012-06-18 Thread Fujii Masao
On Mon, Jun 18, 2012 at 5:42 PM, Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp wrote: What do you think about this? What happens if the server skips an end-of-recovery checkpoint, is promoted to the master, runs some write transactions, crashes and restarts automatically before it completes

Re: [HACKERS] Allow WAL information to recover corrupted pg_controldata

2012-06-18 Thread Alvaro Herrera
Excerpts from Tom Lane's message of sáb jun 16 02:41:00 -0400 2012: Amit kapila amit.kap...@huawei.com writes: The suggested patch improves the logic to recover corrupt control file. So that is the reason I felt it will be relevant to do this patch. Well, we invented pg_resetxlog with

Re: [HACKERS] Allow WAL information to recover corrupted pg_controldata

2012-06-18 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Excerpts from Tom Lane's message of sáb jun 16 02:41:00 -0400 2012: Well, we invented pg_resetxlog with the thought that it might be useful for such situations, but I'm not sure offhand that we've ever seen a field report of corrupted

Re: [HACKERS] temporal support patch

2012-06-18 Thread Jeff Davis
On Mon, 2012-06-18 at 19:34 +0900, Vlad Arkhipov wrote: What's wrong with SPI/timetravel extension for system versioning? http://www.postgresql.org/docs/9.1/static/contrib-spi.html We are heavily using system-versioned and application-time period tables in our enterprise products (most of

Re: [HACKERS] libpq compression

2012-06-18 Thread Martijn van Oosterhout
On Sun, Jun 17, 2012 at 12:29:53PM -0400, Tom Lane wrote: The fly in the ointment with any of these ideas is that the configure list is not a list of exact cipher names, as per Magnus' comment that the current default includes tests like !aNULL. I am not sure that we know how to evaluate such

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

2012-06-18 Thread Alvaro Herrera
Excerpts from Boszormenyi Zoltan's message of vie may 11 03:54:13 -0400 2012: Hi, another rebasing and applied the GIT changes in ada8fa08fc6cf5f199b6df935b4d0a730aaa4fec to the Windows implementation of PGSemaphoreTimedLock. Hi, I gave the framework patch a look. One thing I'm not sure

Re: [HACKERS] Allow WAL information to recover corrupted pg_controldata

2012-06-18 Thread Amit Kapila
AFAIR you can create pg_control from scratch already with pg_resetxlog. The hard part is coming up with values for the counters, such as the next WAL location. Some of them such as next OID are pretty harmless if you don't guess right, but I'm worried that wrong next WAL could make things

Re: [HACKERS] WAL format changes

2012-06-18 Thread Robert Haas
On Thu, Jun 14, 2012 at 5:58 PM, Andres Freund and...@2ndquadrant.com wrote: 1. Use a 64-bit segment number, instead of the log/seg combination. And don't waste the last segment on each logical 4 GB log file. The concept of a logical log file is now completely gone. XLogRecPtr is unchanged,

Re: [HACKERS] WAL format changes

2012-06-18 Thread Heikki Linnakangas
On 18.06.2012 21:00, Robert Haas wrote: On Thu, Jun 14, 2012 at 5:58 PM, Andres Freundand...@2ndquadrant.com wrote: 1. Use a 64-bit segment number, instead of the log/seg combination. And don't waste the last segment on each logical 4 GB log file. The concept of a logical log file is now

Re: [HACKERS] [PATCH] Lazy hashaggregate when no aggregation is needed

2012-06-18 Thread Robert Haas
On Fri, Jun 15, 2012 at 9:22 AM, Ants Aasma a...@cybertec.at wrote: Exactly. I think the first question for this patch should be whether this use-case is worth the complexity of the patch. I can't imagine any really compelling use cases that need an arbitrary distinct subset of results. Me

Re: [HACKERS] WAL format changes

2012-06-18 Thread Andres Freund
On Monday, June 18, 2012 08:08:14 PM Heikki Linnakangas wrote: On 18.06.2012 21:00, Robert Haas wrote: On Thu, Jun 14, 2012 at 5:58 PM, Andres Freundand...@2ndquadrant.com wrote: 1. Use a 64-bit segment number, instead of the log/seg combination. And don't waste the last segment on each

Re: [HACKERS] WAL format changes

2012-06-18 Thread Robert Haas
On Mon, Jun 18, 2012 at 2:08 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 18.06.2012 21:00, Robert Haas wrote: On Thu, Jun 14, 2012 at 5:58 PM, Andres Freundand...@2ndquadrant.com  wrote: 1. Use a 64-bit segment number, instead of the log/seg combination. And don't

Re: [HACKERS] WAL format changes

2012-06-18 Thread Heikki Linnakangas
On 18.06.2012 21:13, Andres Freund wrote: On Monday, June 18, 2012 08:08:14 PM Heikki Linnakangas wrote: The page header contains an XLogRecPtr (LSN), so if we change it we'll have to deal with pg_upgrade. I guess we could still keep XLogRecPtr around as the on-disk representation, and convert

Re: [HACKERS] initdb and fsync

2012-06-18 Thread Peter Eisentraut
On mån, 2012-06-18 at 18:05 +0200, Andres Freund wrote: - defaulting to initdb -N in the regression suite is not a good imo, because that way the buildfarm won't catch problems in that area... The regression test suite also starts postgres with fsync off. This is good, and I don't want to

Re: [HACKERS] initdb and fsync

2012-06-18 Thread Jeff Davis
initdb-fsync-20120618.patch.gz Description: GNU Zip compressed data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] WAL format changes

2012-06-18 Thread Andres Freund
On Monday, June 18, 2012 08:32:54 PM Heikki Linnakangas wrote: On 18.06.2012 21:13, Andres Freund wrote: On Monday, June 18, 2012 08:08:14 PM Heikki Linnakangas wrote: The page header contains an XLogRecPtr (LSN), so if we change it we'll have to deal with pg_upgrade. I guess we could still

Re: [HACKERS] initdb and fsync

2012-06-18 Thread Jeff Davis
-20120618-2.patch.gz Description: GNU Zip compressed data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] initdb and fsync

2012-06-18 Thread Andres Freund
On Monday, June 18, 2012 08:39:47 PM Jeff Davis wrote: On Mon, 2012-06-18 at 18:05 +0200, Andres Freund wrote: Quick review: - defaulting to initdb -N in the regression suite is not a good imo, because that way the buildfarm won't catch problems in that area... I removed the -N as you

Re: [HACKERS] WAL format changes

2012-06-18 Thread Heikki Linnakangas
On 18.06.2012 21:45, Andres Freund wrote: On Monday, June 18, 2012 08:32:54 PM Heikki Linnakangas wrote: On 18.06.2012 21:13, Andres Freund wrote: On Monday, June 18, 2012 08:08:14 PM Heikki Linnakangas wrote: The page header contains an XLogRecPtr (LSN), so if we change it we'll have to deal

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

2012-06-18 Thread Alvaro Herrera
Excerpts from Alex Hunsaker's message of vie feb 10 16:53:05 -0300 2012: Seems like we missed the fact that we still did SvUTF8_on() in sv2cstr and SvPVUTF8() when turning a perl string into a cstring. Hmm, this patch belongs into back branches too, right? Not just the current development

[HACKERS] [Review] Add SPI_gettypmod() to return a field's typemod from a TupleDesc

2012-06-18 Thread Amit Kapila
On Wed, Feb 1, 2012 at 5:23 AM, Chetan Suttraway chetan(dot)suttraway(at)enterprisedb(dot)com wrote: Hi All, This is regarding the TODO item : Add SPI_gettypmod() to return a field's typemod from a TupleDesc The related message is:

Re: [HACKERS] initdb and fsync

2012-06-18 Thread Jeff Davis
On Mon, 2012-06-18 at 20:57 +0200, Andres Freund wrote: - defaulting to initdb -N in the regression suite is not a good imo, because that way the buildfarm won't catch problems in that area... I removed the -N as you suggest. How much does performance matter on the buildfarm? I don't

[HACKERS] Transactions over pathological TCP connections

2012-06-18 Thread Leon Smith
Out of (mostly idle) curiousity, when exactly does a transaction commit, especially with respect to a TCP connection that a pathological demon will cut off at the worst possible moment? The thing is, I'm using PostgreSQL as a queue, using asynchronous notifications and following the advice of

Re: [HACKERS] initdb and fsync

2012-06-18 Thread Andres Freund
On Monday, June 18, 2012 09:32:25 PM Jeff Davis wrote: - could the copydir.c and initdb.c versions of walkdir/sync_fname et al be unified? There's a lot of backend-specific code in the copydir versions, like using ereport() and CHECK_FOR_INTERRUPTS(). I gave a brief attempt at

Re: [HACKERS] initdb and fsync

2012-06-18 Thread Alvaro Herrera
Excerpts from Jeff Davis's message of lun jun 18 15:32:25 -0400 2012: On Mon, 2012-06-18 at 20:57 +0200, Andres Freund wrote: Btw, I just want to have said this, although I don't think its particularly relevant as it doesn't affect correctness: Its possible to have a system where

[HACKERS] [Review] Prevent the specification of conflicting transaction read/write options

2012-06-18 Thread Amit Kapila
Chetan Suttraway chetan(dot)suttraway(at)enterprisedb(dot)com wrote: This is regarding the TODO item: Prevent the specification of conflicting transaction read/write options listed at: http://wiki.postgresql.org/wiki/Todo Here's my review of this patch. Basic stuff:

Re: [HACKERS] initdb and fsync

2012-06-18 Thread Jeff Davis
On Mon, 2012-06-18 at 21:41 +0200, Andres Freund wrote: It calls pg_flush_data inside of copy_file which does the posix_fadvise... So maybe just put the sync_file_range in pg_flush_data? Oh, I didn't notice that, thank you. In that case, it may be good to combine them if possible. I will look

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

2012-06-18 Thread Alvaro Herrera
BTW it doesn't seem that datatype/timestamp.h is really necessary in timeout.h. -- Álvaro Herrera alvhe...@commandprompt.com The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-hackers mailing list

Re: [HACKERS] WAL format changes

2012-06-18 Thread Andres Freund
On Monday, June 18, 2012 09:19:48 PM Heikki Linnakangas wrote: On 18.06.2012 21:45, Andres Freund wrote: On Monday, June 18, 2012 08:32:54 PM Heikki Linnakangas wrote: On 18.06.2012 21:13, Andres Freund wrote: On Monday, June 18, 2012 08:08:14 PM Heikki Linnakangas wrote: The page header

Re: [HACKERS] Testing 9.2 in ~production environment

2012-06-18 Thread Josh Berkus
PE Compare the output of pg_config --configure from both installations. The only differences are 9.1 vs 9.2 in the paths. Can you check the collations of the two databases? I'm wondering if 9.1 is in C collation and 9.2 is something else. -- Josh Berkus PostgreSQL Experts Inc.

Re: [HACKERS] [PATCH 10/16] Introduce the concept that wal has a 'origin' node

2012-06-18 Thread Daniel Farina
On Mon, Jun 18, 2012 at 8:50 AM, Andres Freund and...@2ndquadrant.com wrote: * Size of field. 16 bits is enough for 32,000 master nodes, which is quite a lot. Do we need that many? I think we may have need for a few flag bits, so I'd like to reserve at least 4 bits for flag bits, maybe 8

Re: [HACKERS] [PATCH 10/16] Introduce the concept that wal has a 'origin' node

2012-06-18 Thread Andres Freund
On Monday, June 18, 2012 11:51:27 PM Daniel Farina wrote: On Mon, Jun 18, 2012 at 8:50 AM, Andres Freund and...@2ndquadrant.com wrote: * Size of field. 16 bits is enough for 32,000 master nodes, which is quite a lot. Do we need that many? I think we may have need for a few flag bits, so

Re: [HACKERS] Testing 9.2 in ~production environment

2012-06-18 Thread James Cloos
JB == Josh Berkus j...@agliodbs.com writes: JB Can you check the collations of the two databases? I'm wondering if 9.1 JB is in C collation and 9.2 is something else. Thanks! pg_dump -C tells me these two differences: -SET client_encoding = 'SQL_ASCII'; +SET client_encoding = 'UTF8';

Re: [HACKERS] [PATCH 10/16] Introduce the concept that wal has a 'origin' node

2012-06-18 Thread Christopher Browne
On Mon, Jun 18, 2012 at 11:50 AM, Andres Freund and...@2ndquadrant.com wrote: Hi Simon, On Monday, June 18, 2012 05:35:40 PM Simon Riggs wrote: On 13 June 2012 19:28, Andres Freund and...@2ndquadrant.com wrote: This adds a new configuration parameter multimaster_node_id which determines

Re: [HACKERS] Event Triggers reduced, v1

2012-06-18 Thread Alvaro Herrera
Excerpts from Dimitri Fontaine's message of vie jun 15 16:27:50 -0400 2012: The attached patch contains all the infrastructure for event triggers and also a first implementation of them for the event command_start, implemented in a single place in utility.c. The infrastructure is about:

Re: [HACKERS] [PATCH] Support for foreign keys with arrays

2012-06-18 Thread Misa Simic
2012/6/18 Kevin Grittner kevin.gritt...@wicourts.gov The many-to-one case seems like it is better handled in the other direction -- with the referenced table holding the set of valid keys and the referencing table holding the single key. (I believe the general case of this is what Jeff

Re: [HACKERS] patch: avoid heavyweight locking on hash metapage

2012-06-18 Thread Robert Haas
On Fri, Jun 15, 2012 at 1:58 PM, Jeff Janes jeff.ja...@gmail.com wrote: Do we need the retry flag (applies to two places)?  If oldblkno is still InvalidBlockNumber then it can't equal blkno. I was a bit concerned that blkno = BUCKET_TO_BLKNO(metap, bucket) might set blkno to InvalidBlockNumber,

[HACKERS] performance regression in 9.2 when loading lots of small tables

2012-06-18 Thread Jeff Janes
There was a regression introduced in 9.2 that effects the creation and loading of lots of small tables in a single transaction. It affects the loading of a pg_dump file which has a large number of small tables (10,000 schemas, one table per schema, 10 rows per table). I did not test other schema

Re: [HACKERS] [RFC][PATCH] Logical Replication/BDR prototype and architecture

2012-06-18 Thread Robert Haas
On Sat, Jun 16, 2012 at 3:03 PM, Steve Singer st...@ssinger.info wrote: I feel that in-core support to capture changes and turn them into change records that can be replayed on other databases, without relying on triggers and log tables, would be good to have. I think we want some flexible

Re: [HACKERS] [RFC][PATCH] Logical Replication/BDR prototype and architecture

2012-06-18 Thread Robert Haas
On Sat, Jun 16, 2012 at 7:43 AM, Andres Freund and...@2ndquadrant.com wrote: Hm. Yes, you could do that. But I have to say I don't really see a point. Maybe the fact that I do envision multimaster systems at some point is clouding my judgement though as its far less easy in that case. Why?  

Re: [HACKERS] Pg default's verbosity?

2012-06-18 Thread Robert Haas
On Sat, Jun 16, 2012 at 2:56 PM, Fabien COELHO coe...@cri.ensmp.fr wrote: The argument for defaulting to NOTICE is the same as it's always been: that those messages are really intended for novices, and a pretty good definition of a novice is somebody who doesn't know how to (or that he should)

Re: [HACKERS] measuring spinning

2012-06-18 Thread Robert Haas
On Sat, Jun 16, 2012 at 6:25 PM, Jeff Janes jeff.ja...@gmail.com wrote: Well, this fell through the cracks, because I forgot to add it to the January CommitFest.  Here it is again, rebased. This applies and builds cleanly and passes make check (under enable-cassert). Not test or docs are

Re: [HACKERS] [PATCH 10/16] Introduce the concept that wal has a 'origin' node

2012-06-18 Thread Steve Singer
On 12-06-18 07:30 AM, Andres Freund wrote: Hrmpf #666. I will go through through the series commit-by-commit again to make sure everything compiles again. Reordinging this late definitely wasn't a good idea... I pushed a rebased version with all those fixups (and removal of the zeroRecPtr

Re: [HACKERS] [PATCH 10/16] Introduce the concept that wal has a 'origin' node

2012-06-18 Thread Steve Singer
On 12-06-18 11:50 AM, Andres Freund wrote: Hi Simon, I think we need to agree on the parameter name. It currently is 'multimaster_node_id'. In the discussion with Steve we got to replication_node_id. I don't particularly like either. Other suggestions? Other things that come to mind (for

Re: [HACKERS] Libxml2 load error on Windows

2012-06-18 Thread Robert Haas
On Mon, Jun 18, 2012 at 5:08 AM, Talha Bin Rizwan talha.riz...@gmail.com wrote: PostgreSQL 9.2 Windows build is having trouble with the XML support: http://postgresql.1045698.n5.nabble.com/9-2-beta1-libxml2-can-t-be-loaded-on-Windows-td5710672.html postgres=# SELECT xml 'foobar/foo'; ERROR:  

Re: [HACKERS] pgsql_fdw in contrib

2012-06-18 Thread Robert Haas
On Mon, Jun 18, 2012 at 12:24 PM, Merlin Moncure mmonc...@gmail.com wrote: I can't help but wonder (having been down the contrib/core/extension road myself) if it isn't better to improve the facilities to register and search for qualified extensions (like Perl CPAN) so that people looking for

Re: [HACKERS] patch: autocomplete for functions

2012-06-18 Thread Josh Kupershmidt
On Sun, Feb 19, 2012 at 12:10 PM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello I found so this extremely simple patch should be useful. It helps for pattern SELECT fx(); There was thread about it. Hi Pavel, I signed up to be reviewer for this patch, and finally got around to taking a

Re: [HACKERS] patch: autocomplete for functions

2012-06-18 Thread Josh Kupershmidt
On Mon, Mar 19, 2012 at 1:01 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: I'm rather of the contrary opinion -- surely if we're going to complete function names, we should only complete those that are in schemas in the path; similarly for column names. I think it makes sense to only

Re: [HACKERS] Allow WAL information to recover corrupted pg_controldata

2012-06-18 Thread Tom Lane
Amit Kapila amit.kap...@huawei.com writes: AFAIR you can create pg_control from scratch already with pg_resetxlog. The hard part is coming up with values for the counters, such as the next WAL location. Some of them such as next OID are pretty harmless if you don't guess right, but I'm

Re: [HACKERS] Transactions over pathological TCP connections

2012-06-18 Thread Tom Lane
Leon Smith leon.p.sm...@gmail.com writes: Out of (mostly idle) curiousity, when exactly does a transaction commit, especially with respect to a TCP connection that a pathological demon will cut off at the worst possible moment? It's committed when the XLOG_XACT_COMMIT WAL record reaches disk,