Re: [GENERAL] Drastic select count performance hit when jsonb GIN indices are present

2014-12-26 Thread Anton Melser
Hi Maxim, Thanks for the suggestions. Unfortunately, it does appear to be an IO issue but not one I can get around (on my laptop at least!). Postgres seems to refuse to put any of the index or table in shared buffers at all. For some reason, there seems to be a very great increase in space require

[GENERAL] Drastic select count performance hit when jsonb GIN indices are present

2014-12-26 Thread Anton Melser
Hi, I've been playing with jsonb for storing and querying data from the Mailgun Events API (http://documentation.mailgun.com/api-events.html#examples). I already have a system that parses the JSON to csv and loads into standard tables but what better way to spend the holidays than nerding out on n

[GENERAL] Script to export all privileges to csv or similar

2008-08-22 Thread Anton Melser
Hi, Does anyone know of a script/tool that allows one to export all users with all privileges? I realise I could construct a query to do it but google turned up nothing and if someone else has done the good work... Cheers Anton -- echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq' | dc T

[GENERAL] move database from the default tablespace to a new one?

2008-05-16 Thread Anton Melser
Hi all, Is this possible? I have a db that has been living in the default tablespace, and I am trying to separate out the transaction logs (and log archiving) and the data. It seems that tablespaces are the way to go... but the database exists and I need to separate them out. Any pointers? Cheers A

Re: [GENERAL] recommended way of separating data from indexes

2008-05-16 Thread Anton Melser
Hi, >> I have a 6 disk (x146GB) system running Centos 5.1 - RAID 1 (2 disks) >> and RAID 1+0 (4 disks). This seemed to be the recommended way of doing >> it but I may have been looking in the wrong place. The system is >> replicated using log shipping, so we have the archive command >> activated.

[GENERAL] recommended way of separating data from indexes

2008-05-16 Thread Anton Melser
Hi, I looked for quite a while but must have been looking in the wrong place... I have a 6 disk (x146GB) system running Centos 5.1 - RAID 1 (2 disks) and RAID 1+0 (4 disks). This seemed to be the recommended way of doing it but I may have been looking in the wrong place. The system is replicated us

Re: [GENERAL] database 1.2G, pg_dump 73M?!

2008-04-05 Thread Anton Melser
> I am still trying to figure out if the database was getting any > automatic vacuuming at all. The Postgres documentation (the database is > 8.2, though I'm moving to 8.3 soon) sounds as if it's on automatically, > but the Debian-specific documentation suggests I may need to do some > additi

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2008-03-25 Thread Anton Melser
On 25/03/2008, Tom Lane <[EMAIL PROTECTED]> wrote: > "Anton Melser" <[EMAIL PROTECTED]> writes: > > >> You'd have to do something like > >> DELETE FROM pg_operator WHERE oprcode = 'anytextcat'::regproc; > >> since there is

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2008-03-25 Thread Anton Melser
> You'd have to do something like > DELETE FROM pg_operator WHERE oprcode = 'anytextcat'::regproc; > since there isn't any higher-level command that will let you delete a > built-in operator. > > I recommend practicing on a scratch database ;-) Thanks for the tip, though alas that didn'

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2008-03-25 Thread Anton Melser
> > Anyway, maybe I spoke too soon :-(. > > > ERROR: operator is not unique: integer || unknown > > > I did, of course, not follow the instructions and just blinding > > applied them all, but from reading them it doesn't look like the issue > > here. Does this error mean there are too many oper

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2008-03-21 Thread Anton Melser
> > I have the suspicion that his mother is named Lois, his father is > > unknown and he has a sensitivity to Kryptonite. But that's just > > speculation of course... > > > > Alban Hertroys > > > Superman married Lois, I hope that isn't his Mom's name. I got that he was the *son* of Superman.

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2008-03-21 Thread Anton Melser
On 21/03/2008, Tom Lane <[EMAIL PROTECTED]> wrote: > "Anton Melser" <[EMAIL PROTECTED]> writes: > > ... But it is COMPLETELY out of the > > > question to redo the db abstraction layer, and without these implicit > > casts that is what will be need

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2008-03-21 Thread Anton Melser
> > - Is there a way to turn it back to the old behaviour with a > >warning going to the logs? > > > No. > > > > - Is there a way to get v8.2.x to warn on the dubious casts > >so we can tighten the application side while on v8.2? > > > Seems to me the easiest way would be to try it ou

Re: [GENERAL] shared_buffers and shmmax what are the max recommended values?

2008-03-07 Thread Anton Melser
That's crystal. Thanks for your advice! Cheers Anton On 07/03/2008, Greg Smith <[EMAIL PROTECTED]> wrote: > On Fri, 7 Mar 2008, Anton Melser wrote: > > > > There is actually quite a bit of write (at least the dump is increasing > > far more than what is being a

Re: [GENERAL] shared_buffers and shmmax what are the max recommended values?

2008-03-07 Thread Anton Melser
> With 6GB of RAM, after that you could merrily increase shared_buffers to > 20 or so and possibly increase performance. Just watch your > checkpoints--they'll have more activity as you increase the buffer size, > and from your description you've still got checkpoint_segments at the tiny >

[GENERAL] shared_buffers and shmmax what are the max recommended values?

2008-03-07 Thread Anton Melser
Hi all, We have a web app that is using a 32 bit 8.1.4 (I know but upgrading is not an option for another couple of months...) running on Suse 10. We just increased from 3GO to 6GO of RAM, and I increased the various memory related values... First info - the server ONLY does one pg db (that is its

Re: [GENERAL] URGENT: Whole DB down ("no space left on device")

2007-08-31 Thread Anton Melser
On 31/08/2007, Jeff Davis <[EMAIL PROTECTED]> wrote: > On Fri, 2007-08-31 at 22:34 +0800, Phoenix Kiula wrote: > > On 31/08/2007, Josh Tolley <[EMAIL PROTECTED]> wrote: > > > On 8/31/07, Zoltan Boszormenyi <[EMAIL PROTECTED]> wrote: > > > > Phoenix Kiula írta: > > > > > In addition to what others h

Re: [GENERAL] Postgres 8.2 binary for ubuntu 6.10?

2007-07-11 Thread Anton Melser
Just a word of advice... unless you plan to spend lots of time on your db (like you want to think about it more than twice a week sort of thing...), just go with what you have in terms of the distro. We are running 8.1.4. And it just works, yes, even after all this time! You are certainly behind a

Re: [GENERAL] should the postgres user have a password?

2007-06-07 Thread Anton Melser
Sorry .pgpass :-( Anton ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

[GENERAL] should the postgres user have a password?

2007-06-07 Thread Anton Melser
Hi, I have never given postgres a password before, but one of my clients put one on his postgres user - I suppose so he could use the postgres user from phppgadmin (not my choice !). But now I can't see how to get my backup scripts to work... can I put the password for tools like pg_dumpall (or ps

Re: [GENERAL] recommendations for reducing mem usage on local dev machine

2007-04-19 Thread Anton Melser
On 19/04/07, Andrej Ricnik-Bay <[EMAIL PROTECTED]> wrote: On 4/15/07, Anton Melser <[EMAIL PROTECTED]> wrote: > it might even make more sense), and with KDE/Gnome these days, I don't > think there is much difference with XP... Of course you could use fluxbox, twm or some

Re: [GENERAL] postgresql 8.1.4 to 8.2.3

2007-04-14 Thread Anton Melser
On 14/04/07, Alain Roger <[EMAIL PROTECTED]> wrote: After clicking on your link i got "invalid project" page :-( and the whole page is empty... Ouch Alain... Try http://pgfoundry.org/projects/pg-migrator/ :-) But ask a single postgres oldskool cat (which I am patently not!) and you will get exa

Re: [GENERAL] question

2007-04-14 Thread Anton Melser
On 13/04/07, Andrej Ricnik-Bay <[EMAIL PROTECTED]> wrote: On 4/13/07, Terry Martin <[EMAIL PROTECTED]> wrote: > I would like to know if I there is a utility to take a UDP packet which > has specific information in the payload and extract the information > from the packet and place it in the Postg

Re: [GENERAL] recommendations for reducing mem usage on local dev machine

2007-04-14 Thread Anton Melser
It's fairly likely that that report is misleading: most Unix versions of "top" report Postgres' shared memory as belonging to *each* backend, and I'll bet taskmanager is doing the same thing. You could reduce shared memory usage (cut shared_buffers in particular), which might make the reported us

Re: [GENERAL] recommendations for reducing mem usage on local dev machine

2007-04-14 Thread Anton Melser
On 14/04/07, Roman Neuhauser <[EMAIL PROTECTED]> wrote: # [EMAIL PROTECTED] / 2007-04-14 13:27:33 +0200: > Hi, > I am stuck for the moment with 1gig of ram on a win xp machine running > a 8.2.3 postgres. With the java website taking 300meg, how is it going to scale? It's not! The site is alrea

[GENERAL] recommendations for reducing mem usage on local dev machine

2007-04-14 Thread Anton Melser
Hi, I am stuck for the moment with 1gig of ram on a win xp machine running a 8.2.3 postgres. With the java website taking 300meg, eclipse taking 250meg+, firefox 150meg+, all of which are going to be nasty to reduce the mem usage of, I am looking at reducing postgres usage (the java website runs o

Re: [GENERAL] postgresl for mysql?

2007-04-01 Thread Anton Melser
OK, it got me for more than half a second... :-) And as you mention - not entirely ridiculous! Cheers Anton On 01/04/07, Tom Lane <[EMAIL PROTECTED]> wrote: Leonel <[EMAIL PROTECTED]> writes: > On 4/1/07, Anton Melser <[EMAIL PROTECTED]> wrote: >> What will

[GENERAL] postgresl for mysql?

2007-04-01 Thread Anton Melser
What will they think of next! http://krow.livejournal.com/502908.html I suppose it makes as much sense as the others, except why would you want to use mysql if the storage is in postgres? Cheers Anton ---(end of broadcast)--- TIP 3: Have you checked

Re: [GENERAL] "sniffing" postgres queries

2007-03-20 Thread Anton Melser
On 21/03/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Anton Melser" <[EMAIL PROTECTED]> writes: > I am having real trouble with a project that is a little out of my > league and I just can't find out how to find which table the app is > getting its values from

[GENERAL] "sniffing" postgres queries

2007-03-20 Thread Anton Melser
Hi, I am having real trouble with a project that is a little out of my league and I just can't find out how to find which table the app is getting its values from (it's a long story...). I know what values I am looking for, and would like to log everything (even if only for one call of a web page.

Re: [GENERAL] question about stored procedure / function

2007-03-11 Thread Anton Melser
On 11/03/07, Alain Roger <[EMAIL PROTECTED]> wrote: Hi, i created the following function : -- Function: immense.sp_a_001(username "varchar", pwd "varchar") -- DROP FUNCTION immense.sp_a_001(username "varchar", pwd "varchar"); CREATE OR REPLACE FUNCTION immense.sp_a_001(username "varchar", pwd "

Re: [GENERAL] Beginner's Questions

2007-03-10 Thread Anton Melser
On 3/10/07, Don Lavelle <[EMAIL PROTECTED]> wrote: > Hi, all, > > Thank you all for your help! From what I've gathered, similarly > sized projects run on 100 MB of disk space and a 450 MHz processor. > My GUI and application logic aren't going to need much more than > that, so I should be good to

Re: [GENERAL] pg temp tables

2007-03-07 Thread Anton Melser
On 06/03/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Anton Melser" <[EMAIL PROTECTED]> writes: > Thanks for your reply. I am managing a db that has some export scripts > that don't do a drop/create, but rather a delete from at the start of > the proc (6 or 7

Re: [GENERAL] pg temp tables

2007-03-05 Thread Anton Melser
On 06/03/07, Robert Treat <[EMAIL PROTECTED]> wrote: On Saturday 03 March 2007 10:33, Anton Melser wrote: > Hi, > I have been going around telling everyone that there is no point using > physical tables in postgres for temporary storage within a procedure. > Why bother botheri

[GENERAL] pg temp tables

2007-03-03 Thread Anton Melser
Hi, I have been going around telling everyone that there is no point using physical tables in postgres for temporary storage within a procedure. Why bother bothering the system with something which is only used in one procedure I said to myself... I have just learnt that with MS Sql Server, this i

Re: [GENERAL] stored procedure optimisation...

2007-02-27 Thread Anton Melser
RAISE NOTICE 'I am here, and myvar = % and thatvar = %', myvar, thatvar; Thanks... it is indeed a gem that little instruction!!! Cheers Anton ---(end of broadcast)--- TIP 6: explain analyze is your friend

[GENERAL] stored procedure optimisation...

2007-02-26 Thread Anton Melser
Hi, I need to analyse some html to get some links out, and with only 25 lines in exports_tmp_links (and text_to_parse no more than around 10KB) this function has taken 10 minutes and counting. Something horribly wrong is going on here! Can someone give me any pointers? Cheers Anton delete from tm

Re: [GENERAL] select all matches for a regular expression ?

2007-02-23 Thread Anton Melser
On 23/02/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Anton Melser" <[EMAIL PROTECTED]> writes: > I need to be able to get all the matches for a particular regexp from > a text field that I need to use in another query in a function. Is > this possible with plpgsql

Re: [GENERAL] greedy or not? regexps...

2007-02-23 Thread Anton Melser
Intellectually challenged Anton strikes again! I wanted +, not *. Sometimes I think I'm not cut out for IT! :-( Thanks heaps, Anton On 23/02/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Anton Melser" <[EMAIL PROTECTED]> writes: > I am trying to understand the fu

Re: [GENERAL] select all matches for a regular expression ?

2007-02-23 Thread Anton Melser
On 23/02/07, Peter Childs <[EMAIL PROTECTED]> wrote: On 23/02/07, Anton Melser <[EMAIL PROTECTED]> wrote: > Hi, > I need to be able to get all the matches for a particular regexp from > a text field that I need to use in another query in a function. Is > this possible wi

[GENERAL] select all matches for a regular expression ?

2007-02-23 Thread Anton Melser
Hi, I need to be able to get all the matches for a particular regexp from a text field that I need to use in another query in a function. Is this possible with plpgsql? Do I have to install the perl language? Cheers Anton ---(end of broadcast)--- TI

[GENERAL] greedy or not? regexps...

2007-02-23 Thread Anton Melser
Hi, I am trying to understand the function substring. Here: select SUBSTRING(cit1.summary, '=([0-9]*)') from cms_items cit1 where cit1.summary ~* '.*linkadministration.*[0-9]*'; gives me two empty strings and select SUBSTRING(cit1.summary, '=([0-9]{1,10})') from cms_items cit1 where cit1.summar

Re: [GENERAL] getting postgres to emulate mysql/sqlserver bit datatype

2007-02-13 Thread Anton Melser
On 13/02/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Anton Melser" <[EMAIL PROTECTED]> writes: > ERROR: operator is not unique: boolean = integer > I get this whether castcontext is 'a' or 'i'. If you make both cast directions the same priorit

Re: [GENERAL] getting postgres to emulate mysql/sqlserver bit datatype

2007-02-12 Thread Anton Melser
On 12/02/07, Anton Melser <[EMAIL PROTECTED]> wrote: > I think actually what he needs is what Peter suggested upthread, namely > to weaken the context-restriction on the int-to-bool cast. Indeed... Peter's suggestion seems to have solved all my problems. So even though it pr

Re: [GENERAL] getting postgres to emulate mysql/sqlserver bit datatype

2007-02-12 Thread Anton Melser
I think actually what he needs is what Peter suggested upthread, namely to weaken the context-restriction on the int-to-bool cast. Indeed... Peter's suggestion seems to have solved all my problems. So even though it probably shows just how embarrassingly bad my sql is... update pg_cast set cast

Re: [GENERAL] getting postgres to emulate mysql/sqlserver bit datatype

2007-02-12 Thread Anton Melser
On 12/02/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Joshua D. Drake" <[EMAIL PROTECTED]> writes: > Anton Melser wrote: >> Is there any way >> to force pg to accept 1 and 0 for boolean? > postgres=# insert into bool_test values(1::boolean); > INSERT 166

[GENERAL] getting postgres to emulate mysql/sqlserver bit datatype

2007-02-11 Thread Anton Melser
Hi, I am trying to port an app to postgres and have come up against a most annoying problem. The app works with both mysql and sqlserver, who both seem to have a bit datatype instead of a proper boolean like pg. Alas, pg won't accept 1 and 0 for boolean... and npgsql won't convert my numeric(1) in

Re: [GENERAL] drop table if exists mytable;

2007-02-10 Thread Anton Melser
> I need to do a "drop table if exists" type thing. I realise I can Install 8.2 or use this function, posted by David Fetter: Thanks for your answers... so this really was something that was missing (I think it a little rich to come out with a "are you using a version without this" when it has

[GENERAL] drop table if exists mytable;

2007-02-10 Thread Anton Melser
Hi, I need to do a "drop table if exists" type thing. I realise I can easily look in pg_tables, but for testing (if), don't I need to use a procedural language? In which case, I will need to install it if it doesn't exist - but I don't know how to test to see whether a language exists without usin

Re: [GENERAL] Questions about horizontal partitioning

2007-01-28 Thread Anton Melser
However, if the primary key is entirely within those six columns, there will have to be an index on it in both tables to enforce the primary key constraint. In that case, an inner join could be performed with an index lookup or an index scan plus hash join, for a query that didn't use any oth

Re: [GENERAL] Converting 7.x to 8.x

2007-01-27 Thread Anton Melser
On 26/01/07, Jim Nasby <[EMAIL PROTECTED]> wrote: On Jan 25, 2007, at 12:47 PM, Benjamin Smith wrote: > On Tuesday 23 January 2007 13:55, Carlos wrote: >> What would be the faster way to convert a 7.4.x database into an 8.x >> database? A dump of the database takes over 20 hours so we want >> to

[GENERAL] temp tables and function performance

2006-12-15 Thread Anton Melser
Hi, I am trying to move up in the world with my sql and need to do the following... I have a subscribers table and I need to export to csv (semi-colon separated) certain fields - that is fine, but I also need to export a multi-select field from another table as one string (0 to n values separated

Re: [GENERAL] n00b RAID + wal hot standby question

2006-12-05 Thread Anton Melser
Thanks all for your very insightful and helpful answers. I will be able to really spend some time thinking about how the db will evolve (and so whether it is worth thinking about a change) in a week or so and will be able to think more on your answers then. Cheers Antoine

[GENERAL] n00b RAID + wal hot standby question

2006-12-04 Thread Anton Melser
Hi, I am just starting at a company and we are inheriting a previously built solution. It looks pretty good but my previous experience with pg is seriously small-time compared with this... I am very new at the job, and don't know what hd config we have but it will be RAID-something I imagine (hey

Re: [GENERAL] 8.1.5 installation problem with initdb on WinXP Home

2006-12-02 Thread Anton Melser
Someone posted a solution to this in the last couple of days on this list. Have a good look... Cheers Antoine On 30/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi, I apologize for being yet another noob posting about this problem. I have spent 2 days searching the archives and the net

[GENERAL] transfer just the data directories from linux to windows?

2006-12-01 Thread Anton Melser
Hi, We have some backups from our prod server and I was wondering if there would be any problems with just copying the data directory to a windows install (same version - 8.1.4) ... any pointers? Cheers Antoine ---(end of broadcast)--- TIP 6: explai

[GENERAL] "stopping" a single database in a cluster

2006-11-10 Thread Anton Melser
Hi, Is it possible to stop a single database, like it is with Oracle? Our oracle admin asked this for FS backups, if there are 3 dbs (in separate tablespaces) then there seems no reason why this couldn't be possible... is it possible? Cheers Antoine ps. If this isn't possible, what experiences do

Re: [GENERAL] autovacuum blues

2006-11-09 Thread Anton Melser
The idea is that you _can_ do without a cronjob. You may need to do a first ANALYZE just to get things warmed up, and then let autovacuum do its job. Thanks guys, I think I have it now! Cheers Antoine ---(end of broadcast)--- TIP 4: Have you sear

Re: [GENERAL] autovacuum blues

2006-11-09 Thread Anton Melser
On 09/11/06, Alvaro Herrera <[EMAIL PROTECTED]> wrote: Anton Melser wrote: > Thanks for that. Just a clarification, can someone tell me what the > "number of tuples" means in the context of the multipliers? I mean, > when the vacuum min multiplier is at 0.4, we multiply

Re: [GENERAL] autovacuum blues

2006-11-09 Thread Anton Melser
On 09/11/06, Alvaro Herrera <[EMAIL PROTECTED]> wrote: Anton Melser wrote: > Hi, > I just can't understand why autovacuum is not working. I have a test > db/table which I insert values into (by the thousands) and can't work > out why my stats don't get updated. C

Re: [GENERAL] autovacuum blues

2006-11-09 Thread Anton Melser
On 09/11/06, Richard Huxton wrote: Anton Melser wrote: > Hi, > I just can't understand why autovacuum is not working. I have a test > db/table which I insert values into (by the thousands) and can't work > out why my stats don't get updated. Could someone have a

[GENERAL] autovacuum blues

2006-11-09 Thread Anton Melser
Hi, I just can't understand why autovacuum is not working. I have a test db/table which I insert values into (by the thousands) and can't work out why my stats don't get updated. Could someone have a quick look at my attached .conf and tell me what I am doing? I am running it on FC5 8.1.4.fc5.1. C

[GENERAL] grid things and postgres

2004-08-27 Thread Anton Melser
Hi, I am working on the G System project (BSD licenced) and we are going to be (eventually) implementing a distributed database to hold data for the game that (eventually) will be developed. People have (though I don't think anyone has seriously investigated yet) suggested that we use a grid wi