Re: [HACKERS] Replication slots and footguns

2014-03-18 Thread Robert Haas
On Thu, Mar 13, 2014 at 9:07 PM, Josh Berkus wrote: > On 03/13/2014 05:28 PM, Robert Haas wrote: >> Well we may have kind of hosed ourselves, because the in-memory data >> structures that represent the data structure have an in_use flag that >> indicates whether the structure is allocated at all,

Re: [HACKERS] Replication slots and footguns

2014-03-13 Thread Josh Berkus
On 03/13/2014 05:28 PM, Robert Haas wrote: > Well we may have kind of hosed ourselves, because the in-memory data > structures that represent the data structure have an in_use flag that > indicates whether the structure is allocated at all, and then an > active flag that indicates whether some back

Re: [HACKERS] Replication slots and footguns

2014-03-13 Thread Robert Haas
On Thu, Mar 13, 2014 at 8:09 PM, Josh Berkus wrote: > On 03/13/2014 05:01 PM, Robert Haas wrote: >> On Thu, Mar 13, 2014 at 6:45 PM, Josh Berkus wrote: >>> On 03/13/2014 01:17 PM, Robert Haas wrote: I think "in use" is just as clear as active, and I think the text Andres proposed previo

Re: [HACKERS] Replication slots and footguns

2014-03-13 Thread Josh Berkus
On 03/13/2014 05:01 PM, Robert Haas wrote: > On Thu, Mar 13, 2014 at 6:45 PM, Josh Berkus wrote: >> On 03/13/2014 01:17 PM, Robert Haas wrote: >>> I think "in use" is just as clear as active, and I think the text >>> Andres proposed previously reads a whole lot more nicely than this: >>> >>> repli

Re: [HACKERS] Replication slots and footguns

2014-03-13 Thread Robert Haas
On Thu, Mar 13, 2014 at 6:45 PM, Josh Berkus wrote: > On 03/13/2014 01:17 PM, Robert Haas wrote: >> I think "in use" is just as clear as active, and I think the text >> Andres proposed previously reads a whole lot more nicely than this: >> >> replication slot "%s" is in use by another backend > >

Re: [HACKERS] Replication slots and footguns

2014-03-13 Thread Josh Berkus
On 03/13/2014 01:17 PM, Robert Haas wrote: > I think "in use" is just as clear as active, and I think the text > Andres proposed previously reads a whole lot more nicely than this: > > replication slot "%s" is in use by another backend Then we should change the column name in the pg_stat_replicat

Re: [HACKERS] Replication slots and footguns

2014-03-13 Thread Robert Haas
On Thu, Mar 13, 2014 at 1:03 PM, Josh Berkus wrote: > On 03/13/2014 04:07 AM, Andres Freund wrote: >> On 2014-03-12 13:34:47 -0700, Josh Berkus wrote: >>> On 03/12/2014 12:34 PM, Robert Haas wrote: >> Urgh. That error message looks susceptible to improvement. How about: rep

Re: [HACKERS] Replication slots and footguns

2014-03-13 Thread Josh Berkus
On 03/13/2014 04:07 AM, Andres Freund wrote: > On 2014-03-12 13:34:47 -0700, Josh Berkus wrote: >> On 03/12/2014 12:34 PM, Robert Haas wrote: > Urgh. That error message looks susceptible to improvement. How about: >>> >>> replication slot "%s" cannot be dropped because it is currently

Re: [HACKERS] Replication slots and footguns

2014-03-13 Thread Andres Freund
On 2014-03-12 13:34:47 -0700, Josh Berkus wrote: > On 03/12/2014 12:34 PM, Robert Haas wrote: > >>> Urgh. That error message looks susceptible to improvement. How about: > >>> >> > >>> >> replication slot "%s" cannot be dropped because it is currently in use > >> > > >> > I think that'd require d

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Josh Berkus
On 03/12/2014 04:52 PM, Thom Brown wrote: > On 12 March 2014 23:17, Michael Paquier wrote: >> On Thu, Mar 13, 2014 at 5:45 AM, Thom Brown wrote: >>> I'm not clear on why would dropping an active replication slot would >>> solve disk space problems related to WAL. I thought it was inactive >>> sl

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Thom Brown
On 12 March 2014 23:17, Michael Paquier wrote: > On Thu, Mar 13, 2014 at 5:45 AM, Thom Brown wrote: >> On 12 March 2014 19:00, Josh Berkus wrote: >>> All: >>> >>> I was just reading Michael's explanation of replication slots >>> (http://michael.otacoo.com/postgresql-2/postgres-9-4-feature-highli

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Michael Paquier
On Thu, Mar 13, 2014 at 5:45 AM, Thom Brown wrote: > On 12 March 2014 19:00, Josh Berkus wrote: >> All: >> >> I was just reading Michael's explanation of replication slots >> (http://michael.otacoo.com/postgresql-2/postgres-9-4-feature-highlight-replication-slots/) >> and realized there was somet

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Thom Brown
On 12 March 2014 19:00, Josh Berkus wrote: > All: > > I was just reading Michael's explanation of replication slots > (http://michael.otacoo.com/postgresql-2/postgres-9-4-feature-highlight-replication-slots/) > and realized there was something which had completely escaped me in the > pre-commit di

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Josh Berkus
On 03/12/2014 12:34 PM, Robert Haas wrote: >>> Urgh. That error message looks susceptible to improvement. How about: >>> >> >>> >> replication slot "%s" cannot be dropped because it is currently in use >> > >> > I think that'd require duplicating some code between acquire and drop, >> > but how a

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Josh Berkus
On 03/12/2014 12:26 PM, Andres Freund wrote: > On 2014-03-12 12:23:01 -0700, Josh Berkus wrote: >> On 03/12/2014 12:03 PM, Andres Freund wrote: It seems like there's no way for a DBA to drop slots from the master if it's rapidly running out of disk WAL space without doing a restart, and >

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Robert Haas
On Wed, Mar 12, 2014 at 3:25 PM, Andres Freund wrote: > On 2014-03-12 15:18:04 -0400, Robert Haas wrote: >> On Wed, Mar 12, 2014 at 3:03 PM, Andres Freund >> wrote: >> > Hi, >> > >> > On 2014-03-12 12:00:25 -0700, Josh Berkus wrote: >> >> I was just reading Michael's explanation of replication s

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Andres Freund
On 2014-03-12 12:23:01 -0700, Josh Berkus wrote: > On 03/12/2014 12:03 PM, Andres Freund wrote: > > Hi, > > > > On 2014-03-12 12:00:25 -0700, Josh Berkus wrote: > >> I was just reading Michael's explanation of replication slots > >> (http://michael.otacoo.com/postgresql-2/postgres-9-4-feature-high

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Andres Freund
On 2014-03-12 15:18:04 -0400, Robert Haas wrote: > On Wed, Mar 12, 2014 at 3:03 PM, Andres Freund wrote: > > Hi, > > > > On 2014-03-12 12:00:25 -0700, Josh Berkus wrote: > >> I was just reading Michael's explanation of replication slots > >> (http://michael.otacoo.com/postgresql-2/postgres-9-4-fea

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Josh Berkus
On 03/12/2014 12:03 PM, Andres Freund wrote: > Hi, > > On 2014-03-12 12:00:25 -0700, Josh Berkus wrote: >> I was just reading Michael's explanation of replication slots >> (http://michael.otacoo.com/postgresql-2/postgres-9-4-feature-highlight-replication-slots/) >> and realized there was something

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Robert Haas
On Wed, Mar 12, 2014 at 3:03 PM, Andres Freund wrote: > Hi, > > On 2014-03-12 12:00:25 -0700, Josh Berkus wrote: >> I was just reading Michael's explanation of replication slots >> (http://michael.otacoo.com/postgresql-2/postgres-9-4-feature-highlight-replication-slots/) >> and realized there was

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Andres Freund
Hi, On 2014-03-12 12:00:25 -0700, Josh Berkus wrote: > I was just reading Michael's explanation of replication slots > (http://michael.otacoo.com/postgresql-2/postgres-9-4-feature-highlight-replication-slots/) > and realized there was something which had completely escaped me in the > pre-commit d