Lists: | pgsql-hackers |
---|
From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Default mode for shutdown |
Date: | 2010-12-15 11:47:18 |
Message-ID: | AANLkTimmTZP_YDWeaB-FOaTPTtT2AuSULcA4iuGCE3KY@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
I'm sure this has been up before, but hey, let's take it another round.
Why don't we change the default shutdown mode for pg_ctl from "smart"
to "fast"? I've never come across a single usecase where "smart" is
what people *want*... Not sure if others have?
Yes, I realize it's somewhat of a backwards compatibility thing - but
it will at least not change things for most packages, since I believe
all those use "fast" anyway.
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Default mode for shutdown |
Date: | 2010-12-15 14:39:12 |
Message-ID: | 4948.1292423952@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Magnus Hagander <magnus(at)hagander(dot)net> writes:
> I'm sure this has been up before, but hey, let's take it another round.
> Why don't we change the default shutdown mode for pg_ctl from "smart"
> to "fast"? I've never come across a single usecase where "smart" is
> what people *want*...
Really? Personally I'm quite happy with that default.
regards, tom lane
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Default mode for shutdown |
Date: | 2010-12-15 14:44:39 |
Message-ID: | AANLkTinFKGPvZ0m93QxFo9P-qP-kyn4Wz+Cw+4k0LedU@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Wed, Dec 15, 2010 at 9:39 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>> I'm sure this has been up before, but hey, let's take it another round.
>> Why don't we change the default shutdown mode for pg_ctl from "smart"
>> to "fast"? I've never come across a single usecase where "smart" is
>> what people *want*...
+1. I think we should either have a timeout for "smart" shutdown mode
such that it turns into a fast shutdown after a configurable number of
seconds that defaults to, say, 30; or we should just make the default
fast shutdown as proposed.
> Really? Personally I'm quite happy with that default.
Why? It seems to me that just leads to, oh, gee, the database isn't
shutting down, where's the window where I failed to exit a session?
And it's even worse in production, where whatever you're using for
connection pooling ensures that shutdown will take, if not forever, at
least a very, very long time.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From: | Kenneth Marshall <ktm(at)rice(dot)edu> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Default mode for shutdown |
Date: | 2010-12-15 14:45:06 |
Message-ID: | 20101215144506.GL10252@aart.is.rice.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Wed, Dec 15, 2010 at 09:39:12AM -0500, Tom Lane wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
> > I'm sure this has been up before, but hey, let's take it another round.
> > Why don't we change the default shutdown mode for pg_ctl from "smart"
> > to "fast"? I've never come across a single usecase where "smart" is
> > what people *want*...
>
> Really? Personally I'm quite happy with that default.
>
> regards, tom lane
>
+1
I think the default is perfect. Even if the usecase that is wanted
is "fast", it should be requested each time to verify that a more
destructive shutdown is wanted. If it is really an issue, a script
or shell alias can be defined to perform the more aggressive
shutdown processes.
Regards,
Ken
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Default mode for shutdown |
Date: | 2010-12-15 14:47:08 |
Message-ID: | 5178.1292424428@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Wed, Dec 15, 2010 at 9:39 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Really? Personally I'm quite happy with that default.
> Why? It seems to me that just leads to, oh, gee, the database isn't
> shutting down, where's the window where I failed to exit a session?
Yeah, and more to the point, do I want to finish whatever I was doing in
that window? Fast-by-default is a nice hammer to swing, but one day
you'll pound your finger.
regards, tom lane
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Default mode for shutdown |
Date: | 2010-12-15 14:51:22 |
Message-ID: | AANLkTik7xpxsbb3+M7AVqY8DwZmaJh=UZkPzUMLS=EUT@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Wed, Dec 15, 2010 at 9:47 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Wed, Dec 15, 2010 at 9:39 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Really? Personally I'm quite happy with that default.
>
>> Why? It seems to me that just leads to, oh, gee, the database isn't
>> shutting down, where's the window where I failed to exit a session?
>
> Yeah, and more to the point, do I want to finish whatever I was doing in
> that window? Fast-by-default is a nice hammer to swing, but one day
> you'll pound your finger.
I guess. I've pounded my finger enough time with the current default
that I'd be willing to try a different size hammer. The scenario you
describe has yet to occur in 10+ years of using the product, but
obviously not everyone's experience will match on this point.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Default mode for shutdown |
Date: | 2010-12-15 14:57:18 |
Message-ID: | 5475.1292425038@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Wed, Dec 15, 2010 at 9:47 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Yeah, and more to the point, do I want to finish whatever I was doing in
>> that window? Fast-by-default is a nice hammer to swing, but one day
>> you'll pound your finger.
> I guess. I've pounded my finger enough time with the current default
> that I'd be willing to try a different size hammer. The scenario you
> describe has yet to occur in 10+ years of using the product, but
> obviously not everyone's experience will match on this point.
I think the ultimate basis for the way it's set up now is the mantra of
"be safe by default"; which I believe I've heard you repeating in other
contexts. Between that principle and the backwards-compatibility
hazards, I really don't think there's adequate justification for
changing this.
regards, tom lane
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Default mode for shutdown |
Date: | 2010-12-15 15:03:06 |
Message-ID: | AANLkTimbYjSn8CVqxyCLyLGXneAni_mnH+pQAr1Wi+7y@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Wed, Dec 15, 2010 at 9:57 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Wed, Dec 15, 2010 at 9:47 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Yeah, and more to the point, do I want to finish whatever I was doing in
>>> that window? Fast-by-default is a nice hammer to swing, but one day
>>> you'll pound your finger.
>
>> I guess. I've pounded my finger enough time with the current default
>> that I'd be willing to try a different size hammer. The scenario you
>> describe has yet to occur in 10+ years of using the product, but
>> obviously not everyone's experience will match on this point.
>
> I think the ultimate basis for the way it's set up now is the mantra of
> "be safe by default"; which I believe I've heard you repeating in other
> contexts. Between that principle and the backwards-compatibility
> hazards, I really don't think there's adequate justification for
> changing this.
Backwards compatibility is, I think, a reasonable argument for
maintaining the current default. However, I don't agree that the
current behavior is safe by default. What often happens is that the
system gets stuck in a state where the existing connections will never
terminate (or not for a long time) but new connections aren't accepted
either. So you're sitting there waiting for the database to shut down
- which it never does - meanwhile, half the people hitting your web
site are getting DOS'd.
Certainly, if you have an environment where people are mostly logging
into the database directly (not through a connection pooler) and they
do a few important queries and then disconnect, smart is a better
default. But if you have an environment where (for whatever reason)
long-lasting connections are common, smart is worse than useless.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Default mode for shutdown |
Date: | 2010-12-15 15:11:54 |
Message-ID: | 1292425730-sup-5574@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Excerpts from Robert Haas's message of mié dic 15 12:03:06 -0300 2010:
> Certainly, if you have an environment where people are mostly logging
> into the database directly (not through a connection pooler) and they
> do a few important queries and then disconnect, smart is a better
> default. But if you have an environment where (for whatever reason)
> long-lasting connections are common, smart is worse than useless.
It occurs to me that we may need a new mode, which disconnects sessions
that are not in a transaction (or as soon as they are) but leaves
in-progress transactions alone; this could be the new default. Of
course, this is much more difficult to implement than the current modes.
--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Default mode for shutdown |
Date: | 2010-12-15 15:44:08 |
Message-ID: | AANLkTi=f4yg1VoR6mpkDVnzbv8Paj2wnL9og3Zfxk1iV@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Wed, Dec 15, 2010 at 10:11 AM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
> Excerpts from Robert Haas's message of mié dic 15 12:03:06 -0300 2010:
>
>> Certainly, if you have an environment where people are mostly logging
>> into the database directly (not through a connection pooler) and they
>> do a few important queries and then disconnect, smart is a better
>> default. But if you have an environment where (for whatever reason)
>> long-lasting connections are common, smart is worse than useless.
>
> It occurs to me that we may need a new mode, which disconnects sessions
> that are not in a transaction (or as soon as they are) but leaves
> in-progress transactions alone; this could be the new default. Of
> course, this is much more difficult to implement than the current modes.
That would probably be handy, though I think for my use cases fast
would still be better, or smart with a 30-second timeout.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From: | Jim Nasby <jim(at)nasby(dot)net> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Default mode for shutdown |
Date: | 2010-12-15 16:47:00 |
Message-ID: | CD9A03F0-7075-4198-A8CD-B998BD93FD43@nasby.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Dec 15, 2010, at 9:11 AM, Alvaro Herrera wrote:
> Excerpts from Robert Haas's message of mié dic 15 12:03:06 -0300 2010:
>
>> Certainly, if you have an environment where people are mostly logging
>> into the database directly (not through a connection pooler) and they
>> do a few important queries and then disconnect, smart is a better
>> default. But if you have an environment where (for whatever reason)
>> long-lasting connections are common, smart is worse than useless.
>
> It occurs to me that we may need a new mode, which disconnects sessions
> that are not in a transaction (or as soon as they are) but leaves
> in-progress transactions alone; this could be the new default. Of
> course, this is much more difficult to implement than the current modes.
+1; that would certainly be useful for us.
--
Jim C. Nasby, Database Architect jim(at)nasby(dot)net
512.569.9461 (cell) http://jim.nasby.net
From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Default mode for shutdown |
Date: | 2010-12-15 22:56:15 |
Message-ID: | AANLkTimcWdZZ5vG3njw2vs4q5yw4xjDtve0mNkU7ShDy@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Wed, Dec 15, 2010 at 15:47, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Wed, Dec 15, 2010 at 9:39 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Really? Personally I'm quite happy with that default.
>
>> Why? It seems to me that just leads to, oh, gee, the database isn't
>> shutting down, where's the window where I failed to exit a session?
>
> Yeah, and more to the point, do I want to finish whatever I was doing in
> that window? Fast-by-default is a nice hammer to swing, but one day
> you'll pound your finger.
The whole question "whatever I was doing in that window" indicates a
very limited deployment.
In most production deployments, that would mean different machiens,
and many different people... As a DBA, I certainly don't want to have
to wait around for everybody in my organization to get back from lunch
and close their clients..
In reality, more often than not I see the default shutdown turn into a
very efficient DOS - nobody can do anything in the database ,and a
restart (which is the usual case really - most people don't shut down
their db, they restart it - or shutdown/upgrade/start or something
like that) that could go in seconds turns into minutes or longer.
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Default mode for shutdown |
Date: | 2010-12-15 22:59:48 |
Message-ID: | AANLkTi=EBCRbWnOY1NZcfZ7b+KsJqtQ-9oxFZc23qsm+@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Wed, Dec 15, 2010 at 16:11, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
> Excerpts from Robert Haas's message of mié dic 15 12:03:06 -0300 2010:
>
>> Certainly, if you have an environment where people are mostly logging
>> into the database directly (not through a connection pooler) and they
>> do a few important queries and then disconnect, smart is a better
>> default. But if you have an environment where (for whatever reason)
>> long-lasting connections are common, smart is worse than useless.
>
> It occurs to me that we may need a new mode, which disconnects sessions
> that are not in a transaction (or as soon as they are) but leaves
> in-progress transactions alone; this could be the new default. Of
> course, this is much more difficult to implement than the current modes.
Now that, however, would actually be a useful behavior... Where's your patch? ;)
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
From: | Markus Wanner <markus(at)bluegap(dot)ch> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Default mode for shutdown |
Date: | 2010-12-16 10:26:52 |
Message-ID: | 4D09E96C.6000000@bluegap.ch |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 12/15/2010 03:47 PM, Tom Lane wrote:
> Yeah, and more to the point, do I want to finish whatever I was doing in
> that window? Fast-by-default is a nice hammer to swing, but one day
> you'll pound your finger.
Magnus pointed out that most distributions already use fast shutdown.
So it seems most people are used to that hammer, no?
Regards
Markus Wanner
From: | Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com> |
---|---|
To: | Markus Wanner <markus(at)bluegap(dot)ch> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Default mode for shutdown |
Date: | 2010-12-16 10:46:20 |
Message-ID: | AANLkTin-v5xX2urcDF+ove6L0dzzNNK2wk7XCksTz9xs@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Thu, Dec 16, 2010 at 19:26, Markus Wanner <markus(at)bluegap(dot)ch> wrote:
> On 12/15/2010 03:47 PM, Tom Lane wrote:
>> Yeah, and more to the point, do I want to finish whatever I was doing in
>> that window? Fast-by-default is a nice hammer to swing, but one day
>> you'll pound your finger.
>
> Magnus pointed out that most distributions already use fast shutdown.
> So it seems most people are used to that hammer, no?
Typical users might not use "pg_ctl stop" directly. If they use "service"
or init.d commands, the default shutdown modes are probably fast mode.
It's also true in the service control on MS Windows.
--
Itagaki Takahiro
From: | Josh Kupershmidt <schmiddy(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Default mode for shutdown |
Date: | 2010-12-16 21:47:51 |
Message-ID: | AANLkTimaMJywroj=Uj3y5iyn_tbCzj2sye6hLBjUBh7z@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Wed, Dec 15, 2010 at 10:11 AM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
> It occurs to me that we may need a new mode, which disconnects sessions
> that are not in a transaction (or as soon as they are) but leaves
> in-progress transactions alone; this could be the new default. Of
> course, this is much more difficult to implement than the current modes.
I like this idea, if it's feasible. Might I also suggest that the
smart-mode shutdown give a HINT to the user that he can forcibly kill
off existing sessions using -m fast. Right now, we show something
like this:
$ pg_ctl -D PGDATA stop
waiting for server to shut down....
........................................................... failed
pg_ctl: server does not shut down
And it's not immediately obvious to the user why the server didn't
shut down, or how to fix things.
Josh
From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Josh Kupershmidt <schmiddy(at)gmail(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Default mode for shutdown |
Date: | 2011-03-11 03:04:04 |
Message-ID: | 201103110304.p2B344l06285@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Josh Kupershmidt wrote:
> On Wed, Dec 15, 2010 at 10:11 AM, Alvaro Herrera
> <alvherre(at)commandprompt(dot)com> wrote:
> > It occurs to me that we may need a new mode, which disconnects sessions
> > that are not in a transaction (or as soon as they are) but leaves
> > in-progress transactions alone; this could be the new default. ?Of
> > course, this is much more difficult to implement than the current modes.
>
> I like this idea, if it's feasible. Might I also suggest that the
> smart-mode shutdown give a HINT to the user that he can forcibly kill
> off existing sessions using -m fast. Right now, we show something
> like this:
>
> $ pg_ctl -D PGDATA stop
> waiting for server to shut down....
> ........................................................... failed
> pg_ctl: server does not shut down
>
> And it's not immediately obvious to the user why the server didn't
> shut down, or how to fix things.
I have applied the attached patch to mention -m fast when a smart
shutdown or restart fails.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
Attachment | Content-Type | Size |
---|---|---|
/rtmp/pg_ctl.diff | text/x-diff | 968 bytes |