473,695 Members | 2,781 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3601
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*****@hotmai l.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*******@postg resql.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*******@postg resql.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
1337
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 ./bin/psql. However, when I run ./bin/createlang plpgsql databasename, it asks me for a password over and over. I enter the correct password, and again, I'm prompted for the password.
9
2924
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 embedded in my assembly. Unfortunately, my problem is that every element is coming up invalid. Here is the code: Public Sub Validate(ByVal XmlText As String)Dim strmXML As New System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(XmlText))Dim...
0
1300
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 'XYZ'. - Schema with targetNamespace='' has invalid syntax. - Invalid 'memberTypes' attribute: Value cannot be null. Parameter name: name. The schema library being so extensively large, it took me 4 days to discover that the error was caused by...
2
6928
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 follows: <silcn:silcn xmlns:silcn='http://silcn.org/200309' xmlns='http://xmlprobe.com/200312'> it contains an element <report> off the root and also a separate <Silcn:report> again off the root.
3
2759
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. In the samples/data directory, I ran the following command for all the files: DOMPrint -n -s -f -v=always <filename>
3
4727
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 to not be sequenced. (PERL hashes do not retain order information) First, the w3 specs don't mention the sequence in any detail - its just there in the examples, which makes me wonder if removing the sequence tag is even supportable. Second,...
1
11281
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" targetNamespace="http://www.mycompany.com/plcm" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xsd:include schemaLocation="Schema2.xsd"/> <xsd:include schemaLocation="Schema3.xsd"/>
0
3575
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 public RegistrationResponse registerDevice(RegistrationRequest regReq) throws RemoteException
6
5036
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: language "plpgsql" does not exist HINT: You need to use "createlang" to load the language into the database. So I tried to execute this code but nothing was returned: >createlang plpgsql workdb
1
8864
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8838
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7683
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6506
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4351
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4592
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3025
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2289
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1986
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.