Re: [ADMIN] restoring from a dump

2013-01-07 Thread Burgholzer, Robert (DEQ)
The other quick item to consider is whether or not your database is on a *nix system or a windows machine, and if your workstation is *nix or windows. Cases/suggestions: 1. Windows workstation / *nix DB Server: use putty.exe to ssh into the DB server (a second option would be to use PGAdmin,

[ADMIN] my query is so slow,It costs 944,319.072 ms,Can someone Help!!

2013-01-07 Thread Jerome
I have a postgresql 9.1 in my server,And here 's my query,It costs 944,319.072 ms,it is so slow,query result have 27 records. SELECT AP_ATTRIBUTE.stylename,AP_BASIC.style,AP_ATTRIBUTE.color,AP_ATTRIBUTE.size, AP_BASIC.ap_sizesequence_id as apSizesequenceId, M_TRANSACTION.movementdate as

[ADMIN] Mapping a Data File Back to a Table

2013-01-07 Thread Greg Schenzel
So I've been digging through a database on an embedded device for two days trying to figure out which table some data is stored in. There are litterally 1000 tables in the database and I haven't come across the right one(s) yet. I know that the data I'm looking for is stored in

Re: [ADMIN] Mapping a Data File Back to a Table

2013-01-07 Thread Greg Schenzel
It was stored in pg_largeobject based on the OID. On Fri, Jan 04, 2013 at 11:09:33AM -0700, Greg Schenzel wrote: So I've been digging through a database on an embedded device for two days trying to figure out which table some data is stored in. There are litterally 1000 tables in the database

Re: [ADMIN] Mapping a Data File Back to a Table

2013-01-07 Thread Tom Lane
Greg Schenzel init...@unixdev.net writes: So I've been digging through a database on an embedded device for two days trying to figure out which table some data is stored in. There are litterally 1000 tables in the database and I haven't come across the right one(s) yet. I know that the data

[ADMIN] Using pre-configured vs building Postgres

2013-01-07 Thread Armin Resch
Hi all, I am running custom applications on a Linux platform which essentially have Perl and Postgres as prerequisites. In the past, we used an arcane Linux distro which left me with no other option than to build Perl + 50 odd CPAN modules + Postgres myself. I prefixed the stack under a common

Re: [ADMIN] Using pre-configured vs building Postgres

2013-01-07 Thread Tom Lane
Armin Resch resc...@gmail.com writes: Yet, now, we switch to a more modern distro (OpenSuse 12.1), which does have the RPM for Perl 5.14.2 pre-installed with the option to install more RPMs such as perl-DBI-1.616-7.1.3 perl-DBD-Pg-2.18.0-3.1.4 postgresql-9.1.1-3.1.4 Once our custom

Re: [ADMIN] Postgres base Backup fails to recover all logs fails from archive

2013-01-07 Thread Magnus Hagander
On Sat, Jan 5, 2013 at 11:30 PM, Lars Aksel Opsahl l...@skogoglandskap.no wrote: Hi Thanks for your help. The problem is that it stops to restore the log files after reading log file 0001002300F7. The recovery does not continue to read log file 0001002300F8 and

Re: [ADMIN] Using pre-configured vs building Postgres

2013-01-07 Thread Armin Resch
Thx, Tom. OpenSUSE's most recent postgres 9.1 is 9.1.6. Yet, 9.1.1 is what was part of the opensuse12.1 snapshot of RPMs on top of which some of our engineers develop proprietary apps. It worked well for them to freeze an RPM repo because it can happen (and did happen!) that upgrading an

[ADMIN] Possible database corruption - urgent

2013-01-07 Thread Benjamin Krajmalnik
I have a situation where pg_xlog started growing until it filled up the disk drive. I got alerted to the error and started investigating. Checked the logs and I am seeing the following entry repeatedly: 2013-01-07 01:49:12 GMT ERROR: could not open file base/16748/181979366_fsm: No such

Re: [ADMIN] Possible database corruption - urgent

2013-01-07 Thread Benjamin Krajmalnik
I forgot to mention - PostgreSQL 9.0 - my apologies. Can I just recreate the file using touch so it exists and then restart potgresql? The system coredumped and was attempting to go intorecovery mode 2013-01-07 01:49:12 GMT ERROR: could not open file base/16748/181979366_fsm: No such

Re: [ADMIN] Possible database corruption - urgent

2013-01-07 Thread Benjamin Krajmalnik
Sorry for the cut and paste error. This is the log entry when the pg_xlog partition ran out of space: 2013-01-07 20:50:22 GMT [local]PANIC: could not write to file pg_xlog/xlogtemp.49680: No space left on device 2013-01-07 20:50:22 GMT [local]STATEMENT: INSERT INTO tbltmptests (testhash,

Re: [ADMIN] Possible database corruption - urgent

2013-01-07 Thread Walter Hurry
On Mon, 07 Jan 2013 14:35:48 -0700, Benjamin Krajmalnik wrote: snip What do you think you will gain by adding urgent to your subject line? What do you think you will gain by posting in HTML? -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your

Re: [ADMIN] Possible database corruption - urgent

2013-01-07 Thread Walter Hurry
On Mon, 07 Jan 2013 14:35:48 -0700, Benjamin Krajmalnik wrote: snip What do you think you will gain by adding urgent to your subject line? What do you think you will gain by posting in HTML? -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your

Re: [ADMIN] Possible database corruption - resolved

2013-01-07 Thread Benjamin Krajmalnik
Restarting the postmaster recreated the missing fsm file. Recovery completed and database is back up. -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin

[ADMIN] How to implement the 'GRANT ALL ON DB1 TO 'USER'@'%' of MYSQL in PostgreSQL

2013-01-07 Thread 戴松晚
I have created a user(user1), and with this user I created a db1 and some tables, some functions in it.Now I want to create another user(user2), and I want the two users can access everything in the database db1,like GRANT ALL ON DB1 TO 'USER'@'%' ... in MYSQL.For example:1, The two users can

Re: [ADMIN] Possible database corruption

2013-01-07 Thread Craig Ringer
On 01/08/2013 05:22 AM, Benjamin Krajmalnik wrote: I have a situation where pg_xlog started growing until it filled up the disk drive. This should not ever cause corruption. If it has, there's a bug at work. A crash is reasonable (albeit undesirable; it'd be better to just report errors on

Re: [ADMIN] Possible database corruption

2013-01-07 Thread Benjamin Krajmalnik
Thanks for the reply - I posted an update that I had resolved the issue. When the partition with the WAL files filled up due to the missing fsm file (I wonder what caused that), the db panicked. After moving all 43GB of WAL files to a different partition, database came into recovery mode, and