Re: [HACKERS] pg_dump --serializable-deferrable

2011-05-11 Thread Kevin Grittner
Peter Eisentraut wrote: The name of this new option is a bit of a mouthful, and it mixes in an otherwise standardized term (deferrable, as in constraints) with transaction isolation. Wouldn't something like --wait-for-serializable be clearer (and shorter)? I see it's not mentioned in the

Re: [HACKERS] the big picture for index-only scans

2011-05-11 Thread Simon Riggs
On Wed, May 11, 2011 at 12:54 AM, Greg Stark gsst...@mit.edu wrote: On a separate note though, Simon, I don't know what you mean by we normally start with a problem. It's an free software project and people are free to work on whatever interests them whether that's because it solves a problem

Re: [HACKERS] Feature proposal: distinguish each PostgreSQL instance in the event log

2011-05-11 Thread Dave Page
On Tue, May 10, 2011 at 11:55 PM, Tom Lane t...@sss.pgh.pa.us wrote: MauMau maumau...@gmail.com writes: MauMau maumau...@gmail.com writes: I've encountered one problem on Windows. I need to support running all of my products on one host simultaneously. Plus, I need to log messages in

Re: [HACKERS] Foreign table permissions and cloning

2011-05-11 Thread Shigeru Hanada
(2011/04/26 5:42), Robert Haas wrote: OK. Turned out a little more cleanup was needed to make this all the way consistent with how we handle views; I have now done that. I noticed that some fixes would be needed for consistency about foreign table privileges. Attached patch includes fixes

Re: [HACKERS] the big picture for index-only scans

2011-05-11 Thread Simon Riggs
On Wed, May 11, 2011 at 1:47 AM, Bruce Momjian br...@momjian.us wrote: Greg Stark wrote: On a separate note though, Simon, I don't know what you mean by we normally start with a problem. It's an free software project and people are free to work on whatever interests them whether that's

Re: [HACKERS] the big picture for index-only scans

2011-05-11 Thread Simon Riggs
On Wed, May 11, 2011 at 2:34 AM, Bruce Momjian br...@momjian.us wrote: Robert Haas wrote: So, what do we need in order to find our way to index-only scans? 1. The visibility map needs to be crash-safe.  The basic idea of index-only scans is that, instead of checking the heap to find out

[HACKERS] potential bug in trigger with boolean params

2011-05-11 Thread Szymon Guz
Hi, I was trying to create a trigger with parameters. I've found a potential bug when the param is boolean. Here is code replicating the bug: CREATE TABLE x(x TEXT); CREATE OR REPLACE FUNCTION trigger_x() RETURNS TRIGGER AS $$ BEGIN RETURN NEW; END; $$ LANGUAGE PLPGSQL; CREATE TRIGGER

Re: [HACKERS] Process wakeups when idle and power consumption

2011-05-11 Thread Peter Geoghegan
On 9 May 2011 11:19, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: In the child, spawn a thread How exactly should I go about this? The one place in the code that I knew to use multiple threads, pgbench, falls back on emulation with fork() on some platforms. -- Peter Geoghegan

Re: [HACKERS] the big picture for index-only scans

2011-05-11 Thread Heikki Linnakangas
On 10.05.2011 20:15, Simon Riggs wrote: On Tue, May 10, 2011 at 5:17 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Simon Riggssi...@2ndquadrant.com wrote: This topic has been discussed many times, yet I have never seen an assessment that explains WHY we would want to do index-only

Re: [HACKERS] Process wakeups when idle and power consumption

2011-05-11 Thread Magnus Hagander
On Wed, May 11, 2011 at 10:52, Peter Geoghegan pe...@2ndquadrant.com wrote: On 9 May 2011 11:19, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: In the child, spawn a thread How exactly should I go about this? The one place in the code that I knew to use multiple threads,

Re: [HACKERS] potential bug in trigger with boolean params

2011-05-11 Thread tv
Hi, I was trying to create a trigger with parameters. I've found a potential bug when the param is boolean. Here is code replicating the bug: CREATE TABLE x(x TEXT); CREATE OR REPLACE FUNCTION trigger_x() RETURNS TRIGGER AS $$ BEGIN RETURN NEW; END; $$ LANGUAGE PLPGSQL;

Re: [HACKERS] potential bug in trigger with boolean params

2011-05-11 Thread Szymon Guz
On 11 May 2011 10:56, t...@fuzzy.cz wrote: Hi, I was trying to create a trigger with parameters. I've found a potential bug when the param is boolean. Here is code replicating the bug: CREATE TABLE x(x TEXT); CREATE OR REPLACE FUNCTION trigger_x() RETURNS TRIGGER AS $$ BEGIN

Re: [HACKERS] potential bug in trigger with boolean params

2011-05-11 Thread Andreas Joseph Krogh
På onsdag 11. mai 2011 kl 10:56:19 skrev t...@fuzzy.cz: Hi, I was trying to create a trigger with parameters. I've found a potential bug when the param is boolean. Here is code replicating the bug: CREATE TABLE x(x TEXT); CREATE OR REPLACE FUNCTION trigger_x() RETURNS TRIGGER

Re: [HACKERS] potential bug in trigger with boolean params

2011-05-11 Thread Andres Freund
On Wednesday, May 11, 2011 11:01:56 AM Andreas Joseph Krogh wrote: På onsdag 11. mai 2011 kl 10:56:19 skrev t...@fuzzy.cz: CREATE TRIGGER trig_x_bool BEFORE INSERT ON x FOR EACH ROW EXECUTE PROCEDURE trigger_x(true); The docs clearly state what the valid values are and the literal

Re: [HACKERS] time-delayed standbys

2011-05-11 Thread Heikki Linnakangas
On 07.05.2011 16:48, Robert Haas wrote: I was able to reproduce something very like this in unpatched master, just by letting recovery pause at a named restore point, and then resuming it. LOG: recovery stopping at restore point stop, time 2011-05-07 09:28:01.652958-04 LOG: recovery has

Re: [HACKERS] potential bug in trigger with boolean params

2011-05-11 Thread Andres Freund
On Wednesday, May 11, 2011 11:21:34 AM Andres Freund wrote: On Wednesday, May 11, 2011 11:01:56 AM Andreas Joseph Krogh wrote: På onsdag 11. mai 2011 kl 10:56:19 skrev t...@fuzzy.cz: CREATE TRIGGER trig_x_bool BEFORE INSERT ON x FOR EACH ROW EXECUTE PROCEDURE trigger_x(true);

Re: [HACKERS] potential bug in trigger with boolean params

2011-05-11 Thread Szymon Guz
On 11 May 2011 11:01, Andreas Joseph Krogh andr...@officenet.no wrote: På onsdag 11. mai 2011 kl 10:56:19 skrev t...@fuzzy.cz: Hi, I was trying to create a trigger with parameters. I've found a potential bug when the param is boolean. Here is code replicating the bug:

[HACKERS] Re: 4.1beta1: ANYARRAY disallowed for DOMAIN types which happen to be arrays

2011-05-11 Thread Noah Misch
On Mon, May 09, 2011 at 11:32:28PM -0400, Tom Lane wrote: To be concrete, consider the function array_append(anyarray, anyelement) yielding anyarray. Suppose we have a domain D over int[] and the call array_append(var_of_type_D, 42). If we automatically downcast the variable to int[], should

Re: [HACKERS] the big picture for index-only scans

2011-05-11 Thread Nicolas Barbier
2011/5/11, Bruce Momjian br...@momjian.us: FYI, because the visibility map is only one _bit_ per page, it is 8000 * 8 or 64k times smaller than the heap, e.g. one 8k page covers 64MB of heap pages. Actually, that would be one 8kB block covers 512MB of heap: 1 block of visibility map (8kB) =

Re: [HACKERS] potential bug in trigger with boolean params

2011-05-11 Thread Andreas Joseph Krogh
P onsdag 11. mai 2011 kl 11:30:51 skrev Szymon Guz mabew...@gmail.com: On 11 May 2011 11:01, Andreas Joseph Krogh andr...@officenet.no wrote: P onsdag 11. mai 2011 kl 10:56:19 skrev t...@fuzzy.cz: Hi, I was trying to create a trigger with parameters. I've found a potential bug when

Re: [HACKERS] time-delayed standbys

2011-05-11 Thread Heikki Linnakangas
On 11.05.2011 08:29, Fujii Masao wrote: On Sat, May 7, 2011 at 10:48 PM, Robert Haasrobertmh...@gmail.com wrote: I was able to reproduce something very like this in unpatched master, just by letting recovery pause at a named restore point, and then resuming it. I was able to reproduce the

Re: [HACKERS] the big picture for index-only scans

2011-05-11 Thread Cédric Villemain
2011/5/11 Heikki Linnakangas heikki.linnakan...@enterprisedb.com: On 10.05.2011 20:15, Simon Riggs wrote: On Tue, May 10, 2011 at 5:17 PM, Kevin Grittner kevin.gritt...@wicourts.gov  wrote: Simon Riggssi...@2ndquadrant.com  wrote: This topic has been discussed many times, yet I have never

Re: [HACKERS] potential bug in trigger with boolean params

2011-05-11 Thread Andres Freund
On Wednesday, May 11, 2011 11:50:35 AM Szymon Guz wrote: On 11 May 2011 11:29, Andres Freund and...@anarazel.de wrote: On Wednesday, May 11, 2011 11:21:34 AM Andres Freund wrote: On Wednesday, May 11, 2011 11:01:56 AM Andreas Joseph Krogh wrote: På onsdag 11. mai 2011 kl 10:56:19 skrev

Re: [HACKERS] the big picture for index-only scans

2011-05-11 Thread Cédric Villemain
2011/5/10 Kevin Grittner kevin.gritt...@wicourts.gov: Simon Riggs si...@2ndquadrant.com wrote: The typical speed up for non-covered indexes will come when we access a very large table (not in cache) via an index scan that is smaller than a bitmapindex scan. Will we be able to gauge

Re: [HACKERS] potential bug in trigger with boolean params

2011-05-11 Thread Szymon Guz
On 11 May 2011 12:06, Andres Freund and...@anarazel.de wrote: Why do you wan't to use a boolean directly if you can't use it as the type itself anyway? Yep, and this is a really good point :) I wanted to have consistent api, so use true when I have a boolean value. I will use 'true' and add

Re: [HACKERS] Process wakeups when idle and power consumption

2011-05-11 Thread Peter Geoghegan
On 11 May 2011 09:54, Magnus Hagander mag...@hagander.net wrote: If you're doing this Win32 specific, take a look at src/backend/port/win32/signal.c for an example. If you're not doing this win32-specific, I doubt we really want threads to be involved... Well, that seems to be the

Re: [HACKERS] Process wakeups when idle and power consumption

2011-05-11 Thread Heikki Linnakangas
On 11.05.2011 13:34, Peter Geoghegan wrote: On 11 May 2011 09:54, Magnus Hagandermag...@hagander.net wrote: If you're doing this Win32 specific, take a look at src/backend/port/win32/signal.c for an example. If you're not doing this win32-specific, I doubt we really want threads to be

Re: [HACKERS] the big picture for index-only scans

2011-05-11 Thread Robert Haas
On Tue, May 10, 2011 at 9:34 PM, Bruce Momjian br...@momjian.us wrote: Robert Haas wrote: So, what do we need in order to find our way to index-only scans? 1. The visibility map needs to be crash-safe.  The basic idea of index-only scans is that, instead of checking the heap to find out

Re: [HACKERS] the big picture for index-only scans

2011-05-11 Thread Robert Haas
On Tue, May 10, 2011 at 10:29 PM, Tom Lane t...@sss.pgh.pa.us wrote: That will be true only if you intentionally ignore the points Greg raised.  If the table isn't entirely ALL_VISIBLE, then the choice of index will determine the ordering of the actual table probes that occur. There could be

Re: [HACKERS] time-delayed standbys

2011-05-11 Thread Fujii Masao
On Wed, May 11, 2011 at 6:50 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: I think we can just always call ShutdownWalRcv(). It should be gone if the server was promoted while streaming, but that's just an implementation detail of what the promotion code does. There's no

Re: [HACKERS] the big picture for index-only scans

2011-05-11 Thread Robert Haas
On Wed, May 11, 2011 at 3:17 AM, Simon Riggs si...@2ndquadrant.com wrote: Completely agree, but why are you saying that to me? When Tom asks me why I suggest something, nobody tells him its a free software project etc What is the difference here? We're now 40 emails in this thread, and

Re: [HACKERS] Feature proposal: distinguish each PostgreSQL instance in the event log

2011-05-11 Thread MauMau
From: Dave Page dp...@pgadmin.org On Tue, May 10, 2011 at 11:55 PM, Tom Lane t...@sss.pgh.pa.us wrote: BTW, what will this accomplish exactly that couldn't be accomplished by setting log_line_prefix to include the desired identifier? Windows uses the event source field to show where events in

Re: [HACKERS] time-delayed standbys

2011-05-11 Thread Heikki Linnakangas
On 11.05.2011 14:16, Fujii Masao wrote: On Wed, May 11, 2011 at 6:50 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: I think we can just always call ShutdownWalRcv(). It should be gone if the server was promoted while streaming, but that's just an implementation detail of

Re: [HACKERS] VARIANT / ANYTYPE datatype

2011-05-11 Thread Robert Haas
On Tue, May 10, 2011 at 10:29 PM, Joseph Adams joeyadams3.14...@gmail.com wrote: It seems to me a reasonable way to implement VARIANT would be to have a data type called VARIANT that stores an OID of the inner type at the beginning, followed by the binary data. That's likely to be how it gets

[HACKERS] Patch to allow domains over composite types

2011-05-11 Thread Yeb Havinga
typecmds.c says: Domains over composite types might be made to work in the future, but not today. Attached is a patch that allows domains over composite types, together with test cases in domaincomp.sql. A domain over a composite type has typtype TYPTYPE_DOMAIN, but typrelid and typrelkind

Re: [HACKERS] crash-safe visibility map, take five

2011-05-11 Thread Pavan Deolasee
On Tue, May 10, 2011 at 7:38 PM, Robert Haas robertmh...@gmail.com wrote: On Tue, May 10, 2011 at 9:45 AM, Merlin Moncure mmonc...@gmail.com wrote: I see: here's a comment that was throwing me off: + /* +* If we didn't get the lock and it turns out we need it, we'll have to

Re: [HACKERS] VARIANT / ANYTYPE datatype

2011-05-11 Thread Andrew Dunstan
On 05/11/2011 07:53 AM, Robert Haas wrote: On Tue, May 10, 2011 at 10:29 PM, Joseph Adams joeyadams3.14...@gmail.com wrote: It seems to me a reasonable way to implement VARIANT would be to have a data type called VARIANT that stores an OID of the inner type at the beginning, followed by the

Re: [HACKERS] the big picture for index-only scans

2011-05-11 Thread Bruce Momjian
Nicolas Barbier wrote: 2011/5/11, Bruce Momjian br...@momjian.us: FYI, because the visibility map is only one _bit_ per page, it is 8000 * 8 or 64k times smaller than the heap, e.g. one 8k page covers 64MB of heap pages. Actually, that would be one 8kB block covers 512MB of heap: 1

Re: [HACKERS] the big picture for index-only scans

2011-05-11 Thread Bruce Momjian
Simon Riggs wrote: On Wed, May 11, 2011 at 1:47 AM, Bruce Momjian br...@momjian.us wrote: Greg Stark wrote: On a separate note though, Simon, I don't know what you mean by we normally start with a problem. It's an free software project and people are free to work on whatever interests

Re: [HACKERS] Re: 4.1beta1: ANYARRAY disallowed for DOMAIN types which happen to be arrays

2011-05-11 Thread Tom Lane
Noah Misch n...@leadboat.com writes: On Mon, May 09, 2011 at 11:32:28PM -0400, Tom Lane wrote: So we basically had three alternatives to make it better: * downcast to the array type, which would possibly silently break applications that were relying on the function result

Re: [HACKERS] the big picture for index-only scans

2011-05-11 Thread Bruce Momjian
C?dric Villemain wrote: 2011/5/10 Kevin Grittner kevin.gritt...@wicourts.gov: Simon Riggs si...@2ndquadrant.com wrote: The typical speed up for non-covered indexes will come when we access a very large table (not in cache) via an index scan that is smaller than a bitmapindex scan. Will we

Re: [HACKERS] PGC_S_DEFAULT is inadequate

2011-05-11 Thread Greg Stark
On Wed, May 11, 2011 at 3:20 AM, Tom Lane t...@sss.pgh.pa.us wrote: So this is fine if the current value was from the file or was the boot_val, but if we'd overridden the boot value with a replacement default value using PGC_S_DEFAULT, that code would cause the value to revert to the boot_val

Re: [HACKERS] the big picture for index-only scans

2011-05-11 Thread Kevin Grittner
Bruce Momjian br...@momjian.us wrote: The very fact that Kevin and yourself bring up different reasons for why we need this feature makes me nervous. Yes, no question. For count(*), you don't care about the indexed values, only the count, while for Kevin's case you are reading values

Re: [HACKERS] the big picture for index-only scans

2011-05-11 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: On 10.05.2011 20:15, Simon Riggs wrote: I can picture that. Regrettably, I can also picture the accesses to the visibility map, the maintenance operations on the VM that are needed for this and the contention that both of those

[HACKERS] Fix for bug in ldapServiceLookup in libpq

2011-05-11 Thread Albe Laurenz
I have found a small but annoying bug in libpq where connection parameters are resolved via LDAP. There is a write past the end of a malloc'ed string which causes memory corruption. The code and the bug are originally by me :^( The attached patch fixes the problem in HEAD. This should be

Re: [HACKERS] the big picture for index-only scans

2011-05-11 Thread Bruce Momjian
Tom Lane wrote: Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: On 10.05.2011 20:15, Simon Riggs wrote: I can picture that. Regrettably, I can also picture the accesses to the visibility map, the maintenance operations on the VM that are needed for this and the contention

Re: [HACKERS] PGC_S_DEFAULT is inadequate

2011-05-11 Thread Tom Lane
Greg Stark gsst...@mit.edu writes: On Wed, May 11, 2011 at 3:20 AM, Tom Lane t...@sss.pgh.pa.us wrote: So this is fine if the current value was from the file or was the boot_val, but if we'd overridden the boot value with a replacement default value using PGC_S_DEFAULT, that code would cause

Re: [HACKERS] hint bit cache v5

2011-05-11 Thread Merlin Moncure
On Tue, May 10, 2011 at 11:59 AM, Simon Riggs si...@2ndquadrant.com wrote: On Mon, May 9, 2011 at 5:12 PM, Merlin Moncure mmonc...@gmail.com wrote: I'd like to know if this is a strategy that merits further work...If anybody has time/interest that is.  It's getting close to the point where I

Re: [HACKERS] VARIANT / ANYTYPE datatype

2011-05-11 Thread Joseph Adams
On Wed, May 11, 2011 at 7:53 AM, Robert Haas robertmh...@gmail.com wrote: That's likely to be how it gets implemented, but you seem to have missed the point of some of the discussion upthread: the big problem with that is that someone might type DROP TYPE foo, and when they do, you need an

Re: [HACKERS] Fix for bug in ldapServiceLookup in libpq

2011-05-11 Thread Tom Lane
Albe Laurenz laurenz.a...@wien.gv.at writes: I have found a small but annoying bug in libpq where connection parameters are resolved via LDAP. There is a write past the end of a malloc'ed string which causes memory corruption. The code and the bug are originally by me :^( Hmm ... that's a

Re: [HACKERS] the big picture for index-only scans

2011-05-11 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: I think Simon's point is that showing a gain on specific test cases isn't a sufficient argument. Ah, if that's what he's been trying to get at, I'm curious who disagrees with that. I wouldn't have thought anyone on this list would. What we need to know

Re: [HACKERS] VARIANT / ANYTYPE datatype

2011-05-11 Thread Alvaro Herrera
Excerpts from Simon Riggs's message of mar may 10 17:57:20 -0400 2011: On Wed, May 4, 2011 at 5:58 PM, Alvaro Herrera alvhe...@alvh.no-ip.org wrote: both Oracle and MS-SQL have it Do they? What types are they called? ANYTYPE -- Álvaro Herrera alvhe...@commandprompt.com The PostgreSQL

Re: [HACKERS] VARIANT / ANYTYPE datatype

2011-05-11 Thread Robert Haas
On Wed, May 11, 2011 at 11:43 AM, Joseph Adams joeyadams3.14...@gmail.com wrote: On Tue, May 10, 2011 at 5:19 PM, Darren Duncan dar...@darrenduncan.net wrote: Examples of open union types could be number, which all the numeric types compose, and so you can know say that you can use the

Re: [HACKERS] Fix for bug in ldapServiceLookup in libpq

2011-05-11 Thread Tom Lane
... btw, shouldn't this function free the result string when it's done with it? AFAICS that string is not returned to the caller, it's just being leaked. (I'll refrain from asking why it's creating the string in the first place rather than parsing ldap_get_values_len's output as-is ...)

Re: [HACKERS] hint bit cache v5

2011-05-11 Thread Merlin Moncure
On Wed, May 11, 2011 at 10:38 AM, Merlin Moncure mmonc...@gmail.com wrote: One thing I need to test is how much benefit you'll see with wider records. The results are a bit better, around 25% using a similar methodology on ~ 1k wide records. I think I'm gonna revert the change to cache invalid

[HACKERS] Standbys which don't synch to disk?

2011-05-11 Thread Josh Berkus
Fujii, Simon, For 9.1, both master and replica in a sync replication relationship are required to be fsync'ing to disk. I understand why we had to do that for our first cut at synch rep. Do you think, though, that it might become possible to replicate without synch-to-disk for 9.2? The use

Re: [HACKERS] Standbys which don't synch to disk?

2011-05-11 Thread Robert Haas
On Wed, May 11, 2011 at 1:12 PM, Josh Berkus j...@agliodbs.com wrote: For 9.1, both master and replica in a sync replication relationship are required to be fsync'ing to disk.  I understand why we had to do that for our first cut at synch rep.  Do you think, though, that it might become

Re: [HACKERS] potential bug in trigger with boolean params

2011-05-11 Thread Tom Lane
Andres Freund and...@anarazel.de writes: The grammar accepts only a very limited amount of parameters there: Err TriggerFuncArg: Iconst { char buf[64]; snprintf(buf, sizeof(buf), %d, $1); $$ =

Re: [HACKERS] Standbys which don't synch to disk?

2011-05-11 Thread Josh Berkus
It's already possible to set fsync=off on the standby if you want. If there is an OS-level crash you'll need to rebuild the standby, but in some cases that may be acceptable. Yes, generally if there's an OS-level crash on cloud hosting, you've lost the instance anyway. And Simon has

[HACKERS] pg_upgrade and PGPORT

2011-05-11 Thread Peter Eisentraut
pg_upgrade is a bit schizophrenic concerning the PGPORT environment variable. On the one hand, there is this code in option.c that wants to make use of it: old_cluster.port = getenv(PGPORT) ? atoi(getenv(PGPORT)) : DEF_PGPORT; new_cluster.port = getenv(PGPORT) ? atoi(getenv(PGPORT)) :

Re: [HACKERS] hint bit cache v5

2011-05-11 Thread Simon Riggs
On Wed, May 11, 2011 at 4:38 PM, Merlin Moncure mmonc...@gmail.com wrote: Following are results that are fairly typical of the benefits you might see when the optimization kicks in.  The attached benchmark just [hbcache] real    3m35.549s [HEAD] real    4m24.216s These numbers look very

Re: [HACKERS] pg_upgrade and PGPORT

2011-05-11 Thread Bruce Momjian
Peter Eisentraut wrote: pg_upgrade is a bit schizophrenic concerning the PGPORT environment variable. On the one hand, there is this code in option.c that wants to make use of it: old_cluster.port = getenv(PGPORT) ? atoi(getenv(PGPORT)) : DEF_PGPORT; new_cluster.port =

Re: [HACKERS] potential bug in trigger with boolean params

2011-05-11 Thread Andres Freund
On Wednesday, May 11, 2011 07:25:58 PM Tom Lane wrote: Andres Freund and...@anarazel.de writes: The grammar accepts only a very limited amount of parameters there: Err TriggerFuncArg: Iconst {

Re: [HACKERS] Standbys which don't synch to disk?

2011-05-11 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: It's already possible to set fsync=off on the standby if you want. If there is an OS-level crash you'll need to rebuild the standby, but in some cases that may be acceptable. ... The one other thing would be the ability not to fsync the master, which

Re: [HACKERS] potential bug in trigger with boolean params

2011-05-11 Thread Tom Lane
Andres Freund and...@anarazel.de writes: Is there a special reason for not using the normal function calling mechanisms? It looks to me as it was just done to have an easy way to store it in pg_trigger.tgargs. Well, this is all very historical, dating from Berkeley days AFAIK. If we had it

Re: [HACKERS] pg_upgrade and PGPORT

2011-05-11 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: A larger question is whether we should just disable all the checks for environment variables. The C comment says: * check_for_libpq_envvars() * * tests whether any libpq environment variables are set. * Since pg_upgrade connects to both the old

Re: [HACKERS] pg_upgrade and PGPORT

2011-05-11 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian br...@momjian.us writes: A larger question is whether we should just disable all the checks for environment variables. The C comment says: * check_for_libpq_envvars() * * tests whether any libpq environment variables are set. * Since pg_upgrade

Re: [HACKERS] hint bit cache v5

2011-05-11 Thread Merlin Moncure
On Wed, May 11, 2011 at 12:40 PM, Simon Riggs si...@2ndquadrant.com wrote: On Wed, May 11, 2011 at 4:38 PM, Merlin Moncure mmonc...@gmail.com wrote: Following are results that are fairly typical of the benefits you might see when the optimization kicks in.  The attached benchmark just

[HACKERS] Tables cannot have INSTEAD OF triggers

2011-05-11 Thread Peter Eisentraut
Why not? Is there a fundamental problem, or just that no one wanted to make it work? -- 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] pg_upgrade and PGPORT

2011-05-11 Thread Robert Haas
On Wed, May 11, 2011 at 2:18 PM, Tom Lane t...@sss.pgh.pa.us wrote: Or you could just unsetenv instead of complaining. +1 for that. I would like to think that eventually pg_upgrade won't start a postmaster at all, but connect using something more like a standalone backend.  So someday the

Re: [HACKERS] Standbys which don't synch to disk?

2011-05-11 Thread Josh Berkus
Robert, That WAL has effectively disappeared from the master, but is still present on the slave. Now the master comes up and starts processing read-write transactions again, and generates a new and different 1kB of WAL. Hilarity ensues, because the two machines are now out of step

Re: [HACKERS] Unfriendly handling of pg_hba SSL options with SSL off

2011-05-11 Thread Magnus Hagander
On Tue, May 10, 2011 at 05:39, Tom Lane t...@sss.pgh.pa.us wrote: Bruce Momjian br...@momjian.us writes: Late reply, but we are basically ignoring 'local' lines if the build doesn't support unix domain sockets (windows), but throwing an error for hostssl usage if ssl is not compiled in.  Is

Re: [HACKERS] Tables cannot have INSTEAD OF triggers

2011-05-11 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: Why not? Is there a fundamental problem, or just that no one wanted to make it work? I'm fairly sure there was a substantive issue, but memory fails as to what it was. You could try removing the error check and see what breaks ...

Re: [HACKERS] VARIANT / ANYTYPE datatype

2011-05-11 Thread Darren Duncan
Robert Haas wrote: On Wed, May 11, 2011 at 11:43 AM, Joseph Adams joeyadams3.14...@gmail.com wrote: On Tue, May 10, 2011 at 5:19 PM, Darren Duncan dar...@darrenduncan.net wrote: Examples of open union types could be number, which all the numeric types compose, and so you can know say that you

Re: [HACKERS] Re: 4.1beta1: ANYARRAY disallowed for DOMAIN types which happen to be arrays

2011-05-11 Thread Noah Misch
On Wed, May 11, 2011 at 10:22:01AM -0400, Tom Lane wrote: Noah Misch n...@leadboat.com writes: On Mon, May 09, 2011 at 11:32:28PM -0400, Tom Lane wrote: So we basically had three alternatives to make it better: * downcast to the array type, which would possibly silently break

Re: [HACKERS] VARIANT / ANYTYPE datatype

2011-05-11 Thread Darren Duncan
To follow-up my earlier comments ... I suspect for practical purposes we may want to limit the scope of some type features. For example, the greatest benefits for open union / mixin types is with routines/operators, not so much with tables. So, Pg could choose to support open unions but

Re: [HACKERS] Patch to allow domains over composite types

2011-05-11 Thread Robert Haas
On Wed, May 11, 2011 at 8:07 AM, Yeb Havinga yebhavi...@gmail.com wrote: typecmds.c says: Domains over composite types might be made to work in the future, but not today. Attached is a patch that allows domains over composite types, together with test cases in domaincomp.sql. A domain over a

Re: [HACKERS] Collation mega-cleanups

2011-05-11 Thread Peter Eisentraut
On mån, 2011-05-09 at 14:58 -0400, Bruce Momjian wrote: Tom this collation stuff has seen more post-feature-commit cleanups than I think any patch I remember. Is there anything we can learn from this? Don't do big patches? Seriously, it looks pretty bad, but this is one of the biggest

Re: [HACKERS] Backpatching of Teach the regular expression functions to do case-insensitive matching

2011-05-11 Thread Peter Eisentraut
On tis, 2011-05-10 at 18:05 -0400, Tom Lane wrote: The lack of initdb support for getting more-or-less-standard collation entries into pg_collation on Windows seems to be the major missing piece from here (dunno if Peter is aware of others). If we don't fix that before release, we're going to

Re: [HACKERS] Collation mega-cleanups

2011-05-11 Thread Bruce Momjian
Peter Eisentraut wrote: from that? The bigger your patch, the lonelier you are. I can attest to that. -- Bruce Momjian br...@momjian.ushttp://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + -- Sent

Re: [HACKERS] Collation mega-cleanups

2011-05-11 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: Seriously, it looks pretty bad, but this is one of the biggest feature patches in the last 5 years, it touches many places all over the system, and there is a reason why this topic has been on the TODO list for 10 years: it's overwhelming. Yeah. I did

Re: [HACKERS] Backpatching of Teach the regular expression functions to do case-insensitive matching

2011-05-11 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On tis, 2011-05-10 at 18:05 -0400, Tom Lane wrote: The lack of initdb support for getting more-or-less-standard collation entries into pg_collation on Windows seems to be the major missing piece from here (dunno if Peter is aware of others). If we

Re: [HACKERS] VARIANT / ANYTYPE datatype

2011-05-11 Thread Tom Lane
Darren Duncan dar...@darrenduncan.net writes: But I'm just citing numeric as an example; there would be a lot more in practice, potentially one for every individual type, so for example if operators were defined for the open union rather than for the base type, then users/extensions could

Re: [HACKERS] Extension Packaging

2011-05-11 Thread David E. Wheeler
On Apr 28, 2011, at 2:16 PM, David E. Wheeler wrote: So maybe it's half-assed. Maybe the version can be anything but the revision must be an integer. Maybe there's a `pg_extension_version($extension_name)` function that returns ARRAY[$version, $revision], and the revision is set in the

Re: [HACKERS] Backpatching of Teach the regular expression functions to do case-insensitive matching

2011-05-11 Thread Peter Eisentraut
On ons, 2011-05-11 at 16:47 -0400, Tom Lane wrote: Hm, do you know how to enumerate the available locales on Windows? EnumSystemLocalesEx() Reference: http://msdn.microsoft.com/en-us/library/dd317829(v=vs.85).aspx Example: http://msdn.microsoft.com/en-us/library/dd319091(v=vs.85).aspx As you

Re: [HACKERS] Backpatching of Teach the regular expression functions to do case-insensitive matching

2011-05-11 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On ons, 2011-05-11 at 16:47 -0400, Tom Lane wrote: Hm, do you know how to enumerate the available locales on Windows? EnumSystemLocalesEx() Reference: http://msdn.microsoft.com/en-us/library/dd317829(v=vs.85).aspx Example:

[HACKERS] performance-test farm

2011-05-11 Thread Tomas Vondra
Hi everyone, several members of this mailing list mentioned recently it'd be really useful to have a performance-test farm, that it might improve the development process and make some changes easier. I've briefly discussed this with another CSPUG member, who represents a local company using

Re: [HACKERS] performance-test farm

2011-05-11 Thread Kevin Grittner
Tomas Vondra t...@fuzzy.cz wrote: 1) Is there something that might serve as a model? I've been assuming that we would use the PostgreSQL Buildfarm as a model. http://buildfarm.postgresql.org/ 2) How would you use it? What procedure would you expect? People who had suitable test

Re: [HACKERS] Extension Packaging

2011-05-11 Thread Robert Haas
On Wed, May 11, 2011 at 5:06 PM, David E. Wheeler da...@kineticode.com wrote: On Apr 28, 2011, at 2:16 PM, David E. Wheeler wrote: So maybe it's half-assed. Maybe the version can be anything but the revision must be an integer. Maybe there's a `pg_extension_version($extension_name)`

Re: [HACKERS] performance-test farm

2011-05-11 Thread Tomas Vondra
Dne 11.5.2011 23:41, Kevin Grittner napsal(a): Tomas Vondra t...@fuzzy.cz wrote: 1) Is there something that might serve as a model? I've been assuming that we would use the PostgreSQL Buildfarm as a model. http://buildfarm.postgresql.org/ Yes, I was thinking about that too, but 1)

Re: [HACKERS] Prefered Types

2011-05-11 Thread Alvaro Herrera
Excerpts from Tom Lane's message of dom may 08 23:00:27 -0400 2011: For example, if you start noticing an occasional integer overflow that didn't happen before, it might be pretty darn difficult to figure out that the problem is that an operation that was formerly resolved as int4 + int4 is

Re: [HACKERS] XML with invalid chars

2011-05-11 Thread Andrew Dunstan
On 05/09/2011 11:25 PM, Noah Misch wrote: I see you've gone with doing it unconditionally. I'd lean toward testing the library in pg_xml_init and setting a flag indicating whether we need the extra pass. However, a later patch can always optimize that. I wasn't terribly keen on the

Re: [HACKERS] performance-test farm

2011-05-11 Thread Kevin Grittner
Tomas Vondra t...@fuzzy.cz wrote: Dne 11.5.2011 23:41, Kevin Grittner napsal(a): Tomas Vondra t...@fuzzy.cz wrote: 1) Is there something that might serve as a model? I've been assuming that we would use the PostgreSQL Buildfarm as a model. http://buildfarm.postgresql.org/ Yes, I

Re: [HACKERS] pg_upgrade and PGPORT

2011-05-11 Thread Bruce Momjian
Robert Haas wrote: On Wed, May 11, 2011 at 2:18 PM, Tom Lane t...@sss.pgh.pa.us wrote: Or you could just unsetenv instead of complaining. +1 for that. OK, the attached patch does this, but allows PGCLIENTENCODING to be passed in. The new output looks like: Performing Consistency

Re: [HACKERS] performance-test farm

2011-05-11 Thread Tomas Vondra
Dne 12.5.2011 00:21, Kevin Grittner napsal(a): Tomas Vondra t...@fuzzy.cz wrote: Dne 11.5.2011 23:41, Kevin Grittner napsal(a): Tomas Vondra t...@fuzzy.cz wrote: 1) Is there something that might serve as a model? I've been assuming that we would use the PostgreSQL Buildfarm as a model.

Re: [HACKERS] performance-test farm

2011-05-11 Thread Andrew Dunstan
On 05/11/2011 06:21 PM, Kevin Grittner wrote: Tomas Vondrat...@fuzzy.cz wrote: Dne 11.5.2011 23:41, Kevin Grittner napsal(a): Tomas Vondrat...@fuzzy.cz wrote: First up, you guys should be aware that Greg Smith at least is working on this. Let's not duplicate effort. 1) Is there

Re: [HACKERS] XML with invalid chars

2011-05-11 Thread Noah Misch
On Wed, May 11, 2011 at 06:17:07PM -0400, Andrew Dunstan wrote: On 05/09/2011 11:25 PM, Noah Misch wrote: SELECT xmlcomment(E'\ufffe'); That's a bit harder. Do we want to extend these checks to cover surrogates and end of plane characters, which are the remaining forbidden chars? It

[HACKERS] Help: regarding patch development

2011-05-11 Thread nil nil
Hello,   Sir, i want to develop a service for postgresql related to querry processing.but i dont know how to develop it. plz guide me so that i can take step. i will be realy thankful to you.   Regards Emman

Re: [HACKERS] XML with invalid chars

2011-05-11 Thread Andrew Dunstan
On 05/11/2011 07:00 PM, Noah Misch wrote: On Wed, May 11, 2011 at 06:17:07PM -0400, Andrew Dunstan wrote: On 05/09/2011 11:25 PM, Noah Misch wrote: SELECT xmlcomment(E'\ufffe'); That's a bit harder. Do we want to extend these checks to cover surrogates and end of plane characters, which are

Re: [HACKERS] performance-test farm

2011-05-11 Thread Stephen Frost
* Andrew Dunstan (and...@dunslane.net) wrote: First up, you guys should be aware that Greg Smith at least is working on this. Let's not duplicate effort. Indeed. I'm also interested in making this happen and have worked with Greg in the past on it. There's even some code out there that we

  1   2   >