Re: [GENERAL] fillfactor and cluster table vs ZFS copy-on-write

2015-04-16 Thread Qingqing Zhou
On Thu, Apr 16, 2015 at 5:09 AM, Geoff Speicher wrote: > Therefore one might posit that PostgreSQL should be configured to use 100% > fillfactor and avoid clustering on ZFS. Can anyone comment on this? > Even with COW, I can see fillfactor < 100% still have its virtues. For example, HOT update ca

Re: [GENERAL] Waiting on ExclusiveLock on extension

2015-04-16 Thread Qingqing Zhou
On Thu, Apr 16, 2015 at 1:24 PM, Andomar wrote: > After upgrading our database from 9.3.5 to 9.4.1 last night, the server > suffers from high CPU spikes. During these spikes, there are a lot of these > messages in the logs: > > process X still waiting for ExclusiveLock on extension of relation

Re: [GENERAL] Waiting on ExclusiveLock on extension

2015-04-16 Thread Qingqing Zhou
On Thu, Apr 16, 2015 at 2:39 PM, Andomar wrote: > That post is about a server with huge shared_buffers, but ours is just 8GB. > Total memory 48GB memory on a dedicated server. Checkpoints write around 2% > of the buffers. Are you able to take some 'perf top' during high CPU spike and see what's bu

Re: [GENERAL] Waiting on ExclusiveLock on extension

2015-04-17 Thread Qingqing Zhou
On Fri, Apr 17, 2015 at 1:14 AM, Andres Freund wrote: > Hm. I'm not aware of related changes in 9.4? 9.5 should be a bit better, > but I don't think 9.4 will make much of a difference. > You are right. I mis-read the check-in log. > I don't really agree that that's the most important bit. See > h

Re: [GENERAL] What constitutes "reproducible" numbers from pgbench?

2015-04-21 Thread Qingqing Zhou
On Tue, Apr 21, 2015 at 7:21 AM, wrote: > Hello list, > > Exactly what constitutes „reproducible“ values from pgbench? I keep getting > a range between 340 tps and 440 tps or something like that using the same > command line on the same machine. Is that reproducible enough? > Nope, it is not. Is

[GENERAL] how to read all physical rows (visible or not) from a heap

2015-04-30 Thread Qingqing Zhou
I recall once there is a GUC allowing us - basically force a SnapshotAny - what's current trick now? I need this only for debugging reading heap pages. Thanks, Qingqing -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgre

[GENERAL] Statement cancel or transaction cancel?

2005-03-11 Thread Qingqing Zhou
Pg8.0.1 backend> begin; backend> create table a (i int); backend> insert into a values(1); 1: i (typeid = 23, len = 4, typmod = -1, byval = t) backend> select * from pg_class; 1: relname (typeid = 19, len = 64, typmod = -1, byval = f) 2: relnamespace

Re: [GENERAL] IO Timeout

2005-03-11 Thread Qingqing Zhou
How do you know that PG is in maintainence mode? I am not sure what PG's maintainence mode is and not aware of any configuration parameters that could control the IO reponse waiting time. Postgres just issues the ordinary file system read/write command and wait for the response. Regards, Qingqin

Re: [GENERAL] Oracle's Virtual Private Database functionality

2005-03-11 Thread Qingqing Zhou
Check out CREATE RULE command, Regards, Qingqing ""Doug Bloebaum"" <[EMAIL PROTECTED]> дÈëÓʼþ news:[EMAIL PROTECTED] > [ Sorry if this appears twice on the list: sent it via a non-subscribed email the first time around. Of course, while waiting for it to appear I figured out a workaround; see

Re: [GENERAL] Question about database restrict

2005-03-14 Thread Qingqing Zhou
"Yu Jie" <[EMAIL PROTECTED]> writes: > Hi all, > If I want to restrict the maximum size of one > table to 5MB, restrict the maximum size of database > file to 100MB, how can I do that restriction? > Is PostgreSQL8.0 support this function? I can't > find it in the manual of PostgreSQL.

Re: [GENERAL] Object like pg_class.relkind = 's' or 'c' have on-disk file?

2005-03-16 Thread Qingqing Zhou
Pg_xactlock is always there as a special relation. It has no footprint on disk. Transactions will keep a record in pg_xactlock at the beginning and remove the record at the end. Once any conflicting update happens, the latter transaction will use this relation to wait for the former transaction's r

Re: [GENERAL] foreign key help

2005-03-16 Thread Qingqing Zhou
You may want to have a look at pg DOMAIN (also conforms to SQL standard). http://www.postgresql.org/docs/8.0/static/sql-createdomain.html Regards, Qingqing "Dale Sykora" <[EMAIL PROTECTED]> writes > I am building a database that has about 20 fields in various tables that > I would like to con

Re: [GENERAL] Tracking row updates

2005-03-20 Thread Qingqing Zhou
"Alex Adriaanse" <[EMAIL PROTECTED]> writes > This seems to work, except there exists a race condition. Consider the > following series of events (in chronological order): > >1. Initially, in the codes table there's a row with id=1, revision=1, > and a row with id=2, revision=2 >2.

Re: [GENERAL] Tracking row updates

2005-03-21 Thread Qingqing Zhou
"Alex Adriaanse" <[EMAIL PROTECTED]> writes > Applying this analogy to our database, wouldn't that require a > table-level lock during a CVS-like commit (which would mean locking the > table, getting the revision number, updating the row(s), and committing > the transaction)? > You may have a loo

Re: [GENERAL] Measuring Query Performance

2005-03-22 Thread Qingqing Zhou
""Ed L."" <[EMAIL PROTECTED]> writes > How are others handling this problem? Other ideas? > In your client, you will measure the libpq/odbc/jdbc or whatever call's completion time and send the interesting parts to your log database. And just make sure the tested database and the log database are

Re: [GENERAL] Measuring Query Performance

2005-03-22 Thread Qingqing Zhou
"Qingqing Zhou" <[EMAIL PROTECTED]> writes > ""Ed L."" <[EMAIL PROTECTED]> writes > > How are others handling this problem? Other ideas? > > > Sorry, forget to mention this project: http://pqa.projects.postgresql.org/example.h

Re: [GENERAL] Debugging deadlocks

2005-03-27 Thread Qingqing Zhou
"Michael Fuhr" <[EMAIL PROTECTED]> writes > To make sure the referenced key can't change until the transaction > completes and the referencing row becomes visible to other transactions > (or is rolled back) -- otherwise other transactions could change > or delete the referenced key and not know th

Re: [GENERAL] Debugging deadlocks

2005-03-27 Thread Qingqing Zhou
"Stephan Szabo" <[EMAIL PROTECTED]> writes > > Well, that's not the foreign key necessarily. I don't have a machine to > test on at the moment (machine currently dead), but I think the same > happens without a foreign key constraint due to the unique/primary key > constraint on a.i. I see. That's

Re: [GENERAL] Parallel Query should be a top priority

2005-03-27 Thread Qingqing Zhou
"Mike Mascari" writes > "Consider parallel processing a single query" should be moved out from > under Miscellaneous on the TODO list and re-categorized as the formerly > existent URGENT feature... > Yes, inter/inner-operation of PQO could be an obvious winner in some situations. For example, in

Re: [GENERAL] Database monitor (again)

2005-03-31 Thread Qingqing Zhou
"Edson Vilhena de Carvalho" <[EMAIL PROTECTED]> writes > Sorry but perhaps it is a database monitorizer that > makes the monitorization on the databases. > It's my english Ok, don't worry about your English. Try to find out your questions in your language here: http://www.postgresql.org/docs/faq

Re: [GENERAL] truncate/create slowness

2005-03-31 Thread Qingqing Zhou
"Joe Maldonado" <[EMAIL PROTECTED]> writes > I suspect that pg_class has too many pages (49182 as below) and for > some reason the above commands spend a lot of time updating it. > vacuum/analyze on pg_class has not helped. Also, since the time taken > for these commands is not consistently fast o

Re: [GENERAL] Postgres Processing Help !!!!

2005-03-31 Thread Qingqing Zhou
"Carlos Roberto Chamorro Mostac" <[EMAIL PROTECTED]> writes > Hello to all, I have a problem with the use of > temporary tables to have if somebody has an idea. > Handling an application that it requires to process > 6,000 registries Parents and the processing of each > one requires to process N r

Re: [GENERAL] Triggers: using table's primary key value to update another field

2005-03-31 Thread Qingqing Zhou
"Randall Perry" <[EMAIL PROTECTED]> writes > What I'm having trouble with is figuring out how to grab the primary key > value of the current row. I tried tacking on a var with the pkey row name to > NEW, but that doesn't work (didn't think it would). There is an example in PG docs. http://www.po

[GENERAL] Does SELECT INTO is affected by default_tablespace?

2005-05-23 Thread Qingqing Zhou
According to my test, it does not: test=# set default_tablespace = testsp; SET test=# create table a (i int); CREATE TABLE test=# select * into b from a; SELECT test=# \d+ b Table "public.b" Column | Type | Modifiers | Description +-+---+- i

Re: [GENERAL] getting lock information

2005-05-24 Thread Qingqing Zhou
>"Himanshu Baweja" <[EMAIL PROTECTED]> writes >I wanted to see which tables/transaction have acquired or are waiting for which locks >as far as i know there are two ways to do it > >1) pg_locks ::: need to write trigger... and have high overhead... > "select * from pg_locks" has trivial im

Re: [GENERAL] PG 8.0.1 is getting slow in 24 hours. Only daily VACUUM FULL helps

2005-06-14 Thread Qingqing Zhou
"Tom Lane" <[EMAIL PROTECTED]> writes > > Evidently that's not often enough. Or it could be that your > FSM settings aren't large enough? > Setting various proper parameters of FSM is onerous for maintainence. Is there any plan to make FSM buffer-file-able, just like what clog does now? Regards

Re: [GENERAL] (NONE)

2005-06-14 Thread Qingqing Zhou
""jeremy `"" <[EMAIL PROTECTED]> writes > get some screenshots, and i got this message: > "Internal account lookup failure: No mappiong between account names and > security IDs was done." > This was recently asked. Search "Internal account lookup failure" in list. Regards, Qingqing -

Re: [GENERAL] How to set an expiration date for a WHOLE user account

2005-06-14 Thread Qingqing Zhou
"Együd Csaba" <[EMAIL PROTECTED]> writes > > I'm wonder how I can disable a user (without droping of course). Is there a > way to set an expiration date to prevent logins after that date? > > I know the VALID UNTIL clause of CREATE USER command, but it is about the > password only. > I think somet

Re: [GENERAL] How to set an expiration date for a WHOLE user account

2005-06-16 Thread Qingqing Zhou
"Tom Lane" <[EMAIL PROTECTED]> writes: > > He's right, you're not: that check is only applied in the > password-based authorization path. > > This has always seemed a bit bogus to me too --- would not object to > a well-thought-out patch to change it. > If we add a "VALID UNTIL" column in pg_hba.

Re: [GENERAL] "GiST access is not concurrent"

2005-08-31 Thread Qingqing Zhou
""John Surnow"" <[EMAIL PROTECTED]> wrote > Does this mean that read access is not concurrent, or write access, or > both? For old GiST, you can have several connections read-*only* at the same time, but write/write or read/write is unsafe. GiST in 8.1 is concurrent safe already. Regards, Qing

Re: [GENERAL] could not send data to server: Operation not supported

2005-09-26 Thread Qingqing Zhou
"ruben" <[EMAIL PROTECTED]> wrote > > A PHP script that is running every 30 minutes for three years has crashed > when updating a Postgres database table with this error message: > > "pg_exec() query failed: could not send data to server: Operation not > supported" > > I just ran it again and i

Re: [GENERAL] [SQL] add column if doesn't exist (fwd)

2005-09-26 Thread Qingqing Zhou
""Brandon Metcalf"" <[EMAIL PROTECTED]> wrote > > Is there a way to check for the existence of a column in a table other > than, say, doing a SELECT on that column name and checking the output? > Take a look at pg_attribute system table. http://www.postgresql.org/docs/8.0/static/catalog-pg-attri

Re: [GENERAL] Can not get ODBC to log. Trace is not working.

2005-09-26 Thread Qingqing Zhou
"Roy Souther" <[EMAIL PROTECTED]> wrote >I am trying to get the ODBC client to log but I just can't. I have >included my odbc.ini and odbcinst.ini. Can anyone tell me why there is >never a log file created? I connect to the database with isql and >OpenOffice, run queries and get data but never do

Re: [GENERAL] copy data between database

2005-10-07 Thread Qingqing Zhou
<[EMAIL PROTECTED]> wrote > Hi, I have a table A in both database d1 and d2. I would like to copy > data in A in d1 to A in d2. How can I do it? I do not want to copy all > data, just some part of A, > > Here is a way if you feel want to try. The basic idea is that create a table (say OS file na

Re: [GENERAL] copy data between database

2005-10-10 Thread Qingqing Zhou
"Scott Marlowe" <[EMAIL PROTECTED]> wrote > > Under no circumstances should you do this with a database that has any > data in it that you value. pg_dump / pg_restore / psql are the > preferred way of doing this. > Oh yeah, sorry for the miss leading information. My method is dangerous and can

[GENERAL] Win32 libpq and ecpg thread safety

2005-10-26 Thread Qingqing Zhou
Hi, Is there a paragraph in the document talking about this? I've tried to look into it, but can't find it. Can anybody point me to it? Thanks, Qingqing ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire

Re: [GENERAL] Win32 libpq and ecpg thread safety

2005-10-26 Thread Qingqing Zhou
On Wed, 26 Oct 2005, Bruce Momjian wrote: > > If you are asking about Win32-specific threading, there is no > documentation about it because it works just like Unix threading. At > least, that is what I am told. > So both libpq and ecpg are thread-safe in Win32? I look into the code, seems at

Re: [GENERAL] Difference in indexes

2005-11-21 Thread Qingqing Zhou
""A.j. Langereis"" <[EMAIL PROTECTED]> wrote > > What is happening here? What am I overlooking? The length does not > seem to be the problem: 'FooFooFoo' also uses the index.. > Also the fact whenever there are results or not does not seem to > influence the planner.. > Check out this thread: ht

Re: [GENERAL] Conditional delete

2005-11-21 Thread Qingqing Zhou
On Mon, 21 Nov 2005, Bartosz Jakubiak wrote: > Hi. > > I'm new with PostgreSQL, but this thing doesn't allow me to sleep: > > I wonder if it is possible to execute SQL query which: > 1. checks out if table exists, and if it is: > 2. deletes it > All of it at SQL query level, preferrably in one

Re: [GENERAL] Difference in indexes

2005-11-21 Thread Qingqing Zhou
""A.j. Langereis"" <[EMAIL PROTECTED]> wrote > > "Bitmap Heap Scan on hosts (cost=2.07..11.34 rows=21 width=59) (actual > time=0.175..0.287 rows=21 loops=1)" > " Recheck Cond: ((hostname)::text = 'Fabian'::text)" > " -> Bitmap Index Scan on hosts_hostname (cost=0.00..2.07 rows=21 > width=0) (

Re: [GENERAL] "invalid page header in block 597621 of relation..."error

2005-11-24 Thread Qingqing Zhou
"Tom Lane" <[EMAIL PROTECTED]> wrote > > At this point I think there's no question that your filesystem is > dropping blocks :-(. It is very interesting to follow this thread. But at this point, can you explain more why "there is no question" is file system's fault? Thanks, Qingqing ---

Re: [GENERAL] user_write_lock_oid questions

2005-12-02 Thread Qingqing Zhou
""Marian Naghen"" <[EMAIL PROTECTED]> wrote > 1. if a user set a write lock and then, for some reason (bad > connections, app chashes, etc), disconect from server without releasing, > what happened with the lock ? It will be still holding ? When the connection is lost, server will release all it

Re: [GENERAL] keeping track of inserts (periodical) into a table

2005-12-03 Thread Qingqing Zhou
"Assad Jarrahian" <[EMAIL PROTECTED]> wrote > Hi all, > I have a design decission to make. I am using Lucene (Java Search > API) and I need to update lucenes index from time to time. >Is there a way one can keep track of all the inserts coming > into a table (holding onto their Primary k

Re: [GENERAL] Migration tool from MS SQL server 7.0

2005-12-16 Thread Qingqing Zhou
""dfx"" <[EMAIL PROTECTED]> wrote > Dear Sirs, > it exist some tool to convert a SQL script generated from MS SQL 7 to the > syntax > compatible with Postgresql v. 8.x.x? In general, I bet no - since some functionalities in SQL Server is different from ours, say TableSpace. Regards, Qingqing

Re: [GENERAL] Funky template1 problem?

2005-12-21 Thread Qingqing Zhou
"Jerry LeVan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I have a bunch of small dbs (levan, pictures, and a couple of others). > > I have had these db's over many upgrades and I have just noticed that > template1 seems to be a bit munged... > > testuser=> \c template1

Re: [GENERAL] Funky template1 problem?

2005-12-21 Thread Qingqing Zhou
On Wed, 21 Dec 2005, Tom Lane wrote: > > "Jerry LeVan" <[EMAIL PROTECTED]> wrote in message > >> I have had these db's over many upgrades and I have just noticed that > >> template1 seems to be a bit munged... > > I'm sure they are. Oh right -- since CREATE DATABASE just copied the whole direct

Re: [GENERAL] newbie : setting access for users in a web enviroment

2005-12-23 Thread Qingqing Zhou
"robert mena" <[EMAIL PROTECTED]> wrote > > How can I specify that the user testadm can perform those actions to this > database? Use GRANT command (the opposite is REVOKE). I suppose you are using 8.1: http://www.postgresql.org/docs/8.1/static/sql-grant.html Regards, Qingqing -

Re: [GENERAL] I want to know how to improve the security of postgresql

2005-12-28 Thread Qingqing Zhou
""xiapw"" <[EMAIL PROTECTED]> wrote > Hi guys,can you give me some advices about how to improve the security of > postgresql? > Now I major in the security of postgresql and the destination is create a > database with security level of B1(TCSEC),what should I do now,what > program language shou

Re: [GENERAL] how to add a new column to system table

2005-12-29 Thread Qingqing Zhou
""xiapw"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I wanted to add a new column to system table(pg_database),but failed at >last. Who know how to do this and can you tell me ? A recent change to pg_database (adding a new column) happened on -- Sun Jul 31 17:19:21 2005 UTC (

Re: [GENERAL] pg_reload_conf() does not unset archive_command

2006-01-01 Thread Qingqing Zhou
"Andrus Moor" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > 1. Make sure that postgres.conf file contains in first line: > > archive_command = 'copy "%p" "c:/arhiiv/%f"' > > 2. Edit postgres.conf file by adding # before this line > > #archive_command = 'copy "%p" "c:/arhiiv/%f"'

[GENERAL] SET SESSION TRANSACTION command

2006-01-01 Thread Qingqing Zhou
test=# SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; SET test=# show transaction_isolation; transaction_isolation --- read committed (1 row) Is this a bug by any chance or we do it intentionally? Regards, Qingqing ---(end of broadcast)

Re: [GENERAL] SET SESSION TRANSACTION command

2006-01-01 Thread Qingqing Zhou
On Sun, 1 Jan 2006, Tom Lane wrote: > "Qingqing Zhou" <[EMAIL PROTECTED]> writes: > > test=# SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; > > SESSION is taken as a noise word here. Possibly we should disallow this > syntax altogether, since it isn&#x

Re: [GENERAL] build Postgresql on Solaris 64 bits

2006-01-03 Thread Qingqing Zhou
""FERREIRA, William (GFI INFORMATIQUE)"" <[EMAIL PROTECTED]> wrote > > i'm trying to install Postgresql on Solaris. > Looking at the generated code, i saw that it was in 32 bits. > I would like to compile Postgresql in 64 bits but i didn't find any post > in the archives about this. > Check out

Re: [GENERAL] Hardware recommendation for PostgreSQL on Windows?

2006-01-05 Thread Qingqing Zhou
""Bj?rn T Johansen"" <[EMAIL PROTECTED]> wrote >I an planning to make a small Windows application and need a nice >database I am used to using PostgreSQL > under Linux and I am thinking about using this under Windows but how much > resources does it use under Windows? > The server will be ru

Re: [GENERAL] contrib library in windows

2006-01-06 Thread Qingqing Zhou
"SunWuKung" <[EMAIL PROTECTED]> wrote > > Does the contrib library exist for Windows? If you are compiling from source tar ball, it is in pgsql\contrib. Regards, Qingqing ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will i

Re: [GENERAL] More atomic online backup

2006-01-06 Thread Qingqing Zhou
On Fri, 6 Jan 2006, Bruno Almeida do Lago wrote: > Hi, > > 1) I've a pg cluster with 5 databases here. I was wondering if it's possible > to make an online backup of 1 database only, not the entire cluster. > Check out tool pg_dump or the documents for other options. > 2) Online backups at Ora

Re: [GENERAL] pg_dump throws no buffer space available error

2006-01-06 Thread Qingqing Zhou
"Vishal Dixit" <[EMAIL PROTECTED]> wrote > > We are running postgres version 8.0 on windows server 2003. On > doing a pg_dump of a large database the following error occurs: > > pg_dump: could not receive data from server: No buffer space > available > > There is one table in the database containi

Re: [GENERAL] index and MVCC

2006-01-11 Thread Qingqing Zhou
<[EMAIL PROTECTED]> wrote >a table is created and an index is created on that table > > then one row is updated > > what happens to the index file? > ( is the index to old row deleted?) > Nothing happened to the index file. The index row is not deleted since there is no MVCC information associat

Re: [GENERAL] xml export tool?

2006-01-11 Thread Qingqing Zhou
"JJC" <[EMAIL PROTECTED]> wrote > > I'm looking for an open-source tool that will allow me to extract data as > XML. > If you want to extract data from PostgreSQL, I think most XML export tool will do if they can connect to database via ODBC/JDBC. Regards, Qingqing --

Re: [GENERAL] psql(18967) malloc: *** vm_allocate(size=8421376) failed (error code=3)

2006-01-11 Thread Qingqing Zhou
"Ari Kahn" <[EMAIL PROTECTED]> wrote > I'm doing a query that really should be too taxing. But when I execute it > I get the following error(s): > > psql(18967) malloc: *** vm_allocate(size=8421376) failed (error code=3) > > Nested Loop (cost=89.36..6086.42 rows=273312 width=88) (actual > time

Re: [GENERAL] psql(18967) malloc: *** vm_allocate(size=8421376) failed (error

2006-01-11 Thread Qingqing Zhou
On Wed, 11 Jan 2006, Ari Kahn wrote: > > I have LOTS of memory (5GB). > What is the appropriate way to add more memory slots? > Or increase my VM file size? > Hmm ... What OS are you using? Regards, Qingqing ---(end of broadcast)--- TIP 1: if po

Re: [GENERAL] psql(18967) malloc: *** vm_allocate(size=8421376) failed (error

2006-01-11 Thread Qingqing Zhou
On Wed, 11 Jan 2006, Ari Kahn wrote: > Mac OSX 10.4 > Seems this is a known problem of Mac. Try to google "vm_allocate failed". Regards, Qingqing ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] psql(18967) malloc: *** vm_allocate(size=8421376) failed (error

2006-01-11 Thread Qingqing Zhou
On Wed, 11 Jan 2006, Ari Kahn wrote: > Could you be more specific. It seems that lots of people get this > error message on many platforms. http://groups.google.ca/groups?hl=en&q=vm_allocate%20failed&sa=N&tab=wg I checked the first several pages. You will most of them point to Mac or NeXT. Re

Re: [GENERAL] Plans for 8.2?

2006-01-12 Thread Qingqing Zhou
"Tom Lane" <[EMAIL PROTECTED]> wrote > > The key word there is "safely". We don't have a lot of trust in > SIGTERM'ing individual backends (as opposed to shutting down the > whole cluster at once, which is a well-tested code path). See the > archives. > Maybe related question: is the code below

Re: [GENERAL] extend sql?

2006-01-12 Thread Qingqing Zhou
""xiapw"" <[EMAIL PROTECTED]> wrote > Hello everyone,I want to konw how to extend the SQL. > For example,Create table temp [sec_level],sec_level means the secure level > of the table that you have created,how to do this? If you mean extend the SQL grammar, modify file backend/parser/gram.y. Reg

Re: [GENERAL] Error when inserting millions of records

2006-01-13 Thread Qingqing Zhou
"Rudolph" <[EMAIL PROTECTED]> wrote > Me and a friend are testing some operations for a search application in > PostgreSQL. In version 8.1 my friend tried to copy the result of a join > into another table, about 45.000.000 (small) records. This is the > result: > > testsearch=> insert into t_docum

Re: [GENERAL] Huge number of disk writes after migration to 8.1

2006-01-16 Thread Qingqing Zhou
"Marcin" <[EMAIL PROTECTED]> wrote > > I suffer from huge increase in number of disk writes after migration > from 8.0.3 to 8.1.2. The average number of sectors written increased 10 > times and transfer stays at 20MB of writes per second during work hours > (with 20% cpu time wasted in iowait). Th

Re: [GENERAL] Huge number of disk writes after migration to 8.1

2006-01-17 Thread Qingqing Zhou
On Tue, 17 Jan 2006, Marcin wrote: > > Playing with postgresql.conf I changed "stats_command_string" to off, > reloaded config, and restarted connection from applications (the > postgresql > wasn't restarted). The write rate immediately drops down, and is now > at 8000-9000 blocks per second (whi

Re: [GENERAL] How do I use the backend APIs

2006-02-16 Thread Qingqing Zhou
"Chad" <[EMAIL PROTECTED]> wrote > > In Postgres, is there a C language API which would give me access to > BTrees like Berkeley DB does? eg to seek to a particular key/value pair > and iterate forward from there? AFAIK there is no such API for this purpose. The reason is that to access BTree, yo

Re: [GENERAL] Error in Postgresql after a Machine Crash

2006-03-15 Thread Qingqing Zhou
""Paulo Henrique Oliveira"" <[EMAIL PROTECTED]> wrote > I was using postgres 7.2.1 in a Debian Woody server (in prodution). > The machine crashed and when I restart it the following error occurs a lot > in log. > 2006-03-14 14:35:23 [11858] ERROR: XLogFlush: request 102/7407C864 is not > satisfi

Re: [GENERAL] \copy combine with SELECT

2006-03-15 Thread Qingqing Zhou
""jia ding"" <[EMAIL PROTECTED]> wrote > I tried: > select id, name into table2 from table1; > \copy table2 to filename.txt > in order to export 2 columns from table1 to a file. > > But, I am thinking, if there is a command can combine these two > command together? Notice that COPY command c

Re: [GENERAL] PANIC: heap_update_redo: no block

2006-03-20 Thread Qingqing Zhou
""Alex bahdushka"" <[EMAIL PROTECTED]> wrote > > After doing some more digging, it looks like that server was missing > the appropriate Kpostgresql symlink in /etc/rc0.d/. So upon shutdown > (shutdown -h now)... my guess is it got a sigterm (you know where it > says Sending all processes a TERM

Re: [GENERAL] PANIC: heap_update_redo: no block

2006-03-21 Thread Qingqing Zhou
""Alex bahdushka"" <[EMAIL PROTECTED]> wrote > > Hrm... well i obviously have restored the database by now (using > pg_resetxlog; pg_dump; initdb; pg_restore). However i did make a > backup of the broken directory before I created the new database. If > anyone has any thing they would like me to

Re: [GENERAL] PANIC: heap_update_redo: no block

2006-03-21 Thread Qingqing Zhou
"Tom Lane" <[EMAIL PROTECTED]> wrote > > While at it, you should extend the error message to include the relation > ID, so you have some idea which table is affected ... this is certainly > not a very informative message ... > Exactly. Please use the following version: - elog(PANIC, "heap_update

Re: [GENERAL] PANIC: heap_update_redo: no block

2006-03-21 Thread Qingqing Zhou
"Tom Lane" <[EMAIL PROTECTED]> wrote > "Qingqing Zhou" <[EMAIL PROTECTED]> writes: > > BTW: I just realized that there is another (better) way to do so is to > > enable WAL_DEBUG in xlog.h and SET XLOG_DEBUG=true. And that's why we don'

Re: [GENERAL] How to release locks

2006-03-21 Thread Qingqing Zhou
"Andrus" <[EMAIL PROTECTED]> wrote > After killing client from XP task manager command > > DELETE FROM mytable > > runs forever. > > This is probably because pgAdmin shows that there are some locks placed (see > included picture). > It is not because of the locks. There is only running transactio

Re: [GENERAL] invalid page header

2006-03-21 Thread Qingqing Zhou
"Jo De Haes" <[EMAIL PROTECTED]> wrote > > CETERROR: XX001: invalid page header in block 22182 of relation "dunn_main" > > My main question is: why is this occuring? > I suppose there is no system error happens during the period (like lost power). Can you attach the gdb at "b bufmgr.c:257" and p

Re: [GENERAL] How to release locks

2006-03-22 Thread Qingqing Zhou
"Andrus" <[EMAIL PROTECTED]> wrote > > insert command takes a long time. I terminated the client application from > Windows XP client manager during insert command. > At next re-run application and pgadmin both hang in DELETE FROM line > > I think I can reproduce this. Postgres server is in FreeBS

Re: [GENERAL] Advantages of PostgreSQL over MySQL 5.0

2006-03-23 Thread Qingqing Zhou
""Merlin Moncure"" <[EMAIL PROTECTED]> wrote > > In postgresql, queries executed over the parameterized/prepared C api > are particularly fast...as much as a 70% speed reduction over vanilla > PQexec. Does it mean 70% time is spent on planning? I am a little bit interested in this number. Can you

Re: [GENERAL] PANIC: heap_update_redo: no block

2006-03-26 Thread Qingqing Zhou
""Alex bahdushka"" <[EMAIL PROTECTED]> wrote > > (@)<2006-03-25 20:54:17.528 MST>[26571]LOG: REDO @ D/19176610; LSN > D/19176644: prev D/191765E8; xid 81148979: Heap - clean: rel > 1663/16386/16559898; b > (@)<2006-03-25 20:54:17.528 MST>[26571]LOG: REDO @ D/19176644; LSN > D/191766A4: prev D/19

Re: [GENERAL] PANIC: heap_update_redo: no block

2006-03-27 Thread Qingqing Zhou
""Alex bahdushka"" <[EMAIL PROTECTED]> wrote > > LOG: REDO @ D/19176610; LSN D/19176644: prev D/191765E8; xid 81148979: > Heap - clean: rel 1663/16386/16559898; blk 0 > LOG: REDO @ D/19176644; LSN D/191766A4: prev D/19176610; xid 81148979: > Heap - move: rel 1663/16386/16559898; tid 1/1; new 0/1

Re: [GENERAL] PANIC: heap_update_redo: no block

2006-03-31 Thread Qingqing Zhou
""Alex bahdushka"" <[EMAIL PROTECTED]> wrote > > (@)<2006-03-18 23:30:33.035 MST>[3791]PANIC: heap_update_redo: no block > According to the discussion in pgsql-hackers, to finish this case, did you turn off the full_page_writes parameter? I hope the answer is "yes" ... Regards, Qingqing ---

[GENERAL] How to have a blind-superuser

2006-04-24 Thread Qingqing Zhou
Is it possible to have a superuser who could do CHECKPOINT, BACKUP and whatever but could not see any user data? Regards, Qingqing ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] How to have a blind-superuser

2006-04-24 Thread Qingqing Zhou
""Jim C. Nasby"" <[EMAIL PROTECTED]> wrote > On Mon, Apr 24, 2006 at 06:16:30PM +0800, Qingqing Zhou wrote: > > Is it possible to have a superuser who could do CHECKPOINT, BACKUP and > > whatever but could not see any user data? > > Not for backup.

Re: [GENERAL] Postmaster cannot start

2006-05-15 Thread Qingqing Zhou
""Chun Yit(Chronos)"" <[EMAIL PROTECTED]> wrote > saw from the log file, it's possible that server crash during > vacuum process... > > Question : > 1) what happen to my database server? what the error meaning? > It looks like index "pg_class_relname_nsp_index" (which is an index on pg_class) is

Re: [GENERAL] Postmaster cannot start

2006-05-15 Thread Qingqing Zhou
""Chun Yit(Chronos)"" <[EMAIL PROTECTED]> wrote > postmaster give me error every time i try to start it > LOG: redo starts at A/46315F50 > PANIC: btree_delete_page_redo: uninitialized right sibling > So the last resort I can think of is to use pg_resetxlog to pass the startup failure -- but no

Re: [GENERAL] Insert into partition table hangs

2006-05-19 Thread Qingqing Zhou
"Nik" <[EMAIL PROTECTED]> wrote > I have an application that executes an INSERT statement every second or > two. In my old design this data was inserted into one table. However, I > changed the design to have one table with multiple partitions. Now when > I run the application it runs for some ran

Re: [GENERAL] delete is extremely slow

2006-05-26 Thread Qingqing Zhou
"Emi Lu" <[EMAIL PROTECTED]> wrote > Hello, > > Tried to run: > > delete from tableA where id <60; > > It is extremely slow. > > id is integer and also the primary key. tableA has around 9 records. > > (I do not want to run truncate since I have some foreign key constraint > setup based on

Re: [GENERAL] Restoring databases from a different installment on Windows

2006-05-29 Thread Qingqing Zhou
"Berislav Lopac" <[EMAIL PROTECTED]> wrote >I have recently reinstalled my Windows mychine, including the > PostgreSQL server, but (due to a system crash, unrelated to Postgres) > I > wasn't able to dump my databases to import them now. However, I have a > full copy of the original system, includ

Re: [GENERAL] Out of Memory Error on Postgresql 8.1.3. on win32

2006-06-08 Thread Qingqing Zhou
""Harald Armin Massa"" <[EMAIL PROTECTED]> wrote > today postgresql 8.1.3 on win32 died: > 2006-06-08 16:33:12 ERROR: out of memory > 2006-06-08 16:33:12 DETAIL: Failed on request of size 16777212. > I didn't see any strange number in your log message and 16777212 is 16M, which is not a scary n

Re: [GENERAL] error 57014

2006-06-08 Thread Qingqing Zhou
"Tom Lane" <[EMAIL PROTECTED]> wrote > > Well, *something* sent that backend a SIGINT. > Could something be the backend statement_timeout? I remember [but not sure] we don't differenciate timeout or explicite SIGINT in 7.4.x. Regards, Qingqing ---(end of broadcast)

Re: [GENERAL] Insert into partition table hangs

2006-06-09 Thread Qingqing Zhou
"Nik" <[EMAIL PROTECTED]> wrote > > I also noticed that I am having the similar issue with SELECT > statements. Same SELECT statement will run fine 3-4 times in a row and > then get stuck and run forever with no results. But if I reload the > configuration like above, the query immediatelly return

Re: [GENERAL] Insert into partition table hangs

2006-06-11 Thread Qingqing Zhou
""Nikola Ivanov"" <[EMAIL PROTECTED]> wrote > Database is running on Windows 2003 Advanced Server and it is PostgreSQL > 8.1.3. > > On 6/9/06, Tom Lane <[EMAIL PROTECTED]> wrote > > > > Buggy SysV semaphore support in the kernel, maybe? What platform is > > this exactly? > > Yes, there is a bug

Re: [GENERAL] Disk corruption detection

2006-06-11 Thread Qingqing Zhou
"Florian Weimer" <[EMAIL PROTECTED]> wrote > > Anyway, how would be the chances for PostgreSQL to detect such a > corruption on a heap or index data file? It's typically hard to > detect this at the application level, so I don't expect wonders. I'm > just curious if using PostgreSQL would have h

Re: [GENERAL] Ever increasing OIDs - gonna run out soon?

2006-06-11 Thread Qingqing Zhou
"John Sidney-Woollett" <[EMAIL PROTECTED]> wrote > > It looks like the db is using them at the rate of 1.5 million per day. > At what value will I hit a wraparound, and what options do I have to > identify/fix the (impending) problem. > The Oid will wraparound when it reaches the 32bits unsigned

Re: [GENERAL] Out of memory error in 8.1.0 Win32

2006-06-14 Thread Qingqing Zhou
""Relyea, Mike"" <[EMAIL PROTECTED]> wrote > I've just started receiving an out of memory error with my most complex > query. Can you post the memory usage log after the error the server reports? Regards, Qingqing ---(end of broadcast)--- TIP 6:

Re: [GENERAL] Out of memory error in 8.1.0 Win32

2006-06-15 Thread Qingqing Zhou
""Relyea, Mike"" <[EMAIL PROTECTED]> wrote > Is this what you're looking for? No. I mean per-context memory usage output like this in your log file: 2006-06-08 16:33:09 LOG: autovacuum: processing database "ibox" TopMemoryContext: 84400 total in 7 blocks; 12696 free (22 chunks); 71704 used Oper

Re: [GENERAL] Out of memory error in 8.1.0 Win32

2006-06-18 Thread Qingqing Zhou
"Qingqing Zhou" <[EMAIL PROTECTED]> wrote > > > ExecutorState: 550339936 total in 123 blocks; 195005920 free (740144 chunks); 355334016 used > ... > HashBatchContext: 293593176 total in 44 blocks; 3107384 free (80 chunks); 290485792 used > TIDBitmap: 2088960 t

Re: [GENERAL] How to optimize PostgreSQL database size

2006-06-18 Thread Qingqing Zhou
""Linux Portal"" <[EMAIL PROTECTED]> wrote > The article on the subject can be read here: > > http://linux.inet.hr/optimize_postgresql_database_size.html > After dump/restore the database size is 1685 MB and after vacuum-full/reindex is 1990 MB. Where we saved 305 MB? Regards, Qingqing

Re: [GENERAL] simple query terminated by signal 11

2006-06-19 Thread Qingqing Zhou
""Thomas Chille"" <[EMAIL PROTECTED]> wrote > Hi List, > > i run in to an error while dumping a db. > > after investigating it, i found a possible corrupted table. but i am not sure. > and i dont know how i can repair it? could it be a harddrive error? > > > # now the error: SELECT * FROM hst_sale

  1   2   >