Re: [GENERAL] Best practice on inherited tables

2013-05-19 Thread Frank Lanitz
Am 17.05.2013 21:21, schrieb Alfonso Afonso: > Hi Frank > > Although you are thinking in OOP, the SQL is itself one definition > model that you should not ignore and, IMHO, try to follow the > normalization statements. > > You can build a robust and normalized schema (table primarylocation , > ta

[GENERAL] Best practice on inherited tables

2013-05-17 Thread Frank Lanitz
Hi folkes, I'm looking for a nice way to build this scenario: I've got a lot of locations with some special types. For example I've got workplaces, places like real laboratories and virtual places like maybe parcel service. For each of the different types I need to store some common attributes as

Re: [GENERAL] Update

2013-04-11 Thread Frank Lanitz
Am 11.04.2013 10:29, schrieb jpui: > Hi, > I'm running a server using postgres 8.3 and i was adviced to update it... > what i have to do in order to update it and don't stop the service? 8.3 is out of support so you will need to at a very minimum 8.4. This cannot be done without restarting. Plea

[GENERAL] HwTo Foreign tables anybody?

2013-03-08 Thread Frank Lanitz
Hi folks, I'm looking for a HowTo of Foreign Tables feature. We are thinking of connecting two postgres databases via this way and I wanted to try before I do say yes or no ;) However, I didn't find any good HowTo on via §search_engine. Cheers, Frank -- Sent via pgsql-general mailing list (pgs

[GENERAL] How to store version number of database layout

2013-02-12 Thread Frank Lanitz
Hi folks, It's more like a question of best practice: How do you managing different version of database layout for e.g. software releases? We are planing to do an application based on postgres and want to store some version number of database layout to ensure correct upgrade-scripts can be applied

Re: [GENERAL] PG under OpenVZ?

2012-11-21 Thread Frank Lanitz
Am 2012-11-13 14:53, schrieb François Beausoleil: Hi! I've found an old thread on OpenVZ: (2008): http://archives.postgresql.org/pgsql-performance/2008-03/msg00076.php And a more recent question that scared me a bit: (2011): http://serverfault.com/questions/281783/running-mongodb-with-open

Re: [GENERAL] Too much clients connected to the PostgreSQL Database

2012-10-30 Thread Frank Lanitz
Am 30.10.2012 02:06, schrieb rodr...@paripassu.com.br: > BTW, 200 seems alwfully high unless a *really* high end machine. Â You >> may have fewer timeouts if you avoid swamping the server with a >> "thundering herd" of requests. I was maintaining a setup which had > 1000 connections on a not very

Re: [GENERAL] Help estimating database and WAL size

2012-10-19 Thread Frank Lanitz
Am 2012-10-15 23:13, schrieb John R Pierce: On 10/15/12 2:03 PM, Daniel Serodio (lists) wrote: John R Pierce wrote: On 10/08/12 1:39 PM, Daniel Serodio (lists) wrote: 3) Estimate the size of the transaction log ** We've got no idea how to estimate this, need advice ** postgres doesn't ha

Re: [GENERAL] PostgreSQL force create table / ignore constraints?

2012-10-03 Thread Frank Lanitz
erate the scripts themselves. What about using pg_dump --schema-only when creating the files? (Or are you talking about icremental changes?) Cheers, Frank -- Frank Lanitz pgpJnRr67CUNQ.pgp Description: PGP signature

Re: [GENERAL] Odd query result

2012-08-27 Thread Frank Lanitz
kunde | > bezeichnung > +--+ > 166300 | t| Microsoft Deutschland GmbH > (1 row) > > > What might be up there? How is f_firmen_isKunde() defined? Cheers, Frank -- Frank Lanitz pgp1GbDwLQBZT.pgp Description: PGP signature

Re: [GENERAL] Result from Having count

2012-08-23 Thread Frank Lanitz
Am 23.08.2012 10:45, schrieb Condor: > On , Frank Lanitz wrote: >> Am 23.08.2012 09:52, schrieb Condor: >>> Hello ppl, >>> >>> I try to make query and see how many ids have more then one row. >>> >>> few records is: >>> >>>

Re: [GENERAL] Result from Having count

2012-08-23 Thread Frank Lanitz
Am 23.08.2012 09:52, schrieb Condor: > Hello ppl, > > I try to make query and see how many ids have more then one row. > > few records is: > > ids | val | some > a | 1 | x > a | 1 | v > b | 1 | x > b | 2 | c > > > I focus on ids and val with: > > SELECT ids, val FROM table WHE

Re: [GENERAL] Best practice non privilege postgres-user

2012-08-20 Thread Frank Lanitz
es) and do what I need to do, then revert back to > my regular user. It's not only about the things that can be done from within psql. At least originally. Some of our currently workflows are basing on real shell access. Cheers, Frank -- Frank Lanitz pgpBsGObDQVNO.pgp Description: PGP signature

[GENERAL] Best practice non privilege postgres-user

2012-08-17 Thread Frank Lanitz
Hi folks, I'm looking for some kind of best practice for a non-privilege postgres user. As not all operations can be done within psql you might need access to postgres- on command line from time to time. Currently this is done via root-privvileges and »su - postgres« directly on database server -

Re: [GENERAL] How to don't update sequence on rollback of a transaction

2012-08-03 Thread Frank Lanitz
Am 02.08.2012 17:15, schrieb Andrew Hastie: > Hi Frank, > > I believe this is by design. See the bottom of the documentation on > sequences where it states ;- > > "*Important:* To avoid blocking concurrent transactions that obtain > numbers from the same sequence, a |nextval| operation is never r

Re: [GENERAL] How to don't update sequence on rollback of a transaction

2012-08-03 Thread Frank Lanitz
Hi, Thanks very much for the detailed answer. I totally missed the issue with concurrent transactions. Am 03.08.2012 02:00, schrieb Craig Ringer: > It's interesting that you read the documentation and still got bitten by > this. I'll have to think about writing a patch to add some > cross-refere

[GENERAL] How to don't update sequence on rollback of a transaction

2012-08-02 Thread Frank Lanitz
Hi folks, I did a test with transactions and wondered about an behavior I didn't expected. At http://pastebin.geany.org/bYQNo/raw/ I posted a complete backlog for. To make it short: I created a table with a serial and started a transactions. After this I was inserting values into the table but di

Re: [GENERAL] pg_database_size differs from df -s

2012-06-06 Thread Frank Lanitz
On Wed, 6 Jun 2012 20:31:36 +0200 Alban Hertroys wrote: > On 6 Jun 2012, at 16:33, Frank Lanitz wrote: > > > the result is much bigger than running a df -s over the postgres > > folder > > - Its about factor 5 to 10 depending on database. > > > Is your du repo

Re: [GENERAL] pg_database_size differs from df -s

2012-06-06 Thread Frank Lanitz
Am 06.06.2012 17:49, schrieb Tom Lane: > Frank Lanitz writes: >> I've got an issue I'm not sure I might have a misunderstanding. When >> calling > >> select sum(pg_database_size(datid)) as total_size from pg_stat_database > >> the result is much bi

[GENERAL] pg_database_size differs from df -s

2012-06-06 Thread Frank Lanitz
Hi folks, I've got an issue I'm not sure I might have a misunderstanding. When calling select sum(pg_database_size(datid)) as total_size from pg_stat_database the result is much bigger than running a df -s over the postgres folder - Its about factor 5 to 10 depending on database. My understandi

Re: [GENERAL] Variables inside plpythonu

2012-05-12 Thread Frank Lanitz
ot;]) date_rs = plpy.execute(date_plan,[some_date]) > plpy.notice(date_rs[0]["id_fld"]) > $Body$ > language plpythonu; Yes. Gave me the missing piece. Thanks a lot! Cheers, Frank -- Frank Lanitz pgpKZuZqB0PRy.pgp Description: PGP signature

Re: [GENERAL] Lock out PostgreSQL users for maintenance

2012-05-11 Thread Frank Lanitz
ing ;) Cheers, Frank -- Frank Lanitz pgpKHQ4kaTSLV.pgp Description: PGP signature

[GENERAL] Variables inside plpythonu

2012-05-11 Thread Frank Lanitz
ython code should look similar to plan = plpy.prepare("SELECT id FROM some_table WHERE date= return = plpy.execure(plan) But somehow a last piece is missing. Can anybody help? Cheers, Frank -- Frank Lanitz pgprKWy6SHnPI.pgp Description: PGP signature

[GENERAL] Is it possible to call other functions inside plpythonu?

2012-04-27 Thread Frank Lanitz
Hi folks, Just looking for a nice server side solution to implement some fundamental logic for an application. plpythonu looks in this tmers very well as I'm liking the syntax of Python. However, an very old blog post at [1] made me unsure whether really to use it. Is it still (or has it ever been

Re: [GENERAL] configuring RAID10 for data in Amazon EC2 cloud?

2012-03-27 Thread Frank Lanitz
an amazon > linux instance, 10 volumes (8G each), (WAL on a separate EBS volume) > with the following setup: > You might want to check with Amazon here. Cheers, Frank -- Frank Lanitz pgpmHnneAclhe.pgp Description: PGP signature

[GENERAL] Values inside rolvaliduntil of pg_authid

2012-03-26 Thread Frank Lanitz
Hi folks, I'm currently doing some checks for users. During this I've found inside pg_authid.rolvaliduntil a couple of values I wasn't able to figure out via documentation, whether they are valid Maybe you can help me out helping whether these are valid dates and what is postgres interpreting

Re: [GENERAL] PostgreSQL 64 Bit XIDs - Transaction IDs

2012-03-23 Thread Frank Lanitz
Am 23.03.2012 14:23, schrieb Adrian Klaver: > I would say either they got the numbers wrong or someone is pulling > your leg. That rate is not going to happen. Maybe twitter or facebook all in all... Cheers, Frank -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make ch

Re: [GENERAL] PostgreSQL 64 Bit XIDs - Transaction IDs

2012-03-23 Thread Frank Lanitz
Am 23.03.2012 06:45, schrieb Gerhard Wiesinger: > With a database admin of a commercial database system I've discussed > that they have to provide and they also achieve 2^31 transactions per > SECOND! Just corious: What is causing this many transactions? Cheers, Frank -- Sent via pgsql-general

Re: [GENERAL] Large PostgreSQL servers

2012-03-21 Thread Frank Lanitz
- Number of CPUs > - Memory on the server > - shared_buffers > - Size of the database on disk I guess this is extremely depending on how big you database is ... Cheers, Frank -- Frank Lanitz pgpwUPnXlZqUS.pgp Description: PGP signature

Re: [GENERAL] POSTGRESQL Newbie

2012-03-21 Thread Frank Lanitz
Am 21.03.2012 12:35, schrieb Marti Raudsepp: > On Wed, Mar 21, 2012 at 11:10, Vincent Veyron wrote: >> However, I once read that the real reason is that mysql was available >> when ISPs came of existence, circa 1995. It lacked important features of >> an RDBMS (you can google the details), but it

Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-03 Thread Frank Lanitz
Am 02.01.2012 20:13, schrieb Hagen Finley: > I am using psql (8.2.15) and I would like to input German characters > (e.g. ä,ß,ö) into char fields I have in a database I see that you are using Outlook which leads me to assume you are running Windows as host for your transaction. Therefor you might

Re: [GENERAL]

2011-12-10 Thread Frank Lanitz
ently - links without any > commentary or explanation. Take it as spam and don't rethink about. Cheers, Frank -- Frank Lanitz pgpcfuux8tyNM.pgp Description: PGP signature

Re: [GENERAL] How to configure the connection timeout in PostgreSQL 8.3

2011-12-09 Thread Frank Lanitz
Am 09.12.2011 16:02, schrieb Andre Lopes: > I'm using PostgreSQL 8.3 and I need to reduce the timeout. How can I > configure the connection timeout? Which connection timeout you like to change? Most likely this should be an option you can change on your client. Cheers, Frank -- Sent via pgsql-

Re: [GENERAL] pg_standby: How to check in which state the server is currently?

2011-12-06 Thread Frank Lanitz
Am 05.12.2011 17:02, schrieb Cédric Villemain: > Le 5 décembre 2011 12:16, Frank Lanitz a écrit : >> Hi list, >> >> We had in past from time to time the issue, that the standby server is >> stopping recovering, creating a new timeline and become up and running. >

[GENERAL] pg_standby: How to check in which state the server is currently?

2011-12-05 Thread Frank Lanitz
Hi list, We had in past from time to time the issue, that the standby server is stopping recovering, creating a new timeline and become up and running. In parallel to check for the reasons of this behavior we are looking for a clean way to check whether warm standby database is still in recovering

Re: [GENERAL] CPU move

2011-11-27 Thread Frank Lanitz
Am 26.11.2011 19:18, schrieb Carlos Henrique Reimer: > Hi, > > We're planning to move our postgreSQL database from one CPU box to > another box. > > I'm considering an alternative procedure for the move as the standard > one (pg_dump from the old, copy dump to the new box, psql to restore in > th

Re: [GENERAL] Postgres 8.4: archive_timeout vs. checkpoint_timeout

2011-10-10 Thread Frank Lanitz
Hi, Thanks for your response. Am 07.10.2011 22:05, schrieb Derrick Rice: > On Thu, Oct 6, 2011 at 3:47 AM, Frank Lanitz <mailto:fr...@frank.uvena.de>> wrote: > > Hi folks, > > I want to refer to a question Rob did back in 2008 at > http://archives.p

[GENERAL] Standby server witching into master role after import failure

2011-10-07 Thread Frank Lanitz
Hi folks, I've got an issue I'm currently investigating and I'm not 100 sure about the root cause. The setup is pretty easy: A standby server via PITR is importing WAL-files from master server. During this import it appears there has been an error which cause the standby to finish the importing an

[GENERAL] Postgres 8.4: archive_timeout vs. checkpoint_timeout

2011-10-06 Thread Frank Lanitz
Hi folks, I want to refer to a question Rob did back in 2008 at http://archives.postgresql.org/pgsql-general/2008-07/msg01167.php as we are currently running into a similar question: We are using warm standby via PITR using a shared drive between master and slave node. Our setup currently is set

Re: [GENERAL] Implementing "thick"/"fat" databases

2011-07-25 Thread Frank Lanitz
Am 25.07.2011 10:24, schrieb Sim Zacks: On 07/25/2011 11:06 AM, Frank Lanitz wrote: Am 22.07.2011 21:15, schrieb Karl Nack: to move as much business/transactional logic as possible into the database, so that client applications become little more than moving data into and out of the database

Re: [GENERAL] Implementing "thick"/"fat" databases

2011-07-25 Thread Frank Lanitz
Am 25.07.2011 10:12, schrieb Pavel Stehule: 2011/7/25 Frank Lanitz: Am 22.07.2011 21:15, schrieb Karl Nack: to move as much business/transactional logic as possible into the database, so that client applications become little more than moving data into and out of the database using a well

Re: [GENERAL] Implementing "thick"/"fat" databases

2011-07-25 Thread Frank Lanitz
Am 22.07.2011 21:15, schrieb Karl Nack: to move as much business/transactional logic as possible into the database, so that client applications become little more than moving data into and out of the database using a well-defined API, most commonly (but not necessarily) through the use of stored