Re: [HACKERS] hstore ==> and deprecate =>

2010-06-17 Thread Robert Haas
On Thu, Jun 17, 2010 at 11:04 PM, Andrew Dunstan wrote: >>> I vote for % . >> I'd vote for %>, out of those.  Reason: the operator isn't commutative, >> in fact left and right inputs aren't even the same datatype, so a glyph >> that looks asymmetric seems more natural. > Lots of operators aren't c

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

2010-06-17 Thread Robert Haas
2010/6/17 KaiGai Kohei : > (2010/06/17 21:59), Robert Haas wrote: >> 2010/6/17 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 w

Re: [HACKERS] hstore ==> and deprecate =>

2010-06-17 Thread Andrew Dunstan
Tom Lane wrote: Josh Berkus writes: Currently for hstore, %% returns a flattened array and %# returns a two-dimensional array. That means that it makes sense that the operator which returns an hstore subset should be something based on %, either %>, %% or just %. But %% and %# are

[HACKERS] system views for walsender activity

2010-06-17 Thread Takahiro Itagaki
Hi, We don't have any statistic views for walsenders in SR's master server in 9.0, but such views would be useful to monitor and manage standby servers from the master server. I have two ideas for the solution - adding a new system view or recycling pg_stat_activity: 1. Add another system view fo

Re: [HACKERS] Partitioning syntax

2010-06-17 Thread Takahiro Itagaki
Jaime Casanova wrote: > This one, doesn't apply to head anymore... please update Thank you for reviewing my patch! I attached an updated patch set for partitioning syntax. The latest codes are available at: http://repo.or.cz/w/pgsql-fdw.git (I'm recycling FDW repo for the feature.) * mast

Re: [HACKERS] trace_recovery_messages

2010-06-17 Thread Fujii Masao
On Fri, Jun 18, 2010 at 2:48 AM, Tom Lane wrote: > Fujii Masao writes: >> We should make trace_recovery_messages available only when >> the WAL_DEBUG macro was defined? > > No, because it's used in a lot of other contexts besides that. > >> Currently it's always >> available, so the standby seems

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

2010-06-17 Thread KaiGai Kohei
(2010/06/17 21:59), Robert Haas wrote: > 2010/6/17 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

Re: [HACKERS] hstore ==> and deprecate =>

2010-06-17 Thread David E. Wheeler
On Jun 17, 2010, at 4:15 PM, Tom Lane wrote: >> Using % would also mean that sometime in the future we can implement !% >> as "elements NOT in this list" (i.e. ' a => 1, b => 2, c => 5' !% 'a, b' >> == 'c => 5' ) > > You can prepend ! to any operator name at all, so that's not much of > a differe

Re: [HACKERS] hstore ==> and deprecate =>

2010-06-17 Thread Tom Lane
Josh Berkus writes: > Currently for hstore, %% returns a flattened array and %# returns a > two-dimensional array. That means that it makes sense that the operator > which returns an hstore subset should be something based on %, either > %>, %% or just %. But %% and %# are prefix operators. Ext

Re: [HACKERS] Why aren't master and slave DBs binary identical?

2010-06-17 Thread Andrew Dunstan
Tom Lane wrote: Andres Freund writes: On Friday 18 June 2010 00:22:00 Josh Berkus wrote: We've noticed that checksums and file sizes for the master database, and slave database, even after all transactions have been cleared, are not identical. Why is that? Non Wal-Logge

Re: [HACKERS] Why aren't master and slave DBs binary identical?

2010-06-17 Thread Tom Lane
Andres Freund writes: > On Friday 18 June 2010 00:22:00 Josh Berkus wrote: >> We've noticed that checksums and file sizes for the master database, and >> slave database, even after all transactions have been cleared, are not >> identical. Why is that? > Non Wal-Logged action like visibility bits

Re: [HACKERS] Why aren't master and slave DBs binary identical?

2010-06-17 Thread Andres Freund
Hi, On Friday 18 June 2010 00:22:00 Josh Berkus wrote: > We've noticed that checksums and file sizes for the master database, and > slave database, even after all transactions have been cleared, are not > identical. Why is that? Non Wal-Logged action like visibility bits. Andres -- Sent via pg

Re: [HACKERS] hstore ==> and deprecate =>

2010-06-17 Thread Josh Berkus
On 6/17/10 2:03 PM, David E. Wheeler wrote: > On Jun 17, 2010, at 1:50 PM, Josh Berkus wrote: > >>> It isn't. || already does what you're saying. >> So what *does* it do? > > It returns an hstore that's effectively a slice of another hstore. From the > docs (http://developer.postgresql.org/pgdo

[HACKERS] Why aren't master and slave DBs binary identical?

2010-06-17 Thread Josh Berkus
Hackers, We've noticed that checksums and file sizes for the master database, and slave database, even after all transactions have been cleared, are not identical. Why is that? -- -- Josh Berkus PostgreSQL Experts Inc.

Re: [HACKERS] hstore ==> and deprecate =>

2010-06-17 Thread Robert Haas
On Thu, Jun 17, 2010 at 4:50 PM, Josh Berkus wrote: > On 6/17/10 1:40 PM, Robert Haas wrote: >> On Thu, Jun 17, 2010 at 4:39 PM, Josh Berkus wrote: 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

Re: [HACKERS] hstore ==> and deprecate =>

2010-06-17 Thread David E. Wheeler
On Jun 17, 2010, at 1:50 PM, Josh Berkus wrote: >> It isn't. || already does what you're saying. > > So what *does* it do? It returns an hstore that's effectively a slice of another hstore. From the docs (http://developer.postgresql.org/pgdocs/postgres/hstore.html): 'a=>1,b=>2,c=>3'::hstore =

Re: [HACKERS] hstore ==> and deprecate =>

2010-06-17 Thread Josh Berkus
On 6/17/10 1:40 PM, Robert Haas wrote: > On Thu, Jun 17, 2010 at 4:39 PM, Josh Berkus wrote: >>> 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 att

Re: [HACKERS] hstore ==> and deprecate =>

2010-06-17 Thread Robert Haas
On Thu, Jun 17, 2010 at 4:39 PM, Josh Berkus wrote: > >> 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. > > If what that operator is doing

Re: [HACKERS] hstore ==> and deprecate =>

2010-06-17 Thread Josh Berkus
> 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. If what that operator is doing is appending an array of text to an Hstore, shouldn't we use

Re: [HACKERS] hstore ==> and deprecate =>

2010-06-17 Thread Florian Pflug
On Jun 17, 2010, at 2:56 , David E. Wheeler wrote: > On Jun 16, 2010, at 4:58 PM, Tom Lane wrote: > >>> hstore => text[] is new in 9.0. >> >> Wup, sorry, I read this as being the other operator. Nevermind ... >> >> (FWIW, I share your dislike of & for this operator. I just haven't >> got a bet

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

2010-06-17 Thread Greg Smith
Marc G. Fournier wrote: Anyone volunteering ... ? Adding is simple enough ... I can help with moderating announce, having now gotten used to doing the similar chore for things submitted to the web site for a few months. -- Greg Smith 2ndQuadrant US Baltimore, MD PostgreSQL Training, Servi

Re: [HACKERS] Should the JSON datatype be a specialization of text?

2010-06-17 Thread Robert Haas
On Thu, Jun 17, 2010 at 12:52 PM, Tom Lane wrote: > Robert Haas writes: >> On Thu, Jun 17, 2010 at 11:25 AM, Tom Lane wrote: >>> I'm >>> inclined to think that associating #2 with casts might be better, >>> because clearly casting numerics or bools to JSON ought to act like #2. >>> If we do it a

Re: [HACKERS] Explicit psqlrc

2010-06-17 Thread Alvaro Herrera
Excerpts from Mark Wong's message of mié jun 16 23:54:52 -0400 2010: > ==Usability review== > Read what the patch is supposed to do, and consider: > Does the patch actually implement that? How does it play with ON_ERROR_STOP/ROLLBACK? -- Álvaro Herrera The PostgreSQL Company - Command Prompt,

Re: [HACKERS] to enable O_DIRECT within postgresql

2010-06-17 Thread Greg Smith
Daniel Ng wrote: I am trying to enable the direct IO for the disk-resident hash partitions of hashjoin in postgresql. As Tom already mentioned this isn't working because of alignment issues. I'm not sure what you expect to achieve though. You should be warned that other than the WAL, every

Re: [HACKERS] trace_recovery_messages

2010-06-17 Thread Tom Lane
Fujii Masao writes: > We should make trace_recovery_messages available only when > the WAL_DEBUG macro was defined? No, because it's used in a lot of other contexts besides that. > Currently it's always > available, so the standby seems to call elog() too frequently. Where? I don't see very ma

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

2010-06-17 Thread Alvaro Herrera
Excerpts from Marc G. Fournier's message of jue jun 17 10:47:41 -0400 2010: > I sooo agree here ... and to make matters worse, when I go through all > of the groups once a week, I find a half dozen or more postings that > 'slipped through the cracks' that should have been approved, but weren

Re: [HACKERS] Debug message in RemoveOldXlogFiles

2010-06-17 Thread Tom Lane
Fujii Masao writes: > In the following debug message in RemoveOldXlogFiles(), the variables > "log" and "seg" don't indicate LSN, so we should use %u instead of %X? > elog(DEBUG2, "removing WAL segments older than %X/%X", log, seg); > I attached the patch to do so. Applied, thanks.

Re: [HACKERS] debug log in pg_archivecleanup

2010-06-17 Thread Tom Lane
Fujii Masao writes: > On Wed, Jun 16, 2010 at 12:24 PM, Takahiro Itagaki > wrote: >> This is because pg_archivecleanup puts the line break "\n" in the head of >> debug message. Why should we do so? > Yes. What about the attached patch? Applied along with a bit of further editorialization. >> N

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

2010-06-17 Thread Andy Balholm
Marc Fournier wrote: > But, I think you and I are exceptions here, in that we use the web interface > for moderation, and not just email ... Is it possible that the ones that use email for moderating the lists have aggressive spam filters? Then they might not receive most of the list postings t

Re: [HACKERS] Should the JSON datatype be a specialization of text?

2010-06-17 Thread Tom Lane
Robert Haas writes: > On Thu, Jun 17, 2010 at 11:25 AM, Tom Lane wrote: >> I'm >> inclined to think that associating #2 with casts might be better, >> because clearly casting numerics or bools to JSON ought to act like #2. >> If we do it as you suggest then casting text to JSON behaves differentl

Re: [HACKERS] Keepalive for max_standby_delay

2010-06-17 Thread Robert Haas
On Wed, Jun 16, 2010 at 9:56 PM, Tom Lane wrote: > Robert Haas writes: >> On Wed, Jun 9, 2010 at 8:01 PM, Tom Lane wrote: >>> Yes, I'll get with it ... > >> Any update on this? > > Sorry, I've been a bit distracted by other responsibilities (libtiff > security issues for Red Hat, if you must kno

Re: [HACKERS] Keepalive for max_standby_delay

2010-06-17 Thread Tom Lane
Robert Haas writes: > On Wed, Jun 9, 2010 at 8:01 PM, Tom Lane wrote: >> Yes, I'll get with it ... > Any update on this? Sorry, I've been a bit distracted by other responsibilities (libtiff security issues for Red Hat, if you must know). I'll get on it shortly. regards

Re: [HACKERS] hstore ==> and deprecate =>

2010-06-17 Thread David E. Wheeler
On Jun 16, 2010, at 4:58 PM, Tom Lane wrote: >> hstore => text[] is new in 9.0. > > Wup, sorry, I read this as being the other operator. Nevermind ... > > (FWIW, I share your dislike of & for this operator. I just haven't > got a better idea.) There aren't any very good choices. Possible corr

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

2010-06-17 Thread Tom Lane
Fujii Masao writes: > On Thu, Jun 17, 2010 at 5:26 AM, Robert Haas wrote: >> 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 WA

Re: [HACKERS] Should the JSON datatype be a specialization of text?

2010-06-17 Thread Robert Haas
On Thu, Jun 17, 2010 at 11:25 AM, Tom Lane wrote: > Robert Haas writes: >> On Thu, Jun 17, 2010 at 2:29 AM, Joseph Adams >> wrote: >>>        * No surprises when casting between JSON and TEXT.  If approach B is >>> used, '"string"'::json would be '"string"', but '"string"'::json::text >>> would

Re: [HACKERS] DB crash SOS

2010-06-17 Thread Florian Pflug
On Jun 17, 2010, at 10:39 , Felde Norbert wrote: > I tried even with a bigger empty clog/0003 file but than I get that: > pg_dump: Error message from server: ERROR: xlog flush request > 0/A19F5BF8 is not satisfied --- flushed only to 0/A02A1AC8 > CONTEXT: writing block 1149 of relation 1663/41922

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

2010-06-17 Thread Joshua D. Drake
On Thu, 2010-06-17 at 13:22 +, Greg Sabino Mullane wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: RIPEMD160 > > > > What I'm referring to? The fact that at least last time I was looking > > at this, most (all other?) moderators *only* approve things. And never > > reject them, instead le

[HACKERS] Re: pg_dump does not honor namespaces when functions are used in index

2010-06-17 Thread Greg Stark
On Thu, Jun 17, 2010 at 4:08 PM, Tom Lane wrote: >> I actually wonder if we shouldn't automatically tag plpgsql functions >> with the search_path in effect at the time of their creation (as if >> the user had done ALTER FUNCTION ... SET search_path=...whatever the >> current search path is...). >

Re: [HACKERS] Should the JSON datatype be a specialization of text?

2010-06-17 Thread Tom Lane
Robert Haas writes: > On Thu, Jun 17, 2010 at 2:29 AM, Joseph Adams > wrote: >>        * No surprises when casting between JSON and TEXT.  If approach B is >> used, '"string"'::json would be '"string"', but '"string"'::json::text >> would be 'string'. > As far as I'm concerned, that's a non-star

Re: [HACKERS] pg_dump does not honor namespaces when functions are used in index

2010-06-17 Thread Tom Lane
Robert Haas writes: > I suppose that the root of the problem here is that foo() is not > really immutable - it gives different results depending on the search > path. Yeah. The declaration of the function is broken --- it's not pg_dump's fault that the function misbehaves. > I actually wonder i

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

2010-06-17 Thread Marc G. Fournier
On Thu, 17 Jun 2010, Magnus Hagander wrote: What I'm referring to? The fact that at least last time I was looking at this, most (all other?) moderators *only* approve things. And never reject them, instead letting the timeout take care of things thatn shouldn't be posted. That means that if th

Re: [HACKERS] pg_dump does not honor namespaces when functions are used in index

2010-06-17 Thread Thom Brown
On 17 June 2010 14:20, Robert Haas wrote: > On Thu, Jun 17, 2010 at 8:13 AM, Thom Brown wrote: > > On 17 June 2010 12:31, Jean-Baptiste Quenot wrote: > >> > >> Dear hackers, > >> > >> I have a pretty nasty problem to submit to your careful scrutiny. > >> > >> Please consider the following piece

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

2010-06-17 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > What I'm referring to? The fact that at least last time I was looking > at this, most (all other?) moderators *only* approve things. And never > reject them, instead letting the timeout take care of things thatn > shouldn't be posted. Certain

Re: [HACKERS] pg_dump does not honor namespaces when functions are used in index

2010-06-17 Thread Robert Haas
On Thu, Jun 17, 2010 at 8:13 AM, Thom Brown wrote: > On 17 June 2010 12:31, Jean-Baptiste Quenot wrote: >> >> Dear hackers, >> >> I have a pretty nasty problem to submit to your careful scrutiny. >> >> Please consider the following piece of SQL code: >> >> >> CREATE SCHEMA bar; >> SET search_path

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

2010-06-17 Thread Robert Haas
2010/6/17 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. >  http://archives.

Re: [HACKERS] DB crash SOS

2010-06-17 Thread Robert Haas
On Thu, Jun 17, 2010 at 4:39 AM, Felde Norbert wrote: > I use 8.2 on a windows server 2008. > Suddenly postgres crashed and I can not do anything. > Strange things happend to postgres in the last few weeks. Once, there > was so many postgres process, that I could not connect to it with > pgAdmin3.

Re: [HACKERS] pg_dump does not honor namespaces when functions are used in index

2010-06-17 Thread Thom Brown
On 17 June 2010 12:31, Jean-Baptiste Quenot wrote: > Dear hackers, > > I have a pretty nasty problem to submit to your careful scrutiny. > > Please consider the following piece of SQL code: > > > CREATE SCHEMA bar; > SET search_path = bar; > > CREATE FUNCTION bar() RETURNS text AS $$ > BEGIN >

Re: [HACKERS] Should the JSON datatype be a specialization of text?

2010-06-17 Thread Robert Haas
On Thu, Jun 17, 2010 at 2:29 AM, Joseph Adams wrote: >        * No surprises when casting between JSON and TEXT.  If approach B is > used, '"string"'::json would be '"string"', but '"string"'::json::text > would be 'string'. As far as I'm concerned, that's a non-starter. It should be legal to ca

[HACKERS] pg_dump does not honor namespaces when functions are used in index

2010-06-17 Thread Jean-Baptiste Quenot
Dear hackers, I have a pretty nasty problem to submit to your careful scrutiny. Please consider the following piece of SQL code: CREATE SCHEMA bar; SET search_path = bar; CREATE FUNCTION bar() RETURNS text AS $$ BEGIN RETURN 'foobar'; END $$ LANGUAGE plpgsql IMMUTABLE; CREATE SCHEMA foo;

[HACKERS] DB crash SOS

2010-06-17 Thread Felde Norbert
Hi all, I use 8.2 on a windows server 2008. Suddenly postgres crashed and I can not do anything. Strange things happend to postgres in the last few weeks. Once, there was so many postgres process, that I could not connect to it with pgAdmin3. It said that too many connections and I had to restart

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

2010-06-17 Thread Magnus Hagander
On Thu, Jun 17, 2010 at 08:29, Marc G. Fournier wrote: > On Wed, 16 Jun 2010, 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 post

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

2010-06-17 Thread Magnus Hagander
On Thu, Jun 17, 2010 at 09:20, Fujii Masao wrote: > On Thu, Jun 17, 2010 at 4:02 PM, Rafael Martinez > wrote: >> I tested this yesterday and I could not get any reaction from the wal >> receiver even after using minimal values compared to the default values  . >> >> The default values in linux fo

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

2010-06-17 Thread Fujii Masao
On Thu, Jun 17, 2010 at 4:02 PM, Rafael Martinez wrote: > I tested this yesterday and I could not get any reaction from the wal > receiver even after using minimal values compared to the default values  . > > The default values in linux for tcp_keepalive_time, tcp_keepalive_intvl > and tcp_keepali

[HACKERS] Debug message in RemoveOldXlogFiles

2010-06-17 Thread Fujii Masao
Hi, In the following debug message in RemoveOldXlogFiles(), the variables "log" and "seg" don't indicate LSN, so we should use %u instead of %X? elog(DEBUG2, "removing WAL segments older than %X/%X", log, seg); I attached the patch to do so. Regards, -- Fujii Masao NIPPON TELEGRAPH AND TE

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

2010-06-17 Thread Rafael Martinez
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Heikki Linnakangas wrote: > > We're not talking about a timeout for promoting standby to master. The > problem is that the standby doesn't notice that from the master's point > of view, the connection has been broken. Whether it's because of a > netw