Re: [HACKERS] sync rep and smart shutdown

2011-04-10 Thread Fujii Masao
On Sat, Apr 9, 2011 at 3:53 AM, Robert Haas 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

[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 Dunstan 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 change, but arguably

[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 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 Software Center

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

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

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 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 wrote: > >> > On Thu, Mar 31, 2011 at 11:11:49AM -0400, Robert Haas w

[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 9.1

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.

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 Haas 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 difficulty of getting t

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, 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 I am >

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

2011-04-10 Thread Robert Haas
On Sun, Apr 10, 2011 at 12:41 PM, Robert Haas 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 very simplest case

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

2011-04-10 Thread Robert Haas
On Sun, Apr 10, 2011 at 12:35 PM, Tom Lane wrote: > Robert Haas writes: >> On Sat, Apr 9, 2011 at 2:26 PM, Joshua Berkus 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

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 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 before/after doing s

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

2011-04-10 Thread Tom Lane
Robert Haas writes: > On Sat, Apr 9, 2011 at 2:26 PM, Joshua Berkus 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 copy, a la rsync. > (Now I'm w

Re: [HACKERS] pgindent

2011-04-10 Thread Bruce Momjian
Tom Lane wrote: > Andrew Dunstan 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

Re: [HACKERS] pgindent

2011-04-10 Thread Tom Lane
Andrew Dunstan 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 changed >> a lo

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

2011-04-10 Thread Robert Haas
On Sat, Apr 9, 2011 at 2:26 PM, Joshua Berkus 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 ... > especially i

Re: [HACKERS] pgindent

2011-04-10 Thread Andrew Dunstan
On 04/10/2011 12:11 PM, Tom Lane wrote: Robert Haas writes: On Sun, Apr 10, 2011 at 11:55 AM, Greg Stark 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

Re: [HACKERS] pgindent

2011-04-10 Thread Bruce Momjian
Robert Haas wrote: > On Sun, Apr 10, 2011 at 11:55 AM, Greg Stark wrote: > > On Sun, Apr 10, 2011 at 4:42 PM, Bruce Momjian 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] pgindent

2011-04-10 Thread Tom Lane
Robert Haas writes: > On Sun, Apr 10, 2011 at 11:55 AM, Greg Stark 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 use throughout our code, > presu

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 Robert Haas
On Sun, Apr 10, 2011 at 11:55 AM, Greg Stark wrote: > On Sun, Apr 10, 2011 at 4:42 PM, Bruce Momjian 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

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 Greg Stark
On Sun, Apr 10, 2011 at 4:42 PM, Bruce Momjian 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 = DirectFunction

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 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 has cha

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 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 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 wrote: >> >>

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 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 wrote: > > 3. Make AlterTableCreateToastTable acquire only ShareUpdateExclusiveLock and > > remove the pass-usage heuristic from ATRewriteCatalogs.  For this to be > > valid, > > toast_inser

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 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 a

Re: [HACKERS] switch UNLOGGED to LOGGED

2011-04-10 Thread Robert Haas
On Sat, Apr 9, 2011 at 3:29 AM, Leonardo Francalanci 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 at > htt

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

2011-04-10 Thread Magnus Hagander
On Sat, Apr 9, 2011 at 20:26, Joshua Berkus 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 everything for me ...

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 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 wrote: > >> > The best way I can see is to make ATExecAddColumn more

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 Bartuno