Re: [HACKERS] Performance Enhancement/Fix for Array Utility Functions

2010-06-16 Thread Mike Lewis
The existence and naming of ARR_MAX_HEADER_SIZE is somewhat dubious, as it is: Thanks you for the feedback. I cleaned up the patch. * Used in exactly one place (not necessarily a reason why it should not be reified into a stand-alone definition, though, but something to consider)

[HACKERS] Add a new backend process

2010-06-16 Thread Amir Abdollahi
Hello, I want to add a new backend process to postgres, to include my own auditing modules. How can i do that, also how can i signal it after! Sorry if this is very general question! I didn't find any source to learn these things in postgres. thanks in advance

Re: [HACKERS] New PGXN Extension site

2010-06-16 Thread Stefan Kaltenbrunner
David E. Wheeler wrote: On Jun 15, 2010, at 3:23 PM, Robert Haas wrote: I think this project is a great idea, and I think as a community we ought to be behind it 100%. However, I do wonder what happened to the original name, which IIRC was PGAN. That seems easier to pronounce, remember, ...

[HACKERS] GetOldestWALSendPointer() in header

2010-06-16 Thread Takahiro Itagaki
Hi, GetOldestWALSendPointer() is commented out in the source code with NOT_USED block, but is still declared in the header file. Should we remove the function prototype from walsender.h ? [walsender.h] extern XLogRecPtr GetOldestWALSendPointer(void); Regards, --- Takahiro Itagaki NTT Open

ANNOUNCE list (was Re: [HACKERS] New PGXN Extension site)

2010-06-16 Thread Simon Riggs
On Tue, 2010-06-15 at 16:12 -0400, Bruce Momjian wrote: This was just posted to announce. I notice you mention that this was just posted to the ANNOUNCE list. Who is it that moderates the announce list? The postings made by David Fetter on 13 June and postings by David Wheeler on 15 June were

Re: [HACKERS] New PGXN Extension site

2010-06-16 Thread Dave Page
On Wed, Jun 16, 2010 at 7:03 AM, Stefan Kaltenbrunner ste...@kaltenbrunner.cc wrote: David E. Wheeler wrote: On Jun 15, 2010, at 3:23 PM, Robert Haas wrote: I think this project is a great idea, and I think as a community we ought to be behind it 100%. However, I do wonder what happened to

Re: [HACKERS] Add a new backend process

2010-06-16 Thread Florian Pflug
On Jun 16, 2010, at 8:47 , Amir Abdollahi wrote: I want to add a new backend process to postgres, to include my own auditing modules. How can i do that, also how can i signal it after! The existing auxiliary processes (in 8.4) and their entry points are autovacuum (autovacuum.c,

Re: ANNOUNCE list (was Re: [HACKERS] New PGXN Extension site)

2010-06-16 Thread Magnus Hagander
On Wed, Jun 16, 2010 at 12:27, Simon Riggs si...@2ndquadrant.com wrote: On Tue, 2010-06-15 at 16:12 -0400, Bruce Momjian wrote: This was just posted to announce. I notice you mention that this was just posted to the ANNOUNCE list. Who is it that moderates the announce list? I can't answer

Re: [HACKERS] ALTER TABLE...ALTER COLUMN vs inheritance

2010-06-16 Thread Selena Deckelmann
On Wed, Jun 16, 2010 at 5:31 AM, Bernd Helmle maili...@oopsware.de wrote: --On 15. Juni 2010 20:51:21 -0700 Selena Deckelmann selenama...@gmail.com wrote: Confirmed that this tests fine against commit id 0dca7d2f70872a242d4430c4c3aa01ba8dbd4a8c I also wrote a little test script and

Re: [HACKERS] PL/Perl function naming

2010-06-16 Thread Andrew Dunstan
Tim Bunce wrote: If the feature is not any use should we rip it out? We pretty much included it because you said it was what you needed for the profiler. Yes, it can go. Done. cheers andrew -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] ALTER TABLE...ALTER COLUMN vs inheritance

2010-06-16 Thread Bernd Helmle
--On 15. Juni 2010 20:51:21 -0700 Selena Deckelmann selenama...@gmail.com wrote: Confirmed that this tests fine against commit id 0dca7d2f70872a242d4430c4c3aa01ba8dbd4a8c I also wrote a little test script and verified that it throws an error when I try to remove a constraint from the

Re: [HACKERS] GetOldestWALSendPointer() in header

2010-06-16 Thread Tom Lane
Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp writes: GetOldestWALSendPointer() is commented out in the source code with NOT_USED block, but is still declared in the header file. Should we remove the function prototype from walsender.h ? Yes, that's our usual convention.

Re: [HACKERS] New PGXN Extension site

2010-06-16 Thread Joshua D. Drake
On Wed, 2010-06-16 at 09:03 +0200, Stefan Kaltenbrunner wrote: David E. Wheeler wrote: On Jun 15, 2010, at 3:23 PM, Robert Haas wrote: I think this project is a great idea, and I think as a community we ought to be behind it 100%. However, I do wonder what happened to the original

Re: [HACKERS] New PGXN Extension site

2010-06-16 Thread Bruce Momjian
David E. Wheeler wrote: Honestly, I didn't realize anyone was attached to ?PGAN.? Frankly, I blame whoever named PostgreSQL itself and came up with the short version, ?PG.? Nothing but pigs out of that. I finally understand how pig-squeal is a short-form of PostgreSQL (PG-SQL). :-O Yet

Re: [HACKERS] New PGXN Extension site

2010-06-16 Thread Bruce Momjian
Joshua D. Drake wrote: On Wed, 2010-06-16 at 09:03 +0200, Stefan Kaltenbrunner wrote: David E. Wheeler wrote: On Jun 15, 2010, at 3:23 PM, Robert Haas wrote: I think this project is a great idea, and I think as a community we ought to be behind it 100%. However, I do wonder

Re: [HACKERS] [v9.1] Add security hook on initialization of instance

2010-06-16 Thread Stephen Frost
KaiGai, * KaiGai Kohei (kai...@ak.jp.nec.com) wrote: On the other hand, a security feature have to identify the client and assign an appropriate set of privileges on the session prior to it being available for users. [...] However, here is no hooks available for the purpose. I believe we

Re: ANNOUNCE list (was Re: [HACKERS] New PGXN Extension site)

2010-06-16 Thread Josh Berkus
Why is there significant delay on important posts, yet some posts go almost straight though? Every time I use Announce my posts are delayed for about 4-5 days. Why do some posts jump the queue, appearing to imply the moderator is being selective in releasing some, yet not others? Do we need

Re: [HACKERS] New PGXN Extension site

2010-06-16 Thread Joshua D. Drake
On Wed, 2010-06-16 at 13:22 -0400, Bruce Momjian wrote: I actually like PGXN. PGXN is marketable. Yeah that may not be what -hackers are after but if I stand up in front of a Fortune 500 company and say, We have PGXN it sounds a heck of a lot better that PGAN. I think the attraction of

Re: [HACKERS] Patch to show individual statement latencies in pgbench output

2010-06-16 Thread Florian Pflug
On Jun 14, 2010, at 2:22 , Greg Smith wrote: Florian Pflug wrote: To be able to asses the performance characteristics of the different wal-related options, I patched pgbench to show the average latency of each individual statement. The idea is to be able to compare the latency of the

[HACKERS] 9.0 beta2 pg_upgrade: malloc 0 bytes patch

2010-06-16 Thread Steve Singer
Running pg_upgrade against an unmodified (the output of initdb) cluster on AIX is giving me pg_alloc: Out of memory errors. On some non-linux platforms (including AIX) malloc(0) returns 0. with the attached patch to pg_upgrade I am now able to get pg_upgrade to convert an 8.3 database

Re: ANNOUNCE list (was Re: [HACKERS] New PGXN Extension site)

2010-06-16 Thread Joshua D. Drake
On Wed, 2010-06-16 at 13:05 +0200, Magnus Hagander wrote: On Wed, Jun 16, 2010 at 12:27, Simon Riggs si...@2ndquadrant.com wrote: On Tue, 2010-06-15 at 16:12 -0400, Bruce Momjian wrote: This was just posted to announce. I notice you mention that this was just posted to the ANNOUNCE

Re: [HACKERS] New PGXN Extension site

2010-06-16 Thread Cédric Villemain
2010/6/16 David E. Wheeler david.whee...@pgexperts.com: On Jun 15, 2010, at 3:23 PM, Robert Haas wrote: I think this project is a great idea, and I think as a community we ought to be behind it 100%. However, I do wonder what happened to the original name, which IIRC was PGAN.  That seems

Re: [HACKERS] 9.0 beta2 pg_upgrade: malloc 0 bytes patch

2010-06-16 Thread Bruce Momjian
Steve Singer wrote: Running pg_upgrade against an unmodified (the output of initdb) cluster on AIX is giving me pg_alloc: Out of memory errors. On some non-linux platforms (including AIX) malloc(0) returns 0. with the attached patch to pg_upgrade I am now able to get pg_upgrade to

[HACKERS] streaming replication breaks horribly if master crashes

2010-06-16 Thread Robert Haas
On Mon, Jun 14, 2010 at 7:55 AM, Simon Riggs si...@2ndquadrant.com wrote: But that change would cause the problem that Robert pointed out. http://archives.postgresql.org/pgsql-hackers/2010-06/msg00670.php Presumably this means that if synchronous_commit = off on primary that SR in 9.0 will no

Re: [HACKERS] streaming replication breaks horribly if master crashes

2010-06-16 Thread Joshua D. Drake
On Wed, 2010-06-16 at 15:47 -0400, Robert Haas wrote: So, obviously at this point my slave database is corrupted beyond repair due to nothing more than an unexpected crash on the master. That's bad. What is worse is that the system only detected the corruption because the slave had crossed

Re: [HACKERS] streaming replication breaks horribly if master crashes

2010-06-16 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: So, obviously at this point my slave database is corrupted beyond repair due to nothing more than an unexpected crash on the master. Certainly that's true for resuming replication. From your description it sounds as though the slave would be usable

Re: [HACKERS] streaming replication breaks horribly if master crashes

2010-06-16 Thread Stefan Kaltenbrunner
On 06/16/2010 09:47 PM, Robert Haas wrote: On Mon, Jun 14, 2010 at 7:55 AM, Simon Riggssi...@2ndquadrant.com wrote: But that change would cause the problem that Robert pointed out. http://archives.postgresql.org/pgsql-hackers/2010-06/msg00670.php Presumably this means that if

Re: [HACKERS] streaming replication breaks horribly if master crashes

2010-06-16 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: I don't know what to do about this This probably is out of the question for 9.0 based on scale of change, and maybe forever based on the impact of WAL volume, but -- if we logged before images along with the after, we could undo the work of the

Re: [HACKERS] streaming replication breaks horribly if master crashes

2010-06-16 Thread Kevin Grittner
Stefan Kaltenbrunner ste...@kaltenbrunner.cc wrote: well this is likely caused by the OS not noticing that the connections went away (linux has really long timeouts here) - maybe we should unconditionally enable keepalive on systems that support that for replication connections (if that is

Re: [HACKERS] streaming replication breaks horribly if master crashes

2010-06-16 Thread Josh Berkus
The first problem I noticed is that the slave never seems to realize that the master has gone away. Every time I crashed the master, I had to kill the wal receiver process on the slave to get it to reconnect; otherwise it just sat there waiting, either forever or at least for longer than I

Re: [HACKERS] streaming replication breaks horribly if master crashes

2010-06-16 Thread Robert Haas
On Wed, Jun 16, 2010 at 4:00 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Robert Haas robertmh...@gmail.com wrote: So, obviously at this point my slave database is corrupted beyond repair due to nothing more than an unexpected crash on the master. Certainly that's true for resuming

Re: [HACKERS] streaming replication breaks horribly if master crashes

2010-06-16 Thread Robert Haas
On Wed, Jun 16, 2010 at 4:14 PM, Josh Berkus j...@agliodbs.com wrote: The first problem I noticed is that the slave never seems to realize that the master has gone away.  Every time I crashed the master, I had to kill the wal receiver process on the slave to get it to reconnect; otherwise it

Re: [HACKERS] streaming replication breaks horribly if master crashes

2010-06-16 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: Kevin Grittner kevin.gritt...@wicourts.gov wrote: Robert Haas robertmh...@gmail.com wrote: So, obviously at this point my slave database is corrupted beyond repair due to nothing more than an unexpected crash on the master. Certainly that's true for

Re: [HACKERS] streaming replication breaks horribly if master crashes

2010-06-16 Thread Magnus Hagander
On Wed, Jun 16, 2010 at 22:26, Robert Haas robertmh...@gmail.com wrote: and this just makes it more likely.  After the most recent crash, the master thought pg_current_xlog_location() was 1/86CD4000; the slave thought pg_last_xlog_receive_location() was 1/8733C000.  After reconnecting to the

Re: [HACKERS] streaming replication breaks horribly if master crashes

2010-06-16 Thread Rafael Martinez
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert Haas wrote: The first problem I noticed is that the slave never seems to realize that the master has gone away. Every time I crashed the master, I had to kill the wal receiver process on the slave to get it to reconnect; otherwise it

Re: [HACKERS] streaming replication breaks horribly if master crashes

2010-06-16 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: The first problem I noticed is that the slave never seems to realize that the master has gone away. Every time I crashed the master, I had to kill the wal receiver process on the slave to get it to reconnect; otherwise it just sat there waiting,

[HACKERS] Add new backend process

2010-06-16 Thread Amir Abdollahi
Hello, I want to add a new backend process to postgres, to include my own auditing modules. How can i do that, also how can i signal it after! Sorry if this is very general question! I didn't find any source to learn these things in postgres. thanks in advance

Re: ANNOUNCE list (was Re: [HACKERS] New PGXN Extension site)

2010-06-16 Thread Joshua D. Drake
On Wed, 2010-06-16 at 10:34 -0700, Josh Berkus wrote: Why is there significant delay on important posts, yet some posts go almost straight though? Every time I use Announce my posts are delayed for about 4-5 days. Why do some posts jump the queue, appearing to imply the moderator is

Re: ANNOUNCE list (was Re: [HACKERS] New PGXN Extension site)

2010-06-16 Thread Josh Berkus
And me, and devrim and a number of others. Hmmm. Yet nothing seems to get approved unless I personal e-mail Marc. Why? -- -- Josh Berkus PostgreSQL Experts Inc.

Re: [HACKERS] streaming replication breaks horribly if master crashes

2010-06-16 Thread Josh Berkus
On 6/16/10 1:26 PM, Robert Haas wrote: Similarly with synchronous_commit=off, I believe that the next checkpoint will still fsync WAL, but the lag might be long. That's not a showstopper. Just tell people that having synch_commit=off on the master might increase the lag to the slave, and

Re: [HACKERS] ANNOUNCE list

2010-06-16 Thread Tatsuo Ishii
On Wed, 2010-06-16 at 10:34 -0700, Josh Berkus wrote: Why is there significant delay on important posts, yet some posts go almost straight though? Every time I use Announce my posts are delayed for about 4-5 days. Why do some posts jump the queue, appearing to imply the moderator

Re: ANNOUNCE list (was Re: [HACKERS] New PGXN Extension site)

2010-06-16 Thread Devrim GUNDUZ
I don't moderate -announce. -- Devrim GÜNDÜZ PostgreSQL DBA @ Akinon/Markafoni, Red Hat Certified Engineer devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz 17.Haz.2010 tarihinde 00:58 saatinde, Joshua D. Drake

Re: [HACKERS] streaming replication breaks horribly if master crashes

2010-06-16 Thread Pierre C
The real problem here is that we're sending records to the slave which might cease to exist on the master if it unexpectedly reboots. I believe that what we need to do is make sure that the master only sends WAL it has already fsync'd How about this : - pg records somewhere the xlog

Re: ANNOUNCE list (was Re: [HACKERS] New PGXN Extension site)

2010-06-16 Thread Joshua D. Drake
On Wed, 2010-06-16 at 15:01 -0700, Josh Berkus wrote: And me, and devrim and a number of others. Hmmm. Yet nothing seems to get approved unless I personal e-mail Marc. Why? I approved stuff today and yesterday. I didn't the week before because I was in Chicago. I also normally don't

Re: ANNOUNCE list (was Re: [HACKERS] New PGXN Extension site)

2010-06-16 Thread Joshua D. Drake
On Thu, 2010-06-17 at 01:17 +0300, Devrim GUNDUZ wrote: I don't moderate -announce. Sorry. I thought you did. JD -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564 Consulting, Training, Support, Custom Development, Engineering -- Sent via

Re: [HACKERS] streaming replication breaks horribly if master crashes

2010-06-16 Thread Greg Stark
On Wed, Jun 16, 2010 at 9:56 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: The first problem I noticed is that the slave never seems to realize that the master has gone away.  Every time I crashed the master, I had to kill the wal receiver process on the

Re: ANNOUNCE list (was Re: [HACKERS] New PGXN Extension site)

2010-06-16 Thread Josh Berkus
Hmmm. Yet nothing seems to get approved unless I personal e-mail Marc. Why? I approved stuff today and yesterday. I didn't the week before because I was in Chicago. I also normally don't moderate on the weekends. I was the one that approved the PGXN email for example. This week isn't

Re: ANNOUNCE list (was Re: [HACKERS] New PGXN Extension site)

2010-06-16 Thread Joshua D. Drake
On Wed, 2010-06-16 at 16:08 -0700, Josh Berkus wrote: Hmmm. Yet nothing seems to get approved unless I personal e-mail Marc. Why? I approved stuff today and yesterday. I didn't the week before because I was in Chicago. I also normally don't moderate on the weekends. I was the one

Re: [HACKERS] streaming replication breaks horribly if master crashes

2010-06-16 Thread Kevin Grittner
Greg Stark gsst...@mit.edu wrote: TCP keepalives are for detecting broken network connections Yeah. That seems like what we have here. If you shoot the OS in the head, the network connection is broken rather abruptly, without the normal packets exchanged to close the TCP connection. It

Re: [HACKERS] streaming replication breaks horribly if master crashes

2010-06-16 Thread Kevin Grittner
Kevin Grittner kevin.gritt...@wicourts.gov wrote: It sounds like it behaves just fine except for not detecting a broken connection. Of course I meant in terms of the slave's attempts at retrieving more WAL, not in terms of it applying a second time line. TCP keepalive timeouts don't help

Re: [HACKERS] hstore == and deprecate =

2010-06-16 Thread Robert Haas
On Tue, Jun 15, 2010 at 10:55 PM, David E. Wheeler da...@kineticode.com wrote: On Jun 15, 2010, at 6:58 PM, Robert Haas wrote: Well, the idea is it's like logical-and - give me only those keys that appear on both sides... Yeah, but = doesn't return the keys, - does. = returns an hstore. If

Re: [HACKERS] streaming replication breaks horribly if master crashes

2010-06-16 Thread Greg Stark
On Thu, Jun 17, 2010 at 12:22 AM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Kevin Grittner kevin.gritt...@wicourts.gov wrote: It sounds like it behaves just fine except for not detecting a broken connection. Of course I meant in terms of the slave's attempts at retrieving more WAL,

Re: [HACKERS] [v9.1] Add security hook on initialization of instance

2010-06-16 Thread KaiGai Kohei
(2010/06/16 21:37), Stephen Frost wrote: KaiGai, * KaiGai Kohei (kai...@ak.jp.nec.com) wrote: On the other hand, a security feature have to identify the client and assign an appropriate set of privileges on the session prior to it being available for users. [...] However, here is no hooks

Re: [HACKERS] hstore == and deprecate =

2010-06-16 Thread David E. Wheeler
On Jun 16, 2010, at 4:24 PM, Robert Haas wrote: Put me down for +. Since there are no other votes for that option (or, indeed, any other option), I'm going to go with my original instinct and change hstore = text[] to hstore text[]. Patch to do that is attached. Damn. My other argument

Re: [HACKERS] streaming replication breaks horribly if master crashes

2010-06-16 Thread Greg Stark
On Thu, Jun 17, 2010 at 12:16 AM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Greg Stark gsst...@mit.edu wrote: TCP keepalives are for detecting broken network connections Yeah.  That seems like what we have here.  If you shoot the OS in the head, the network connection is broken

Re: [HACKERS] hstore == and deprecate =

2010-06-16 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Since there are no other votes for that option (or, indeed, any other option), I'm going to go with my original instinct and change hstore = text[] to hstore text[]. Patch to do that is attached. Um ... wait a minute. What happened to backwards

Re: [HACKERS] hstore == and deprecate =

2010-06-16 Thread David E. Wheeler
On Jun 16, 2010, at 4:53 PM, Tom Lane wrote: Um ... wait a minute. What happened to backwards compatibility? I thought the idea was to deprecate = for a release or so, not kill it on the spot. hstore = text[] is new in 9.0. David -- Sent via pgsql-hackers mailing list

Re: [HACKERS] hstore == and deprecate =

2010-06-16 Thread Tom Lane
David E. Wheeler da...@kineticode.com writes: On Jun 16, 2010, at 4:53 PM, Tom Lane wrote: Um ... wait a minute. What happened to backwards compatibility? I thought the idea was to deprecate = for a release or so, not kill it on the spot. hstore = text[] is new in 9.0. Wup, sorry, I read

Re: [HACKERS] [PATCH] elimination of code duplication in DefineOpFamily()

2010-06-16 Thread Brent Dombrowski
I have not been able to find any comments or discussion on this patch. Contents and Purpose: This patch removes duplicate code in opclasscmds.c. It removes the duplicate code from DefineOpFamily by calling CreateOpFamily. No new regression test or documentation are included

Re: [HACKERS] InvalidXLogRecPtr in docs

2010-06-16 Thread Robert Haas
On Tue, Jun 15, 2010 at 4:22 AM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jun 15, 2010 at 2:41 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 15/06/10 08:23, Fujii Masao wrote: On Thu, Jun 10, 2010 at 11:06 PM, Tom Lanet...@sss.pgh.pa.us  wrote: I'm not sure if

Re: [HACKERS] Keepalive for max_standby_delay

2010-06-16 Thread Robert Haas
On Wed, Jun 9, 2010 at 8:01 PM, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: On Thu, 2010-06-03 at 19:02 -0400, Tom Lane wrote: I decided there wasn't time to get anything useful done on it before the beta2 deadline (which is, more or less, right now).  I will

Re: [HACKERS] Explicit psqlrc

2010-06-16 Thread Mark Wong
Hi David, At a pdxpug gathering, we took a look at your patch to psql for supporting multiple -f's and put together some feedback: REVIEW: Patch: support multiple -f options https://commitfest.postgresql.org/action/patch_view?id=286 ==Submission review== Is the patch in context diff format?

[HACKERS] modular se-pgsql as proof-of-concept

2010-06-16 Thread KaiGai Kohei
I tried to implement a modular se-pgsql as proof-of-concept, using the DML permission check hook which was proposed by Robert Haas. At first, please build and install the latest PostgreSQL with this patch to add a hook on DML permission checks.

Re: [HACKERS] streaming replication breaks horribly if master crashes

2010-06-16 Thread Fujii Masao
On Thu, Jun 17, 2010 at 5:26 AM, Robert Haas robertmh...@gmail.com wrote: On Wed, Jun 16, 2010 at 4:14 PM, Josh Berkus j...@agliodbs.com wrote: The first problem I noticed is that the slave never seems to realize that the master has gone away.  Every time I crashed the master, I had to kill