Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-08 Thread Tom Lane
Brendan Jurd dire...@gmail.com writes: On 7 April 2013 01:43, Kevin Grittner kgri...@ymail.com wrote: Your interpretation matches mine all around. It is unfortunate that we have hijacked the standard's syntax for arrays to add a matrix feature. It really is unfortunate. I wonder if it was

Re: [HACKERS] Enabling Checksums

2013-04-08 Thread Simon Riggs
On 6 April 2013 08:40, Heikki Linnakangas hlinnakan...@vmware.com wrote: AFAICS that could be easily avoided by doing a simple PageGetLSN() like we used to, if checksums are not enabled. In XLogCheckBuffer: /* * XXX We assume page LSN is first data on *every* page that can

Re: [HACKERS] corrupt pages detected by enabling checksums

2013-04-08 Thread Simon Riggs
On 6 April 2013 15:44, Andres Freund and...@2ndquadrant.com wrote: * In xlog_redo, it seemed slightly awkward to call XLogRecGetData twice. Merely a matter of preference but I thought I would mention it. Youre absolutely right, memcpy should have gotten passed 'data', not

Re: [HACKERS] Patch for removng unused targets

2013-04-08 Thread Etsuro Fujita
From: Tom Lane [mailto:t...@sss.pgh.pa.us] Alexander Korotkov aekorot...@gmail.com writes: On Mon, Dec 3, 2012 at 8:31 PM, Tom Lane t...@sss.pgh.pa.us wrote: But having said that, I'm wondering (without having read the patch) why you need anything more than the existing resjunk field.

Re: [HACKERS] WIP: index support for regexp search

2013-04-08 Thread Alexander Korotkov
On Mon, Apr 8, 2013 at 9:28 AM, Tom Lane t...@sss.pgh.pa.us wrote: Alexander Korotkov aekorot...@gmail.com writes: [ trgm-regexp-0.15.patch.gz ] I spent the weekend hacking on this, making a number of bug fixes and a whole lot of cosmetic changes. I think there are large parts of this

Re: [HACKERS] commit dfda6ebaec67 versus wal_keep_segments

2013-04-08 Thread Heikki Linnakangas
On 03.04.2013 22:50, Jeff Janes wrote: On Wed, Apr 3, 2013 at 11:14 AM, Heikki Linnakangashlinnakan...@vmware.com wrote: On 03.04.2013 18:58, Jeff Janes wrote: On Tue, Apr 2, 2013 at 10:08 PM, Jeff Janesjeff.ja...@gmail.com wrote: This commit introduced a problem with

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-08 Thread Brendan Jurd
On 8 April 2013 16:09, Tom Lane t...@sss.pgh.pa.us wrote: Brendan Jurd dire...@gmail.com writes: On the specific issue of CARDINALITY, I guess we need to decide whether we are going to pretend that our array/matrix thing is actually nested. I first argued that we should not. But it occurred

Re: [HACKERS] Unrecognized type error (postgres 9.1.4)

2013-04-08 Thread Tom Lane
Rodrigo Barboza rodrigombu...@gmail.com writes: UPDATE tm32 SET a = a + 1 WHERE a $i; ERROR: unsupported type: 202886 I'm betting that's coming from scalargtsel, which doesn't know anything about your type, but you've nominated it to be the selectivity function for anyway. /*

Re: [HACKERS] Unrecognized type error (postgres 9.1.4)

2013-04-08 Thread Rodrigo Barboza
On Mon, Apr 8, 2013 at 11:25 AM, Tom Lane t...@sss.pgh.pa.us wrote: Rodrigo Barboza rodrigombu...@gmail.com writes: UPDATE tm32 SET a = a + 1 WHERE a $i; ERROR: unsupported type: 202886 I'm betting that's coming from scalargtsel, which doesn't know anything about your type, but you've

Re: [HACKERS] [COMMITTERS] pgsql: Get rid of USE_WIDE_UPPER_LOWER dependency in trigram constructi

2013-04-08 Thread Tom Lane
Dimitri Fontaine dimi...@2ndquadrant.fr writes: Tom Lane t...@sss.pgh.pa.us writes: If there is anybody still using Postgres on machines without wcstombs() or towlower(), and they have non-ASCII data indexed by pg_trgm, they'll need to REINDEX those indexes after pg_upgrade to 9.3, else

[HACKERS] Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: Should array_length() Return NULL)

2013-04-08 Thread Greg Stark
On Thu, Apr 4, 2013 at 4:10 PM, Merlin Moncure mmonc...@gmail.com wrote: The only reasonable answer for this (a provably used, non-security, non-standards violating, non-gross functionality breakage case) is *zero*. Our historically cavalier attitude towards compatibility breakage has been

Re: [HACKERS] pg_dump with postgis extension dumps rules separately

2013-04-08 Thread Dimitri Fontaine
Joe Conway m...@joeconway.com writes: Shouldn't that CREATE RULE be implicitly part of the CREATE EXTENSION? Yes. It's a bug, been reported before, it's on my todo list. I have arranged some time to care about it while in beta, I won't be able to have at it before then… Regards, -- Dimitri

Re: [HACKERS] Unrecognized type error (postgres 9.1.4)

2013-04-08 Thread Rodrigo Barboza
On Mon, Apr 8, 2013 at 11:27 AM, Rodrigo Barboza rodrigombu...@gmail.comwrote: On Mon, Apr 8, 2013 at 11:25 AM, Tom Lane t...@sss.pgh.pa.us wrote: Rodrigo Barboza rodrigombu...@gmail.com writes: UPDATE tm32 SET a = a + 1 WHERE a $i; ERROR: unsupported type: 202886 I'm betting that's

Re: [HACKERS] [COMMITTERS] pgsql: Get rid of USE_WIDE_UPPER_LOWER dependency in trigram constructi

2013-04-08 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: How exactly would you know whether the previous installation was built without HAVE_WCSTOMBS/HAVE_TOWLOWER? That's not exposed anywhere reliable. And it's not out of the question that somebody upgrading to a newer PG version might upgrade his OS too, so I

Re: [HACKERS] pg_dump with postgis extension dumps rules separately

2013-04-08 Thread Joe Conway
On 04/08/2013 07:42 AM, Dimitri Fontaine wrote: Joe Conway m...@joeconway.com writes: Shouldn't that CREATE RULE be implicitly part of the CREATE EXTENSION? Yes. It's a bug, been reported before, it's on my todo list. I have arranged some time to care about it while in beta, I won't be able

Re: [HACKERS] Unrecognized type error (postgres 9.1.4)

2013-04-08 Thread Rodrigo Barboza
On Mon, Apr 8, 2013 at 11:44 AM, Rodrigo Barboza rodrigombu...@gmail.comwrote: On Mon, Apr 8, 2013 at 11:27 AM, Rodrigo Barboza rodrigombu...@gmail.comwrote: On Mon, Apr 8, 2013 at 11:25 AM, Tom Lane t...@sss.pgh.pa.us wrote: Rodrigo Barboza rodrigombu...@gmail.com writes: UPDATE

Re: [HACKERS] pg_dump with postgis extension dumps rules separately

2013-04-08 Thread Dimitri Fontaine
Joe Conway m...@joeconway.com writes: OK, maybe I'll try to take a look in the meantime. That would be awesome :) Did you have any comment on the other pg_dump patch (reviewed by Vibhor)? This whole extension table filtering and dumping is more in Tom's realm, so I guess that if you want to

Re: [HACKERS] unused code in float8_to_char , formatting.c ?

2013-04-08 Thread Greg Jaskiewicz
On 7 Apr 2013, at 05:14, Robert Haas robertmh...@gmail.com wrote: On Thu, Apr 4, 2013 at 6:47 PM, Greg Jaskiewicz gryz...@me.com wrote: Looking around the code Today, one of my helpful tools detected this dead code. As far as I can see, it is actually unused call to strlen() in

[HACKERS] Inconsistent DB data in Streaming Replication

2013-04-08 Thread Samrat Revagade
Hello, We have been trying to figure out possible solutions to the following problem in streaming replication Consider following scenario: If master receives commit command, it writes and flushes commit WAL records to the disk, It also writes and flushes data page related to this transaction.

Re: [HACKERS] Inconsistent DB data in Streaming Replication

2013-04-08 Thread Shaun Thomas
On 04/08/2013 05:34 AM, Samrat Revagade wrote: One solution to avoid this situation is have the master send WAL records to standby and wait for ACK from standby committing WAL files to disk and only after that commit data page related to this transaction on master. Isn't this basically what

Re: [HACKERS] Inconsistent DB data in Streaming Replication

2013-04-08 Thread Tom Lane
Samrat Revagade revagade.sam...@gmail.com writes: We have been trying to figure out possible solutions to the following problem in streaming replication Consider following scenario: If master receives commit command, it writes and flushes commit WAL records to the disk, It also writes and

Re: [HACKERS] [BUGS] BUG #8043: 9.2.4 doesn't open WAL files from archive, only looks in pg_xlog

2013-04-08 Thread Jeff Bohmer
On Apr 6, 2013, at 1:24 PM, Jeff Janes jeff.ja...@gmail.com wrote: On Sat, Apr 6, 2013 at 1:24 AM, Heikki Linnakangas hlinnakan...@vmware.comwrote: Incidentally, I bumped into another custom backup script just a few weeks back that also excluded backup_label. I don't know what the author

Re: [HACKERS] Inconsistent DB data in Streaming Replication

2013-04-08 Thread Ants Aasma
On Mon, Apr 8, 2013 at 6:50 PM, Shaun Thomas stho...@optionshouse.com wrote: On 04/08/2013 05:34 AM, Samrat Revagade wrote: One solution to avoid this situation is have the master send WAL records to standby and wait for ACK from standby committing WAL files to disk and only after that commit

Re: [HACKERS] [sepgsql 2/3] Add db_schema:search permission checks

2013-04-08 Thread Kohei KaiGai
2013/4/5 Robert Haas robertmh...@gmail.com: On Thu, Apr 4, 2013 at 8:26 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: OK, I follow the manner of the terminology as we usually call it. The attached patch just replaced things you suggested. Thanks, I have committed this, after making some changes

Re: [HACKERS] Inconsistent DB data in Streaming Replication

2013-04-08 Thread Andres Freund
On 2013-04-08 19:26:33 +0300, Ants Aasma wrote: On Mon, Apr 8, 2013 at 6:50 PM, Shaun Thomas stho...@optionshouse.com wrote: On 04/08/2013 05:34 AM, Samrat Revagade wrote: One solution to avoid this situation is have the master send WAL records to standby and wait for ACK from standby

Re: [HACKERS] Inconsistent DB data in Streaming Replication

2013-04-08 Thread Ants Aasma
On Mon, Apr 8, 2013 at 7:38 PM, Andres Freund and...@2ndquadrant.com wrote: On 2013-04-08 19:26:33 +0300, Ants Aasma wrote: Not exactly. Sync-rep ensures that commit success is not sent to the client before a synchronous replica acks the commit record. What Samrat is proposing here is that WAL

Re: [HACKERS] Inconsistent DB data in Streaming Replication

2013-04-08 Thread Fujii Masao
On Mon, Apr 8, 2013 at 7:34 PM, Samrat Revagade revagade.sam...@gmail.com wrote: Hello, We have been trying to figure out possible solutions to the following problem in streaming replication Consider following scenario: If master receives commit command, it writes and flushes commit WAL

Re: [HACKERS] Unrecognized type error (postgres 9.1.4)

2013-04-08 Thread Rodrigo Barboza
On Mon, Apr 8, 2013 at 12:14 PM, Rodrigo Barboza rodrigombu...@gmail.comwrote: On Mon, Apr 8, 2013 at 11:44 AM, Rodrigo Barboza rodrigombu...@gmail.comwrote: On Mon, Apr 8, 2013 at 11:27 AM, Rodrigo Barboza rodrigombu...@gmail.com wrote: On Mon, Apr 8, 2013 at 11:25 AM, Tom Lane

Re: [HACKERS] Back branches vs. gcc 4.8.0

2013-04-08 Thread Peter Eisentraut
On 4/5/13 6:14 PM, Tom Lane wrote: Since gcc 4.8 is going to be on a lot of people's machines pretty soon, I think we need to do something to prevent it from breaking 8.4.x and 9.0.x. It looks like our choices are (1) teach configure to enable -fno-aggressive-loop-optimizations if the

Re: [HACKERS] Back branches vs. gcc 4.8.0

2013-04-08 Thread Gavin Flower
On 09/04/13 08:41, Peter Eisentraut wrote: On 4/5/13 6:14 PM, Tom Lane wrote: Since gcc 4.8 is going to be on a lot of people's machines pretty soon, I think we need to do something to prevent it from breaking 8.4.x and 9.0.x. It looks like our choices are (1) teach configure to enable

Re: [HACKERS] Unrecognized type error (postgres 9.1.4)

2013-04-08 Thread Rodrigo Barboza
On Mon, Apr 8, 2013 at 4:30 PM, Rodrigo Barboza rodrigombu...@gmail.comwrote: On Mon, Apr 8, 2013 at 12:14 PM, Rodrigo Barboza rodrigombu...@gmail.comwrote: On Mon, Apr 8, 2013 at 11:44 AM, Rodrigo Barboza rodrigombu...@gmail.com wrote: On Mon, Apr 8, 2013 at 11:27 AM, Rodrigo

Re: [HACKERS] Fwd: Range types (DATERANGE, TSTZRANGE) in a foreign key with inclusion logic

2013-04-08 Thread Kevin Grittner
Matthias Nagel matthias.h.na...@gmail.com wrote: I would like to do someting like: FOREIGN KEY ( container_id, lifetime ) REFERENCES other_table (id, lifetime ) USING gist ( container_id WITH =, lifetime WITH @ ) (Of course, this is PosgreSQL-pseudo-code, but it hopefully make clear what

[HACKERS] Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: Should array_length() Return NULL)

2013-04-08 Thread Josh Berkus
All, As much as I have a keen interest in this feature, it isn't (AFAIK) being considered for 9.3. Given that it's generated a fair amount of controversy, could we table it until 9.3 beta? There's still plenty of unresolved 9.3 patches in the queue. -- Josh Berkus PostgreSQL Experts Inc.

Re: [HACKERS] Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: Should array_length() Return NULL)

2013-04-08 Thread Bruce Momjian
On Mon, Apr 8, 2013 at 04:24:31PM -0700, Josh Berkus wrote: All, As much as I have a keen interest in this feature, it isn't (AFAIK) being considered for 9.3. Given that it's generated a fair amount of controversy, could we table it until 9.3 beta? There's still plenty of unresolved 9.3

[HACKERS] Reassign variable value in XLogReadRecord

2013-04-08 Thread Dickson S. Guedes
Hello, While walking in the code I see the following code in src/backend/access/transam/xlogreader.c:177-191 XLogRecord * XLogReadRecord(XLogReaderState *state, XLogRecPtr RecPtr, char **errormsg) { XLogRecord *record; XLogRecPtr targetPagePtr; bool

[HACKERS] Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: Should array_length() Return NULL)

2013-04-08 Thread Brendan Jurd
On 9 April 2013 09:24, Josh Berkus j...@agliodbs.com wrote: As much as I have a keen interest in this feature, it isn't (AFAIK) being considered for 9.3. Given that it's generated a fair amount of controversy, could we table it until 9.3 beta? There's still plenty of unresolved 9.3 patches

Re: [HACKERS] Enabling Checksums

2013-04-08 Thread Ants Aasma
On Fri, Apr 5, 2013 at 9:39 PM, Ants Aasma a...@cybertec.at wrote: Unless somebody tells me not to waste my time I'll go ahead and come up with a workable patch by Monday. And here you go. I decided to be verbose with the comments as it's easier to delete a comment to write one. I also left in

Re: [HACKERS] Page replacement algorithm in buffer cache

2013-04-08 Thread Robert Haas
On Fri, Apr 5, 2013 at 11:08 PM, Amit Kapila amit.kap...@huawei.com wrote: I still have one more doubt, consider the below scenario for cases when we Invalidate buffers during moving to freelist v/s just move to freelist Backend got the buffer from freelist for a request of page-9 (number 9

Re: [HACKERS] WIP: index support for regexp search

2013-04-08 Thread Tom Lane
Alexander Korotkov aekorot...@gmail.com writes: On Mon, Apr 8, 2013 at 9:28 AM, Tom Lane t...@sss.pgh.pa.us wrote: I spent the weekend hacking on this, making a number of bug fixes and a whole lot of cosmetic changes. I think there are large parts of this that are in committable shape now,