Shoaib Mir | 1 Feb 2007 08:02
Picon

Re: 8.1.3 Problem

It looks like to be a data corruption case.... a few cases like this have been discussed in the past as well. The following link --> http://archives.postgresql.org/pgsql-general/2006-12/msg01546.php might help you resolve the problem.

--------------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)

On 2/1/07, Chris Hoover <revoohc <at> gmail.com> wrote:
I am starting to have some significant problems with one of my 8.1.3 databases.  I am getting more and more of these errors:
wbd,20552,dholton,2007-01-31 15:32:27.137 EST,45c0fcb4.5048,16,2007-01-31 15:31:48 EST,342126177,UPDATE,ERROR:  could not access status of transaction 253762136
wbd,20552,dholton,2007-01-31 15:32:27.137 EST,45c0fcb4.5048,17,2007-01-31 15:31:48 EST,342126177,UPDATE,DETAIL:  could not open file "pg_clog/00F2": No such file or directory


This is happening more and more, and on seeming random databases.  Any idea what is going on?  I have already dumped and reloaded 2-3 of my databases and now have about 3 more suffering from this.

Right now, I can't upgrade to 8.1.6 until around March (have to wait until the current release of our application is released).  I have 7 databases running 8.1.3 (6 prod and 1 test/dev) and only the test/dev is exhibiting this problem

Any help/ideas on what is going on and how to fix would be appreciated.

Chris

Alexander B. | 1 Feb 2007 12:11
Picon
Favicon

System Area

Hi,

I would like to know if Postgres has shared memory like Library Cache
(avoid to do parse the same sql), Dictionary Cache (metadata
information), Sort Area and so on?

Oracle has this structures. And Postgres?
I couldn't find anything about memory on Postgres.

Thanks.

	

	
		
_______________________________________________________ 
Yahoo! Mail - Sempre a melhor opção para você! 
Experimente já e veja as novidades. 
http://br.yahoo.com/mailbeta/tudonovo/

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Achilleas Mantzios | 1 Feb 2007 13:23

Re: System Area

Στις Πέμπτη 01 Φεβρουάριος 2007 13:11, ο/η Alexander B. έγραψε:
> Hi,
>
> I would like to know if Postgres has shared memory like Library Cache
> (avoid to do parse the same sql), Dictionary Cache (metadata
> information), Sort Area and so on?

Yes, PostgreSQL makes use of SYSV IPC shared mem and semaphores.

>
> Oracle has this structures. And Postgres?
> I couldn't find anything about memory on Postgres.
>
> Thanks.
>
>
>
>
>
> _______________________________________________________
> Yahoo! Mail - Sempre a melhor opção para você!
> Experimente já e veja as novidades.
> http://br.yahoo.com/mailbeta/tudonovo/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
>                http://archives.postgresql.org

--

-- 
Achilleas Mantzios

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Jonah H. Harris | 1 Feb 2007 14:54
Picon
Gravatar

Re: System Area

On 2/1/07, Achilleas Mantzios <achill <at> matrix.gatewaynet.com> wrote:
> > I would like to know if Postgres has shared memory like Library Cache
> > (avoid to do parse the same sql), Dictionary Cache (metadata
> > information), Sort Area and so on?
>
> Yes, PostgreSQL makes use of SYSV IPC shared mem and semaphores.

That's not the question that was asked though.  The correct answer is
no, PostgreSQL does not have a global statement caching subsystem like
Oracle's Library Cache.  The majority of PostgreSQL caches are
backend-local... which means that each backend maintains its own
cache.  PostgreSQL has no algorithms similar to a hard, soft, or
soft-soft parse; it's all hard parsing in PostgreSQL unless you
explicitly prepare a statement.

Keep in mind that, once your session is terminated, so is all of your
cache data (including prepared statements).  This isn't too much of an
issue on a connection-pooled system, but if you have lots of
client/server activity, you'll want to make sure you use prepared
statements.

> > Oracle has this structures. And Postgres?
> > I couldn't find anything about memory on Postgres.

PostgreSQL uses shared memory, but it's primarily for the buffer cache
and some shared variables.

--

-- 
Jonah H. Harris, Software Architect | phone: 732.331.1324
EnterpriseDB Corporation            | fax: 732.331.1301
33 Wood Ave S, 3rd Floor            | jharris <at> enterprisedb.com
Iselin, New Jersey 08830            | http://www.enterprisedb.com/

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

Karthikeyan Sundaram | 1 Feb 2007 16:01
Picon
Favicon

questions on multibyte

Hi all,

    I am new to postgres.  I have converted my current db from sql_ascii to 
unicode.  I followed the instructions give by some site called moodle and it 
worked.

    I have some basic questions.

1) How will I insert multibyte from insert statement?  I figured out a way 
to insert multibyte, but want general opinion.
2) I want the data to be transferred to warehouse.
3) I login to psql and do a select the multibyte. (I did a plain select). 
and push to a flat file so that the warehouse will upload. The data appread 
to be scatterd to multiple lines which I am not able to insert into my 
warehouse. How will display the multibyte chars from psql command line?
4) Do I need to install some modules or functions or any methods?

   Please advise.

Regards
skarthi
Podbridge Inc

_________________________________________________________________
Turn searches into helpful donations. Make your search count. 
http://click4thecause.live.com/search/charity/default.aspx?source=hmemtagline_donation&FORM=WLMTAG

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

Sidar López Cruz | 1 Feb 2007 16:31
Picon
Favicon

User OID

How to obtain the current_user OID?

_________________________________________________________________
MSN Amor: busca tu ½ naranja http://latam.msn.com/amor/

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

                http://www.postgresql.org/about/donate

Steve Holdoway | 1 Feb 2007 19:39

Re: blobs

On Wed, 31 Jan 2007 18:45:15 -0500
"Chad Wagner" <chad.wagner <at> gmail.com> wrote:

> On 1/31/07, Steve Holdoway <steve.holdoway <at> firetrust.com> wrote:
> >
> > The table I'm concerned with at the moment have (currently) 5 million
> > rows, with a churn of about 300,000 rows a week. The table has about a
> > million hits a day, which makes it the main potential bottleneck in this
> > database.
> 
> 
> Why would it be a "bottleneck"?  If you are updating or deleting 300K a
> week, definitely make sure you take a look at autovacuum and turn it ON.
It is a potential bottleneck as I said. I am replacing between 5 and 10 percent of the data in the table every
week. There are, in addition, a daily total of about a million hits ( read/update/delete ), as I said. 

This is the busiest table in the database. Therefore, it's the most likely candidate to cause performance
problems. That's what I call a bottleneck.
> 
> 
> We need to store some large ( 0 -> 100kB ) data with each row. Would you
> > recommend adding it as columns in this table, given that blobs will be
> > stored in the pg_largeobject table anyway, or would you recommend a daughter
> > table for this?
> 
> 
> Depends on how you are querying the table.  This is really a database
> modeling question, and leads into many many more questions.  I would say if
> your frequently range scanning the table (selecting several rows) and in
> those cases you rarely need the "blob", then I would fork it off into a
> child table.  If the "blob" is rarely accessed, and only accessed directly,
> then definitely a child table in my book.
> 
> The reason is if your frequently fetching rows from this table and rarely
> using the blob all you are doing is consuming memory that could be better
> used for other things, and spinning I/O when it is not necessary.
Sorry, you're completley wrong. If you consider that the only way of getting info is select *, then this is
true. Personally, I think that anyone who does this in code is plain lazy and should find a job more suited to
them (:

I am asking for input from those who have been in this situation before, and have experience in the tradeoff
of running a separate table for the big stuff as against the extra ( 8 byte? ) column that would be added to the
master table. Why am I asking this? Because Postgres has an unique way of handling this kind of data, unique
from even the last time I used postgres in anger - 7.4. It's different from every other rdbms ( and MySQL ),
and I have no practical experience of it in the wild.
> 
> 
> Any other suggestions on how to avoid performance problems with this table (
> > hardware is dual Xeon, 4GB mem, 2 hardware raid channels for storage + 1 for
> > logs, all running debian 32 bit ).
> >
> 
> It really has to do with how you design your schema.
No. It really has to do with the gathering of relevant information so that I can design my schema properly.
Academically, 3NF may be the solution to every design, but in the real world, there are many other things to
take in to account. I've monitored the data flows, sized the hardware to handle the IO, and can either spend
a week or two benchmarking different solutions from cold, or I can take the advice of those with relevant
experience ( who I expect to find on this list ) to point me in the right direction first.
> 
> 
> -- 
> Chad
> http://www.postgresqlforums.com/
> 
Steve.

PS. Please fix your headers so replies to your mails appear on the list directly.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Alexander B. | 1 Feb 2007 20:16
Picon
Favicon

Install Tsearch2

Hi,

I need to install tsearch2, but I couldn't find a procedure (step-by-step).
Could you recomend some site or some steps to install.

I used PG 8 on Suse and Debian, and I installed postgres by source.

Thanks in advance.

	

	
		
_______________________________________________________ 
Yahoo! Mail - Sempre a melhor opção para você! 
Experimente já e veja as novidades. 
http://br.yahoo.com/mailbeta/tudonovo/

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

                http://www.postgresql.org/about/donate

Jeff Frost | 1 Feb 2007 20:25
Gravatar

Re: Install Tsearch2

I believe I followed these instructions the last time I enabled tsearch2:

http://www.sai.msu.su/~megera/wiki/tsearch-v2-intro

These are my crib notes for the English version, you'll have to update paths 
etc:

wget http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/dicts/ispell/ispell-english.tar.gz
cd /usr/local/lib
sudo tar xvfz /usr/local/src/TARFILES/ispell-english.tar.gz

psql -f /usr/share/pgsql/contrib/tsearch2.sql ftstest

INSERT INTO pg_ts_cfg (ts_name , prs_name, locale ) values ( 'default_english', 'default', 'en_US');

INSERT INTO pg_ts_dict
        (SELECT 'en_ispell',
 	       dict_init,
 	       'DictFile="/usr/local/lib/english.dict",'
 	       'AffFile="/usr/local/lib/english.aff",'
 	       'StopFile="/usr/share/pgsql/contrib/english.stop"',
 	       dict_lexize
 	FROM pg_ts_dict
 	WHERE dict_name = 'ispell_template');

INSERT INTO pg_ts_cfgmap (ts_name, tok_alias, dict_name)
        VALUES ('default_english', 'lhword', '{en_ispell,en_stem}');
INSERT INTO pg_ts_cfgmap (ts_name, tok_alias, dict_name)
        VALUES ('default_english', 'lpart_hword', '{en_ispell,en_stem}');
INSERT INTO pg_ts_cfgmap (ts_name, tok_alias, dict_name)
        VALUES ('default_english', 'lword', '{en_ispell,en_stem}');

INSERT INTO pg_ts_cfgmap
        VALUES ('default_english', 'url', '{simple}');
INSERT INTO pg_ts_cfgmap
        VALUES ('default_english', 'host', '{simple}');
INSERT INTO pg_ts_cfgmap
        VALUES ('default_english', 'sfloat', '{simple}');
INSERT INTO pg_ts_cfgmap
        VALUES ('default_english', 'uri', '{simple}');
INSERT INTO pg_ts_cfgmap
        VALUES ('default_english', 'int', '{simple}');
INSERT INTO pg_ts_cfgmap
        VALUES ('default_english', 'float', '{simple}');
INSERT INTO pg_ts_cfgmap
        VALUES ('default_english', 'email', '{simple}');
INSERT INTO pg_ts_cfgmap
        VALUES ('default_english', 'word', '{simple}');
INSERT INTO pg_ts_cfgmap
        VALUES ('default_english', 'hword', '{simple}');
INSERT INTO pg_ts_cfgmap
        VALUES ('default_english', 'nlword', '{simple}');
INSERT INTO pg_ts_cfgmap
        VALUES ('default_english', 'nlpart_hword', '{simple}');
INSERT INTO pg_ts_cfgmap
        VALUES ('default_english', 'part_hword', '{simple}');
INSERT INTO pg_ts_cfgmap
        VALUES ('default_english', 'nlhword', '{simple}');
INSERT INTO pg_ts_cfgmap
        VALUES ('default_english', 'file', '{simple}');
INSERT INTO pg_ts_cfgmap
        VALUES ('default_english', 'uint', '{simple}');
INSERT INTO pg_ts_cfgmap
        VALUES ('default_english', 'version', '{simple}');

ALTER TABLE album ADD COLUMN idxFTI tsvector;
UPDATE album SET idxFTI=to_tsvector(name);
CREATE INDEX album_idxFTI_idx ON album USING gist(idxFTI);

CREATE TRIGGER album_tsvectorupdate BEFORE UPDATE OR INSERT ON album
             FOR EACH ROW EXECUTE PROCEDURE tsearch2(idxFTI, name);

SELECT * FROM album WHERE idxfti  <at>  <at>  to_tsquery('spiderman');

Hopefully that helps...

On Thu, 1 Feb 2007, Alexander B. wrote:

> Hi,
>
> I need to install tsearch2, but I couldn't find a procedure (step-by-step).
> Could you recomend some site or some steps to install.
>
> I used PG 8 on Suse and Debian, and I installed postgres by source.
>
> Thanks in advance.
>
>
>
>
>
> _______________________________________________________
> Yahoo! Mail - Sempre a melhor opo para voc!
> Experimente j e veja as novidades.
> http://br.yahoo.com/mailbeta/tudonovo/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
>
>                http://www.postgresql.org/about/donate
>
>

--

-- 
Jeff Frost, Owner 	<jeff <at> frostconsultingllc.com>
Frost Consulting, LLC 	http://www.frostconsultingllc.com/
Phone: 650-780-7908	FAX: 650-649-1954
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Shoaib Mir | 1 Feb 2007 20:28
Picon

Re: Install Tsearch2

It already is there in the contrib folder within the source. While in the tsearch2 folder you just need to do a 'make' and 'make install' and then then run the tsearch.sql file so that you can register the tsearch2 functions.

--
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)

On 2/2/07, Alexander B. < burbello3000 <at> yahoo.com.br> wrote:
Hi,

I need to install tsearch2, but I couldn't find a procedure (step-by-step).
Could you recomend some site or some steps to install.

I used PG 8 on Suse and Debian, and I installed postgres by source.

Thanks in advance.





_______________________________________________________
Yahoo! Mail - Sempre a melhor opção para você!
Experimente já e veja as novidades.
http://br.yahoo.com/mailbeta/tudonovo/

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

                http://www.postgresql.org/about/donate


Gmane