Re: [HACKERS] Add FET to Default and Europe.txt

2012-10-08 Thread Simon Riggs
On 6 October 2012 22:40, Tom Lane t...@sss.pgh.pa.us wrote: Thus for example MSK apparently now means GMT+4 not GMT+3. We can change the tznames entry for that, but should we get rid of MSD entirely? Some input from the Russians on this list would be helpful. ... Comments? It shouldn't be

Re: [HACKERS] Rethinking placement of latch self-pipe initialization

2012-10-08 Thread Simon Riggs
On 7 October 2012 18:27, Tom Lane t...@sss.pgh.pa.us wrote: Sean Chittenden recently reported that 9.2 can crash after logging FATAL: pipe() failed if the kernel is short of file descriptors: http://archives.postgresql.org/pgsql-general/2012-10/msg00202.php The only match to that error text

Re: [HACKERS] Bad Data back Door

2012-10-08 Thread Albe Laurenz
Tom Lane wrote: David E. Wheeler da...@justatheory.com writes: On Oct 5, 2012, at 6:12 PM, Tom Lane t...@sss.pgh.pa.us wrote: Now, having said that, I think it has to be the reponsibility of the FDW to apply any required check ... which makes this a bug report against oracle_fdw, not the core

Re: [HACKERS] Bad Data back Door

2012-10-08 Thread David E. Wheeler
On Oct 8, 2012, at 12:25 AM, Albe Laurenz laurenz.a...@wien.gv.at wrote: As the author I agree that this is a bug in oracle_fdw. Thanks. Should I file a report somewhere? This was caused by ignorance on my part: I had assumed that the type input functions would perform the necessary checks,

Re: [HACKERS] Add FET to Default and Europe.txt

2012-10-08 Thread Heikki Linnakangas
On 08.10.2012 10:03, Simon Riggs wrote: On 6 October 2012 22:40, Tom Lanet...@sss.pgh.pa.us wrote: Thus for example MSK apparently now means GMT+4 not GMT+3. We can change the tznames entry for that, but should we get rid of MSD entirely? Some input from the Russians on this list would be

Re: [HACKERS] Improving psql \ds

2012-10-08 Thread Julien Tachoires
2012/10/8 Tom Lane t...@sss.pgh.pa.us: Julien Tachoires jul...@gmail.com writes: About \ds behaviour, I think to add 2 columns : - 'LastValue' - 'Increment' That would make the command a great deal slower, since it would have to access each sequence to get that info. I don't object to

Re: [HACKERS] Add FET to Default and Europe.txt

2012-10-08 Thread Simon Riggs
On 8 October 2012 09:05, Heikki Linnakangas hlinnakan...@vmware.com wrote: * Make the tz file configurable, so people can be more explicit about what *they* mean by certain codes, to avoid the need for choosing between countries. For example, someone may have hardcoded particular codes with

Re: [HACKERS] Add FET to Default and Europe.txt

2012-10-08 Thread Marc Balmer
Am 08.10.12 11:07, schrieb Simon Riggs: On 8 October 2012 09:05, Heikki Linnakangas hlinnakan...@vmware.com wrote: * Make the tz file configurable, so people can be more explicit about what *they* mean by certain codes, to avoid the need for choosing between countries. For example, someone

Re: [HACKERS] Add FET to Default and Europe.txt

2012-10-08 Thread Simon Riggs
On 8 October 2012 11:14, Marc Balmer m...@msys.ch wrote: So I think we need 2 new settings: one called Postgres92, one called Postgres93. 93 has the new settings and is the default. Default would no longer map to anything, to make sure we have an explicit break of compatibility. Removing

Re: [HACKERS] more suitable messages for analyze on hot standby.

2012-10-08 Thread Heikki Linnakangas
On 08.10.2012 04:04, Tomonari Katsumata wrote: I work with streaming replication and hot standby. And I noticed that error message is not proper when I issue ANALYZE command to standby. ... This is not big problem, but error message should report actual thing. please check it. Thanks,

Re: Promoting a standby during base backup (was Re: [HACKERS] Switching timeline over streaming replication)

2012-10-08 Thread Heikki Linnakangas
On 04.10.2012 20:07, Fujii Masao wrote: On Thu, Oct 4, 2012 at 4:59 PM, Heikki Linnakangas But I wonder why promoting a standby renders the backup invalid in the first place? Fujii, Simon, can you explain that? Simon had the same question and I answered it before.

Re: [HACKERS] Libxml2 load error on Windows

2012-10-08 Thread Noah Misch
On Mon, Jun 18, 2012 at 02:08:29PM +0500, Talha Bin Rizwan 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 Therefore, I used first approach to get libxml2 version

[HACKERS] PQntuples and PQgetvalue problem.

2012-10-08 Thread zafer yagmuroglu
Hello, In my C++ program, i want to partition sql table, there is sample code below. It is working right. the problem is after func called 2 or 3 times in func1, PQntuples results 0 although tablename exist. Also when i disabled PQntuples at if statement, other psql function PQgetvalue(res)

Re: [HACKERS] Visual Studio 2012 RC

2012-10-08 Thread Noah Misch
On Sun, Oct 07, 2012 at 08:30:22PM +0200, Brar Piening wrote: Noah Misch wrote: I'm marking this patch Waiting on Author, but the changes needed to get it Ready for Committer are fairly trivial. Thanks, nm Thanks for your review and sorry for my delayed response - I've been on vacation.

Re: Promoting a standby during base backup (was Re: [HACKERS] Switching timeline over streaming replication)

2012-10-08 Thread Simon Riggs
On 4 October 2012 18:07, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Oct 4, 2012 at 4:59 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 03.10.2012 18:15, Amit Kapila wrote: On Tuesday, October 02, 2012 4:21 PM Heikki Linnakangas wrote: Hmm, should a base backup be aborted

Re: [HACKERS] sortsupport for text

2012-10-08 Thread Peter Geoghegan
Do you think you can follow through on this soon, Robert? I don't believe that there are any outstanding issues. I'm not going to make an issue of the fact that strxfrm() hasn't been taken advantage of. If you could please post a new revision, with the suggested alterations (that you agree with),

Re: [HACKERS] Regarding identifying a foreign scan

2012-10-08 Thread Merlin Moncure
On Sun, Oct 7, 2012 at 10:29 AM, Tom Lane t...@sss.pgh.pa.us wrote: Atri Sharma atri.j...@gmail.com writes: Does that mean that using (some) global storage is the cause of the problem? If you're using global storage for state that needs to be replicated per-scan, yes, probably. But it's hard

[HACKERS] odd alter_generic regression failures

2012-10-08 Thread Andrew Dunstan
We seem to have an intermittent failure on the alter_generic tests that look like this: SET SESSION AUTHORIZATION regtest_alter_user1; CREATE FUNCTION alt_func1(int) RETURNS int LANGUAGE sql AS 'SELECT $1 + 1'; + ERROR: permission denied for language sql CREATE

Re: [HACKERS] Deparsing DDL command strings

2012-10-08 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: going to be required below that ... but the point I'm trying to make is that it would be a one-and-done task. Adding a requirement to be able to decompile raw parse trees will be a permanent drag on every type of SQL feature addition. I'll show some

Re: [HACKERS] [COMMITTERS] pgsql: Disable _FORTIFY_SOURCE with ICC

2012-10-08 Thread Peter Geoghegan
On 5 October 2012 04:37, Tom Lane t...@sss.pgh.pa.us wrote: A bit later: testing on an F17 box (glibc-2.15-56.fc17.x86_64) confirms Peter G's complaint, and also confirms that putting the above into port/linux.h (instead of the template file) fixes the problem. Don't know how to disable it on

Re: [HACKERS] Rethinking placement of latch self-pipe initialization

2012-10-08 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: We still have to consider how Postgres would operate without the latches. I don't see that it can, so a shutdown seems appropriate. Is the purpose of this just to allow a cleaner and more informative shutdown? Or do you think we can avoid? The point

Re: [HACKERS] enhanced error fields

2012-10-08 Thread Peter Geoghegan
On 20 August 2012 14:09, Pavel Stehule pavel.steh...@gmail.com wrote: (eelog-2012-08-20.diff) This patch has the following reference to relerror.c: *** a/src/include/utils/rel.h --- b/src/include/utils/rel.h *** *** 394,397 typedef struct StdRdOptions --- 394,402

Re: [HACKERS] [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown

2012-10-08 Thread Robert Haas
On Thu, Oct 4, 2012 at 6:12 AM, Amit kapila amit.kap...@huawei.com wrote: 1. One new configuration parameter wal_receiver_timeout is added to detect timeout at receiver task. 2. Existing parameter replication_timeout is renamed to wal_sender_timeout. -1 from me on a backward compatibility

Re: [HACKERS] Missing OID define

2012-10-08 Thread Robert Haas
On Fri, Oct 5, 2012 at 3:32 AM, Albe Laurenz laurenz.a...@wien.gv.at wrote: Phil Sorber wrote: Thom Brown and I were doing some hacking the other day and came across this missing define. We argued over who was going to send the patch in and I lost. So here it is. +1 I have been missing

[HACKERS] why can't plpgsql return a row-expression?

2012-10-08 Thread Robert Haas
Hi, PL/pgsql seems to have a strange restriction regarding RETURN. Normally, you can write RETURN expression. But if the function returns a row type, then you can only write RETURN variable or RETURN NULL. rhaas=# create type xyz as (a int, b int); CREATE TYPE rhaas=# select row(1,2)::xyz;

Re: [HACKERS] [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown

2012-10-08 Thread Amit Kapila
On Monday, October 08, 2012 7:38 PM Robert Haas wrote: On Thu, Oct 4, 2012 at 6:12 AM, Amit kapila amit.kap...@huawei.com wrote: 1. One new configuration parameter wal_receiver_timeout is added to detect timeout at receiver task. 2. Existing parameter replication_timeout is renamed to

Re: [HACKERS] Improving psql \ds

2012-10-08 Thread Robert Haas
On Mon, Oct 8, 2012 at 3:49 AM, Julien Tachoires jul...@gmail.com wrote: 2012/10/8 Tom Lane t...@sss.pgh.pa.us: Julien Tachoires jul...@gmail.com writes: About \ds behaviour, I think to add 2 columns : - 'LastValue' - 'Increment' That would make the command a great deal slower, since it

Re: [HACKERS] Improving psql \ds

2012-10-08 Thread Tom Lane
Julien Tachoires jul...@gmail.com writes: 2012/10/8 Tom Lane t...@sss.pgh.pa.us: The other problem you're going to have here is that there is in fact no such command as \ds (nor \ds+); rather, it's a special case of \dtsvi. As such, putting any relkind-specific info into the result is

Re: [HACKERS] Improving psql \ds

2012-10-08 Thread Julien Tachoires
2012/10/8 Robert Haas robertmh...@gmail.com: On Mon, Oct 8, 2012 at 3:49 AM, Julien Tachoires jul...@gmail.com wrote: 2012/10/8 Tom Lane t...@sss.pgh.pa.us: Julien Tachoires jul...@gmail.com writes: About \ds behaviour, I think to add 2 columns : - 'LastValue' - 'Increment' That would make

Re: [HACKERS] why can't plpgsql return a row-expression?

2012-10-08 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: ERROR: RETURN must specify a record or row variable in function returning row Off the top of my head, I can't think of any reason for this restriction, nor can I find any code comments or anything in the commit log which explains the reason for it.

Re: [HACKERS] Add FET to Default and Europe.txt

2012-10-08 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Could we pull an abbreviation list from one of the BSDs? And that would be authoritative why? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Add FET to Default and Europe.txt

2012-10-08 Thread Bruce Momjian
On Mon, Oct 8, 2012 at 11:10:08AM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Could we pull an abbreviation list from one of the BSDs? And that would be authoritative why? It would be somone else maintaining it. :-) -- Bruce Momjian br...@momjian.us

Re: [HACKERS] Add FET to Default and Europe.txt

2012-10-08 Thread Marc Balmer
Am 08.10.12 16:53, schrieb Bruce Momjian: On Mon, Oct 8, 2012 at 12:14:15PM +0200, Marc Balmer wrote: A good starting point would be to take the timezone information directly from the the files IANA distributes, instead of manually copying and maintaining them in a separate file. If no one

Re: [HACKERS] Add FET to Default and Europe.txt

2012-10-08 Thread Bruce Momjian
On Mon, Oct 8, 2012 at 05:15:18PM +0200, Marc Balmer wrote: Am 08.10.12 16:53, schrieb Bruce Momjian: On Mon, Oct 8, 2012 at 12:14:15PM +0200, Marc Balmer wrote: A good starting point would be to take the timezone information directly from the the files IANA distributes, instead of

Re: [HACKERS] Improving psql \ds

2012-10-08 Thread Julien Tachoires
2012/10/8 Tom Lane t...@sss.pgh.pa.us: Julien Tachoires jul...@gmail.com writes: 2012/10/8 Tom Lane t...@sss.pgh.pa.us: The other problem you're going to have here is that there is in fact no such command as \ds (nor \ds+); rather, it's a special case of \dtsvi. As such, putting any

Re: [HACKERS] Add FET to Default and Europe.txt

2012-10-08 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: Sorry for any confusion. I've not suggested removing timezone abbreviations, nor do I wish to do so. I did suggest that we do not rely upon TZ abbreviations in any code shipped by PostgreSQL project, but I suspect that is a non-problem anyway. No,

Re: [HACKERS] sortsupport for text

2012-10-08 Thread Robert Haas
On Mon, Oct 8, 2012 at 8:47 AM, Peter Geoghegan pe...@2ndquadrant.com wrote: Do you think you can follow through on this soon, Robert? I don't believe that there are any outstanding issues. I'm not going to make an issue of the fact that strxfrm() hasn't been taken advantage of. If you could

Re: [HACKERS] Move postgresql_fdw_validator into dblink

2012-10-08 Thread Kohei KaiGai
Hanada-san, The attached patch is a revised one according to my previous suggestion. It re-defines PQconninfoOption *options as static variable with NULL initial value, then, PQconndefaults() shall be invoked at once. The default options never changed during duration of the backend process, so

Re: [HACKERS] Add FET to Default and Europe.txt

2012-10-08 Thread Heikki Linnakangas
On 08.10.2012 18:26, Tom Lane wrote: The other thing that the abbreviation list files are doing for us is providing a user-configurable way to resolve conflicting abbreviations, for instance IST (the Indians and the Israelis both use this, but not to mean the same thing). This requirement isn't

[HACKERS] static-if-inline

2012-10-08 Thread Alvaro Herrera
The ilist patch from Andres Freund introduces a cute trick for defining maybe-inline functions, which works regardless of whether the compiler supports inlining, and eliminates the need to write the code twice (first in the header and also the .c file.) It's really quite a simple thing, but the

Re: [HACKERS] Add FET to Default and Europe.txt

2012-10-08 Thread Tom Lane
Heikki Linnakangas hlinnakan...@vmware.com writes: On 08.10.2012 18:26, Tom Lane wrote: The other thing that the abbreviation list files are doing for us is providing a user-configurable way to resolve conflicting abbreviations, for instance IST (the Indians and the Israelis both use this, but

Re: [HACKERS] static-if-inline

2012-10-08 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: What's being done in this patch is exactly what would be done in the ilist code. So if there are problems with this, please speak up. Stylistic gripe: in palloc.h you didn't follow the pattern of #ifndef USE_INLINE extern ...

Re: [HACKERS] Warnings from fwrite() in git head

2012-10-08 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: I am seeing the following warnings in git head from zic.c: zic.c:1505: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result Yeah, this is probably a consequence of the _FORTIFY_SOURCE addition. I believe that

Re: [HACKERS] Warnings from fwrite() in git head

2012-10-08 Thread Jeff Janes
On Mon, Oct 8, 2012 at 8:58 AM, Bruce Momjian br...@momjian.us wrote: I am seeing the following warnings in git head from zic.c: zic.c:1505: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result ... Seems casting to void is not enough. Not sure why

[HACKERS] Logging parameters values on bind error

2012-10-08 Thread Jehan-Guillaume de Rorthais
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, We were struggling today with some java code binding values violating some constraints in a prepared statement. We don't own the code and couldn't make tests with it. So we tried to find if PostgreSQL was able to log binded values when the BIND

Re: [HACKERS] why can't plpgsql return a row-expression?

2012-10-08 Thread Pavel Stehule
2012/10/8 Tom Lane t...@sss.pgh.pa.us: Robert Haas robertmh...@gmail.com writes: ERROR: RETURN must specify a record or row variable in function returning row Off the top of my head, I can't think of any reason for this restriction, nor can I find any code comments or anything in the

Re: [HACKERS] sortsupport for text

2012-10-08 Thread Peter Geoghegan
On 8 October 2012 16:30, Robert Haas robertmh...@gmail.com wrote: I don't have any plans to work on this further. I think all of the criticism that has been leveled at this patch is 100% bogus, and I greatly dislike the changes that have been proposed. That may not be fair, but it's how I

Re: [HACKERS] Logging parameters values on bind error

2012-10-08 Thread Tom Lane
Jehan-Guillaume de Rorthais j...@dalibo.com writes: PFA a patch that catch any error while creating the query plan and add parameters values to the error message if log_statement or log_min_duration_statement would have logged it. If that works, it's only by accident --- you're not supposed to

Re: [HACKERS] why can't plpgsql return a row-expression?

2012-10-08 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: 2012/10/8 Tom Lane t...@sss.pgh.pa.us: Laziness, probably. Feel free to have at it. I wrote patch some years ago. It was rejected from performance reasons - because every row had to be casted to resulted type. I don't recall that patch in any

Re: [HACKERS] Bad Data back Door

2012-10-08 Thread David E. Wheeler
On Oct 5, 2012, at 6:12 PM, Tom Lane t...@sss.pgh.pa.us wrote: Now, having said that, I think it has to be the reponsibility of the FDW to apply any required check ... which makes this a bug report against oracle_fdw, not the core system. (FWIW, contrib/file_fdw depends on the COPY code,

Re: [HACKERS] Bad Data back Door

2012-10-08 Thread Tom Lane
David E. Wheeler da...@justatheory.com writes: On Oct 5, 2012, at 6:12 PM, Tom Lane t...@sss.pgh.pa.us wrote: Now, having said that, I think it has to be the reponsibility of the FDW to apply any required check ... which makes this a bug report against oracle_fdw, not the core system. (FWIW,

Re: [HACKERS] Bad Data back Door

2012-10-08 Thread David E. Wheeler
On Oct 8, 2012, at 11:13 AM, Tom Lane t...@sss.pgh.pa.us wrote: FWIW, I believe that dblink does not check encoding. In dblink's case, that boils down to trusting a remote instance of Postgres to get this right, which doesn't seem totally unreasonable. But I wouldn't object to adding checks

Re: [HACKERS] Bad Data back Door

2012-10-08 Thread Andrew Dunstan
On 10/08/2012 02:13 PM, Tom Lane wrote: David E. Wheeler da...@justatheory.com writes: On Oct 5, 2012, at 6:12 PM, Tom Lane t...@sss.pgh.pa.us wrote: Now, having said that, I think it has to be the reponsibility of the FDW to apply any required check ... which makes this a bug report against

Re: [HACKERS] [v9.3] Row-Level Security

2012-10-08 Thread Dean Rasheed
On 8 October 2012 15:57, Kohei KaiGai kai...@kaigai.gr.jp wrote: The attached patch is a refreshed version towards the latest master branch, to fix up patch conflicts. Here is no other difference from the previous revision. Thanks, I had another look at this over the weekend and I found

[HACKERS] getopt() and strdup()

2012-10-08 Thread Bruce Momjian
A while ago I noticed that in some places we strdup/pg_strdup() optarg strings from getopt(), and in some places we don't. If we needed the strdup(), the missing cases should generate errors. If we don't need them, the strdup() is unnecessary, and research confirms they are unnecessary. Should

Re: [HACKERS] Improving psql \ds

2012-10-08 Thread Gavin Flower
On 09/10/12 03:53, Robert Haas wrote: On Mon, Oct 8, 2012 at 3:49 AM, Julien Tachoires jul...@gmail.com wrote: 2012/10/8 Tom Lane t...@sss.pgh.pa.us: Julien Tachoires jul...@gmail.com writes: About \ds behaviour, I think to add 2 columns : - 'LastValue' - 'Increment' That would make the

Re: [HACKERS] Add FET to Default and Europe.txt

2012-10-08 Thread Christopher Browne
On Mon, Oct 8, 2012 at 11:54 AM, Tom Lane t...@sss.pgh.pa.us wrote: Heikki Linnakangas hlinnakan...@vmware.com writes: On 08.10.2012 18:26, Tom Lane wrote: The other thing that the abbreviation list files are doing for us is providing a user-configurable way to resolve conflicting

Re: [HACKERS] [v9.3] Row-Level Security

2012-10-08 Thread Kohei KaiGai
2012/10/8 Dean Rasheed dean.a.rash...@gmail.com: On 8 October 2012 15:57, Kohei KaiGai kai...@kaigai.gr.jp wrote: The attached patch is a refreshed version towards the latest master branch, to fix up patch conflicts. Here is no other difference from the previous revision. Thanks, I had

Re: [HACKERS] getopt() and strdup()

2012-10-08 Thread Andrew Dunstan
On 10/08/2012 02:40 PM, Bruce Momjian wrote: A while ago I noticed that in some places we strdup/pg_strdup() optarg strings from getopt(), and in some places we don't. If we needed the strdup(), the missing cases should generate errors. If we don't need them, the strdup() is unnecessary, and

Re: [HACKERS] Add FET to Default and Europe.txt

2012-10-08 Thread Tom Lane
Christopher Browne cbbro...@gmail.com writes: The scenario where we could unambiguously include time zones is where the symbols are unique. If we were to include *all* uniquely-named symbols, that would minimize the number of complaints about missing zones, whilst evading the cases where the

Re: [HACKERS] embedded list v3

2012-10-08 Thread Andres Freund
Hi Peter, On Monday, October 08, 2012 09:43:51 PM Peter Geoghegan wrote: Pendantry: This should be in alphabetical order: ! OBJS = stringinfo.o ilist.o Argh. Youve said that before. Somehow I reintroduced it... I notice that the patch (my revision) produces a whole bunch of warnings like

Re: [HACKERS] getopt() and strdup()

2012-10-08 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: A while ago I noticed that in some places we strdup/pg_strdup() optarg strings from getopt(), and in some places we don't. If we needed the strdup(), the missing cases should generate errors. If we don't need them, the strdup() is unnecessary, and

Re: [HACKERS] sortsupport for text

2012-10-08 Thread Robert Haas
On Mon, Oct 8, 2012 at 12:26 PM, Peter Geoghegan pe...@2ndquadrant.com wrote: If it was the case that you were only 50% of the way to getting something committable, I guess I'd understand; this is, after all, a volunteer effort, and you are of course free to pursue or not pursue whatever you

Re: [HACKERS] why repl_gram.h?

2012-10-08 Thread Magnus Hagander
On Oct 6, 2012 3:00 AM, Peter Eisentraut pete...@gmx.net wrote: src/backend/replication/Makefile calls bison with -d to create a repl_gram.h header file, but that is not used anywhere. Is this an oversight? That's probably a copy/paste caused oversight. I don't recall any particular reason

[HACKERS] MemSetLoop ignoring the 'val' parameter

2012-10-08 Thread Andres Freund
Hi, #define MemSetLoop(start, val, len) \ do \ { \ long * _start = (long *) (start); \ long * _stop = (long *) ((char *) _start + (Size) (len)); \ \ while (_start _stop) \ *_start++ = 0; \ }

Re: [HACKERS] MemSetLoop ignoring the 'val' parameter

2012-10-08 Thread Andres Freund
On Monday, October 08, 2012 10:39:27 PM Andres Freund wrote: The 'val' parameter is ignored. Trivial patch attached. -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training Services From a4056e1110961c64b56d61a88c0d472c58a80579 Mon Sep

Re: [HACKERS] Support for REINDEX CONCURRENTLY

2012-10-08 Thread Jim Nasby
On 10/5/12 9:57 PM, Michael Paquier wrote: In the current version of the patch, at the beginning of process a new index is created. It is a twin of the index it has to replace, meaning that it copies the dependencies of old index and creates twin entries of the old index even in pg_depend and

Re: [HACKERS] sortsupport for text

2012-10-08 Thread Peter Geoghegan
On 8 October 2012 21:35, Robert Haas robertmh...@gmail.com wrote: Hey, if me deciding I don't want to work on a patch any more is going to make you feel slighted, then you're out of luck. The archives are littered with people who have decided to stop working on things because the consensus

[HACKERS] Placement of permissions checks for large object operations

2012-10-08 Thread Tom Lane
While looking at the 64-bit large object patch, I happened to notice that the LO permissions checks that were added a release or two back seem to be done exceedingly inefficiently. To wit, they're done in lo_read() and lo_write(), which means that if the user say reads an 8MB large object with an

Re: [HACKERS] MemSetLoop ignoring the 'val' parameter

2012-10-08 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: The 'val' parameter is ignored. This is not broken. Read the comments for MemSetTest. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] MemSetLoop ignoring the 'val' parameter

2012-10-08 Thread Andres Freund
On Tuesday, October 09, 2012 12:56:16 AM Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: The 'val' parameter is ignored. This is not broken. Read the comments for MemSetTest. Ah. I was surprised about that already. The comment says that val has to be constant though, not that

Re: [HACKERS] Support for REINDEX CONCURRENTLY

2012-10-08 Thread Jim Nasby
On 10/8/12 6:12 PM, Tom Lane wrote: Jim Nasby j...@nasby.net writes: Yeah, what's the risk to renaming an index during concurrent access? SnapshotNow searches for the pg_class row could get broken by *any* transactional update of that row, whether it's for a change of relname or some other

Re: [HACKERS] Support for REINDEX CONCURRENTLY

2012-10-08 Thread Jim Nasby
On 10/8/12 5:08 PM, Andres Freund wrote: On Monday, October 08, 2012 11:57:46 PM Jim Nasby wrote: On 10/5/12 9:57 PM, Michael Paquier wrote: In the current version of the patch, at the beginning of process a new index is created. It is a twin of the index it has to replace, meaning that it

Re: [HACKERS] PQping command line tool

2012-10-08 Thread Jim Nasby
On 10/4/12 11:34 AM, Greg Sabino Mullane wrote: I was wondering recently if there was any command line tool that utilized PQping() or PQpingParams(). I searched the code and couldn't find anything and was wondering if there was any interest to have something like this included? I wrote something

Re: [HACKERS] Deparsing DDL command strings

2012-10-08 Thread Jim Nasby
On 10/5/12 11:15 AM, Tom Lane wrote: Also, we need to normalize that command string. Tools needing to look at it won't want to depend on random white spacing and other oddities. Instead, they'll get to depend on the oddities of parse transformations (ie, what's done in the raw grammar vs.

Re: [HACKERS] MemSetLoop ignoring the 'val' parameter

2012-10-08 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On Tuesday, October 09, 2012 12:56:16 AM Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: The 'val' parameter is ignored. This is not broken. Read the comments for MemSetTest. Ah. I was surprised about that already. The comment says

Re: [HACKERS] getopt() and strdup()

2012-10-08 Thread Bruce Momjian
On Mon, Oct 8, 2012 at 04:33:29PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: A while ago I noticed that in some places we strdup/pg_strdup() optarg strings from getopt(), and in some places we don't. If we needed the strdup(), the missing cases should generate errors.

Re: [HACKERS] Support for REINDEX CONCURRENTLY

2012-10-08 Thread Michael Paquier
On Tue, Oct 9, 2012 at 8:14 AM, Jim Nasby j...@nasby.net wrote: Hrm... the claim was made that everything relating to the index, including pg_depend and pg_contstraint, got duplicated. But I don't know how you could duplicate a constraint without also playing name games. Perhaps name games

Re: [HACKERS] Add FET to Default and Europe.txt

2012-10-08 Thread Joachim Wieland
On Mon, Oct 8, 2012 at 4:00 PM, Tom Lane t...@sss.pgh.pa.us wrote: We can't just refuse to deal with this ambiguity. We have to have some very-low-pain way to install settings that will please those large fractions of our user base. Moreover, if that very-low-pain way isn't the exact same

[HACKERS] TODO item: teach pg_dump about sparsely-stored large objects

2012-10-08 Thread Tom Lane
The backend code for large objects goes to some lengths to be intelligent about sparsely-written blobs: if you seek out to the middle of nowhere and write a few bytes, you don't end up allocating space in pg_largeobject for all the byte positions you skipped over. However, pg_dump knows nothing

Re: [HACKERS] Visual Studio 2012 RC

2012-10-08 Thread Noah Misch
One more thing -- I tried a build with NLS support and encountered this: src\backend\utils\adt\pg_locale.c(746): error C2039: 'lc_handle' : is not a member of 'threadlocaleinfostruct' [c:\cygwin\home\nm\src\pg\postgresql\postgres.vcxproj] That's in the function IsoLocaleName(), which digs