Re: [HACKERS] Proof of concept: auto updatable views

2012-08-28 Thread Dean Rasheed
On 27 August 2012 20:26, Dean Rasheed dean.a.rash...@gmail.com wrote: Here's an updated WIP patch which I'll add to the next commitfest. Re-sending gzipped (apparently the mail system corrupted it last time). Regards, Dean auto-update-views.patch.gz Description: GNU Zip compressed data --

Re: [HACKERS] Timing overhead and Linux clock sources

2012-08-28 Thread Ants Aasma
On Tue, Aug 28, 2012 at 6:13 AM, Greg Smith g...@2ndquadrant.com wrote: After staring at all the examples I generated again, I think Bruce is right that the newer format he's suggesting is better. I know I never thought about whether reordering for easier interpretation made sense before, and

Re: [HACKERS] [v9.3] writable foreign tables

2012-08-28 Thread Kohei KaiGai
2012/8/27 Albe Laurenz laurenz.a...@wien.gv.at: Kohei KaiGai wrote: 2012/8/25 Robert Haas robertmh...@gmail.com: On Thu, Aug 23, 2012 at 1:10 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: It is a responsibility of FDW extension (and DBA) to ensure each foreign-row has a unique identifier that

Re: [HACKERS] [v9.3] writable foreign tables

2012-08-28 Thread Kohei KaiGai
2012/8/27 Shigeru HANADA shigeru.han...@gmail.com: Kaigai-san, On Thu, Aug 23, 2012 at 2:10 PM, Kohei KaiGai kai...@kaigai.gr.jp wrote: The patched portion at contrib/file_fdw.c does not make sense actually. It just prints messages for each invocation. It is just a proof-of-concept to show

Re: [HACKERS] [v9.3] writable foreign tables

2012-08-28 Thread Albe Laurenz
Kohei KaiGai wrote: It is a responsibility of FDW extension (and DBA) to ensure each foreign-row has a unique identifier that has 48-bits width integer data type in maximum. For example, if primary key of the remote table is Text data type, an idea is to use a hash table to track the

Re: [HACKERS] [v9.3] writable foreign tables

2012-08-28 Thread Kohei KaiGai
2012/8/28 Albe Laurenz laurenz.a...@wien.gv.at: Kohei KaiGai wrote: It is a responsibility of FDW extension (and DBA) to ensure each foreign-row has a unique identifier that has 48-bits width integer data type in maximum. For example, if primary key of the remote table is Text data type, an

[HACKERS] SP-GiST micro-optimizations

2012-08-28 Thread Heikki Linnakangas
I did some performance testing of building an SP-GiST index, with the new range type SP-GiST opclass. There's some low-hanging fruit there, I was able to reduce the index build time on a simple test case by about 20% with a few small changes. I created a test table with: create table

[HACKERS] pg_dump incorrect output in plaintext mode

2012-08-28 Thread Magnus Hagander
$ pg_dump -v postgres -Fc -t t /dev/null ... pg_dump: dumping contents of table t ... but in plaintext: $ pg_dump -v postgres -Fp -t t /dev/null pg_dump: creating TABLE t pg_dump: restoring data for table t pg_dump: dumping contents of table t pg_dump: setting owner and privileges for TABLE t

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-08-28 Thread Robert Haas
On Mon, Aug 27, 2012 at 7:13 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: I agree that redefining the lexer behavior is a can of worms. What I don't understand is why f(2+2) can't call f(smallint) when that's the only extant f. It seems to me that we could

Re: [HACKERS] Timing overhead and Linux clock sources

2012-08-28 Thread Robert Haas
On Mon, Aug 27, 2012 at 11:13 PM, Greg Smith g...@2ndquadrant.com wrote: After staring at all the examples I generated again, I think Bruce is right that the newer format he's suggesting is better. OK by me, then. If you're happy, I'm happy. -- Robert Haas EnterpriseDB:

Re: [HACKERS] [v9.3] writable foreign tables

2012-08-28 Thread Tom Lane
Kohei KaiGai kai...@kaigai.gr.jp writes: Would it be too invasive to introduce a new pointer in TupleTableSlot that is NULL for anything but virtual tuples from foreign tables? I'm not certain whether the duration of TupleTableSlot is enough to carry a private datum between scan and modify

Re: [HACKERS] [v9.3] writable foreign tables

2012-08-28 Thread Tom Lane
Kohei KaiGai kai...@kaigai.gr.jp writes: It seems to me TargetEntry of the parse tree can inform us which column should be modified on UPDATE or INSERT. If it has just a Var element that reference original table as-is, it means here is no change. Only if you're not going to support BEFORE

Re: [HACKERS] [v9.3] writable foreign tables

2012-08-28 Thread David Fetter
On Tue, Aug 28, 2012 at 10:58:25AM -0400, Tom Lane wrote: Kohei KaiGai kai...@kaigai.gr.jp writes: It seems to me TargetEntry of the parse tree can inform us which column should be modified on UPDATE or INSERT. If it has just a Var element that reference original table as-is, it means here

Re: [HACKERS] pg_dump incorrect output in plaintext mode

2012-08-28 Thread Alvaro Herrera
Excerpts from Magnus Hagander's message of mar ago 28 08:08:24 -0400 2012: In particular, the restoring data is obviously completely wrong. But AFAICT, the creating table and setting owner etc are also wrong... This is because pg_dump calls RestoreArchive(fout). Do we need to pass down a

Re: [HACKERS] [v9.3] writable foreign tables

2012-08-28 Thread Kohei KaiGai
2012/8/28 David Fetter da...@fetter.org: On Tue, Aug 28, 2012 at 10:58:25AM -0400, Tom Lane wrote: Kohei KaiGai kai...@kaigai.gr.jp writes: It seems to me TargetEntry of the parse tree can inform us which column should be modified on UPDATE or INSERT. If it has just a Var element that

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-08-28 Thread Fabrízio de Royes Mello
2012/8/27 Dickson S. Guedes lis...@guedesoft.net [...] Two questions: - Should this patch implements others INEs like ADD COLUMN IF NOT EXISTS? If this feature is important I believe we must implement it. Exists several CREATE statements without IF NOT EXISTS option too, so we can

Re: [HACKERS] [v9.3] writable foreign tables

2012-08-28 Thread David Fetter
On Tue, Aug 28, 2012 at 05:18:34PM +0200, Kohei KaiGai wrote: 2012/8/28 David Fetter da...@fetter.org: On Tue, Aug 28, 2012 at 10:58:25AM -0400, Tom Lane wrote: Kohei KaiGai kai...@kaigai.gr.jp writes: It seems to me TargetEntry of the parse tree can inform us which column should be

Re: [HACKERS] [v9.3] writable foreign tables

2012-08-28 Thread Kohei KaiGai
2012/8/28 Tom Lane t...@sss.pgh.pa.us: Kohei KaiGai kai...@kaigai.gr.jp writes: Would it be too invasive to introduce a new pointer in TupleTableSlot that is NULL for anything but virtual tuples from foreign tables? I'm not certain whether the duration of TupleTableSlot is enough to carry a

Re: [HACKERS] wal_buffers

2012-08-28 Thread Bruce Momjian
On Tue, Aug 28, 2012 at 09:40:33AM +0530, Amit Kapila wrote: From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Bruce Momjian Added to TODO: Allow reporting of stalls due to wal_buffer wrap-around

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-08-28 Thread David E. Wheeler
On Aug 28, 2012, at 8:19 AM, Fabrízio de Royes Mello wrote: - Should this patch implements others INEs like ADD COLUMN IF NOT EXISTS? If this feature is important I believe we must implement it. Exists several CREATE statements without IF NOT EXISTS option too, so we can discuss more

Re: [HACKERS] [v9.3] writable foreign tables

2012-08-28 Thread Kohei KaiGai
2012/8/28 David Fetter da...@fetter.org: On Tue, Aug 28, 2012 at 05:18:34PM +0200, Kohei KaiGai wrote: 2012/8/28 David Fetter da...@fetter.org: On Tue, Aug 28, 2012 at 10:58:25AM -0400, Tom Lane wrote: Kohei KaiGai kai...@kaigai.gr.jp writes: It seems to me TargetEntry of the parse tree

Re: [HACKERS] Advisory Lock BIGINT Values

2012-08-28 Thread David E. Wheeler
On Aug 27, 2012, at 8:56 PM, Tom Lane wrote: This formula is not actually correct, as you'd soon find out if you experimented with values with the high-order bit of the low-order word set. (Hint: sign extension.) The correct formula is both simpler and far more efficient: (classid::int8

Re: [HACKERS] Advisory Lock BIGINT Values

2012-08-28 Thread Bruce Momjian
On Mon, Aug 27, 2012 at 11:56:32PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: On Fri, Mar 9, 2012 at 04:36:08PM -0800, David E. Wheeler wrote: A typebigint/type key is displayed with its high-order half in the structfieldclassid/ column, its low-order half

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-08-28 Thread Dickson S. Guedes
2012/8/28 David E. Wheeler da...@justatheory.com: On Aug 28, 2012, at 8:19 AM, Fabrízio de Royes Mello wrote: - Should this patch implements others INEs like ADD COLUMN IF NOT EXISTS? If this feature is important I believe we must implement it. Exists several CREATE statements without IF

Re: [HACKERS] [v9.3] writable foreign tables

2012-08-28 Thread David Fetter
On Tue, Aug 28, 2012 at 06:08:59PM +0200, Kohei KaiGai wrote: 2012/8/28 David Fetter da...@fetter.org: On Tue, Aug 28, 2012 at 05:18:34PM +0200, Kohei KaiGai wrote: 2012/8/28 David Fetter da...@fetter.org: On Tue, Aug 28, 2012 at 10:58:25AM -0400, Tom Lane wrote: Kohei KaiGai

[HACKERS] Use of systable_beginscan_ordered in event trigger patch

2012-08-28 Thread Tom Lane
I find $SUBJECT fairly scary, because systable_beginscan_ordered() is dependent on having a working, non-corrupt index. If you are trying to run the backend with ignore_system_indexes so that you can rebuild corrupt indexes, uses of systable_beginscan_ordered() represent places where you can't

Re: [HACKERS] pg_dump incorrect output in plaintext mode

2012-08-28 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: but in plaintext: $ pg_dump -v postgres -Fp -t t /dev/null pg_dump: creating TABLE t pg_dump: restoring data for table t pg_dump: dumping contents of table t pg_dump: setting owner and privileges for TABLE t pg_dump: setting owner and privileges

Re: [HACKERS] Use of systable_beginscan_ordered in event trigger patch

2012-08-28 Thread Andres Freund
On Tuesday, August 28, 2012 06:39:50 PM Tom Lane wrote: Or maybe we should disable event triggers altogether in standalone mode? I can think of plenty of ways that a broken event trigger could cause enough havoc that you'd wish there was a way to suppress it, at least for long enough to drop

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-08-28 Thread Greg Stark
On Mon, Aug 27, 2012 at 10:03 PM, Robert Haas robertmh...@gmail.com wrote: We really ought to put some effort into solving this problem. I've seen a few Oracle-migration talks at conferences, and *every one* of them has mentioned the smallint problem. It hits our customers, too. I'm kind of

Re: [HACKERS] psql: tab-completion fails SET var=

2012-08-28 Thread Bruce Momjian
On Fri, Mar 30, 2012 at 08:15:22PM +0200, Erik Rijkers wrote: (in hopes that the current changes to tab-completion will help to get this fixed) tab-completion goes wrong on SET setting=... example: If you want to input set search_path=myschema; without spaces around '=', and you try

Re: [HACKERS] Timing overhead and Linux clock sources

2012-08-28 Thread Bruce Momjian
On Tue, Aug 28, 2012 at 10:43:07AM -0400, Robert Haas wrote: On Mon, Aug 27, 2012 at 11:13 PM, Greg Smith g...@2ndquadrant.com wrote: After staring at all the examples I generated again, I think Bruce is right that the newer format he's suggesting is better. OK by me, then. If you're

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-08-28 Thread Tom Lane
Greg Stark st...@mit.edu writes: Perhaps just a warning on CREATE FUNCTION when one of the arguments doesn't have an implicit cast from the canonical data type of that hierarchy saying perhaps you should consider using that data type and let Postgres convert instead of the more specific data

[HACKERS] default deny for roles

2012-08-28 Thread David Fetter
Folks, There are situations where a default deny policy is the best fit. To that end, I have a modest proposal: REVOKE PUBLIC FROM role; Thenceforth, the role in question would only have access to things it was specifically granted. What say? Cheers, David. -- David Fetter

Re: [HACKERS] SP-GiST micro-optimizations

2012-08-28 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: Drilling into the profile, I came up with three little optimizations: 1. Within spgdoinsert, a significant portion of the CPU time is spent on line 2033 in spgdoinsert.c: memset(out, 0, sizeof(out)); That zeroes out a small

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-08-28 Thread Robert Haas
On Tue, Aug 28, 2012 at 1:06 PM, Tom Lane t...@sss.pgh.pa.us wrote: Also, right at the moment it's not clear to me whether there are any other cases besides integer literal vs smallint argument. I think that's the only particularly surprising case within the numeric hierarchy --- and for

Re: [HACKERS] Use of systable_beginscan_ordered in event trigger patch

2012-08-28 Thread Robert Haas
On Tue, Aug 28, 2012 at 12:47 PM, Andres Freund and...@2ndquadrant.com wrote: On Tuesday, August 28, 2012 06:39:50 PM Tom Lane wrote: Or maybe we should disable event triggers altogether in standalone mode? I can think of plenty of ways that a broken event trigger could cause enough havoc that

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-08-28 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Aug 28, 2012 at 1:06 PM, Tom Lane t...@sss.pgh.pa.us wrote: Also, right at the moment it's not clear to me whether there are any other cases besides integer literal vs smallint argument. I think that's the only particularly surprising case

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-08-28 Thread Jim Nasby
On 8/27/12 5:19 PM, Greg Sabino Mullane wrote: Tom Lane replied: Come on, really? Note that the above example works without casts if you use int*or* bigint*or* numeric, but not smallint. That could be fixed by causing sufficiently-small integers to lex as smallints, Is there any general

Re: [HACKERS] default deny for roles

2012-08-28 Thread Tom Lane
David Fetter da...@fetter.org writes: There are situations where a default deny policy is the best fit. To that end, I have a modest proposal: REVOKE PUBLIC FROM role; Neither possible nor sensible. PUBLIC means everybody, and is implemented in a way that doesn't allow any other

Re: [HACKERS] default deny for roles

2012-08-28 Thread Stephen Frost
David, * David Fetter (da...@fetter.org) wrote: There are situations where a default deny policy is the best fit. That's certainly true. It's also what we *have*. The only places where we aren't default deny are places where things have been granted to public. Feel free to revoke public from

Re: [HACKERS] SP-GiST micro-optimizations

2012-08-28 Thread Heikki Linnakangas
On 28.08.2012 20:30, Tom Lane wrote: Heikki Linnakangasheikki.linnakan...@enterprisedb.com writes: Drilling into the profile, I came up with three little optimizations: 1. Within spgdoinsert, a significant portion of the CPU time is spent on line 2033 in spgdoinsert.c: memset(out, 0,

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-08-28 Thread Robert Haas
On Tue, Aug 28, 2012 at 1:39 PM, Tom Lane t...@sss.pgh.pa.us wrote: The other case that comes up regularly is someone trying to pass some kind of number to a function such as LPAD(). There is only one LPAD() so no ambiguity exists, but PostgreSQL doesn't even see that there's a candidate.

Re: [HACKERS] SP-GiST micro-optimizations

2012-08-28 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: On 28.08.2012 20:30, Tom Lane wrote: Fascinating. I'd been of the opinion that modern compilers would inline memset() for themselves and MemSet was probably not better than what the compiler could do these days. What platform are

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-08-28 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Aug 28, 2012 at 1:39 PM, Tom Lane t...@sss.pgh.pa.us wrote: There still won't be a candidate for that one, unless you're proposing to allow explicit-only coercions to be applied implicitly. [ not so, see kluge in find_coercion_pathway() ] Oh,

Re: [HACKERS] FATAL: bogus data in lock file postmaster.pid:

2012-08-28 Thread Bruce Momjian
On Mon, Aug 27, 2012 at 10:17:43PM -0400, Bruce Momjian wrote: Seems pg_ctl would also need some cleanup if we change the error message and/or timing. I am thinking we should just change the error message in the postmaster and pg_ctl to say the file is empty, and call it done (no hint

Re: [HACKERS] pg_dump incorrect output in plaintext mode

2012-08-28 Thread Magnus Hagander
On Tue, Aug 28, 2012 at 6:42 PM, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: but in plaintext: $ pg_dump -v postgres -Fp -t t /dev/null pg_dump: creating TABLE t pg_dump: restoring data for table t pg_dump: dumping contents of table t pg_dump: setting

Re: [HACKERS] Audit Logs WAS: temporal support patch

2012-08-28 Thread Jim Nasby
On 8/22/12 3:03 AM, Pavel Stehule wrote: SELECT coverage_amt FROM policy FOR SYSTEM_TIME AS OF '2010-12-01' WHERE id = ; SELECT count(*) FROM policy FOR SYSTEM_TIME FROM '2011-11-30' TO '-12-30' WHERE vin = 'A'; I like this design - it is simple without other objects The thing I

Re: [HACKERS] SP-GiST micro-optimizations

2012-08-28 Thread Ants Aasma
On Tue, Aug 28, 2012 at 9:42 PM, Tom Lane t...@sss.pgh.pa.us wrote: Seems like that's down to the CPU not doing rep stosq particularly quickly, which might well be chip-specific. AMD optimization manual[1] states the following: For repeat counts of less than 4k, expand REP string

Re: [HACKERS] Audit Logs WAS: temporal support patch

2012-08-28 Thread Pavel Stehule
2012/8/28 Jim Nasby j...@nasby.net: On 8/22/12 3:03 AM, Pavel Stehule wrote: SELECT coverage_amt FROM policy FOR SYSTEM_TIME AS OF '2010-12-01' WHERE id = ; SELECT count(*) FROM policy FOR SYSTEM_TIME FROM '2011-11-30' TO '-12-30' WHERE vin = 'A'; I like this design - it is

Re: [HACKERS] pg_dump incorrect output in plaintext mode

2012-08-28 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Tue, Aug 28, 2012 at 6:42 PM, Tom Lane t...@sss.pgh.pa.us wrote: I don't see anything particularly incorrect about that. The point of the --verbose switch is to track what pg_dump is doing, and if what it's doing involves going through

Re: [HACKERS] FATAL: bogus data in lock file postmaster.pid:

2012-08-28 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Updated patch attached which just reports the file as empty. I assume we don't want the extra text output for pg_ctl like we do for the backend. The backend side of this looks mostly sane to me (but drop the \n, messages are not supposed to contain

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-08-28 Thread Robert Haas
On Tue, Aug 28, 2012 at 2:55 PM, Tom Lane t...@sss.pgh.pa.us wrote: Oh, I'd forgotten that worked that way. Frankly, that makes me quite a bit more concerned about this proposal than I was before. I do *not* want to re-introduce silent cross-category casts to text, not even if there's no

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-08-28 Thread Robert Haas
On Mon, Aug 27, 2012 at 7:43 PM, Tom Lane t...@sss.pgh.pa.us wrote: There's also the big-picture question of whether we should just get rid of fuzzy comparisons in the geometric types instead of trying to hack indexes to work around them. +1 for that approach, but only if I don't have to do

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-08-28 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Aug 28, 2012 at 2:55 PM, Tom Lane t...@sss.pgh.pa.us wrote: Oh, I'd forgotten that worked that way. Frankly, that makes me quite a bit more concerned about this proposal than I was before. I do *not* want to re-introduce silent cross-category

Re: [HACKERS] temporal support patch

2012-08-28 Thread Jim Nasby
On 8/27/12 12:40 PM, Robert Haas wrote: On Sat, Aug 25, 2012 at 1:30 PM, David Johnstonpol...@yahoo.com wrote: My internals knowledge is basically zero but it would seem that If you simply wanted the end-of-transaction result you could just record nothing during the transaction and then copy

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-08-28 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Aug 27, 2012 at 7:43 PM, Tom Lane t...@sss.pgh.pa.us wrote: There's also the big-picture question of whether we should just get rid of fuzzy comparisons in the geometric types instead of trying to hack indexes to work around them. +1 for that

Re: [HACKERS] Audit Logs WAS: temporal support patch

2012-08-28 Thread Jim Nasby
On 8/28/12 2:51 PM, Pavel Stehule wrote: The thing I don't like about this is it assumes that time is the best way to refer to when things changed in a system. Not only is that a bad assumption, it also means that relating things to history becomes messy. On second hand I don't have a problem

Re: [HACKERS] splitting htup.h

2012-08-28 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: This patch is mainly doing four things: 1. take some typedefs and the HeapTupleData struct definition from access/htup.h, and put them in access/tupbasics.h. This new file is used as #include in all headers instead of htup.h. I'm unsure about

Re: [HACKERS] Audit Logs WAS: temporal support patch

2012-08-28 Thread Christopher Browne
On Tue, Aug 28, 2012 at 5:06 PM, Jim Nasby j...@nasby.net wrote: On 8/28/12 2:51 PM, Pavel Stehule wrote: The thing I don't like about this is it assumes that time is the best way to refer to when things changed in a system. Not only is that a bad assumption, it also means that relating

Re: [HACKERS] default deny for roles

2012-08-28 Thread Craig Ringer
On 08/29/2012 01:25 AM, David Fetter wrote: Folks, There are situations where a default deny policy is the best fit. To that end, I have a modest proposal: REVOKE PUBLIC FROM role; Thenceforth, the role in question would only have access to things it was specifically granted. Wouldn't

Re: [HACKERS] 64-bit API for large object

2012-08-28 Thread Tatsuo Ishii
Correct me if I am wrong. After expanding large object API to 64-bit, the max size of a large object will be 8TB(assuming 8KB default BLKSZ). large object max size = pageno(int32) * LOBLKSIZE = (2^32-1) * (BLCKSZ / 4)

Re: [HACKERS] default deny for roles

2012-08-28 Thread Andrew Dunstan
On 08/28/2012 09:09 PM, Craig Ringer wrote: On 08/29/2012 01:25 AM, David Fetter wrote: Folks, There are situations where a default deny policy is the best fit. To that end, I have a modest proposal: REVOKE PUBLIC FROM role; Thenceforth, the role in question would only have access to

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-08-28 Thread Craig Ringer
On 08/29/2012 01:32 AM, Robert Haas wrote: On Tue, Aug 28, 2012 at 1:06 PM, Tom Lane t...@sss.pgh.pa.us wrote: Also, right at the moment it's not clear to me whether there are any other cases besides integer literal vs smallint argument. I think that's the only particularly surprising case

[HACKERS] A note about add_path() and parameterized paths

2012-08-28 Thread Tom Lane
I've been looking more closely at add_path() and related functions while trying to decide exactly how I want to handle cases where all the available paths for a relation are parameterized (because it's got unresolved lateral references). It suddenly struck me that I missed a bet while revising

Re: [HACKERS] FATAL: bogus data in lock file postmaster.pid:

2012-08-28 Thread Bruce Momjian
On Tue, Aug 28, 2012 at 04:25:36PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Updated patch attached which just reports the file as empty. I assume we don't want the extra text output for pg_ctl like we do for the backend. The backend side of this looks mostly sane to

Re: [HACKERS] FATAL: bogus data in lock file postmaster.pid:

2012-08-28 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: On Tue, Aug 28, 2012 at 04:25:36PM -0400, Tom Lane wrote: The backend side of this looks mostly sane to me (but drop the \n, messages are not supposed to contain those). But the feof test proposed Removed. I thought we needed to add \n so that strings

Re: [HACKERS] default deny for roles

2012-08-28 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 08/28/2012 09:09 PM, Craig Ringer wrote: Wouldn't that render the user utterly unable to do anything until you added a bunch of GRANTs on the system catalogs for that user or a group they're a member of? Try it and see. You can do a lot without

Re: [HACKERS] 64-bit API for large object

2012-08-28 Thread Tom Lane
Tatsuo Ishii is...@postgresql.org writes: Correct me if I am wrong. After expanding large object API to 64-bit, the max size of a large object will be 8TB(assuming 8KB default BLKSZ). large object max size = pageno(int32) * LOBLKSIZE = (2^32-1) *

Re: [HACKERS] 64-bit API for large object

2012-08-28 Thread Tatsuo Ishii
pg_largeobject.pageno is a signed int, so I don't think we can let it go past 2^31-1, so half that. We could buy back the other bit if we redefined the column as oid instead of int4 (to make it unsigned), but I think that would create fairly considerable risk of confusion between the loid

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-08-28 Thread Robert Haas
On Tue, Aug 28, 2012 at 4:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: Well, I think that when there is only one LPAD function, there is also very little chance that the results will come out differently than the user expected. [ shrug... ] I'm having a hard time resisting the temptation to

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-08-28 Thread Robert Haas
On Tue, Aug 28, 2012 at 5:04 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Aug 27, 2012 at 7:43 PM, Tom Lane t...@sss.pgh.pa.us wrote: There's also the big-picture question of whether we should just get rid of fuzzy comparisons in the geometric types

Re: [HACKERS] 64-bit API for large object

2012-08-28 Thread Robert Haas
On Tue, Aug 28, 2012 at 10:51 PM, Tatsuo Ishii is...@postgresql.org wrote: pg_largeobject.pageno is a signed int, so I don't think we can let it go past 2^31-1, so half that. We could buy back the other bit if we redefined the column as oid instead of int4 (to make it unsigned), but I think

Re: [HACKERS] [BUGS] BUG #6572: The example of SPI_execute is bogus

2012-08-28 Thread Bruce Momjian
On Sun, Apr 15, 2012 at 12:29:39PM -0400, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: On Thu, Apr 5, 2012 at 2:39 AM, Hitoshi Harada umi.tan...@gmail.com wrote: On Wed, Apr 4, 2012 at 8:00 AM, Tom Lane t...@sss.pgh.pa.us wrote: Given the lack of complaints since 9.0, maybe we

Re: [HACKERS] default deny for roles

2012-08-28 Thread Andrew Dunstan
On 08/28/2012 10:42 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 08/28/2012 09:09 PM, Craig Ringer wrote: Wouldn't that render the user utterly unable to do anything until you added a bunch of GRANTs on the system catalogs for that user or a group they're a member of?

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-08-28 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Aug 28, 2012 at 4:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: The real point here though is that the proposed behavior change will affect all functions, not only the cases where you think there is only one sane behavior. And features such as

Re: [HACKERS] Audit Logs WAS: temporal support patch

2012-08-28 Thread Pavel Stehule
2012/8/28 Jim Nasby j...@nasby.net: On 8/28/12 2:51 PM, Pavel Stehule wrote: The thing I don't like about this is it assumes that time is the best way to refer to when things changed in a system. Not only is that a bad assumption, it also means that relating things to history becomes

Re: [HACKERS] splitting htup.h

2012-08-28 Thread Tom Lane
... btw, the buildfarm says you forgot contrib/ while fixing the collateral damage from these changes. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] FATAL: bogus data in lock file postmaster.pid:

2012-08-28 Thread Alvaro Herrera
Excerpts from Bruce Momjian's message of mar ago 28 22:21:27 -0400 2012: On Tue, Aug 28, 2012 at 04:25:36PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Updated patch attached which just reports the file as empty. I assume we don't want the extra text output for pg_ctl

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-08-28 Thread Tom Lane
I wrote: Robert Haas robertmh...@gmail.com writes: That problem is dead. The reason it's dead is that we killed it in 8.3. I don't want it coming back to life, but I think that that will be exactly the outcome if we let any implicit casts to text get back into the rules for

Re: [HACKERS] FATAL: bogus data in lock file postmaster.pid:

2012-08-28 Thread Bruce Momjian
On Wed, Aug 29, 2012 at 12:24:26AM -0400, Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of mar ago 28 22:21:27 -0400 2012: On Tue, Aug 28, 2012 at 04:25:36PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Updated patch attached which just reports the file as

Re: [HACKERS] [WIP] Performance Improvement by reducing WAL for Update Operation

2012-08-28 Thread Amit kapila
On August 27, 2012 7:00 PM Amit Kapila wrote: On August 27, 2012 5:58 PM Heikki Linnakangas wrote: On 27.08.2012 15:18, Amit kapila wrote: I have implemented the WAL Reduction Patch for the case of HOT Update as Let's do it for HOT updates only. Simon Robert made good arguments on why this

Re: [HACKERS] FATAL: bogus data in lock file postmaster.pid:

2012-08-28 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: On Wed, Aug 29, 2012 at 12:24:26AM -0400, Alvaro Herrera wrote: It's a pretty strange line wrap you got in this version of the patch. Normally we just let the string run past the 78 char limit, without cutting it in any way. And moving the start of the