472,354 Members | 1,727 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,354 software developers and data experts.

cannot use createlang after removing public schema

I have a database where I remove the schema public. When I
try to use the createlang script, it fails like this ...
createdb foo CREATE DATABASEpsql foo -c "select version()" version
---------------------------------------------------------------------
PostgreSQL 7.4.1 on i386-portbld-freebsd4.9, compiled by GCC 2.95.4
(1 row)createlang plpgsql foo
dropdb foo DROP DATABASEcreatedb foo CREATE DATABASEpsql foo -c "drop schema public" DROP SCHEMAcreatelang plpgsql foo

createlang: language installation failed: ERROR: no schema has been
selected to create in

I read through the man page, but I do not see how to specify the
schema to createlang ...

I can add the language using the manual syntax, I am just wondering if
there is a simple way to use the script.

__________________________________________________ _______________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 22 '05 #1
6 3507
Hello,

I asked one time for more "benchmark" soft to know where is the cpu
average, and read the post about optimising the postgresql.conf (and use
them), but i allways get a load > 1 on fire time (dunno the right name,
"coup de feu" in french (10h00 -> 14h00, 18h00 -> 21h00).

For information, i have a Celeron 1.2Ghz with 256Mb, IDE drive, enough
bandewitch, and about 3000 hit per day. Its postgresql 7.2.lastone,
apache 1.3.lastone, linux (redhat), and the last 2.4 kernel after the
exploit problem. Its not 'my' server, so i cant upgrade anything of it
(RAM is very short i think). Im hosting a web site with apache/php. The
table are not huge, the biggest is aroung 3000rows and only 25-30
tables.

The problem is that on "fire time", the load go to > 1 and stay long
time. But with top (i use top -d 1 to have "real" load average) i can
see that the CPU is more than 50% idling.

For exemple, i have this kind of stat :

0s - load 1.5 - cpu idling 0%
5s - load 1.6 - cpu ilding 50%
6s -> 60s - load around 1.2 - cpu idling around 50%-100%

(Dunno if its very easy to understand).

With different software, i dont see anything wrong (or i dont understand
how to use them), the problem is the memory which make some nice road
around 12Mo Free and 3Mo Free, but the swap dont really grow up (but
linux make a lot of cache).

In fact, i hosted the old site with mysql/apache and i was very happy to
see the load going from 0.90 to 0.40 but the population growing up and
the problem came.

I made the common optimisation with VACUUM ANALYZE and some from the
documentation.

Maybe i dont understand what load average mean, but i dont understand
why with more than 50% cpu idling, the load average dont grow down. So i
thought i lose cpu from somewhere ... but the probleme is what is this
somewhere :).

If someone could help me, i need to put a new feature which will add
more than 2000 hit per day and im afraid about the life of the server
:).

Really thx in advance,

regards,

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

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 22 '05 #2
On Wednesday 18 February 2004 19:24, Lee Harr wrote:
I have a database where I remove the schema public. When I
try to use the createlang script, it fails like this ...
[snip] DROP SCHEMA
createlang plpgsql foo
createlang: language installation failed: ERROR: no schema has been
selected to create in

I read through the man page, but I do not see how to specify the
schema to createlang ...

I can add the language using the manual syntax, I am just wondering if
there is a simple way to use the script.


What if you use CREATE LANGUAGE as an SQL statement, but after setting
search_path to the single schema you want?

Incidentally, createlang is just a script that issues SQL, so you could
probably hack that if you wanted to. Perhaps even post it as a bug with a
patch.

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 22 '05 #3
On Wed, 18 Feb 2004, Froggy / Froggy Corp. wrote:
The problem is that on "fire time", the load go to > 1 and stay long
time. But with top (i use top -d 1 to have "real" load average) i can
see that the CPU is more than 50% idling.

For exemple, i have this kind of stat :

0s - load 1.5 - cpu idling 0%
5s - load 1.6 - cpu ilding 50%
6s -> 60s - load around 1.2 - cpu idling around 50%-100%


sounds to me like you're starving for bandwidth on your I/O subsystem.
any chance you can get a faster set of drives under it or go with a SCSI
RAID controller with battery backed cache?

also, turning off fsync may increase speed at the cost of data security in
the event of a kernel crash or power failure.

Are you doing a lot of writing or mostly just reading? If mostly reading,
then you might do well with more memory in the machine. 256 meg is kinda
puny. You'd do better with my old PIII750 machine that had 1.5 gig in it
than a celeron with only 256 meg, no matter how fast the celeron.
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 22 '05 #4
On Wednesday 18 February 2004 20:18, Froggy / Froggy Corp. wrote:
Hello,

I asked one time for more "benchmark" soft to know where is the cpu
average, and read the post about optimising the postgresql.conf (and use
them), but i allways get a load > 1 on fire time (dunno the right name,
"coup de feu" in french (10h00 -> 14h00, 18h00 -> 21h00).
This is the period when you get the most hits, yes?
For information, i have a Celeron 1.2Ghz with 256Mb, IDE drive, enough
bandewitch, and about 3000 hit per day. Its postgresql 7.2.lastone,
apache 1.3.lastone, linux (redhat), and the last 2.4 kernel after the
exploit problem. Its not 'my' server, so i cant upgrade anything of it
(RAM is very short i think). Im hosting a web site with apache/php. The
table are not huge, the biggest is aroung 3000rows and only 25-30
tables.
Not a very big machine, but it's not a big database.
The problem is that on "fire time", the load go to > 1 and stay long
time. But with top (i use top -d 1 to have "real" load average) i can
see that the CPU is more than 50% idling.

For exemple, i have this kind of stat :

0s - load 1.5 - cpu idling 0%
5s - load 1.6 - cpu ilding 50%
6s -> 60s - load around 1.2 - cpu idling around 50%-100%

(Dunno if its very easy to understand).
I would guess disk activity is the problem.
With different software, i dont see anything wrong (or i dont understand
how to use them), the problem is the memory which make some nice road
around 12Mo Free and 3Mo Free, but the swap dont really grow up (but
linux make a lot of cache).
Not sure I understand you fully, but if swap isn't active you should be OK.
See below for a good test.
In fact, i hosted the old site with mysql/apache and i was very happy to
see the load going from 0.90 to 0.40 but the population growing up and
the problem came.

I made the common optimisation with VACUUM ANALYZE and some from the
documentation.
OK - you have obviously done the basics.
Maybe i dont understand what load average mean, but i dont understand
why with more than 50% cpu idling, the load average dont grow down. So i
thought i lose cpu from somewhere ... but the probleme is what is this
somewhere :).
Load average is a measure of how many processes are waiting. They might be
waiting for CPU time, or disk I/O or network, or ...

There are three things to look at while testing this:
1. The output of "vmstat 1" - this will show memory usage, swap activity disk
blocks in/out, cpu usage etc.
2. The output from "top", press "M" to sort by memory usage - that way we can
see how much memory is being used.
3. How many requests are you processing at the same time?
If someone could help me, i need to put a new feature which will add
more than 2000 hit per day and im afraid about the life of the server


Only 5000 hits per day? I'm sure we can get that working.

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 22 '05 #5
"Lee Harr" <mi*****@hotmail.com> writes:
createdb foo

CREATE DATABASE
psql foo -c "drop schema public"

DROP SCHEMA
createlang plpgsql foo

createlang: language installation failed: ERROR: no schema has been
selected to create in


This is not different from the error you'd get if you tried to create
any other sort of object at this point. You have no public schema, and
you have no per-user schema matching your user name, so there's simply
not anyplace to create anything, because there are no schemas in your
search path.

You need to make a schema in which you would like the plpgsql language
handler to live (no, I don't really recommend putting it in pg_catalog).
Then use ALTER DATABASE SET or ALTER USER SET to make your default
search_path begin with that schema. Then createlang will work, as will
"CREATE TABLE foo" and other creation commands.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 22 '05 #6
At 09:18 PM 2/18/2004 +0100, Froggy / Froggy Corp. wrote:
For information, i have a Celeron 1.2Ghz with 256Mb, IDE drive,
enough
bandewitch, and about 3000 hit per day. Its postgresql 7.2.lastone,
apache 1.3.lastone, linux (redhat), and the last 2.4 kernel after the
exploit problem. Its not 'my' server, so i cant upgrade anything of it


If it's a P4 family Celeron then that's not doing you any favours - those
are crippled CPUs, but that doesn't seem to be your main problem.

Assuming your IDE/ATA drive is on /dev/hda what does:
hdparm -i /dev/hda
say?

Ideally your ATA drive should be using one of the udma modes. Make sure you
are using the 80 pin ATA cables.

If your DB is as small as you say, even if you get all your 2000 hits a day
spread over just 20-200 seconds you should do ok. ATA hdds since the past 3
years can do 100 I/Os a sec.

Even with random seeks you can get at least 5-7MB a sec (typically more -
11MB/sec?) on a 7200 rpm HDD - assuming 10-15msec average seek times, files
that have at least 64KB or 128KB contiguous chunks and a smart enough O/S
to realize that.

1MB/sec is pretty crappy for any desktop ATA HDD that's less than 3-4 years
old. If your ATA HDD is crap, replace it.

Link.
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 22 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: cliff | last post by:
Hello, I'm using version 7.3.3 on RedHat 8. I have my pg_hba.conf configured to require passwords for the superuser account postgres and I'm able to log in fine from the command line using...
9
by: Rob Mayo | last post by:
I have a bunch of XSD files in my assembly as embedded content that are read out via reflection and streams. My app creates the XML on the fly, and I want to validate it using the schema files...
0
by: Marc Meermans | last post by:
While converting a schema library into a .Net class library using XSD I constantly kept running into the following error message issues by the tool: Error: Error generating classes for schema...
2
by: PeterW | last post by:
I have an xml file from which I want to generate an xsd schema and at a later stage a cs class. The xml file has a mix of defined namespaces and also an empty namespace. These are defined as...
3
by: ciaran.mchale | last post by:
Hi folks, I downloaded the binary version of Xerces C++ 2.7.0 for Windows and am using it to help me get up to speed with XML and XML Schema. So please excuse me if this is a "novice" question....
3
by: kevin | last post by:
Is that even possible? I am creating a web service in .NET to expose some already created .NET programs to other groups. One group is writing the client in PERL, and thus wishes the wsdl schema...
1
by: techie | last post by:
Hi, I am using an xml schema (Schema1.xsd) which refers to two other Schemas as follows. <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:plcm-s="http://www.mycompany.com/plcm"...
0
by: shaily | last post by:
hi I have a java web service called "Registration service" and C# client which is a consumer of that service java web service running under Tomcat has following interface API exposed ...
6
by: twinklyblue | last post by:
Hi team, I'm new in Postgres and I tried creating a stored procedure which performs numerous update procedure. As I compiled it, I was given the following error: psql:storedproc.sql:33: ERROR: ...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
1
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. header("Location:".$urlback); Is this the right layout the...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it so the python app could use a http request to get...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
0
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.