pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Monitoring database
6+ messages / 3 participants
[nested] [flat]

* Monitoring database
@ 2002-01-09 11:31 Roman Gavrilov <romio@il.aduva.com>
  2002-01-14 15:36 ` Re: [ADMIN] Monitoring database Tim Barnard <tbarnard@povn.com>
  2002-01-15 00:16 ` Re: Monitoring database David Stanaway <david@netventures.com.au>
  0 siblings, 2 replies; 6+ messages in thread

From: Roman Gavrilov @ 2002-01-09 11:31 UTC (permalink / raw)
  To: pgsql-admin

Hello everybody.
Is there any way to check database status, or who is currently connected
to it.
I tried to drop database and got an error saying that other users using
this database.
So I wanted to see who is connected right now to the database.

One more question is how can I see all tables in the template1 ?
Thanks allot.

--
-----------------------------------------------------------------------------
 Roman Gavrilov
 Aduva Inc., Web Development Services.
 work +972-3-7534324 mobile +972-54-834668
 romio@aduva.com, romio@netvision.net.il

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

* Re: [ADMIN] Monitoring database
  2002-01-09 11:31 Monitoring database Roman Gavrilov <romio@il.aduva.com>
@ 2002-01-14 15:36 ` Tim Barnard <tbarnard@povn.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Tim Barnard @ 2002-01-14 15:36 UTC (permalink / raw)
  To: romio@il.aduva.com; +Cc: pgsql-general@postgresql.org

I don't think there is currently a way to check the database for connections (someone correct me if I'm wrong). But to get a list of all of the tables in template1:

\c template1
select relname from pg_class

Tim
  ----- Original Message ----- 
  From: Roman Gavrilov 
  To: pgsql-admin@postgresql.org 
  Sent: Wednesday, January 09, 2002 3:31 AM
  Subject: [ADMIN] Monitoring database


  Hello everybody. 
  Is there any way to check database status, or who is currently connected to it. 
  I tried to drop database and got an error saying that other users using this database. 
  So I wanted to see who is connected right now to the database. 
  One more question is how can I see all tables in the template1 ? 
  Thanks allot. 

-- 
-----------------------------------------------------------------------------
 Roman Gavrilov                           
 Aduva Inc., Web Development Services.    
 work +972-3-7534324 mobile +972-54-834668
 romio@aduva.com, romio@netvision.net.il
    

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

* Re: Monitoring database
  2002-01-09 11:31 Monitoring database Roman Gavrilov <romio@il.aduva.com>
@ 2002-01-15 00:16 ` David Stanaway <david@netventures.com.au>
  1 sibling, 0 replies; 6+ messages in thread

From: David Stanaway @ 2002-01-15 00:16 UTC (permalink / raw)
  To: romio@il.aduva.com; +Cc: pgsql-admin


On Wednesday, January 9, 2002, at 10:31  PM, Roman Gavrilov wrote:

> Hello everybody.
> Is there any way to check database status, or who is currently 
> connected to it.
> I tried to drop database and got an error saying that other users using 
> this database.
> So I wanted to see who is connected right now to the database.

Take a look here maybe:
http://gborg.postgresql.org/project/pgmonitor/projdisplay.php

> One more question is how can I see all tables in the template1 ?
> Thanks allot.

in the psql client: psql template1
\dt
\h is definately worth reading too.

==============================
David Stanaway
Personal: david@stanaway.net
Work: david@netventures.com.au

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

* Re: Monitoring database
@ 2002-01-15 22:29 David Stanaway <david@netventures.com.au>
  2002-01-16 08:09 ` Re: Monitoring database Roman Gavrilov <romio@il.aduva.com>
  0 siblings, 1 reply; 6+ messages in thread

From: David Stanaway @ 2002-01-15 22:29 UTC (permalink / raw)
  To: romio@il.aduva.com; pgsql-admin


On Tuesday, January 15, 2002, at 07:08  PM, Roman Gavrilov wrote:

>> David Stanaway wrote:
>>
>> On Wednesday, January 9, 2002, at 10:31 PM, Roman Gavrilov wrote:
>>>      One more question is how can I see all tables in the template1 ?
>>>      Thanks allot.
>>
>> in the psql client: psql template1
>> \dt
>> \h is definately worth reading too.
>  
> Did you try that ?
> I get  "No relations found" is it a problem or template1 tables are 
> protected some how and not shown in \dt

What relations are you looking for? System tables?  They don't show up 
in \dt  That just lists user tables.
There are a number of \d<X> commands in psql for different types of 
relations, you should look at \? (Sorry I said \h and thats for SQL 
help) to see all the psql escapes.



==============================
David Stanaway
Personal: david@stanaway.net
Work: david@netventures.com.au

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

* Re: Monitoring database
  2002-01-15 22:29 Re: Monitoring database David Stanaway <david@netventures.com.au>
@ 2002-01-16 08:09 ` Roman Gavrilov <romio@il.aduva.com>
  2002-01-16 22:36   ` Re: Monitoring database David Stanaway <david@netventures.com.au>
  0 siblings, 1 reply; 6+ messages in thread

From: Roman Gavrilov @ 2002-01-16 08:09 UTC (permalink / raw)
  To: David Stanaway <david@netventures.com.au>; +Cc: pgsql-admin

Yes I would like to see system tables, that is correct is there any way to see all those tables.
For example in MySQL there is mysql database where you have all system tables.

David Stanaway wrote:

> On Tuesday, January 15, 2002, at 07:08 PM, Roman Gavrilov wrote:
>
>           David Stanaway wrote:
>
>           On Wednesday, January 9, 2002, at 10:31 PM, Roman Gavrilov wrote:
>
>                     One more question is how can I see all tables in the template1 ?
>                     Thanks allot.
>
>           in the psql client: psql template1
>           \dt
>           \h is definately worth reading too.
>
>
>      Did you try that ?
>      I get  "No relations found" is it a problem or template1 tables are protected some how and not shown in \dt
>
> What relations are you looking for? System tables? They don't show up in \dt That just lists user tables.
> There are a number of \d<X> commands in psql for different types of relations, you should look at \? (Sorry I said \h and thats for SQL help) to see all the psql escapes.
>
> ==============================
> David Stanaway
> Personal: david@stanaway.net
> Work: david@netventures.com.au

--
-----------------------------------------------------------------------------
 Roman Gavrilov
 Aduva Inc., Web Development Services.
 work +972-3-7534324 mobile +972-54-834668
 romio@aduva.com, romio@netvision.net.il

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

* Re: Monitoring database
  2002-01-15 22:29 Re: Monitoring database David Stanaway <david@netventures.com.au>
  2002-01-16 08:09 ` Re: Monitoring database Roman Gavrilov <romio@il.aduva.com>
@ 2002-01-16 22:36   ` David Stanaway <david@netventures.com.au>
  0 siblings, 0 replies; 6+ messages in thread

From: David Stanaway @ 2002-01-16 22:36 UTC (permalink / raw)
  To: romio@il.aduva.com; pgsql-admin


On Wednesday, January 16, 2002, at 07:09  PM, Roman Gavrilov wrote:

> Yes I would like to see system tables, that is correct is there any way 
> to see all those tables.
> For example in MySQL there is mysql database where you have all system 
> tables.

Please read the documentation. I have already told you where to look.

But just incase you missed it:
$ psql template1
Welcome to psql, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
        \h for help with SQL commands
        \? for help on internal slash commands
        \g or terminate with semicolon to execute query
        \q to quit

template1=> \?
  \a             toggle between unaligned and aligned mode
  \c[onnect] [dbname|- [user]]
                 connect to new database (currently 'template1')
  \C <title>     table title
  \copy ...      perform SQL COPY with data stream to the client machine
  \copyright     show PostgreSQL usage and distribution terms
  \d <table>     describe table (or view, index, sequence)
  \d{t|i|s|v}    list tables/indices/sequences/views
  \d{p|S|l}      list permissions/system tables/lobjects
  \da            list aggregates
  \dd [object]   list comment for table, type, function, or operator
  \df            list functions
  \do            list operators
  \dT            list data types
  \e [file]      edit the current query buffer or [file] with external 
editor
  \echo <text>   write text to stdout
  \encoding <encoding>  set client encoding
  \f <sep>       change field separator
  \g [file]      send query to backend (and results in [file] or |pipe)
  \h [cmd]       help on syntax of sql commands, * for all commands
  \H             toggle HTML mode (currently off)
  \i <file>      read and execute queries from <file>
  \l             list all databases
  \lo_export, \lo_import, \lo_list, \lo_unlink
                 large object operations
  \o [file]      send all query results to [file], or |pipe
  \p             show the content of the current query buffer
  \pset <opt>    set table output  <opt> = 
{format|border|expanded|fieldsep|
                 null|recordsep|tuples_only|title|tableattr|pager}
  \q             quit psql
  \qecho <text>  write text to query output stream (see \o)
  \r             reset (clear) the query buffer
  \s [file]      print history or save it in [file]
  \set <var> <value>  set internal variable
  \t             show only rows (currently off)
  \T <tags>      HTML table tags
  \unset <var>   unset (delete) internal variable
  \w <file>      write current query buffer to a <file>
  \x             toggle expanded output (currently off)
  \z             list table access permissions
  \! [cmd]       shell escape or command

==============================
David Stanaway
Personal: david@stanaway.net
Work: david@netventures.com.au

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


end of thread, other threads:[~2002-01-16 22:36 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-01-09 11:31 Monitoring database Roman Gavrilov <romio@il.aduva.com>
2002-01-14 15:36 ` Tim Barnard <tbarnard@povn.com>
2002-01-15 00:16 ` David Stanaway <david@netventures.com.au>
2002-01-15 22:29 Re: Monitoring database David Stanaway <david@netventures.com.au>
2002-01-16 08:09 ` Roman Gavrilov <romio@il.aduva.com>
2002-01-16 22:36   ` David Stanaway <david@netventures.com.au>

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