Re: [HACKERS] GSSAPI doesn't play nice with non-canonical host names

2008-01-28 Thread Magnus Hagander
On Sun, Jan 27, 2008 at 09:51:48PM -0500, Tom Lane wrote: Stephen Frost [EMAIL PROTECTED] writes: * Tom Lane ([EMAIL PROTECTED]) wrote: Whilst trying to reproduce bug #3902 I noticed that the code doesn't work with an abbreviated host name: Testing w/ 8.3RC2, everything seems to be

Re: [HACKERS] SSL connections don't cope with server crash very well at all

2008-01-28 Thread Magnus Hagander
On Sun, Jan 27, 2008 at 08:09:10PM -0500, Tom Lane wrote: If you do a manual kill -9 (for testing purposes) on its connected server process, psql normally recovers nicely: regression=# select 1; ?column? -- 1 (1 row) -- issue kill here in another window regression=#

Re: [HACKERS] RFC: array_agg() per SQL:200n

2008-01-28 Thread Gregory Stark
Neil Conway [EMAIL PROTECTED] writes: AFAIK the conclusion reached by the previous thread was that to be type safe, you'd need one distinct pseudotype per aggregate function, along with some way to let the planner distinguish this class of pseudotypes from other types (in order to apply the

Re: [HACKERS] plperl: Documentation on BYTEA decoding is wrong

2008-01-28 Thread Florian Weimer
* Robert Treat: Note we've been using Theo's plperl bytea patch on one of our production servers for some time; if anyone wants access to that lmk. I'm interested. Could you post a pointer to this code, please? -- Florian Weimer[EMAIL PROTECTED] BFK edv-consulting GmbH

Re: [HACKERS] [PATCHES] Proposed patch: synchronized_scanning GUC variable

2008-01-28 Thread Zeugswetter Andreas ADI SD
I liked the synchronized_sequential_scans idea myself. I think that's a bit too long. How about synchronized_scans, or synchronized_seqscans? We have enable_seqscan already, so that last choice seems to fit in. Yes looks good, how about synchronized_seqscan without plural ? Andreas

Re: [HACKERS] Proposal: Integrity check

2008-01-28 Thread Zdenek Kotala
Simon Riggs wrote: On Fri, 2008-01-25 at 17:56 +0100, Zdenek Kotala wrote: Regarding to Robert Mach's work during Google SOC on data integrity check. I would like to improve storage module and implement some Robert's code into the core. I would like to make following modification: 1) Add

Re: [HACKERS] CLUSTER and synchronized scans and pg_dump et al

2008-01-28 Thread Kevin Grittner
On Sun, Jan 27, 2008 at 9:02 AM, in message [EMAIL PROTECTED], Gregory Stark [EMAIL PROTECTED] wrote: Perhaps we should have some form of escape hatch for pg_dump to request real physical order when dumping clustered tables. It would seem reasonable to me for pg_dump to use ORDER BY to

Re: [HACKERS] CLUSTER and synchronized scans and pg_dump et al

2008-01-28 Thread Florian G. Pflug
Guillaume Smet wrote: On Jan 27, 2008 9:07 PM, Markus Bertheau [EMAIL PROTECTED] wrote: 2008/1/28, Tom Lane [EMAIL PROTECTED]: Do we have nominations for a name? The first idea that comes to mind is synchronized_scanning (defaulting to ON). synchronized_sequential_scans is a bit long, but

Re: [HACKERS] GSSAPI doesn't play nice with non-canonical host names

2008-01-28 Thread Magnus Hagander
On Sun, Jan 27, 2008 at 09:32:54PM -0500, Stephen Frost wrote: While I'm complaining: that's got to be one of the least useful error messages I've ever seen, and it's for a case that's surely going to be fairly common in practice. Can't we persuade GSSAPI to produce something more

Re: [PATCHES] [HACKERS] Including Snapshot Info with Indexes

2008-01-28 Thread Jonah H. Harris
On Jan 28, 2008 8:21 AM, Gokulakannan Somasundaram [EMAIL PROTECTED] wrote: I am not seeing my mail getting listed in the archives. So i am just resending it, in case the above one has got missed. It was sent. Archive processing is delayed. -- Jonah H. Harris, Sr. Software Architect | phone:

Re: [HACKERS] CLUSTER and synchronized scans and pg_dump et al

2008-01-28 Thread Kevin Grittner
On Mon, Jan 28, 2008 at 9:00 AM, in message [EMAIL PROTECTED], Andrew Dunstan [EMAIL PROTECTED] wrote: Kevin Grittner wrote: On Sun, Jan 27, 2008 at 9:02 AM, in message [EMAIL PROTECTED], Gregory Stark [EMAIL PROTECTED] wrote: Perhaps we should have some form of escape hatch for

Re: [HACKERS] [PATCHES] Proposed patch: synchronized_scanning GUC variable

2008-01-28 Thread Simon Riggs
On Sun, 2008-01-27 at 21:04 -0500, Tom Lane wrote: [ redirecting thread to -hackers ] Neil Conway [EMAIL PROTECTED] writes: On Sun, 2008-01-27 at 21:54 +, Gregory Stark wrote: I liked the synchronized_sequential_scans idea myself. I think that's a bit too long. How about

[HACKERS] system catalog constraints question

2008-01-28 Thread Gevik Babakhani
Hi, Is there a way to query the column constraints between the tables of system catalog. For example pg_attribute.atttypidpg_type.oid. This is described in the docs of course , but does the system use something like pg_constaint or the system catalog constraints are enforced only in the

Re: [HACKERS] CLUSTER and synchronized scans and pg_dump et al

2008-01-28 Thread Kevin Grittner
On Mon, Jan 28, 2008 at 10:36 AM, in message [EMAIL PROTECTED], Tom Lane [EMAIL PROTECTED] wrote: in general pg_dump's charter is to reproduce the state of the database as best it can, not to improve it. Seems that I've often seen it recommended as a way to eliminate bloat. It seems like

Re: [HACKERS] CLUSTER and synchronized scans and pg_dump et al

2008-01-28 Thread Guillaume Smet
Hi Florian, Glad to see you back! On Jan 28, 2008 3:25 PM, Florian G. Pflug [EMAIL PROTECTED] wrote: How about enable_syncscan, or enable_seqscan_sync? It's not strictly something the influences the planner, but maybe it's similar enough to justify a similar naming? It was my first idea but

Re: [HACKERS] system catalog constraints question

2008-01-28 Thread Gevik Babakhani
Thank you :) -Original Message- From: Heikki Linnakangas [mailto:[EMAIL PROTECTED] Sent: Monday, January 28, 2008 5:35 PM To: Gevik Babakhani Cc: pgsql-hackers@postgresql.org Subject: Re: [HACKERS] system catalog constraints question Gevik Babakhani wrote: Is there a way to

Re: [HACKERS] CLUSTER and synchronized scans and pg_dump et al

2008-01-28 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: Kevin Grittner wrote: It would seem reasonable to me for pg_dump to use ORDER BY to select data from clustered tables. What will be the performance hit from doing that? That worries me too. Also, in general pg_dump's charter is to reproduce the state

Re: [HACKERS] CLUSTER and synchronized scans and pg_dump et al

2008-01-28 Thread Tom Lane
Guillaume Smet [EMAIL PROTECTED] writes: It was my first idea but I didn't propose it as it's really a different thing IMHO. enable_* variables don't change the way PostgreSQL really does the job as synchronize_scans (or whatever the name will be) does. And it's not very consistent with the

Re: [HACKERS] CLUSTER and synchronized scans and pg_dump et al

2008-01-28 Thread Andrew Dunstan
Kevin Grittner wrote: On Sun, Jan 27, 2008 at 9:02 AM, in message [EMAIL PROTECTED], Gregory Stark [EMAIL PROTECTED] wrote: Perhaps we should have some form of escape hatch for pg_dump to request real physical order when dumping clustered tables. It would seem

Re: [HACKERS] [GENERAL] SHA1 on postgres 8.3

2008-01-28 Thread Bruce Momjian
I am not thrilled about moving _some_ of pgcrypto into the backend --- pgcrypto right now seems well designed and if we pull part of it out it seems it will be less clear than what we have now. Perhaps we just need to document that md5() isn't for general use and some function in pgcrypto should

Re: [HACKERS] autonomous transactions

2008-01-28 Thread Decibel!
On Wed, Jan 23, 2008 at 05:50:02PM -0500, Tom Lane wrote: Simon Riggs [EMAIL PROTECTED] writes: From looking at how Oracle does them, autonomous transactions are completely independent of the transaction that originates them -- they take a new database snapshot. This means that uncommitted

Re: [HACKERS] [PATCHES] Friendly help for psql

2008-01-28 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Uh, imagine: test= SELECT * from pg_class test- help Technically 'help' is now an alias for 'pg_class'. Are you suggesting supporting 'help' in this usage? People were saying they forget semicolons, so this 'help' usage is

Re: [HACKERS] Strange locking choices in pg_shdepend.c

2008-01-28 Thread Decibel!
On Mon, Jan 21, 2008 at 04:54:06PM -0500, Tom Lane wrote: It's probably not a good idea to have shdepReassignOwned() take only AccessShareLock on pg_shdepend. Even though the function itself merely reads the table, it is going to call functions that will take RowExclusiveLock, meaning that

Re: [HACKERS] Spoofing as the postmaster

2008-01-28 Thread Decibel!
On Sat, Dec 22, 2007 at 09:25:05AM -0500, Bruce Momjian wrote: So, what solutions exist? We could require the use of port numbers less than 1024 which typically require root and then become a non-root user, but that requires root to start the server. We could put the unix I don't know about

Re: [HACKERS] There's random access and then there's random access

2008-01-28 Thread Decibel!
On Wed, Dec 05, 2007 at 01:49:20AM +, Gregory Stark wrote: Regardless of what mechanism is used and who is responsible for doing it someone is going to have to figure out which blocks are specifically interesting to prefetch. Bitmap index scans happen to be the easiest since we've already

Re: [HACKERS] Truncate Triggers

2008-01-28 Thread Decibel!
On Fri, Jan 25, 2008 at 11:40:19AM +, Simon Riggs wrote: (for 8.4 ...) I'd like to introduce triggers that fire when we issue a truncate: Rather than focusing exclusively on TRUNCATE, how about triggers that fire whenever any kind of DDL operation is performed? (Ok, truncate is more DML

Re: [HACKERS] [PATCH] Add size/acl information when listing databases

2008-01-28 Thread Bruce Momjian
This has been saved for the 8.4 release: http://momjian.postgresql.org/cgi-bin/pgpatches_hold --- Andrew Gilligan wrote: On 20 Jan 2008, at 04:34, Tom Lane wrote: Andrew Gilligan [EMAIL PROTECTED] writes:

Re: [HACKERS] [PATCHES] Better default_statistics_target

2008-01-28 Thread Decibel!
On Wed, Dec 05, 2007 at 06:49:00PM +0100, Guillaume Smet wrote: On Dec 5, 2007 3:26 PM, Greg Sabino Mullane [EMAIL PROTECTED] wrote: Agreed, this would be a nice 8.4 thing. But what about 8.3 and 8.2? Is there a reason not to make this change? I know I've been lazy and not run any absolute

Re: [HACKERS] [PATCHES] Proposed patch: synchronized_scanning GUC variable

2008-01-28 Thread Tom Lane
Simon Riggs [EMAIL PROTECTED] writes: Rather than having a boolean GUC, we should have a number and make the parameter synchronised_scan_threshold. This would open up a can of worms I'd prefer not to touch, having to do with whether the buffer-access-strategy behavior should track that or not.

Re: [HACKERS] Strange locking choices in pg_shdepend.c

2008-01-28 Thread Tom Lane
Decibel! [EMAIL PROTECTED] writes: Would it be worthwhile to allow for logging when a lock gets upgraded? That would make it easier to protect against deadlocks... There is some debug code for that in the backend, but my experience is that it's too noisy to have on by default.

Re: [HACKERS] [GENERAL] SHA1 on postgres 8.3

2008-01-28 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 I am not thrilled about moving _some_ of pgcrypto into the backend --- pgcrypto right now seems well designed and if we pull part of it out it seems it will be less clear than what we have now. Perhaps we just need to document that md5()

Re: [HACKERS] GSSAPI doesn't play nice with non-canonical host names

2008-01-28 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: While I'm complaining: that's got to be one of the least useful error messages I've ever seen, and it's for a case that's surely going to be fairly common in practice. AFAIK, that one is for Kerberos only. For GSSAPI, we already use the

Re: [HACKERS] system catalog constraints question

2008-01-28 Thread Heikki Linnakangas
Gevik Babakhani wrote: Is there a way to query the column constraints between the tables of system catalog. For example pg_attribute.atttypidpg_type.oid. This is described in the docs of course , but does the system use something like pg_constaint or the system catalog constraints are

Re: [HACKERS] [PATCHES] Friendly help for psql

2008-01-28 Thread Bruce Momjian
Alvaro Herrera wrote: To avoid the usage of unadorned help (which I don't think is going to ever cause conflicts with a SQL command but perhaps it's better to be prepared), one idea would be to respond with please execute \help instead, and then \help would emit the verbose output. Perhaps

Re: [HACKERS] [PATCHES] Proposed patch: synchronized_scanning GUC variable

2008-01-28 Thread Hans-Juergen Schoenig
On Jan 28, 2008, at 6:14 PM, Simon Riggs wrote: On Sun, 2008-01-27 at 21:04 -0500, Tom Lane wrote: [ redirecting thread to -hackers ] Neil Conway [EMAIL PROTECTED] writes: On Sun, 2008-01-27 at 21:54 +, Gregory Stark wrote: I liked the synchronized_sequential_scans idea myself. I

Re: [HACKERS] [PATCHES] Friendly help for psql

2008-01-28 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Alvaro Herrera wrote: To avoid the usage of unadorned help (which I don't think is going to ever cause conflicts with a SQL command but perhaps it's better to be prepared), one idea would be to respond with please execute \help instead, and then \help

Re: [HACKERS] autonomous transactions

2008-01-28 Thread Roberts, Jon
On Wed, Jan 23, 2008 at 05:50:02PM -0500, Tom Lane wrote: Simon Riggs [EMAIL PROTECTED] writes: From looking at how Oracle does them, autonomous transactions are completely independent of the transaction that originates them -- they take a new database snapshot. This means that

Re: [HACKERS] [PATCHES] Better default_statistics_target

2008-01-28 Thread Christopher Browne
On Dec 6, 2007 6:28 PM, Decibel! [EMAIL PROTECTED] wrote: FWIW, I've never seen anything but a performance increase or no change when going from 10 to 100. In most cases there's a noticeable improvement since it's common to have over 100k rows in a table, and there's just no way to capture any

Re: [HACKERS] CLUSTER and synchronized scans and pg_dump et al

2008-01-28 Thread Steve Atkins
On Jan 28, 2008, at 8:36 AM, Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: Kevin Grittner wrote: It would seem reasonable to me for pg_dump to use ORDER BY to select data from clustered tables. What will be the performance hit from doing that? That worries me too. Also, in

Re: [HACKERS] [PATCHES] Proposed patch: synchronized_scanning GUCvariable

2008-01-28 Thread Heikki Linnakangas
Simon Riggs wrote: On Mon, 2008-01-28 at 16:21 -0500, Tom Lane wrote: Simon Riggs [EMAIL PROTECTED] writes: Rather than having a boolean GUC, we should have a number and make the parameter synchronised_scan_threshold. This would open up a can of worms I'd prefer not to touch, having to do

Re: [HACKERS] CLUSTER and synchronized scans and pg_dump et al

2008-01-28 Thread Jeff Davis
On Sun, 2008-01-27 at 13:37 -0500, Tom Lane wrote: Also, does anyone object to making pg_dump just disable it unconditionally? Greg's original gripe only mentioned the case of clustered tables, but it'd be kind of a pain to make pg_dump turn it on and off again for different tables. And I

Re: [HACKERS] CLUSTER and synchronized scans and pg_dump et al

2008-01-28 Thread Jeff Davis
On Sun, 2008-01-27 at 15:02 +, Gregory Stark wrote: It occurred to me the other day that synchronized scans could play havoc with clustered tables. When you dump and reload a table even if it was recently clustered if any other sequential scans are happening in the system at the time you

Re: [HACKERS] CLUSTER and synchronized scans and pg_dump et al

2008-01-28 Thread Jeff Davis
On Sun, 2008-01-27 at 12:45 -0500, Tom Lane wrote: Maybe a GUC variable to enable/disable syncscan? The first iterations of the patch included a GUC. I don't have any objection to re-introducing a GUC to enable/disable it. However, I would suggest that it defaults to on, because: 1. There

Re: [HACKERS] [PATCHES] Proposed patch: synchronized_scanning GUC variable

2008-01-28 Thread Simon Riggs
On Mon, 2008-01-28 at 16:21 -0500, Tom Lane wrote: Simon Riggs [EMAIL PROTECTED] writes: Rather than having a boolean GUC, we should have a number and make the parameter synchronised_scan_threshold. This would open up a can of worms I'd prefer not to touch, having to do with whether the

Re: [HACKERS] RFC: array_agg() per SQL:200n

2008-01-28 Thread Jeff Davis
On Sun, 2008-01-27 at 22:11 -0800, Neil Conway wrote: p. 564 discusses the required behavior. The result of array_agg() is an array with one element per input value, sorted according to the optional ORDER BY clause. NULL input values are included in the array, and the result for an empty group

Re: [HACKERS] CLUSTER and synchronized scans and pg_dump et al

2008-01-28 Thread Florian G. Pflug
Steve Atkins wrote: On Jan 28, 2008, at 8:36 AM, Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: Kevin Grittner wrote: It would seem reasonable to me for pg_dump to use ORDER BY to select data from clustered tables. What will be the performance hit from doing that? That worries

[HACKERS] Mail issue

2008-01-28 Thread Decibel!
I had a mail issue on my end which resulted in a number of outbound emails getting stuck in a queue. They all just went out; sorry for the flood. -- Decibel!, aka Jim C. Nasby, Database Architect [EMAIL PROTECTED] Give your computer some brain candy! www.distributed.net Team #1828

Re: [HACKERS] [PATCHES] Proposed patch: synchronized_scanning GUCvariable

2008-01-28 Thread Simon Riggs
On Mon, 2008-01-28 at 23:13 +, Heikki Linnakangas wrote: Tables that are seq scanned are typically very small, like a summary table with just a few rows, or huge tables in a data warehousing system. Between the extremes, I don't think the threshold actually has a very big impact. And if

Re: [HACKERS] [PATCHES] Proposed patch: synchronized_scanning GUCvariable

2008-01-28 Thread Jeff Davis
On Mon, 2008-01-28 at 23:13 +, Heikki Linnakangas wrote: It's a good point that we don't want pg_dump to screw up the cluster order, but that's the only use case I've seen this far for disabling sync scans. Even that wouldn't matter much if our estimate for clusteredness didn't get

Re: [HACKERS] Strange locking choices in pg_shdepend.c

2008-01-28 Thread Alvaro Herrera
Tom Lane wrote: Decibel! [EMAIL PROTECTED] writes: Would it be worthwhile to allow for logging when a lock gets upgraded? That would make it easier to protect against deadlocks... There is some debug code for that in the backend, but my experience is that it's too noisy to have on by

Re: [HACKERS] Truncate Triggers

2008-01-28 Thread Alvaro Herrera
Decibel! wrote: On Fri, Jan 25, 2008 at 11:40:19AM +, Simon Riggs wrote: (for 8.4 ...) I'd like to introduce triggers that fire when we issue a truncate: Rather than focusing exclusively on TRUNCATE, how about triggers that fire whenever any kind of DDL operation is performed? (Ok,

Re: [HACKERS] [PATCHES] Proposed patch: synchronized_scanning GUCvariable

2008-01-28 Thread Ron Mayer
Jeff Davis wrote: On Mon, 2008-01-28 at 23:13 +, Heikki Linnakangas wrote: clusteredness didn't get screwed up by a table that looks like this: 5 6 7 8 9 1 2 3 4 ...test table with a similar distribution to your example, and it shows a correlation of about -0.5, but it should

Re: [HACKERS] find_typedef alternative that works on mainstream systems

2008-01-28 Thread Bruce Momjian
Alvaro Herrera wrote: Alvaro Herrera wrote: objdump -W $object_file | \ awk '/DW_TAG_/ { grab=0 } /DW_TAG_typedef/ { grab=1 } /DW_AT_name/ { if (grab) { print $0 } }' | \ sed -e 's/^.*: \([^ ]*\)/\1/' | \ sort | \ uniq I oversimplified the awk line, causing some garbage to

Re: [HACKERS] RFC: array_agg() per SQL:200n

2008-01-28 Thread Joe Conway
Jeff Davis wrote: On Sun, 2008-01-27 at 22:11 -0800, Neil Conway wrote: p. 564 discusses the required behavior. The result of array_agg() is an array with one element per input value, sorted according to the optional ORDER BY clause. NULL input values are included in the array, and the result

[HACKERS] Bogus cleanup code in GSSAPI/SSPI patch

2008-01-28 Thread Tom Lane
Hi Magnus, Would you take a look at the patch I just committed in fe-connect.c? I found out today that PQreset() wasn't working on a GSSAPI connection, because closePGconn hadn't been patched to clear out the GSSAPI state (resulting in duplicate GSS authentication request failure). I think I

Re: [HACKERS] RFC: array_agg() per SQL:200n

2008-01-28 Thread Hitoshi Harada
yet another inverse function I wrote before, though it applies for only 1D array. typedef struct _enuminfo{ ArrayType *data; char*ptr; int16 typlen; booltypbyval; chartypalign; } EnumInfo; Datum

[HACKERS] Transition functions for SUM(::int2), SUM(::int4, SUM(::int8])

2008-01-28 Thread Caleb Welton
Is there any reason that int2_sum, int4_sum, and int8_sum are not marked as being strict? All the other transition functions for sum, and every other built in aggregation function is marked as strict, as demonstrated with: select x.proname, t.proname, t.proisstrict from ((pg_aggregate a left

Re: [HACKERS] Transition functions for SUM(::int2), SUM(::int4, SUM(::int8])

2008-01-28 Thread Tom Lane
Caleb Welton [EMAIL PROTECTED] writes: Is there any reason that int2_sum, int4_sum, and int8_sum are not marked as being strict? They wouldn't work otherwise, because the transition datatypes aren't the same as the inputs. regards, tom lane

Re: [HACKERS] autonomous transactions

2008-01-28 Thread Hans-Juergen Schoenig
On Jan 25, 2008, at 7:27 AM, Decibel! wrote: On Wed, Jan 23, 2008 at 05:50:02PM -0500, Tom Lane wrote: Simon Riggs [EMAIL PROTECTED] writes: From looking at how Oracle does them, autonomous transactions are completely independent of the transaction that originates them -- they take a new