pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
need help
32+ messages / 27 participants
[nested] [flat]

* need help
@ 2001-09-07 16:01   meena nimmagadda <meenahere@lycos.com>
  0 siblings, 2 replies; 32+ messages in thread

From: meena nimmagadda @ 2001-09-07 16:01 UTC (permalink / raw)
  To: pgsql-general

Hi!  I have some doubts on Postgres....
Once we start a Postmaster process, will it keep running forever? How can we restart/stop??(the commands???)
Also, should we start the Postmaster only as the "postgres" superuser??? Is it possible to have users for postgres database also....like in linux....we have users? What is the importance of users and superuser?
After I start Postmaster process, I am getting the following error:
SetUserId: user 'postgres' is not in 'pg_shadow'.
What does it mean? How do I avoid it? Because of this,I am not able to create a database......after starting postmaster process.
Thanks,
Meena.


Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/



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

* Re: need help
@ 2001-09-14 20:14  Andre Schnabel <A_Schnabel@t-online.de>
  parent:  meena nimmagadda <meenahere@lycos.com>
  1 sibling, 0 replies; 32+ messages in thread

From: A_Schnabel@t-online.de @ 2001-09-14 20:14 UTC (permalink / raw)
  To: meenahere@lycos.com; pgsql-general

Hi Meena,

you'll find the answers to your question in the postgres doc's. I'd suggest
reading at least the Tutorial
(http://www.postgresql.org/idocs/index.php?tutorial.html). Some basic
concepts (postmaster, clients, architecture of postgres) are explained
there.
Answers to your questions about the postmaster process and users can be
found at the adminsitrators guide
(http://www.postgresql.org/idocs/index.php?admin.html) and the reference
manual (http://www.postgresql.org/idocs/index.php?reference.html)

I'll put some basic answers just here.


----- Original Message -----
From: " meena nimmagadda" <meenahere@lycos.com>
Subject: [GENERAL] need help


> Hi!  I have some doubts on Postgres....
> Once we start a Postmaster process, will it keep running forever? How can
we restart/stop??(the commands???)
Yes, postmaster will run forever ... at least as long as you don't stop it.
You can use pg_ctl for starting and stoping the postmaster.
(http://www.postgresql.org/idocs/index.php?app-pg-ctl.html)

> Also, should we start the Postmaster only as the "postgres" superuser???
Yes, because this "masterprocess" is just a server. Other users can connect
to the database via clientapplications.

> Is it possible to have users for postgres database also....like in
linux....we have users?
Yes. You can create new users with createuser
(http://www.postgresql.org/idocs/index.php?app-createuser.html).

> What is the importance of users and superuser?
Users can connect to the database and retrieve / insert data (if this rights
are granted to the user). A superuser can create databases and other users.

> After I start Postmaster process, I am getting the following error:
> SetUserId: user 'postgres' is not in 'pg_shadow'.
> What does it mean? How do I avoid it? Because of this,I am not able to
create a database......after starting postmaster process.

You don't have a DB-user "postgres". Although this should have been done
automatically during installation, you can create the user with the
createuser command.

> Thanks,
> Meena.





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

* Re: need help
@ 2001-09-14 21:41  Jeff Eckermann <jeckermann@verio.net>
  parent:  meena nimmagadda <meenahere@lycos.com>
  1 sibling, 0 replies; 32+ messages in thread

From: Jeff Eckermann @ 2001-09-14 21:41 UTC (permalink / raw)
  To: meenahere@lycos.com; pgsql-general

Did you do "initdb"?
I suggest you read man pages:
man initdb
man postmaster
man pg_ctl
man createdb
man createuser
and PostgreSQL documentation in general.

If you are not able to solve the problem, please make a further post giving
details like:
PostgreSQL version you are using
Platform (OS etc)
Whether you installed using a package, or compiled from source
Any configure options you used

----- Original Message -----
From: " meena nimmagadda" <meenahere@lycos.com>
To: <pgsql-general@postgresql.org>
Sent: Friday, September 07, 2001 11:01 AM
Subject: [GENERAL] need help


> Hi!  I have some doubts on Postgres....
> Once we start a Postmaster process, will it keep running forever? How can
we restart/stop??(the commands???)
> Also, should we start the Postmaster only as the "postgres" superuser???
Is it possible to have users for postgres database also....like in
linux....we have users? What is the importance of users and superuser?
> After I start Postmaster process, I am getting the following error:
> SetUserId: user 'postgres' is not in 'pg_shadow'.
> What does it mean? How do I avoid it? Because of this,I am not able to
create a database......after starting postmaster process.
> Thanks,
> Meena.
>
>
> Get 250 color business cards for FREE!
> http://businesscards.lycos.com/vp/fastpath/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>
>




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

* Re: need help
@ 2001-09-15 00:54  cnliou@eurosport.com
  0 siblings, 0 replies; 32+ messages in thread

From: cnliou@eurosport.com @ 2001-09-15 00:54 UTC (permalink / raw)
  To: pgsql-general

> Once we start a Postmaster process, will it keep
running forever? 

It will if you run it in background like

postmaste -i -D /home/mydir/pgsql-database-dir &

> How can we restart/stop??(the commands???)

The preferred command might be pg_ctl that comes
along with postgresql distribution:

pg_ctl start
pg_ctl stop

killing the postmaster process (kill <pid>) also
works although this approach is not recommended.

> Also, should we start the Postmaster only as the
"postgres" superuser???

I would say this is a management issue and it is you
who decide whether to start postmaster by postgres or
not. I have not seen in the document saying that this
is the only way to go.

> Is it possible to have users for postgres database
also....like in linux....we have users?

Yes. you can define users somewhere. The document
already explains.

CN

CN

--------------------------------------------------------
You too can have your own email address from Eurosport.
http://www.eurosport.com








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

* Need help
@ 2002-01-01 11:51  Shamik Majumder <shamik.majumder@wipro.com>
  0 siblings, 2 replies; 32+ messages in thread

From: Shamik Majumder @ 2002-01-01 11:51 UTC (permalink / raw)
  To: pgsql-admin@postgresql.org; pgsql-general; pgsql-sql@postgresql.org

Hi ,

We are facing some problems with the creation of tables of same name but
owned by different user .

We followed the following steps .

Lets say, we have a database DBTest and this database was created by the
user postgres.
We created  tables - Table1, Table2 and Table3 in it.
Now, by using the createuser command - one more database user is
created, say dbuser1.
Now, when I login as dbuser1 on the DBTest database, I can see all the
tables Table1, Table2 and Table3 by /dt command.
Even, I am able to create new tables ( i.e table with new names ) in the
same database DBTest but with the owner dbuser1.
Now, when I try to create the same table like Table1 ( which has been
created by the
postgress user previously ) as dbuser1 user  - the create table command
fails with the following o/p :

ERROR:  Relation 'Table1' already exists

My question  - is it possible in Postgres, to create the tables with
same name but with different users ?

i.e we create Table1 table both as postgres as well as dbuser1 .

Is it possible kindly let me know .

Thanks and Regards,
Shamik

Attachments:

InterScan_Disclaimer.txt (text/plain, 854B) download ------------------------------------------------------------------------------------------------------------------------- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:mailadmin@wipro.com and delete this mail from your records. ----------------------------------------------------------------------------------------------------------------------
^ permalink raw reply [nested|flat] 32+ messages in thread

* Re: Need help
@ 2002-01-08 15:17  Holger Krug <hkrug@rationalizer.com>
  parent: Shamik Majumder <shamik.majumder@wipro.com>
  1 sibling, 0 replies; 32+ messages in thread

From: Holger Krug @ 2002-01-08 15:17 UTC (permalink / raw)
  To: Shamik Majumder <shamik.majumder@wipro.com>; +Cc: pgsql-general

On Tue, Jan 01, 2002 at 05:21:12PM +0530, Shamik Majumder wrote:
> My question  - is it possible in Postgres, to create the tables with
> same name but with different users ?

No.

-- 
Holger Krug
hkrug@rationalizer.com



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

* Re: [GENERAL] Need help
@ 2002-01-08 17:17  Jason Earl <jason.earl@simplot.com>
  parent: Shamik Majumder <shamik.majumder@wipro.com>
  1 sibling, 1 reply; 32+ messages in thread

From: Jason Earl @ 2002-01-08 17:17 UTC (permalink / raw)
  To: Shamik Majumder <shamik.majumder@wipro.com>; +Cc: pgsql-admin@postgresql.org; pgsql-general; pgsql-sql@postgresql.org


Why do you want a database where two tables have the same name?  When
you do a "SELECT * from Table1" what table do you expect PostgreSQL to
use?

Now, that being said, it's possible to create temporary tables in
different connections with the same name.  These tables will dissapear
when the connection is terminated, however.  For example you could
have something like this:

conn1: CREATE TEMP TABLE foo (bar text);
conn2: CREATE TEMP TABLE foo (bar text);
conn1: INSERT INTO foo (bar) VALUES ('baz');
conn2: SELECT * from foo; [returns zero rows]
conn1: SELECT * from foo; [returns 'baz']

If you actually want two permanent tables with the same name, you are
going to have to put them in separate databases.  Otherwise use
temporary tables.

Jason

Shamik Majumder <shamik.majumder@wipro.com> writes:

> Hi ,
> 
> We are facing some problems with the creation of tables of same name
> but owned by different user .
> 
> We followed the following steps .
> 
> Lets say, we have a database DBTest and this database was created by
> the user postgres.  We created tables - Table1, Table2 and Table3 in
> it.  Now, by using the createuser command - one more database user
> is created, say dbuser1.  Now, when I login as dbuser1 on the DBTest
> database, I can see all the tables Table1, Table2 and Table3 by /dt
> command.  Even, I am able to create new tables ( i.e table with new
> names ) in the same database DBTest but with the owner dbuser1.
> Now, when I try to create the same table like Table1 ( which has
> been created by the postgress user previously ) as dbuser1 user -
> the create table command fails with the following o/p :
> 
> ERROR:  Relation 'Table1' already exists
> 
> My question - is it possible in Postgres, to create the tables with
> same name but with different users ?
> 
> i.e we create Table1 table both as postgres as well as dbuser1 .
> 
> Is it possible kindly let me know .
> 
> Thanks and Regards,
> Shamik
> 
> 
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org



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

* Re: [SQL] Need help
@ 2002-01-08 20:23  Bill Cunningham <billc@ballydev.com>
  parent: Jason Earl <jason.earl@simplot.com>
  0 siblings, 1 reply; 32+ messages in thread

From: Bill Cunningham @ 2002-01-08 20:23 UTC (permalink / raw)
  To: pgsql-general

Actually this concept is used in production environments or classes for 
seperating student's school work.

I can see the need to create a Table1 under several different names. 
Does postgresql have a schema concept like so:
dbuser1.Table1
postgres.Table1

This is how DB2 does it.

- Bill Cunningham
Technical Lead
Bally Gaming and Systems


Jason Earl wrote:

>Why do you want a database where two tables have the same name?  When
>you do a "SELECT * from Table1" what table do you expect PostgreSQL to
>use?
>
>Now, that being said, it's possible to create temporary tables in
>different connections with the same name.  These tables will dissapear
>when the connection is terminated, however.  For example you could
>have something like this:
>
>conn1: CREATE TEMP TABLE foo (bar text);
>conn2: CREATE TEMP TABLE foo (bar text);
>conn1: INSERT INTO foo (bar) VALUES ('baz');
>conn2: SELECT * from foo; [returns zero rows]
>conn1: SELECT * from foo; [returns 'baz']
>
>If you actually want two permanent tables with the same name, you are
>going to have to put them in separate databases.  Otherwise use
>temporary tables.
>
>Jason
>
>Shamik Majumder <shamik.majumder@wipro.com> writes:
>
>>Hi ,
>>
>>We are facing some problems with the creation of tables of same name
>>but owned by different user .
>>
>>We followed the following steps .
>>
>>Lets say, we have a database DBTest and this database was created by
>>the user postgres.  We created tables - Table1, Table2 and Table3 in
>>it.  Now, by using the createuser command - one more database user
>>is created, say dbuser1.  Now, when I login as dbuser1 on the DBTest
>>database, I can see all the tables Table1, Table2 and Table3 by /dt
>>command.  Even, I am able to create new tables ( i.e table with new
>>names ) in the same database DBTest but with the owner dbuser1.
>>Now, when I try to create the same table like Table1 ( which has
>>been created by the postgress user previously ) as dbuser1 user -
>>the create table command fails with the following o/p :
>>
>>ERROR:  Relation 'Table1' already exists
>>
>>My question - is it possible in Postgres, to create the tables with
>>same name but with different users ?
>>
>>i.e we create Table1 table both as postgres as well as dbuser1 .
>>
>>Is it possible kindly let me know .
>>
>>Thanks and Regards,
>>Shamik
>>
>>
>>
>>
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>






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

* Re: [SQL] Need help
@ 2002-01-09 00:04  Doug McNaught <doug@wireboard.com>
  parent: Bill Cunningham <billc@ballydev.com>
  0 siblings, 0 replies; 32+ messages in thread

From: Doug McNaught @ 2002-01-09 00:04 UTC (permalink / raw)
  To: Bill Cunningham <billc@ballydev.com>; +Cc: pgsql-general

Bill Cunningham <billc@ballydev.com> writes:

> Actually this concept is used in production environments or classes
> for seperating student's school work.
> 
> I can see the need to create a Table1 under several different
> names. Does postgresql have a schema concept like so:
> dbuser1.Table1
> postgres.Table1
> 
> This is how DB2 does it.

I understand that schemas are tentatively planned for 7.3, but they
are not currently available.

-Doug
-- 
Let us cross over the river, and rest under the shade of the trees.
   --T. J. Jackson, 1863



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

* need help
@ 2004-08-17 20:36  Kevin Matthews <dataport10@yahoo.com>
  0 siblings, 1 reply; 32+ messages in thread

From: Kevin Matthews @ 2004-08-17 20:36 UTC (permalink / raw)
  To: pgsql-general

 subscribe
    end

i am getting this error
 
org.apache.jasper.JasperException: ERROR:  current transaction is aborted, queries ignored until end of transaction block

 
Please help

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

* Re: need help
@ 2004-08-20 08:09  Richard Huxton <dev@archonet.com>
  parent: Kevin Matthews <dataport10@yahoo.com>
  0 siblings, 0 replies; 32+ messages in thread

From: Richard Huxton @ 2004-08-20 08:09 UTC (permalink / raw)
  To: Kevin Matthews <dataport10@yahoo.com>; +Cc: pgsql-general

Kevin Matthews wrote:
> subscribe end
> 
> i am getting this error
> 
> org.apache.jasper.JasperException: ERROR:  current transaction is
> aborted, queries ignored until end of transaction block

It appears an error has occurred in your current transaction, which has 
caused it to abort. Until you issue a ROLLBACK, any further queries will 
be ignored.

You probably need to look in PostgreSQL's logs to see what caused the 
error, or check the error codes from SQL commands issued from jasper's code.

-- 
   Richard Huxton
   Archonet Ltd



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

* Re: need help
@ 2004-08-20 14:17  Jim Wilson <jimw@kelcomaine.com>
  0 siblings, 0 replies; 32+ messages in thread

From: Jim Wilson @ 2004-08-20 14:17 UTC (permalink / raw)
  To: pgsql-general

Kevin Matthews said:

>  subscribe
>     end
> 
> i am getting this error
>  
> org.apache.jasper.JasperException: ERROR:  current transaction is aborted,
queries ignored until end of transaction block
> 

This just indicates that an update failed within the current transaction
scope.  Your application needs to rollback when an update or insert fails
otherwise you will get this error message.

Best,

Jim Wilson





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

* need help
@ 2005-12-06 08:38  Jenny <jenny_tania@yahoo.com>
  0 siblings, 2 replies; 32+ messages in thread

From: Jenny @ 2005-12-06 08:38 UTC (permalink / raw)
  To: pgsql-general; pgsql-sql@postgresql.org; pgsql-performance@postgresql.org

I'm running PostgreSQL 8.0.3 on i686-pc-linux-gnu (Fedora Core 2). I've been
dealing with Psql for over than 2 years now, but I've never had this case
before.

I have a table that has about 20 rows in it.

       Table "public.s_apotik"
    Column         |          Type                |     Modifiers
-------------------+------------------------------+------------------
obat_id            | character varying(10)        | not null
stock              | numeric                      | not null
s_min              | numeric                      | not null
s_jual             | numeric                      | 
s_r_jual           | numeric                      | 
s_order            | numeric                      | 
s_r_order          | numeric                      | 
s_bs               | numeric                      | 
last_receive       | timestamp without time zone  |
Indexes:
   "s_apotik_pkey" PRIMARY KEY, btree(obat_id)
   
When I try to UPDATE one of the row, nothing happens for a very long time.
First, I run it on PgAdminIII, I can see the miliseconds are growing as I
waited. Then I stop the query, because the time needed for it is unbelievably
wrong.

Then I try to run the query from the psql shell. For example, the table has
obat_id : A, B, C, D.
db=# UPDATE s_apotik SET stock = 100 WHERE obat_id='A';
(.... nothing happens.. I press the Ctrl-C to stop it. This is what comes out
:)
Cancel request sent
ERROR: canceling query due to user request

(If I try another obat_id)
db=# UPDATE s_apotik SET stock = 100 WHERE obat_id='B';
(Less than a second, this is what comes out :)
UPDATE 1

I can't do anything to that row. I can't DELETE it. Can't DROP the table. 
I want this data out of my database.
What should I do? It's like there's a falsely pointed index here.
Any help would be very much appreciated.


Regards,
Jenny Tania


		
__________________________________________ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 




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

* Re: need help
@ 2005-12-06 08:54  Tino Wildenhain <tino@wildenhain.de>
  parent: Jenny <jenny_tania@yahoo.com>
  1 sibling, 1 reply; 32+ messages in thread

From: Tino Wildenhain @ 2005-12-06 08:54 UTC (permalink / raw)
  To: Jenny <jenny_tania@yahoo.com>; +Cc: pgsql-general; pgsql-sql@postgresql.org; pgsql-performance@postgresql.org

Jenny schrieb:
> I'm running PostgreSQL 8.0.3 on i686-pc-linux-gnu (Fedora Core 2). I've been
> dealing with Psql for over than 2 years now, but I've never had this case
> before.
> 
> I have a table that has about 20 rows in it.
> 
>        Table "public.s_apotik"
>     Column         |          Type                |     Modifiers
> -------------------+------------------------------+------------------
> obat_id            | character varying(10)        | not null
> stock              | numeric                      | not null
> s_min              | numeric                      | not null
> s_jual             | numeric                      | 
> s_r_jual           | numeric                      | 
> s_order            | numeric                      | 
> s_r_order          | numeric                      | 
> s_bs               | numeric                      | 
> last_receive       | timestamp without time zone  |
> Indexes:
>    "s_apotik_pkey" PRIMARY KEY, btree(obat_id)
>    
> When I try to UPDATE one of the row, nothing happens for a very long time.
> First, I run it on PgAdminIII, I can see the miliseconds are growing as I
> waited. Then I stop the query, because the time needed for it is unbelievably
> wrong.
> 
> Then I try to run the query from the psql shell. For example, the table has
> obat_id : A, B, C, D.
> db=# UPDATE s_apotik SET stock = 100 WHERE obat_id='A';
> (.... nothing happens.. I press the Ctrl-C to stop it. This is what comes out
> :)
> Cancel request sent
> ERROR: canceling query due to user request
> 
> (If I try another obat_id)
> db=# UPDATE s_apotik SET stock = 100 WHERE obat_id='B';
> (Less than a second, this is what comes out :)
> UPDATE 1
> 
> I can't do anything to that row. I can't DELETE it. Can't DROP the table. 
> I want this data out of my database.
> What should I do? It's like there's a falsely pointed index here.
> Any help would be very much appreciated.
> 

1) lets hope you do regulary backups - and actually tested restore.
1a) if not, do it right now
2) reindex the table
3) try again to modify

Q: are there any foreign keys involved? If so, reindex those
tables too, just in case.

did you vacuum regulary?

HTH
Tino



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

* Re: need help
@ 2005-12-06 10:45  Alban Hertroys <alban@magproductions.nl>
  parent: Jenny <jenny_tania@yahoo.com>
  1 sibling, 0 replies; 32+ messages in thread

From: Alban Hertroys @ 2005-12-06 10:45 UTC (permalink / raw)
  To: Jenny <jenny_tania@yahoo.com>; +Cc: pgsql-general

Jenny wrote:
> I'm running PostgreSQL 8.0.3 on i686-pc-linux-gnu (Fedora Core 2). I've been
> dealing with Psql for over than 2 years now, but I've never had this case
> before.

> Then I try to run the query from the psql shell. For example, the table has
> obat_id : A, B, C, D.
> db=# UPDATE s_apotik SET stock = 100 WHERE obat_id='A';
> (.... nothing happens.. I press the Ctrl-C to stop it. This is what comes out
> :)
> Cancel request sent
> ERROR: canceling query due to user request
> 
> (If I try another obat_id)
> db=# UPDATE s_apotik SET stock = 100 WHERE obat_id='B';
> (Less than a second, this is what comes out :)
> UPDATE 1

It could well be another client has a lock on that record, for example 
by doing a SELECT FOR UPDATE w/o a NOWAIT.

You can verify by querying pg_locks. IIRC you can also see what query 
caused the lock by joining against some other system table, but the 
details escape me atm (check the archives, I learned that by following 
this list).

If it's indeed a locked record, the process causing the lock is listed. 
Either kill it or call it's owner back from his/her coffee break ;)

I doubt it's anything serious.

-- 
Alban Hertroys
alban@magproductions.nl

magproductions b.v.

T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
    7500 AK Enschede

//Showing your Vision to the World//



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

* Re: [PERFORM] need help
@ 2005-12-21 11:10  Alban Medici (NetCentrex) <amedici@fr.netcentrex.net>
  parent: Tino Wildenhain <tino@wildenhain.de>
  0 siblings, 0 replies; 32+ messages in thread

From: Alban Medici \(NetCentrex\) @ 2005-12-21 11:10 UTC (permalink / raw)
  To: pgsql-general; pgsql-sql@postgresql.org; pgsql-performance@postgresql.org


Try to execute your query (in psql) with prefixing by EXPLAIN ANALYZE and
send us the result
 db=# EXPLAIN ANALYZE UPDATE s_apotik SET stock = 100 WHERE obat_id='A';

regards

-----Original Message-----
From: pgsql-performance-owner@postgresql.org
[mailto:pgsql-performance-owner@postgresql.org] On Behalf Of Tino Wildenhain
Sent: mardi 6 décembre 2005 09:55
To: Jenny
Cc: pgsql-general@postgresql.org; pgsql-sql@postgresql.org;
pgsql-performance@postgresql.org
Subject: Re: [PERFORM] [GENERAL] need help

Jenny schrieb:
> I'm running PostgreSQL 8.0.3 on i686-pc-linux-gnu (Fedora Core 2). 
> I've been dealing with Psql for over than 2 years now, but I've never 
> had this case before.
> 
> I have a table that has about 20 rows in it.
> 
>        Table "public.s_apotik"
>     Column         |          Type                |     Modifiers
> -------------------+------------------------------+------------------
> obat_id            | character varying(10)        | not null
> stock              | numeric                      | not null
> s_min              | numeric                      | not null
> s_jual             | numeric                      | 
> s_r_jual           | numeric                      | 
> s_order            | numeric                      | 
> s_r_order          | numeric                      | 
> s_bs               | numeric                      | 
> last_receive       | timestamp without time zone  |
> Indexes:
>    "s_apotik_pkey" PRIMARY KEY, btree(obat_id)
>    
> When I try to UPDATE one of the row, nothing happens for a very long time.
> First, I run it on PgAdminIII, I can see the miliseconds are growing 
> as I waited. Then I stop the query, because the time needed for it is 
> unbelievably wrong.
> 
> Then I try to run the query from the psql shell. For example, the 
> table has obat_id : A, B, C, D.
> db=# UPDATE s_apotik SET stock = 100 WHERE obat_id='A'; (.... nothing 
> happens.. I press the Ctrl-C to stop it. This is what comes out
> :)
> Cancel request sent
> ERROR: canceling query due to user request
> 
> (If I try another obat_id)
> db=# UPDATE s_apotik SET stock = 100 WHERE obat_id='B'; (Less than a 
> second, this is what comes out :) UPDATE 1
> 
> I can't do anything to that row. I can't DELETE it. Can't DROP the table. 
> I want this data out of my database.
> What should I do? It's like there's a falsely pointed index here.
> Any help would be very much appreciated.
> 

1) lets hope you do regulary backups - and actually tested restore.
1a) if not, do it right now
2) reindex the table
3) try again to modify

Q: are there any foreign keys involved? If so, reindex those tables too,
just in case.

did you vacuum regulary?

HTH
Tino

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq




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

* Need Help
@ 2006-12-28 02:42  JM <jerome@gmanmi.tv>
  0 siblings, 1 reply; 32+ messages in thread

From: JM @ 2006-12-28 02:42 UTC (permalink / raw)
  To: pgsql-general; +Cc: Pgsql-Performance (E-mail) <pgsql-performance@postgresql.org>

how can i get the disk usage for each table? can i do it via SQL? 



Thanks,

Mailing-Lists



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

* Re: Need Help
@ 2006-12-28 02:54  Richard Broersma Jr <rabroersma@yahoo.com>
  parent: JM <jerome@gmanmi.tv>
  0 siblings, 0 replies; 32+ messages in thread

From: Richard Broersma Jr @ 2006-12-28 02:54 UTC (permalink / raw)
  To: JM <jerome@gmanmi.tv>; pgsql-general; +Cc: Pgsql-Performance \(E-mail\) <pgsql-performance@postgresql.org>


--- JM <jerome@gmanmi.tv> wrote:

> how can i get the disk usage for each table? can i do it via SQL? 

This function should do what you want:

pg_relation_size(text) or pg_total_relation_size(text) 

I found it on the following link:

http://www.postgresql.org/docs/8.2/interactive/functions-admin.html#FUNCTIONS-ADMIN-DBSIZE

Regards,

Richard Broersma Jr.



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

* Need Help
@ 2013-08-09 17:59  nandan <nandand1985@gmail.com>
  0 siblings, 2 replies; 32+ messages in thread

From: nandan @ 2013-08-09 17:59 UTC (permalink / raw)
  To: pgsql-general

Hello All ;

Please help me in knowing below queries which are in Mysql to Postgresql.

 1.
SELECT user,host,password
  FROM mysql.user
  WHERE password = '';
SET PASSWORD FOR <user>@<host> =
  PASSWORD ('newpass');

2.
SELECT user,host,password
  FROM mysql.user
  WHERE user  = '';
DELETE FROM mysql.user
  WHERE user  = '';
FLUSH PRIVILEGES;

3.
SELECT user,host,password
  FROM mysql.user
  WHERE user = 'root' AND host = '%';
DROP USER root@'%';
FLUSH PRIVILEGES;

4.
SELECT user,host,password
  FROM mysql.user
  WHERE length(password) <> 41;
SET PASSWORD FOR <user>@<host> =
  PASSWORD ('newpass');

5.
Do not enable insecure password generation option

Setting can be verified by viewing the MySQL config file as per the
Recommended settings, OR by issuing the following command:

mysqladmin var | grep old_passwords


6.
Enable secure password authentication option by blocking connections from
all accounts that have passwords stored in it.

Setting can be verified by viewing the MySQL config file as per the
Recommended settings, OR by issuing the following command:

mysqladmin var | grep secure_auth


7.
Binary logging should be enabled to log all completed transactions, and
allow for point-in-time recovery.  This can be enabled via the log-bin
status variable in the mysql configuration file.  As an example, the
following entry will place all binary log files in the /var/lib/mysql/logs
directory, and use 'binlog' as the filename prefix to get binary log files
names such as binlog.000001:

   log-bin=/var/lib/mysql/logs/binlog

Setting can be verified by viewing the MySQL config file as per the
Recommended settings, OR by issuing the following command:

mysqladmin var | grep log_bin


8.
Prevent the grant statement from creating new users unless a non-empty
password is specified (v5.0.2+)

Setting can be verified by viewing the MySQL config file as per the
Recommended settings, OR by issuing the following command:

mysqladmin var | grep sql_mode

9.
Do not allow new user creation by a user that does not have write access to
the mysql.user table.  Note that this setting may not appear when viewing
status variables via "show variables" or "mysqladmin var", and should
therefore be validated by checking the MySQL config file.


Disable global access to test% databases by issuing the following sample
SQL statements:

SELECT user,host,db
  FROM mysql.db
  WHERE db LIKE 'test%';
DELETE FROM mysql.db
  WHERE db LIKE 'test%';
FLUSH PRIVILEGES;



9.
Identify and remove privileges on non-existent database objects by issuing
the following sample SQL statements:

SELECT d.host, d.db, d.user
  FROM mysql.db AS d LEFT OUTER JOIN
    information_schema.schemata AS s
  ON s.schema_name LIKE d.db
  WHERE s.schema_name IS NULL;
DELETE FROM mysql.db
  WHERE db=<obsolete_db>;

SELECT d.host, d.db, d.user, d.table_name
  FROM mysql.tables_priv AS d
  LEFT OUTER JOIN
    information_schema.schemata AS s
  ON s.schema_name LIKE d.db
  WHERE s.schema_name IS NULL;
DELETE FROM mysql.tables_priv
  WHERE db=<obsolete_db>;

SELECT d.host, d.db, d.user, d.table_name, d.column_name
  FROM mysql.columns_priv AS d
  LEFT OUTER JOIN
    information_schema.schemata AS s
  ON s.schema_name LIKE d.db
  WHERE s.schema_name IS NULL;
DELETE FROM mysql.columns_priv
  WHERE db=<obsolete_db>;


10.
SUPER privileges can be verified by issuing the following SQL statement:

SELECT user, host,
       super_priv AS 'SUPER'
  FROM mysql.user
  WHERE super_priv = 'Y';



11.
Additional global admin privileges can be reviewed by issuing the following
sample SQL statement:

SELECT user, host,
       super_priv AS 'SUPER',
       shutdown_priv AS 'SHUTDOWN',
       process_priv AS 'PROCESS',
       grant_priv AS 'GRANT',
       create_user_priv AS 'CREATE_USER',
       file_priv AS 'FILE',
       reload_priv AS 'RELOAD',
       show_db_priv AS 'SHOW_DATABASES',
       lock_tables_priv AS 'LOCK_TABLES',
       repl_slave_priv AS 'REPL_SLAVE',
       repl_client_priv AS 'REPL_CLIENT'
  FROM mysql.user
  WHERE super_priv = 'Y' OR shutdown_priv = 'Y'
     OR process_priv = 'Y' OR grant_priv = 'Y'
     OR create_user_priv = 'Y' OR file_priv = 'Y'
     OR reload_priv = 'Y' OR show_db_priv = 'Y'
     OR lock_tables_priv = 'Y'
     OR repl_slave_priv = 'Y'
     OR repl_client_priv = 'Y';



12.
SHUTDOWN privileges can be verified by issuing the following SQL statement:

SELECT user, host,
       shutdown_priv AS 'SHUTDOWN'
  FROM mysql.user
  WHERE shutdown_priv = 'Y';
PROCESS privileges can be verified by issuing the following SQL statement:

SELECT user, host,
       shutdown_priv AS 'PROCESS'
  FROM mysql.user
  WHERE process_priv = 'Y';
GRANT privileges can be verified by issuing the following SQL statement:

SELECT user, host,
       shutdown_priv AS 'GRANT'
  FROM mysql.user
  WHERE grant_priv = 'Y';
These privileges can be verified by issuing the following SQL statement to
display all global database privileges, inclusive of the mysql database.

SELECT user, host,
       select_priv AS 'SELECT',
       insert_priv AS 'INSERT',
       update_priv AS 'UPDATE',
       delete_priv AS 'DELETE',
       show_db_priv AS 'SHOWDB',
       create_priv AS 'CREATE',
       drop_priv AS 'DROP',
       index_priv AS 'INDEX', alter_priv AS 'ALTER',
       create_routine_priv AS 'CREATE_ROUTINE',
       alter_routine_priv AS 'ALTER_ROUTINE',
       create_view_priv AS 'CREATE_VIEW',
       show_view_priv AS 'SHOW_VIEW',
       create_tmp_table_priv AS 'CREATE_TEMP',
       execute_priv AS 'EXECUTE',
       references_priv AS 'REFERENCES'
FROM mysql.user
WHERE select_priv = 'Y' OR insert_priv = 'Y'
     OR update_priv = 'Y' OR delete_priv = 'Y'
     OR show_db_priv = 'Y'
     OR create_priv = 'Y' OR drop_priv = 'Y'
     OR index_priv = 'Y' OR alter_priv = 'Y'
     OR create_routine_priv = 'Y'
     OR alter_routine_priv = 'Y'
     OR create_view_priv = 'Y' OR show_view_priv = 'Y'
     OR create_tmp_table_priv = 'Y'
     OR execute_priv = 'Y' OR references_priv = 'Y';
These privileges can be verified by issuing the following SQL statements to
display additional privileges granted against database/table/column objects
of the mysql database.

SELECT user, host, db
     FROM mysql.db
     WHERE db='mysql';

SELECT user, host, db, table_name
     FROM mysql.tables_priv
     WHERE db='mysql';

SELECT user, host, db, table_name, column_name
     FROM mysql.columns_priv
     WHERE db='mysql';




What is the SQL Query or command for  Postgres to check the following
points?

1.No blank passwords
2.No anonymous-user accounts
3.No remotely-accessible root accounts
4.No insecure passwords
5.MySQL config file setting:
  old-passwords = 0  OR
  old_passwords = 0

6.MySQL config file setting:
  secure-auth [= 1]  OR
  secure_auth [= 1]

7.MySQL config file setting:
  log-bin [= /path/to/log/file-prefix]  OR
  log_bin [= /path/to/log/file-prefix]

8.MySQL config file setting:
  sql-mode = no_auto_create_user  OR
  sql_mode = no_auto_create_user

9.MySQL config file setting:
  safe-user-create [=1]  OR
  safe_user_create [=1]

10.No global access to test% databases
11.Remove obsolete privileges



--
View this message in context: http://postgresql.1045698.n5.nabble.com/Need-Help-tp5767001.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



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

* Re: Need Help
@ 2013-08-09 21:11  John R Pierce <pierce@hogranch.com>
  parent: nandan <nandand1985@gmail.com>
  1 sibling, 0 replies; 32+ messages in thread

From: John R Pierce @ 2013-08-09 21:11 UTC (permalink / raw)
  To: pgsql-general

On 8/9/2013 10:59 AM, nandan wrote:
> Hello All ;
>
> Please help me in knowing below queries which are in Mysql to Postgresql.
>
>   1.
> SELECT user,host,password
>    FROM mysql.user
>    WHERE password = '';
> SET PASSWORD FOR <user>@<host> =
>    PASSWORD ('newpass');

postgres has no concept of user@host.    host restrictions can be 
implemented in the pg_hba.conf file.

ALTER ROLE user WITH PASSWORD 'newpass';



>
> 2.
> SELECT user,host,password
>    FROM mysql.user
>    WHERE user  = '';
> DELETE FROM mysql.user
>    WHERE user  = '';
> FLUSH PRIVILEGES;

no such concept in postgres.  you would drop a user with..

DROP ROLE username;

but there are no empty/null users.


> 3.
> SELECT user,host,password
>    FROM mysql.user
>    WHERE user = 'root' AND host = '%';
> DROP USER root@'%';
> FLUSH PRIVILEGES;

no root user in postgres.

>
> 4.
> SELECT user,host,password
>    FROM mysql.user
>    WHERE length(password) <> 41;
> SET PASSWORD FOR <user>@<host> =
>    PASSWORD ('newpass');

not even sure why you would set all users who's password is not 41 chars 
long to a specific password, so I'm not going there.


>
> 5.
> Do not enable insecure password generation option
>
> Setting can be verified by viewing the MySQL config file as per the
> Recommended settings, OR by issuing the following command:
>
> mysqladmin var | grep old_passwords
>
>
> 6.
> Enable secure password authentication option by blocking connections from
> all accounts that have passwords stored in it.
>
> Setting can be verified by viewing the MySQL config file as per the
> Recommended settings, OR by issuing the following command:
>
> mysqladmin var | grep secure_auth

these two don't make any sense in postgres.

>
>
> 7.
> Binary logging should be enabled to log all completed transactions, and
> allow for point-in-time recovery.  This can be enabled via the log-bin
> status variable in the mysql configuration file.  As an example, the
> following entry will place all binary log files in the /var/lib/mysql/logs
> directory, and use 'binlog' as the filename prefix to get binary log files
> names such as binlog.000001:
>
>     log-bin=/var/lib/mysql/logs/binlog
>
> Setting can be verified by viewing the MySQL config file as per the
> Recommended settings, OR by issuing the following command:
>
> mysqladmin var | grep log_bin

read the section on WAL Archiving in the postgres user manual, if done 
correctly, this allows Point In Time Recovery.

>
>
> 8.
> Prevent the grant statement from creating new users unless a non-empty
> password is specified (v5.0.2+)
>
> Setting can be verified by viewing the MySQL config file as per the
> Recommended settings, OR by issuing the following command:
>
> mysqladmin var | grep sql_mode

the GRANT statement doesn't create roles, CREATE ROLE (or CREATE USER) does.


>
> 9.
> Do not allow new user creation by a user that does not have write access to
> the mysql.user table.  Note that this setting may not appear when viewing
> status variables via "show variables" or "mysqladmin var", and should
> therefore be validated by checking the MySQL config file.

only users/roles with the specific CREATEUSER or SUPERUSER attributes 
can create/modify users.



> 9.
> Identify and remove privileges on non-existent database objects by issuing
> the following sample SQL statements:
> ...

nonexisting objects don't have any privileges to identify or remove.

>
> 10.
> SUPER privileges can be verified by issuing the following SQL statement:
>
> SELECT user, host,
>         super_priv AS 'SUPER'
>    FROM mysql.user
>    WHERE super_priv = 'Y';
>
easy way:
in psql comand line shell, use the \du  metacommand to display all 
users, note who has superuser.

harder way:
there's probably a query of the pg_catalog metadata but I'm not looking 
it up.


> 11.
> Additional global admin privileges can be reviewed by issuing the following
> sample SQL statement:
>
> SELECT user, host,
>         super_priv AS 'SUPER',
>         shutdown_priv AS 'SHUTDOWN',
>         process_priv AS 'PROCESS',
>         grant_priv AS 'GRANT',
>         create_user_priv AS 'CREATE_USER',
>         file_priv AS 'FILE',
>         reload_priv AS 'RELOAD',
>         show_db_priv AS 'SHOW_DATABASES',
>         lock_tables_priv AS 'LOCK_TABLES',
>         repl_slave_priv AS 'REPL_SLAVE',
>         repl_client_priv AS 'REPL_CLIENT'
>    FROM mysql.user
>    WHERE super_priv = 'Y' OR shutdown_priv = 'Y'
>       OR process_priv = 'Y' OR grant_priv = 'Y'
>       OR create_user_priv = 'Y' OR file_priv = 'Y'
>       OR reload_priv = 'Y' OR show_db_priv = 'Y'
>       OR lock_tables_priv = 'Y'
>       OR repl_slave_priv = 'Y'
>       OR repl_client_priv = 'Y';

see answer to previous.     postgres is shutdown from the system shell, 
not from within postgres.   most of those other global privileges don't 
exist on postgres, just SUPERUSER, CREATEUSER, CREATEDB attributes.


>
>
> 12.
> SHUTDOWN privileges can be verified by issuing the following SQL statement:

no such privilege.

>
>
>
> What is the SQL Query or command for  Postgres to check the following
> points?
>
> 1.No blank passwords
> 2.No anonymous-user accounts
> 3.No remotely-accessible root accounts
> 4.No insecure passwords
> 5.MySQL config file setting:
>    old-passwords = 0  OR
>    old_passwords = 0
>
> 6.MySQL config file setting:
>    secure-auth [= 1]  OR
>    secure_auth [= 1]
>
> 7.MySQL config file setting:
>    log-bin [= /path/to/log/file-prefix]  OR
>    log_bin [= /path/to/log/file-prefix]
>
> 8.MySQL config file setting:
>    sql-mode = no_auto_create_user  OR
>    sql_mode = no_auto_create_user
>
> 9.MySQL config file setting:
>    safe-user-create [=1]  OR
>    safe_user_create [=1]
>
> 10.No global access to test% databases
> 11.Remove obsolete privileges

thats mostly mysql specific stuff not applicable to postgres, and highly 
redundant with what you asked above.


-- 
john r pierce                                      37N 122W
somewhere on the middle of the left coast



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



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

* Re: Need Help
@ 2013-08-10 09:11  Alban Hertroys <haramrae@gmail.com>
  parent: nandan <nandand1985@gmail.com>
  1 sibling, 0 replies; 32+ messages in thread

From: Alban Hertroys @ 2013-08-10 09:11 UTC (permalink / raw)
  To: nandan <nandand1985@gmail.com>; +Cc: pgsql-general

On Aug 9, 2013, at 19:59, nandan <nandand1985@gmail.com> wrote:

> Hello All ;
> 
> Please help me in knowing below queries which are in Mysql to Postgresql.


Postgres and MySQL are very different in these respects. Answering these questions is rather pointless, as it will not give you an understanding of how the role and grant system works in PostgreSQL and you'll need that kind of understanding if you're as concerned about security as you appear to be.

Have a look at chapters 19 & 20 in the fine manual: http://www.postgresql.org/docs/9.2/static/index.html

Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



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

* need help
@ 2013-08-16 13:35  Basavaraj <basava247@gmail.com>
  0 siblings, 2 replies; 32+ messages in thread

From: Basavaraj @ 2013-08-16 13:35 UTC (permalink / raw)
  To: pgsql-general

i have two unrelated tables as their is no common column to apply joins or
anything, so i want to join those tables using simple query(only two tables
should be used and no common table) can you pls help me out how to do that.
I am new user to postgres

this is table format

table1                                                 table2

name| address|email|                     mobileNo|firstname|lastName|
----------------------                  ------------------------------
abc    some1   mail1                       1234564|def         | 
:                                                 :
:                                                 :
                                                  :
:
:5 records                                  10 records


finally the result shoule be

name| address|email|mobileNo|firstname|lastName|
--------------------------------------------------
abc   some1    mail1   1234564 def          xyz

5 records               |   10 records

                           |

Very thankful for solution............





--
View this message in context: http://postgresql.1045698.n5.nabble.com/Here-is-my-problem-tp5766954p5767611.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



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

* Re: need help
@ 2013-08-16 14:34  David Johnston <polobo@yahoo.com>
  parent: Basavaraj <basava247@gmail.com>
  1 sibling, 1 reply; 32+ messages in thread

From: David Johnston @ 2013-08-16 14:34 UTC (permalink / raw)
  To: pgsql-general

Basavaraj wrote
> i have two unrelated tables as their is no common column to apply joins or
> anything, so i want to join those tables...

I can understand being required to join them (for some unstated reason) but
a simple want does not seem a strong enough reason to go through the pain...


> ...using simple query...

If you have to join these tables together the complexity of the resultant
query should be irrelevant.  Furthermore how one defines "simple" is quite
subjective.


> finally the result shoule be
> 
> name| address|email|mobileNo|firstname|lastName|
> --------------------------------------------------
> abc   some1    mail1   1234564 def          xyz
> 
> 5 records               |   10 records
> 
>                            |
> 
> Very thankful for solution............

I have no clue what you mean when you indicate "5 records | 10 records" in
the final result.

I'm tempted to ask you leading questions but instead am going to ask that
you consider your goal more closely and be more explicit in your
description/request.

If you just want to go and play with it you can consider two possible
options:

SELECT * FROM tbl1 CROSS JOIN tbl2 --(this will return X times Y rows - or
10 times 5 = 50)

or <not valid SQL, just an example>

SELECT * 
FROM (SELECT row_number, * FROM tbl1) t1 
FULL OUTER JOIN (SELECT row_number, * FROM tbl2) t2 USING (row_number)
-- this will return 10 rows with 5 of them containing NULL values for t1
columns where t2 has row numbers not existing in t1.

What you are doing, by the example given, is wrong.  Proposing an
alternative is impossible since you have not explained WHY you feel you need
to do this or WHAT you are actually trying to accomplish.

David J.





--
View this message in context: http://postgresql.1045698.n5.nabble.com/Here-is-my-problem-tp5766954p5767617.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



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

* Re: need help
@ 2013-08-16 18:11  John R Pierce <pierce@hogranch.com>
  parent: Basavaraj <basava247@gmail.com>
  1 sibling, 0 replies; 32+ messages in thread

From: John R Pierce @ 2013-08-16 18:11 UTC (permalink / raw)
  To: pgsql-general

On 8/16/2013 6:35 AM, Basavaraj wrote:
> finally the result shoule be
>
> name| address|email|mobileNo|firstname|lastName|
> --------------------------------------------------
> abc   some1    mail1   1234564 def          xyz
>
> 5 records               |   10 records
>
>                             |


First, a table is an unordered SET of tuples(rows).  it only has an 
order when one is applied to it.   so which rows of table 1 would go 
with what rows of table 2?

Second, if that 2nd table has 10 records and the first table only has 5, 
what would those other 5 look like in your example?   no answer I can 
think of makes sense.   all rows of a recordset have to have the same 
fields.

If this data is unrelated, then it does not belong together in a relation.


-- 
john r pierce                                      37N 122W
somewhere on the middle of the left coast



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



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

* Re: need help
@ 2013-08-19 04:30  Basavaraj <basava247@gmail.com>
  parent: David Johnston <polobo@yahoo.com>
  0 siblings, 0 replies; 32+ messages in thread

From: Basavaraj @ 2013-08-19 04:30 UTC (permalink / raw)
  To: pgsql-general

thanks for ur help,this was the requirement which assigned for us,so i had to
ask even though we are having many options.....thanks again



--
View this message in context: http://postgresql.1045698.n5.nabble.com/Here-is-my-problem-tp5766954p5767778.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



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

* Need help
@ 2023-07-06 04:52  aarthi rajagopal <aarthirajagopal2@gmail.com>
  0 siblings, 1 reply; 32+ messages in thread

From: aarthi rajagopal @ 2023-07-06 04:52 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Hi,

   I have doubt about how to enable pg_cron in PgAdmin4 version 7, kindly
guide me how to do it..

Thanks& Regards
Aarthi Rajagopal

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

* Re: Need help
@ 2023-07-06 19:29  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: aarthi rajagopal <aarthirajagopal2@gmail.com>
  0 siblings, 0 replies; 32+ messages in thread

From: Adrian Klaver @ 2023-07-06 19:29 UTC (permalink / raw)
  To: aarthi rajagopal <aarthirajagopal2@gmail.com>; pgsql-general@lists.postgresql.org

On 7/5/23 21:52, aarthi rajagopal wrote:
> Hi,
>     I have doubt about how to enable pg_cron in PgAdmin4 version 7, 
> kindly guide me how to do it..

pg_cron:

https://github.com/citusdata/pg_cron

is an extension that has nothing to do with pgAdmin4.

Follow the instructions at the link above to install it.

> 
> Thanks& Regards
> Aarthi Rajagopal

-- 
Adrian Klaver
adrian.klaver@aklaver.com






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

* Need help
@ 2023-12-29 14:02  ankit.singh@nest-is2.com
  0 siblings, 2 replies; 32+ messages in thread

From: ankit.singh@nest-is2.com @ 2023-12-29 14:02 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

In Ubuntu 22.04LTS when we try to restore the database it's giving the error
- pg restore unsupported 1.15

 

 

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

* Re: Need help
@ 2023-12-29 19:15  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: ankit.singh@nest-is2.com
  1 sibling, 1 reply; 32+ messages in thread

From: Adrian Klaver @ 2023-12-29 19:15 UTC (permalink / raw)
  To: ankit.singh@nest-is2.com; pgsql-general@lists.postgresql.org


On 12/29/23 6:02 AM, ankit.singh@nest-is2.com wrote:
>
> In Ubuntu 22.04LTS when we try to restore the database it's giving the 
> error – pg restore unsupported 1.15
>
Needs  a lot more information:

1) Postgres version being restored to.

2) The complete pg_restore command.

3) The complete error message.

4) Where was Postgres installed from?

5) Do you have more then one version of Postgres installed?

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

* Re: Need help
@ 2023-12-29 19:24  Tom Lane <tgl@sss.pgh.pa.us>
  parent: ankit.singh@nest-is2.com
  1 sibling, 0 replies; 32+ messages in thread

From: Tom Lane @ 2023-12-29 19:24 UTC (permalink / raw)
  To: ankit.singh@nest-is2.com; +Cc: pgsql-general@lists.postgresql.org

<ankit.singh@nest-is2.com> writes:
> In Ubuntu 22.04LTS when we try to restore the database it's giving the error
> - pg restore unsupported 1.15

You need a version of pg_restore that's at least as new as
the pg_dump that made the archive file.  File version 1.15
I believe requires PG 16.

			regards, tom lane





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

* Re: Need help
@ 2023-12-30 05:36  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 1 reply; 32+ messages in thread

From: Adrian Klaver @ 2023-12-30 05:36 UTC (permalink / raw)
  To: ankit.singh@nest-is2.com; pgsql-general@lists.postgresql.org

On 12/29/23 21:21, ankit.singh@nest-is2.com wrote:
> Needs  a lot more information:
> 
> 1) Postgres version being restored to.--- *14.10*
> 
> 2)The complete pg_restore command. ---
> 
> */home/zulip/deployments/current/scripts/setup/restore-backup 
> /path/to/backup*
> 
> 3) The complete error message*.    PGDMP\\0000zulip\00"\00\00\0014.10 
> (Ubuntu 14.10-1.pgdg22.04+1)\00 \00\00\0016.1 (Ubuntu 
> 16.1-1.pgdg22.04+1)\0000ENCODING00SET client_encoding = 'UTF8';*


I'm not exactly sure what that error message is saying, though it is 
showing two different version of Postgres in use. Since pg_dump will not 
dump from a Postgres version newer then it's version, I'm going to say 
that you used the Postgres 16 version of pg_dump against the Postgres 14 
instance. Then used the Postgres 14 version of pg_restore to restore 
that dump file to the 14 instance. As Tom Lane mentioned that will not 
work as the older version(14) of pg_restore will not recognize the newer 
file version from the dump file(16). I don't have an answer for how you 
sort that out in the Zulip process.

> 
> **
> 
> 4) Where was Postgres installed from*?- Zulip server-6.1 I have 
> installed from that server I have taken backup*.**
> 
> 5) Do you have more then one version of Postgres installed? *14.10 & 
> 16.1 in server which I have taken backup*
> 
> **
> 
> *From:*Adrian Klaver <adrian.klaver@aklaver.com>
> *Sent:* 30 December 2023 00:45
> *To:* ankit.singh@nest-is2.com; pgsql-general@lists.postgresql.org
> *Subject:* Re: Need help
> 
> On 12/29/23 6:02 AM, ankit.singh@nest-is2.com 
> <mailto:ankit.singh@nest-is2.com> wrote:
> 
>     In Ubuntu 22.04LTS when we try to restore the database it's giving
>     the error – pg restore unsupported 1.15
> 
> Needs  a lot more information:
> 
> 1) Postgres version being restored to.
> 
> 2) The complete pg_restore command.
> 
> 3) The complete error message.
> 
> 4) Where was Postgres installed from?
> 
> 5) Do you have more then one version of Postgres installed?
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com






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

* Re: Need help
@ 2023-12-30 16:29  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 0 replies; 32+ messages in thread

From: Adrian Klaver @ 2023-12-30 16:29 UTC (permalink / raw)
  To: ankit.singh@nest-is2.com; pgsql-general@lists.postgresql.org

On 12/29/23 21:56, ankit.singh@nest-is2.com wrote:
> It's giving one more error please have a look.
> 

All that is telling you is that the underlying error you first reported 
"pg restore unsupported 1.15" caused one of the Zulip commands to fail.

The issue still remains that you have a mismatch between the file format 
of the dump file and the version of pg_restore you are using to attempt 
to restore that file. Until that gets sorted out you will not get any 
further.


-- 
Adrian Klaver
adrian.klaver@aklaver.com






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


end of thread, other threads:[~2023-12-30 16:29 UTC | newest]

Thread overview: 32+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-09-07 16:01 need help  meena nimmagadda <meenahere@lycos.com>
2001-09-14 20:14 ` Andre Schnabel <A_Schnabel@t-online.de>
2001-09-14 21:41 ` Jeff Eckermann <jeckermann@verio.net>
2001-09-15 00:54 Re: need help cnliou@eurosport.com
2002-01-01 11:51 Need help Shamik Majumder <shamik.majumder@wipro.com>
2002-01-08 15:17 ` Re: Need help Holger Krug <hkrug@rationalizer.com>
2002-01-08 17:17 ` Re: [GENERAL] Need help Jason Earl <jason.earl@simplot.com>
2002-01-08 20:23   ` Re: [SQL] Need help Bill Cunningham <billc@ballydev.com>
2002-01-09 00:04     ` Re: [SQL] Need help Doug McNaught <doug@wireboard.com>
2004-08-17 20:36 need help Kevin Matthews <dataport10@yahoo.com>
2004-08-20 08:09 ` Richard Huxton <dev@archonet.com>
2004-08-20 14:17 Re: need help Jim Wilson <jimw@kelcomaine.com>
2005-12-06 08:38 need help Jenny <jenny_tania@yahoo.com>
2005-12-06 08:54 ` Tino Wildenhain <tino@wildenhain.de>
2005-12-21 11:10   ` Alban Medici (NetCentrex) <amedici@fr.netcentrex.net>
2005-12-06 10:45 ` Alban Hertroys <alban@magproductions.nl>
2006-12-28 02:42 Need Help JM <jerome@gmanmi.tv>
2006-12-28 02:54 ` Re: Need Help Richard Broersma Jr <rabroersma@yahoo.com>
2013-08-09 17:59 Need Help nandan <nandand1985@gmail.com>
2013-08-09 21:11 ` Re: Need Help John R Pierce <pierce@hogranch.com>
2013-08-10 09:11 ` Re: Need Help Alban Hertroys <haramrae@gmail.com>
2013-08-16 13:35 need help Basavaraj <basava247@gmail.com>
2013-08-16 14:34 ` David Johnston <polobo@yahoo.com>
2013-08-19 04:30   ` Basavaraj <basava247@gmail.com>
2013-08-16 18:11 ` John R Pierce <pierce@hogranch.com>
2023-07-06 04:52 Need help aarthi rajagopal <aarthirajagopal2@gmail.com>
2023-07-06 19:29 ` Re: Need help Adrian Klaver <adrian.klaver@aklaver.com>
2023-12-29 14:02 Need help ankit.singh@nest-is2.com
2023-12-29 19:15 ` Re: Need help Adrian Klaver <adrian.klaver@aklaver.com>
2023-12-30 05:36   ` Re: Need help Adrian Klaver <adrian.klaver@aklaver.com>
2023-12-30 16:29     ` Re: Need help Adrian Klaver <adrian.klaver@aklaver.com>
2023-12-29 19:24 ` Re: Need help Tom Lane <tgl@sss.pgh.pa.us>

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