[GENERAL] trouble with to_char('L')

2009-04-20 Thread Mikko
rows. The query works ok without the 'L'. Thanks in advance, Mikko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] trouble with to_char('L')

2009-04-21 Thread Mikko
rror can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding". If connected to postgres database the query returns 3,14. Mikko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chan

Re: [GENERAL] trouble with to_char('L')

2009-04-21 Thread Mikko
b with --locale fi_FI.UTF8 at the very start? The to_char('L') works fine with a database with win1252 encoding. Mikko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] trouble with to_char('L')

2009-04-22 Thread Mikko
ack to 1252. http://msdn.microsoft.com/en-us/library/x99tb11d.aspx I guess I'll have to manage with win1252 encoded dbs for the moment. Thanks for the answers! Mikko -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://ww

Re: [GENERAL] data partitions across different nodes

2007-06-25 Thread Mikko Partio
On 6/26/07, 金星星 <[EMAIL PROTECTED]> wrote: Are there any solutions based on PostgreSQL that can support distributing partitions (horizontal fragmentations) across different nodes. It doesn't need to support distributed transaction, since data inconsistent is not a critical problem in my situatio

Re: [GENERAL] tables are not listable by \dt

2007-07-02 Thread Mikko Partio
On 7/2/07, Rajarshi Guha <[EMAIL PROTECTED]> wrote: Hi, we recently upgraded our Postgres instllation from 7.4 to 8.2 by doing a dump and restore. Howveer after logging into the database (as a user that is not the superuser) and doing \dt I get the error: No relations found Are you using th

[GENERAL] Unexpected crash

2007-07-18 Thread Mikko Partio
Hello all, I installed the latest version from rpms and everythings ok, except when I connect to a db with psql and press shift+return the backend crashes with "Segmentation fault"! I guess the problem is with my installation but I don't know how to debug. It's not a very disconcerning thing per

Re: [GENERAL] Unexpected crash

2007-07-18 Thread Mikko Partio
On 7/19/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Mikko Partio" <[EMAIL PROTECTED]> writes: > I installed the latest version from rpms and everythings ok, except when I > connect to a db with psql and press shift+return the backend crashes with > "Segmenta

Re: [GENERAL] Unexpected crash

2007-07-18 Thread Mikko Partio
On 7/19/07, Richard Huxton <[EMAIL PROTECTED]> wrote: Mikko Partio wrote: OK. This is RH Enterprise Server, then? Yes. cat /etc/issue Red Hat Enterprise Linux ES release 3 (Taroon Update 8) Kernel \r on an \m Is there a server log-line saying you have a sig-11 crash? No that

Re: [GENERAL] Moving to postgresql and some ignorant questions

2007-08-14 Thread Mikko Partio
On 8/14/07, Bill Moran <[EMAIL PROTECTED]> wrote: > > But the rule is, if any query within the transaction errors, then all > queries > within the transaction are rolled back. This is the default behaviour, but with psql and ON_ERROR_ROLLBACK parameter the behaviour can be changed. See http://w

[GENERAL] PostgreSQL clustering (shared disk)

2007-08-15 Thread Mikko Partio
Hello list, I have a mission to implement a two-node active-passive PostgreSQL cluster. The databases at the cluster are rather large (hundreds of GB's) which opts me to consider a shared disk environment. I know this is not natively supported with PostgreSQL, but I have been investigating the Red

Re: [GENERAL] PostgreSQL clustering (shared disk)

2007-08-17 Thread Mikko Partio
On 8/16/07, Douglas McNaught <[EMAIL PROTECTED]> wrote: > > Devrim GÜNDÜZ <[EMAIL PROTECTED]> writes: > > >> What I'm pondering here is that is the cluster able to keep the > >> postmasters synchronized at all times so that the database won't get > >> corrupted. > > > > Keep all the $PGDATA in the

Re: [GENERAL] PostgreSQL clustering (shared disk)

2007-08-17 Thread Mikko Partio
On 8/17/07, Hannes Dorbath <[EMAIL PROTECTED]> wrote: > > On 17.08.2007 11:12, Mikko Partio wrote: > > Maybe I'm just better off using the more simple (crude?) method of drbd > + > > heartbeat? > > Crude? Use what you like to use, but you should keep one

Re: [GENERAL] "out of memory" error

2007-08-24 Thread Mikko Partio
On 8/23/07, Martijn van Oosterhout <[EMAIL PROTECTED]> wrote: > > > You've got it completely wrong. By setting shared_buffers to 2GB it > means no-one can use it. It's not postgres that's running out of > memory, it's the rest of your system. Set it to something sane like > 128MB or maybe smaller.

Re: [GENERAL] Symlinking (specific) tables to different Drives

2007-09-03 Thread Mikko Partio
On 9/4/07, Ow Mun Heng <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm running out of space on one of my partitions and I still have not > gotten all the data loaded yet. I've read that one could symlink the > pg_pg_xlog directory to another drive. I'm wondering if I can do the > same for specific table

Re: [GENERAL] Symlinking (specific) tables to different Drives

2007-09-03 Thread Mikko Partio
On 9/4/07, Ow Mun Heng <[EMAIL PROTECTED]> wrote: > > On Tue, 2007-09-04 at 07:09 +0300, Mikko Partio wrote: > > > > > > On 9/4/07, Ow Mun Heng <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I'm running out of spa

Re: [GENERAL] Problem dropping table

2007-09-18 Thread Mikko Partio
On 9/18/07, Ken Logan <[EMAIL PROTECTED]> wrote: > > > On Tue, 2007-09-18 at 11:10 -0700, Alan Hodgson wrote: > > On Tuesday 18 September 2007 10:30, Ken Logan <[EMAIL PROTECTED]> wrote:> > When we try to drop the table we get the error:> ERROR: "member_pkey" is an > index > You have to remove t

Re: [GENERAL] multiple row insertion

2007-10-04 Thread Mikko Partio
On 10/4/07, test tester <[EMAIL PROTECTED]> wrote: > > In MySQL, I can insert multiple rows like this: > > > insert into cars values(5, "toyota"),(5,"ford"), etc. > > > How can I do something similiar in PostgreSQL? > > Exactly the same way. Make sure though that your pgsql is new enough version (8

Re: [GENERAL] Automating Backup & Restor

2007-10-24 Thread Mikko Partio
On 10/24/07, smiley2211 <[EMAIL PROTECTED]> wrote: > > > Hello all, > > Does someone have a script that backups a database from one server and > restores it to another server??? I am NEW to Postgresql so I am starting > from scratch... > > so, in essence - what I want to do is (I CURRENTLY DO THI

Re: [GENERAL] Populating large DB from Perl script

2007-11-02 Thread Mikko Partio
On Nov 2, 2007 8:45 PM, Kynn Jones <[EMAIL PROTECTED]> wrote: > PS: As an aside to the list, as a programmer, when I'm starting out in > language, I learn more than I can say from reading source code written > by the experts, but for some reason I have had a hard time coming > across expertly writ

[GENERAL] rpm's for 8.3 beta 4

2007-12-03 Thread Mikko Partio
Hello is there going to be an rpm release of beta 4 (for RHEL 5)? It seems that beta 2 did have red hat rpms but beta 3 did not. Regards Mikko

[GENERAL] SPI-functions and transaction control

2008-02-17 Thread Mikko Partio
ning since I really don't have that much experience in c :) Regards Mikko

Re: [GENERAL] SPI-functions and transaction control

2008-02-20 Thread Mikko Partio
On Feb 19, 2008 12:12 AM, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Mikko Partio escribió: > > > Now, I was wondering if a c function would be faster, and with the help > of > > the manual I have written a function that can insert tuples from one > table > &

[GENERAL] "too many trigger records found for relation xyz"

2008-04-08 Thread Mikko Partio
base had a bunch of autovacuum runs and an import process copying data to temporary tables at the time I tried to create the tables. What could cause such behaviour, and how can I remove the one remaining table? Regards Mikko

Re: [GENERAL] "too many trigger records found for relation xyz"

2008-04-08 Thread Mikko Partio
On Tue, Apr 8, 2008 at 12:20 PM, Mikko Partio <[EMAIL PROTECTED]> wrote: > > > On Tue, Apr 8, 2008 at 11:27 AM, Zdenek Kotala <[EMAIL PROTECTED]> > wrote: > > > > > > > Mikko Partio napsal(a): > > > > > Hello all > > > > >

Re: [GENERAL] "too many trigger records found for relation xyz"

2008-04-08 Thread Mikko Partio
On Tue, Apr 8, 2008 at 1:19 PM, Zdenek Kotala <[EMAIL PROTECTED]> wrote: > Mikko Partio napsal(a): > > > > > > > I little investigation showed that there is duplicate row in pg_class: > > > > # select oid from pg_class group by oid having count(*) >

Re: [GENERAL] "too many trigger records found for relation xyz"

2008-04-08 Thread Mikko Partio
On Tue, Apr 8, 2008 at 1:45 PM, Zdenek Kotala <[EMAIL PROTECTED]> wrote: > Mikko Partio napsal(a): > > Should I try remove one of the duplicate rows from pg_class? > > > > Try it with caution. You should use ctid column to refer to exact row. > > Try before:

Re: [GENERAL] "too many trigger records found for relation xyz"

2008-04-08 Thread Mikko Partio
On Tue, Apr 8, 2008 at 11:27 AM, Zdenek Kotala <[EMAIL PROTECTED]> wrote: > > > Mikko Partio napsal(a): > > > Hello all > > > > Postgres version 8.3.1 > > > > I just created a bunch of tables (~10) with identical structure; all > > tables &

Re: [GENERAL] "too many trigger records found for relation xyz"

2008-04-08 Thread Mikko Partio
On Tue, Apr 8, 2008 at 2:49 PM, Zdenek Kotala <[EMAIL PROTECTED]> wrote: > Mikko Partio napsal(a): > > On Tue, Apr 8, 2008 at 1:45 PM, Zdenek Kotala <[EMAIL PROTECTED]> > > wrote: > > > > Mikko Partio napsal(a): > > > > > > Should I try

Re: [GENERAL] "too many trigger records found for relation xyz"

2008-04-08 Thread Mikko Partio
On Tue, Apr 8, 2008 at 1:45 PM, Zdenek Kotala <[EMAIL PROTECTED]> wrote: > Mikko Partio napsal(a): > > Should I try remove one of the duplicate rows from pg_class? > > > > Try it with caution. You should use ctid column to refer to exact row. > > Ok I rem

Re: [GENERAL] "too many trigger records found for relation xyz"

2008-04-08 Thread Mikko Partio
On Tue, Apr 8, 2008 at 5:26 PM, Mikko Partio <[EMAIL PROTECTED]> wrote: > > Ok I removed the faulty tuple and nothing catastrophical happened. I can > do a pg_dump now, but I still can't remove the one remaining table: > > # drop table xyz ; > ERROR: too many trigg

Re: [GENERAL] "too many trigger records found for relation xyz"

2008-04-08 Thread Mikko Partio
On Tue, Apr 8, 2008 at 6:38 PM, Zdenek Kotala <[EMAIL PROTECTED]> wrote: > Mikko Partio napsal(a): > > On Tue, Apr 8, 2008 at 5:26 PM, Mikko Partio <[EMAIL PROTECTED]> wrote: > > > > Ok I removed the faulty tuple and nothing catastrophical happened. I > &

Re: [GENERAL] "too many trigger records found for relation xyz"

2008-04-08 Thread Mikko Partio
On Tue, Apr 8, 2008 at 9:30 PM, Tom Lane <[EMAIL PROTECTED]> wrote: > "Mikko Partio" <[EMAIL PROTECTED]> writes: > > On Tue, Apr 8, 2008 at 6:38 PM, Zdenek Kotala <[EMAIL PROTECTED]> > wrote: > >> It is really strange. It would be nice to hav

Re: [GENERAL] backup-strategies for large databases

2011-08-14 Thread Mikko Partio
ight_ be. We have restored this database more than once, and each time it got fully restored surprisingly quick (a matter of hours). Of course if you have a 24/7 database this might not be acceptable, but then again if that's the case you should have a standby ready anyways. Regards Mikko

Re: [GENERAL] Incrementally Updated Backups

2010-09-13 Thread Mikko Partio
n. Is there a way to get this without using hot > > standby? > > That section has been removed from the current 9.0 docs because we are > unsure it works. Is the feature (or the documentation) still being worked on, or is pg_dump the only way to take a backup of a warm standby while the database is running? Regards Mikko

Re: [GENERAL] Incrementally Updated Backups

2010-09-13 Thread Mikko Partio
I got confused with the terms. What I meant was 'hot standby', the new feature implemented in 9.0. I guess you can take a pg_dump out of a hot standby, right? Regards Mikko

Re: [GENERAL] two or more pg installations running as the same user

2008-11-25 Thread Mikko Partio
ections, to different databases. > I know I can do it under same user, just by changing PGDATA/PGPORT before > initdb gets to run. But will it be safe otherwise ? > You know you don't need separate clusters (ie. installations) to have multiple databases? Regards Mikko

Re: [GENERAL] Postgres Clustering Options

2009-11-11 Thread Mikko Partio
ot mature enough and it seems every release contains new critical bugs, and sometimes even mission-critical components such as quorum disk do not work after an upgrade. Regards Mikko

Re: [GENERAL] Postgres Clustering Options

2009-11-12 Thread Mikko Partio
ld be able to retry in the case of losing a > connection to > the DB vs failing and crashing the app. > Since the system is active/passive, a failover *will* disconnect all sessions. We have coded our applications so that if they lose connection to the database, they will automatically try to reconnect. Regards Mikko

Re: [GENERAL] connecting using libpq breaks printf

2009-02-18 Thread Mikko Partio
*conn; > fprintf(stderr, "connecting\n"); > conn = PQconnectdb("dbname=postgres"); > PQfinish(conn); > return 0; > } > Works fine with linux + gcc. Must be something in your environment. Regards Mikko

Re: [GENERAL] Simple stored procedure examples?

2006-11-04 Thread Mikko Partio
> novnov wrote: Thanks to both of you for responding. I should have included the code for my own attempt, at #1 which is just as you suggest: update item set itemname = 'fox'; I've tried single, and double quoting the table and field names; call caps to the UPDATE etc, exactly matching the cap

Re: [GENERAL] CONNECT privilege

2006-11-26 Thread Mikko Partio
Joris Dobbelsteen wrote: When using pgAdmin-III it does not display the granted CONNECT priviledge. Also when doing GRANT CONNECT FOR DATABASE TO it succeeds, but I fail to observe its effects: i.e. users are not allowed to a database. Have you modified pg_hba.conf to allow the new use

Re: [GENERAL] Client connection: Port 5432 / Postgres

2007-02-08 Thread Mikko Partio
Nicolas Gignac wrote: I have installed Postgres 8.2 on a internal server having Windows Server 2003 (IIS 6) up and running. - I have configure the hp_config file to: host all 0.0.0.0./0md5 ^

Re: [GENERAL] Cast record as text

2007-02-14 Thread Mikko Partio
> Why do you want to reinvent the wheel? > > http://pgfoundry.org/projects/tablelog/ > > > But it use a separate log-table per table. > > > Andreas My original idea was to log changes from different tables to one audit table, and I think tablelog uses separate audit tables for each monitored table

Re: [GENERAL] Cast record as text

2007-02-17 Thread Mikko Partio
A. Kretschmer wrote: My original idea was to log changes from different tables to one audit table, and I think tablelog uses separate audit tables for each monitored table? Yes, but with tablelog it is possible to restore any changes, you can restore a table. A blog-entry from Andreas Sch

Re: [GENERAL] Cast record as text SOLVED

2007-02-17 Thread Mikko Partio
Mikko Partio wrote: I agree that the ability to restore changes is quite nice, but my primary goal is to record changes from many tables into one table, and I think tablelog does not offer that. Do you know any way of casting a record to text, or perhaps a different way altogether to audit

Re: [GENERAL] PG Dump 8.2

2007-03-02 Thread Mikko Partio
Laurent ROCHE wrote: Hi, Does anyone know if Ubuntu 6.10 (LTS) has packages for PostgreSQL 8.2, from a recommandable place ? I can not recommend my clients to use 8.2 if there's nobody supporting the packages (so just compiling from the source code is not an option). They are right at t

Re: [GENERAL] PG Dump 8.2

2007-03-03 Thread Mikko Partio
Joshua D. Drake wrote: Mikko Partio wrote: Laurent ROCHE wrote: Hi, Does anyone know if Ubuntu 6.10 (LTS) has packages for PostgreSQL 8.2, from a recommandable place ? I can not recommend my clients to use 8.2 if there's nobody supporting the packages (so just compiling fro

Re: [GENERAL] Anyone know where I can get an 8.2.3 binary for ubuntu?

2007-03-31 Thread Mikko Partio
> Subject says it all. Doing a source compile under Debian or > Debian-like condition is not an option for the end user. They need > an apt-get (the ubuntu equivalent to rpm AFAICT) version. > > Unfortunately, the latest I can find is 8.1.8 > Where's 8.2.3? > What ubuntu version do you have? I

[GENERAL]

2007-04-16 Thread Mikko Partio
Nico Sabbi wrote: > > > but "cp /tmp/pg//00010021 pg_xlog/RECOVERYXLOG" looks suspicious to me. > Works for me [clip from process listing]: postgres 12864 12863 0 18:36 ?00:00:00 cp /wal/000100E10035 pg_xlog/RECOVERYXLOG I think RECOVERYXLOG should be ove

Re: [GENERAL] Permission denied to create database

2007-05-04 Thread Mikko Partio
> > $ sudo -u postgres psql -c "grant all on tablespace pg_default to joe" > Password: > GRANT > > $ createdb -U joe joejunkdb > createdb: database creation failed: ERROR: permission denied to create > database > How about ALTER ROLE joe CREATEDB Regards MP ---(end of