pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
auto_explain causes cluster crash if pg_ctl reload is used (not pg_ctl restart)
5+ messages / 3 participants
[nested] [flat]

* auto_explain causes cluster crash if pg_ctl reload is used (not pg_ctl restart)
@ 2011-10-25 15:42 bricklen <bricklen@gmail.com>
  2011-10-25 16:22 ` Re: auto_explain causes cluster crash if pg_ctl reload is used (not pg_ctl restart) Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
  0 siblings, 1 reply; 5+ messages in thread

From: bricklen @ 2011-10-25 15:42 UTC (permalink / raw)
  To: pgsql-bugs

Tried on both
PostgreSQL 9.0.4 on x86_64-unknown-linux-gnu, compiled by GCC gcc
(GCC) 4.1.2 20080704 (Red Hat 4.1.2-48), 64-bit
and
PostgreSQL 9.0.3 on x86_64-unknown-linux-gnu, compiled by GCC gcc
(GCC) 4.1.2 20080704 (Red Hat 4.1.2-48), 64-bit

shared_preload_libraries = 'pg_stat_statements,auto_explain'
custom_variable_classes = 'auto_explain'
auto_explain.log_min_duration = '10s'
auto_explain.log_analyze = true
auto_explain.log_buffers = true

I was testing to see if any of the settings above got applied after
issuing a "pg_ctl reload" rather than a restart, and I was surprised
to see that I could crash my db cluster. I realize that the docs say
to issue a restart, but the crash seems a tad user-unfriendly.

Any other details I should provide?



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: auto_explain causes cluster crash if pg_ctl reload is used (not pg_ctl restart)
  2011-10-25 15:42 auto_explain causes cluster crash if pg_ctl reload is used (not pg_ctl restart) bricklen <bricklen@gmail.com>
@ 2011-10-25 16:22 ` Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
  2011-10-25 19:51   ` Re: auto_explain causes cluster crash if pg_ctl reload is used (not pg_ctl restart) bricklen <bricklen@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Heikki Linnakangas @ 2011-10-25 16:22 UTC (permalink / raw)
  To: bricklen <bricklen@gmail.com>; +Cc: pgsql-bugs

On 25.10.2011 18:42, bricklen wrote:
> Tried on both
> PostgreSQL 9.0.4 on x86_64-unknown-linux-gnu, compiled by GCC gcc
> (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48), 64-bit
> and
> PostgreSQL 9.0.3 on x86_64-unknown-linux-gnu, compiled by GCC gcc
> (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48), 64-bit
>
> shared_preload_libraries = 'pg_stat_statements,auto_explain'
> custom_variable_classes = 'auto_explain'
> auto_explain.log_min_duration = '10s'
> auto_explain.log_analyze = true
> auto_explain.log_buffers = true
>
> I was testing to see if any of the settings above got applied after
> issuing a "pg_ctl reload" rather than a restart, and I was surprised
> to see that I could crash my db cluster. I realize that the docs say
> to issue a restart, but the crash seems a tad user-unfriendly.
>
> Any other details I should provide?

A backtrace from the core dump would be help a lot. Can you get one? 
More precise instructions on how to reproduce this would also be nice.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: auto_explain causes cluster crash if pg_ctl reload is used (not pg_ctl restart)
  2011-10-25 15:42 auto_explain causes cluster crash if pg_ctl reload is used (not pg_ctl restart) bricklen <bricklen@gmail.com>
  2011-10-25 16:22 ` Re: auto_explain causes cluster crash if pg_ctl reload is used (not pg_ctl restart) Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
@ 2011-10-25 19:51   ` bricklen <bricklen@gmail.com>
  2011-10-25 21:01     ` Re: auto_explain causes cluster crash if pg_ctl reload is used (not pg_ctl restart) Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 5+ messages in thread

From: bricklen @ 2011-10-25 19:51 UTC (permalink / raw)
  To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>; +Cc: pgsql-bugs

On Tue, Oct 25, 2011 at 9:22 AM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> On 25.10.2011 18:42, bricklen wrote:
>>
>> Tried on both
>> PostgreSQL 9.0.4 on x86_64-unknown-linux-gnu, compiled by GCC gcc
>> (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48), 64-bit
>> and
>> PostgreSQL 9.0.3 on x86_64-unknown-linux-gnu, compiled by GCC gcc
>> (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48), 64-bit
>>
>> shared_preload_libraries = 'pg_stat_statements,auto_explain'
>> custom_variable_classes = 'auto_explain'
>> auto_explain.log_min_duration = '10s'
>> auto_explain.log_analyze = true
>> auto_explain.log_buffers = true
>>
>> I was testing to see if any of the settings above got applied after
>> issuing a "pg_ctl reload" rather than a restart, and I was surprised
>> to see that I could crash my db cluster. I realize that the docs say
>> to issue a restart, but the crash seems a tad user-unfriendly.
>>
>> Any other details I should provide?
>
> A backtrace from the core dump would be help a lot. Can you get one? More
> precise instructions on how to reproduce this would also be nice.

I tried generating a core dump according to the steps at
http://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Linux/BSD
but either I was doing it incorrectly, or it wasn't dumping core
anywhere I could find.

The steps to reproduce are pretty simple.

Set the following in the postgresql.conf file:

shared_preload_libraries = 'pg_stat_statements,auto_explain'
custom_variable_classes = 'auto_explain'
auto_explain.log_min_duration = '10s'
auto_explain.log_analyze = true
auto_explain.log_buffers = true

As the postgres user, issue "pg_ctl reload"

pg_ctl status will now show that there is no running postmaster.  I
won't have access to those servers for at least another couple of
hours, but if there are some steps I should try to get a core dump I'm
willing to try them when the servers are free again.

The servers are running on CentOS 5.7 and CentOS 5.6, with the
packages from http://yum.pgrpms.org/9.0/redhat/



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: auto_explain causes cluster crash if pg_ctl reload is used (not pg_ctl restart)
  2011-10-25 15:42 auto_explain causes cluster crash if pg_ctl reload is used (not pg_ctl restart) bricklen <bricklen@gmail.com>
  2011-10-25 16:22 ` Re: auto_explain causes cluster crash if pg_ctl reload is used (not pg_ctl restart) Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
  2011-10-25 19:51   ` Re: auto_explain causes cluster crash if pg_ctl reload is used (not pg_ctl restart) bricklen <bricklen@gmail.com>
@ 2011-10-25 21:01     ` Tom Lane <tgl@sss.pgh.pa.us>
  2011-10-25 21:16       ` Re: auto_explain causes cluster crash if pg_ctl reload is used (not pg_ctl restart) bricklen <bricklen@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Tom Lane @ 2011-10-25 21:01 UTC (permalink / raw)
  To: bricklen <bricklen@gmail.com>; +Cc: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>; pgsql-bugs

bricklen <bricklen@gmail.com> writes:
> The steps to reproduce are pretty simple.

> Set the following in the postgresql.conf file:

> shared_preload_libraries = 'pg_stat_statements,auto_explain'
> custom_variable_classes = 'auto_explain'
> auto_explain.log_min_duration = '10s'
> auto_explain.log_analyze = true
> auto_explain.log_buffers = true

> As the postgres user, issue "pg_ctl reload"

> pg_ctl status will now show that there is no running postmaster.

This looks like the same thing as bug #6097, which is fixed in 9.0.5.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: auto_explain causes cluster crash if pg_ctl reload is used (not pg_ctl restart)
  2011-10-25 15:42 auto_explain causes cluster crash if pg_ctl reload is used (not pg_ctl restart) bricklen <bricklen@gmail.com>
  2011-10-25 16:22 ` Re: auto_explain causes cluster crash if pg_ctl reload is used (not pg_ctl restart) Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
  2011-10-25 19:51   ` Re: auto_explain causes cluster crash if pg_ctl reload is used (not pg_ctl restart) bricklen <bricklen@gmail.com>
  2011-10-25 21:01     ` Re: auto_explain causes cluster crash if pg_ctl reload is used (not pg_ctl restart) Tom Lane <tgl@sss.pgh.pa.us>
@ 2011-10-25 21:16       ` bricklen <bricklen@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: bricklen @ 2011-10-25 21:16 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>; pgsql-bugs

On Tue, Oct 25, 2011 at 2:01 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> bricklen <bricklen@gmail.com> writes:
>> The steps to reproduce are pretty simple.
>
>> Set the following in the postgresql.conf file:
>
>> shared_preload_libraries = 'pg_stat_statements,auto_explain'
>> custom_variable_classes = 'auto_explain'
>> auto_explain.log_min_duration = '10s'
>> auto_explain.log_analyze = true
>> auto_explain.log_buffers = true
>
>> As the postgres user, issue "pg_ctl reload"
>
>> pg_ctl status will now show that there is no running postmaster.
>
> This looks like the same thing as bug #6097, which is fixed in 9.0.5.
>
>                        regards, tom lane
>

Yup, you nailed it. I upgraded to 9.0.5 and the earlier changes no
longer trigger the crash.

Thanks!



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2011-10-25 21:16 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-10-25 15:42 auto_explain causes cluster crash if pg_ctl reload is used (not pg_ctl restart) bricklen <bricklen@gmail.com>
2011-10-25 16:22 ` Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
2011-10-25 19:51   ` bricklen <bricklen@gmail.com>
2011-10-25 21:01     ` Tom Lane <tgl@sss.pgh.pa.us>
2011-10-25 21:16       ` bricklen <bricklen@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox