Killing a session

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Vitaly Belman

    Killing a session

    Is there a way to kill a session in PostrgeSQL? I ran a bad query by
    mistake and I don't want to shut the whole database just to quit using
    the whole CPU.

    --
    ICQ: 1912453
    AIM: VitalyB1984
    MSN: tmdagent@hotmai l.com
    Yahoo!: VitalyBe

    ---------------------------(end of broadcast)---------------------------
    TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddres sHere" to majordomo@postg resql.org)

  • Tom Lane

    #2
    Re: Killing a session

    Vitaly Belman <vitalyb@gmail. com> writes:[color=blue]
    > Is there a way to kill a session in PostrgeSQL? I ran a bad query by
    > mistake and I don't want to shut the whole database just to quit using
    > the whole CPU.[/color]

    ISTM what you really want is query cancel, not whole-session kill.
    Try "kill -INT <pid-of-backend>".

    regards, tom lane

    ---------------------------(end of broadcast)---------------------------
    TIP 9: the planner will ignore your desire to choose an index scan if your
    joining column's datatypes do not match

    Comment

    • Vitaly Belman

      #3
      Re: Killing a session

      Even better. Thanks =).

      On Sat, 21 Aug 2004 20:14:53 -0400, Tom Lane <tgl@sss.pgh.pa .us> wrote:[color=blue]
      >
      >
      > Vitaly Belman <vitalyb@gmail. com> writes:[color=green]
      > > Is there a way to kill a session in PostrgeSQL? I ran a bad query by
      > > mistake and I don't want to shut the whole database just to quit using
      > > the whole CPU.[/color]
      >
      > ISTM what you really want is query cancel, not whole-session kill.
      > Try "kill -INT <pid-of-backend>".
      >
      > regards, tom lane
      >
      > ---------------------------(end of broadcast)---------------------------
      > TIP 9: the planner will ignore your desire to choose an index scan if your
      > joining column's datatypes do not match
      >
      >[/color]


      --
      ICQ: 1912453
      AIM: VitalyB1984
      MSN: tmdagent@hotmai l.com
      Yahoo!: VitalyBe

      ---------------------------(end of broadcast)---------------------------
      TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

      Comment

      Working...