Re: [HACKERS] k-neighbourhood search in databases

2011-04-10 Thread Oleg Bartunov
Wow, custom solution for 2008 still much faster Denali 2011 solution. Also, what's about not spatial data types ? In our approach, we can provide knn for any datatype, which has GiST index and distance method. Oleg On Fri, 8 Apr 2011, Jeremiah Peschka wrote: On 4/8/11 5:21 AM, Oleg

Re: [HACKERS] BUG #5856: pg_attribute.attinhcount is not correct.

2011-04-10 Thread Noah Misch
On Sun, Apr 03, 2011 at 09:53:57PM -0400, Robert Haas wrote: On Fri, Apr 1, 2011 at 12:56 AM, Noah Misch n...@leadboat.com wrote: On Thu, Mar 31, 2011 at 11:11:49AM -0400, Robert Haas wrote: On Thu, Mar 31, 2011 at 6:06 AM, Noah Misch n...@leadboat.com wrote: The best way I can see is to

Re: [HACKERS] Feature request: pg_basebackup --force

2011-04-10 Thread Magnus Hagander
On Sat, Apr 9, 2011 at 20:26, Joshua Berkus j...@agliodbs.com wrote: Magnus, all: It seems a bit annoying to have to do an rm -rf * $PGDATA/ before resynching a standby using pg_basebackup.  This means that I still need to wrap basebackup in a shell script, instead of having it do

Re: [HACKERS] switch UNLOGGED to LOGGED

2011-04-10 Thread Robert Haas
On Sat, Apr 9, 2011 at 3:29 AM, Leonardo Francalanci m_li...@yahoo.it wrote: I'm pretty sure we wouldn't accept a patch for a  feature that would only work with wal_level=minimal, but it might be a useful  starting point for someone else to keep hacking on. I understand. Reading your post

Re: [HACKERS] BUG #5856: pg_attribute.attinhcount is not correct.

2011-04-10 Thread Robert Haas
On Sun, Apr 10, 2011 at 6:36 AM, Noah Misch n...@leadboat.com wrote: I had exactly what you just said in mind. Patch attached, then. Committed. Thanks.  This turns out to have caused that TOAST creation regression: Crap. I am not going to be able to look at this today; I am getting on

Re: [HACKERS] BUG #5856: pg_attribute.attinhcount is not correct.

2011-04-10 Thread Noah Misch
On Sun, Apr 10, 2011 at 07:35:53AM -0400, Robert Haas wrote: On Sun, Apr 10, 2011 at 6:36 AM, Noah Misch n...@leadboat.com wrote: 3. Make AlterTableCreateToastTable acquire only ShareUpdateExclusiveLock and remove the pass-usage heuristic from ATRewriteCatalogs.  For this to be valid,

Re: [HACKERS] k-neighbourhood search in databases

2011-04-10 Thread Jesper Krogh
On 2011-04-10 12:18, Oleg Bartunov wrote: Wow, custom solution for 2008 still much faster Denali 2011 solution. Also, what's about not spatial data types ? In our approach, we can provide knn for any datatype, which has GiST index and distance method. Can you share some insight about how it

Re: [HACKERS] BUG #5856: pg_attribute.attinhcount is not correct.

2011-04-10 Thread Robert Haas
On Sun, Apr 10, 2011 at 6:36 AM, Noah Misch n...@leadboat.com wrote: On Sun, Apr 03, 2011 at 09:53:57PM -0400, Robert Haas wrote: On Fri, Apr 1, 2011 at 12:56 AM, Noah Misch n...@leadboat.com wrote: On Thu, Mar 31, 2011 at 11:11:49AM -0400, Robert Haas wrote: On Thu, Mar 31, 2011 at 6:06 AM,

Re: [HACKERS] pgindent

2011-04-10 Thread Bruce Momjian
Bruce Momjian wrote: Robert Haas wrote: On Fri, Apr 8, 2011 at 11:21 PM, Andrew Dunstan and...@dunslane.net wrote: We've got more work to do before that works, so I have committed what we have. Some symbols have disappeared, some because of code changes and some probably because Cygwin

Re: [HACKERS] pgindent

2011-04-10 Thread Greg Stark
On Sun, Apr 10, 2011 at 4:42 PM, Bruce Momjian br...@momjian.us wrote: 27 hours later, done.   I ran all the tests outlined in the pgindent README. What's with things like: -void _PG_init(void); +void _PG_init(void); - Datum diff = DirectFunctionCall2(date_mi, + Datum diff =

Re: [HACKERS] pgindent

2011-04-10 Thread Greg Stark
And this doesn't seem helpful: /* Format options */ /* oids option is not supported */ - { format, ForeignTableRelationId }, - { header, ForeignTableRelationId }, - { delimiter, ForeignTableRelationId }, - { quote, ForeignTableRelationId }, - {

Re: [HACKERS] pgindent

2011-04-10 Thread Robert Haas
On Sun, Apr 10, 2011 at 11:55 AM, Greg Stark gsst...@mit.edu wrote: On Sun, Apr 10, 2011 at 4:42 PM, Bruce Momjian br...@momjian.us wrote: 27 hours later, done.   I ran all the tests outlined in the pgindent README. What's with things like: -void _PG_init(void); +void      

Re: [HACKERS] Feature request: pg_basebackup --force

2011-04-10 Thread Joshua Berkus
Magnus, That could certainly be useful, yes. But I have a feeling whomever tries to get that into 9.1 will be killed - but it's certainly good to put ont he list of things for 9.2. Oh, no question. At some point in 9.2 we should also discuss how basebackup considers emtpy directories.

Re: [HACKERS] pgindent

2011-04-10 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Sun, Apr 10, 2011 at 11:55 AM, Greg Stark gsst...@mit.edu wrote: Note that in the last one someone carefully made the variable names line up and pgindent is changing the spacing to an arbitrary amount. Well, it's the same arbitrary amount that we

Re: [HACKERS] pgindent

2011-04-10 Thread Bruce Momjian
Robert Haas wrote: On Sun, Apr 10, 2011 at 11:55 AM, Greg Stark gsst...@mit.edu wrote: On Sun, Apr 10, 2011 at 4:42 PM, Bruce Momjian br...@momjian.us wrote: 27 hours later, done. ? I ran all the tests outlined in the pgindent README. What's with things like: -void _PG_init(void);

Re: [HACKERS] pgindent

2011-04-10 Thread Andrew Dunstan
On 04/10/2011 12:11 PM, Tom Lane wrote: Robert Haasrobertmh...@gmail.com writes: On Sun, Apr 10, 2011 at 11:55 AM, Greg Starkgsst...@mit.edu wrote: Note that in the last one someone carefully made the variable names line up and pgindent is changing the spacing to an arbitrary amount.

Re: [HACKERS] Feature request: pg_basebackup --force

2011-04-10 Thread Robert Haas
On Sat, Apr 9, 2011 at 2:26 PM, Joshua Berkus j...@agliodbs.com wrote: It seems a bit annoying to have to do an rm -rf * $PGDATA/ before resynching a standby using pg_basebackup.  This means that I still need to wrap basebackup in a shell script, instead of having it do everything for me ...

Re: [HACKERS] pgindent

2011-04-10 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 04/10/2011 12:11 PM, Tom Lane wrote: What I was a bit surprised by is the volume of changes in wparser_def.c --- so far as I can see, that file hardly changed since 9.0, so why did pgindent suddenly whack it around so much? The other files that

Re: [HACKERS] pgindent

2011-04-10 Thread Bruce Momjian
Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 04/10/2011 12:11 PM, Tom Lane wrote: What I was a bit surprised by is the volume of changes in wparser_def.c --- so far as I can see, that file hardly changed since 9.0, so why did pgindent suddenly whack it around so much?

Re: [HACKERS] Feature request: pg_basebackup --force

2011-04-10 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Sat, Apr 9, 2011 at 2:26 PM, Joshua Berkus j...@agliodbs.com wrote: Couldn't we have a --force option which would clear all data and tablespace directories before resynching? What would be even more useful us some kind of support for differential

Re: [HACKERS] lowering privs in SECURITY DEFINER function

2011-04-10 Thread Robert Haas
On Wed, Apr 6, 2011 at 6:39 PM, Jeff Davis pg...@j-davis.com wrote: On Wed, 2011-04-06 at 18:33 -0300, Alvaro Herrera wrote: (Consider, for example, that you may want to enable a user to run some operation to which he is authorized, but you want to carry out some privileged operation

Re: [HACKERS] Feature request: pg_basebackup --force

2011-04-10 Thread Robert Haas
On Sun, Apr 10, 2011 at 12:35 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Sat, Apr 9, 2011 at 2:26 PM, Joshua Berkus j...@agliodbs.com wrote: Couldn't we have a --force option which would clear all data and tablespace directories before resynching?

Re: [HACKERS] Feature request: pg_basebackup --force

2011-04-10 Thread Robert Haas
On Sun, Apr 10, 2011 at 12:41 PM, Robert Haas robertmh...@gmail.com wrote: It's not integrated and I doubt it's conveniently available on Windows. One of the biggest problems with our replication functionality right now is that it's hard to set up.  We've actually done a good job making the

Re: [HACKERS] How would sorting work with millions of rows in a huge DB with PG?

2011-04-10 Thread Vaibhav Kaushal
Thanks a lot for the help. Regards, Vaibhav On Sun, Apr 10, 2011 at 11:07 AM, to...@tuxteam.de wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sun, Apr 10, 2011 at 05:20:02AM +0530, Vaibhav Kaushal wrote: Hello all, I was going through some papers related to sorting and since

Re: [HACKERS] Feature request: pg_basebackup --force

2011-04-10 Thread Heikki Linnakangas
On 10.04.2011 20:06, Robert Haas wrote: On Sun, Apr 10, 2011 at 12:41 PM, Robert Haasrobertmh...@gmail.com wrote: Admittedly, the above is a slightly different problem, but I think it all points in the direction of needing more automation and more ease of use. And let me also note that the

Re: [HACKERS] k-neighbourhood search in databases

2011-04-10 Thread Oleg Bartunov
On Sun, 10 Apr 2011, Jesper Krogh wrote: On 2011-04-10 12:18, Oleg Bartunov wrote: Wow, custom solution for 2008 still much faster Denali 2011 solution. Also, what's about not spatial data types ? In our approach, we can provide knn for any datatype, which has GiST index and distance method.

[HACKERS] Back branch update releases this week; beta postponed

2011-04-10 Thread Tom Lane
In view of the recently-discovered data loss bug in pg_upgrade, it seems imperative to push out update releases fixing that as soon as possible. The core team has therefore decided to wrap back-branch update releases this Thursday for release Monday 4/18. We were previously targeting wrapping

Re: [HACKERS] BUG #5856: pg_attribute.attinhcount is not correct.

2011-04-10 Thread Noah Misch
On Sun, Apr 10, 2011 at 11:19:26AM -0400, Robert Haas wrote: On Sun, Apr 10, 2011 at 6:36 AM, Noah Misch n...@leadboat.com wrote: On Sun, Apr 03, 2011 at 09:53:57PM -0400, Robert Haas wrote: On Fri, Apr 1, 2011 at 12:56 AM, Noah Misch n...@leadboat.com wrote: On Thu, Mar 31, 2011 at

Re: [HACKERS] Teaching regex operators about collations

2011-04-10 Thread Tom Lane
I wrote: Since ILIKE now responds to collations, it would be nice if the case-insensitive regex operators did too. The hard part of that is getting the information from src/backend/utils/adt/regexp.c to src/backend/regex/regc_locale.c. In principle we could probably add a field to the data

Re: [HACKERS] k-neighbourhood search in databases

2011-04-10 Thread Jeremiah Peschka
On Sunday, April 10, 2011 at 3:18 AM, Oleg Bartunov wrote: Wow, custom solution for 2008 still much faster Denali 2011 solution. Also, what's about not spatial data types ? In our approach, we can provide knn for any datatype, which has GiST index and distance method. There are a number of

[HACKERS] Re: [COMMITTERS] pgsql: Don't make replication magical as a user name, only as a datab

2011-04-10 Thread Fujii Masao
On Mon, Apr 11, 2011 at 3:53 AM, Andrew Dunstan and...@dunslane.net wrote: Don't make replication magical as a user name, only as a database name, in pg_hba.conf. Is it worth backporting this change to 9.0? Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source

[HACKERS] Re: [COMMITTERS] pgsql: Don't make replication magical as a user name, only as a datab

2011-04-10 Thread Andrew Dunstan
On 04/10/2011 09:47 PM, Fujii Masao wrote: On Mon, Apr 11, 2011 at 3:53 AM, Andrew Dunstanand...@dunslane.net wrote: Don't make replication magical as a user name, only as a database name, in pg_hba.conf. Is it worth backporting this change to 9.0? I didn't because it's a behaviour

Re: [HACKERS] sync rep and smart shutdown

2011-04-10 Thread Fujii Masao
On Sat, Apr 9, 2011 at 3:53 AM, Robert Haas robertmh...@gmail.com wrote: There are a couple of plausible ways to proceed here: 1. Do nothing. 2. When a smart shutdown is initiated, shut off synchronous replication. 3. Accept new replication connections even when the system is undergoing a