Re: [GENERAL] Move rows from one database to other

2017-02-21 Thread William Ivanski
t; > - inserts can happen during syncing. > > Can UPDATEs happen? > > > - Network can break during syncing. > > - inserts into the central table can break (e.g. disk full): No loss at > > the satellite database must happen. > > - ... > > > > How to solve this with PostgreSQL? > > > > Regards, > > Thomas Güttler > > > > > > > > > > > -- > Adrian Klaver > adrian.kla...@aklaver.com > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- William Ivanski - Microsoft MVP

Re: [GENERAL] migrate Sql Server database to PostgreSql

2017-01-18 Thread William Ivanski
res 9.5 enterprise edition. > > i want to to how to migrate Sql Server database to PostgreSql. what are > the things required for migration and what are the cron and prons of > migration. > > -Pawan > -- William Ivanski - Microsoft MVP

Re: [GENERAL] Importing SQLite database

2016-12-08 Thread William Ivanski
self clear. > Let me know if not and I will try to clarify further. > > Thank you. > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- William Ivanski

Re: [GENERAL] Postgres Traffic accounting

2016-12-05 Thread William Ivanski
uery? > > best regards > basti > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- William Ivanski

Re: [GENERAL] Trim performance on 9.5

2016-11-18 Thread William Ivanski
I just ran EXPLAIN ANALYZE, please see images attached. Field doesn't have a index. Em sex, 18 de nov de 2016 às 12:16, vinny escreveu: > On 2016-11-18 15:06, William Ivanski wrote: > > Hi, > > > > I recently did major improvements on perfomance on our routines by &g

[GENERAL] Trim performance on 9.5

2016-11-18 Thread William Ivanski
m function? Thanks in advance. -- William Ivanski -- 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] Strange? BETWEEN behaviour.

2016-10-20 Thread William Ivanski
> > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- William Ivanski

[GENERAL] OmniDB 1.6

2016-10-12 Thread William Ivanski
dback from the community. Thanks in advance! -- William Ivanski

Re: [GENERAL] Transaction ID Wraparound Monitoring

2015-08-03 Thread William Dunn
Hello Jan, I think your calculation is slightly off because per the docs when PostgreSQL comes within 1 million of the age at which an actual wraparound occurs it will go into the safety shutdown mode. Thus the calculation should be ((2^32)-1)/2-100 rather than just ((2^32)-1)/2 as I think you

Re: [GENERAL] Setting up HA postgresql

2015-07-23 Thread William Dunn
oss.co.jp/index_en.php > Japanese:http://www.sraoss.co.jp > > > *Will J. Dunn* > > *willjdunn.com <http://willjdunn.com>* > > > > On Tue, Jul 21, 2015 at 4:27 PM, Joshua D. Drake > > wrote: > > > >> > >> On 07/21/2015 01:21 PM, Will

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread William Dunn
ux-HA well enough to know of any limitations or whether it should be recommend http://linux-ha.org/doc/man-pages/re-ra-pgsql.html *Will J. Dunn* *willjdunn.com <http://willjdunn.com>* On Tue, Jul 21, 2015 at 5:35 PM, William Dunn wrote: > On Tue, Jul 21, 2015 at 5:12 PM, Joshua

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread William Dunn
the pgpool-II instances with each other. It is for maintaining availability of pgpool-II and monitoring for failure of pgpool-II backends, not Postgres/postmaster. *Will J. Dunn* *willjdunn.com <http://willjdunn.com>* On Tue, Jul 21, 2015 at 5:12 PM, Joshua D. Drake wrote: > > On 07/2

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread William Dunn
.com <http://willjdunn.com>* On Tue, Jul 21, 2015 at 4:27 PM, Joshua D. Drake wrote: > > On 07/21/2015 01:21 PM, William Dunn wrote: > >> That's pretty cool! But the intended use of watchdog is so you can have >> multiple pgpool-II instances and failover among

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread William Dunn
goes down but pgpool-II is fine? The watchdog appears to be monitoring the pgpool-II process, not the postgres/postmaster process. *Will J. Dunn* *willjdunn.com <http://willjdunn.com>* On Tue, Jul 21, 2015 at 3:31 PM, Joshua D. Drake wrote: > > On 07/21/2015 11:04 AM, William Dunn wrote

Re: [GENERAL] Promoting 1 of 2 slaves

2015-07-21 Thread William Dunn
As I am aware, you would have two options depending on your configuration: 1. Change the primary_conninfo value on the second standby's recovery.conf to point to the standby that has been promoted to master. However, I think this would require that instance to be rebooted for the confi

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread William Dunn
source tool instead of developing the fail-over logic by > myself? > > 2015-07-21 18:34 GMT+03:00 William Dunn : > >> Hello Aviel, >> >> On Tue, Jul 21, 2015 at 3:56 AM, Aviel Buskila wrote: >>> >>> How can I set a highly available postgresql in a share

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread William Dunn
J. Dunn* *willjdunn.com <http://willjdunn.com>* On Tue, Jul 21, 2015 at 1:55 PM, Aviel Buskila wrote: > Can you link me up to a good tutorial using pgpool-II? > > 2015-07-21 20:02 GMT+03:00 Joshua D. Drake : > >> >> On 07/21/2015 08:34 AM, William Dunn wrote: >

Re: [GENERAL] Setting up HA postgresql

2015-07-21 Thread William Dunn
Hello Aviel, On Tue, Jul 21, 2015 at 3:56 AM, Aviel Buskila wrote: > > How can I set a highly available postgresql in a share-nothing > architecture? > I suggest you review the official documentation on high-availability configurations linked below: http://www.postgresql.org/docs/current/static/

Re: [GENERAL] Index Only Scan vs Cache

2015-07-14 Thread William Dunn
On Tue, Jul 14, 2015 at 2:19 PM, Marc Mamin wrote: > > Any rule of the thumb with which number of pages per relation it is worth > to start indexing ? The code for the monitoring tool check_postgres uses table size larger than 5.12kb as a rule of thumb, expecting that for tables smaller than 5.

Re: [GENERAL] Oracle to PostgreSQL Migration - Need Information

2015-07-08 Thread William Dunn
On Wed, Jul 8, 2015 at 5:20 PM, Joshua D. Drake wrote: > > On 07/08/2015 12:47 PM, John McKown wrote: > > >> ​Why are they converting? >> >> Would EnterpriseDB (a commercial version of PostgreSQL which has >> extensions to make it a "drop in" replacement for Oracle) be a >> possibility? >> http:

Re: [GENERAL] very slow queries and ineffective vacuum

2015-06-30 Thread William Dunn
the view's fields and their datatype but also their meaning,what they will be in their specific Postgres version, and any additional notes the community deemed useful *Will J. Dunn* *willjdunn.com <http://willjdunn.com>* On Tue, Jun 30, 2015 at 5:31 PM, Jerry Sievers wrote: >

Re: [GENERAL] very slow queries and ineffective vacuum

2015-06-30 Thread William Dunn
Sorry I meant to say, "To track transactions that *have been* left idle but not committed or rolled back you would..." Typo *Will J. Dunn* *willjdunn.com <http://willjdunn.com>* On Tue, Jun 30, 2015 at 4:33 PM, William Dunn wrote: > On Tue, Jun 30, 2015 at 8:57 AM, Lukasz Wr

Re: [GENERAL] very slow queries and ineffective vacuum

2015-06-30 Thread William Dunn
ot; prevent vacuum from removing old tuples (because they are still in scope for that transaction) *Will J. Dunn* *willjdunn.com <http://willjdunn.com>* On Tue, Jun 30, 2015 at 4:27 PM, William Dunn wrote: > Hello Lukasz, > > On Tue, Jun 30, 2015 at 8:57 AM, Lukasz Wrobel < &g

Re: [GENERAL] very slow queries and ineffective vacuum

2015-06-30 Thread William Dunn
Hello Lukasz, On Tue, Jun 30, 2015 at 8:57 AM, Lukasz Wrobel < lukasz.wro...@motorolasolutions.com> wrote: > > There doesn't seem to be any issues with disk space, memory or CPU, as > neither of those is even 50% used (as per df and top). > Are you using the default PostgreSQL configuration sett

Re: [GENERAL] foreign keys to foreign tables

2015-06-22 Thread William Dunn
Hello Rick, As I understand it you are correct. Oracle/DB2/Postgres and I think the SQL Standards to not implement constraints against tables on foreign servers. Although it would be possible to develop the DBMS to handle such constraints in a heterogeneous distributed environment it would be unwi

Re: [GENERAL] pg_class.reltuples VS pg_stat_all_tables.n_live_tup for estimation of table

2015-06-17 Thread William Dunn
Thanks so much Tom! *Will J. Dunn* *willjdunn.com <http://willjdunn.com>* On Wed, Jun 17, 2015 at 3:48 PM, Tom Lane wrote: > William Dunn writes: > > Does anyone which is a more accurate estimate of a table's live > > rows: pg_class.reltuples ( > > http:/

[GENERAL] pg_class.reltuples VS pg_stat_all_tables.n_live_tup for estimation of table

2015-06-17 Thread William Dunn
Hello, Does anyone which is a more accurate estimate of a table's live rows: pg_class.reltuples ( http://www.postgresql.org/docs/current/static/catalog-pg-class.html) OR pg_stat_all_tables.n_live_tup ( http://www.postgresql.org/docs/current/static/monitoring-stats.html#PG-STAT-ALL-TABLES-VIEW)? In

Re: [GENERAL] Indexed views like SQL Server - NOT Materialized Views

2015-06-09 Thread William Dunn
Though I'm sure you've already looked into it, for your specific issue of getting row counts: - In PostgreSQL 9.2 and above this operation can be made much faster with index-only scans so ensure you are on a recent version and do your count on a column of a candidate key with an index (for example,

Re: [GENERAL] Database designpattern - product feature

2015-06-04 Thread William Dunn
le-inheritance That is also the behavior of Hibernate (Java) when using "table per subclass" mapping. *Will J. Dunn* *willjdunn.com <http://willjdunn.com>* On Wed, Jun 3, 2015 at 2:50 AM, Adrian Stern wrote: > Hi William, thanks for joining the conversation. > > 1) We

Re: [GENERAL] Database designpattern - product feature

2015-06-02 Thread William Dunn
Hello Adrian, May I ask why you need a non-standard model? By standard models I mean the following: 1) When you don't need to have subclass specific database constraints: All subclasses in the same table, subclasses that do not have an attribute have that column null. This has the best performanc

Re: [GENERAL] odbc to emulate mysql for end programs

2015-06-01 Thread William Dunn
Hello, PostgreSQL has a fully standards compliant ODBC driver (See: https://odbc.postgresql.org/). Any application designed to communicate with DBMS over ODBC connection should be able to use that driver to communicate with PostgreSQL. Most applications that interact with databases come with ODBC

Re: [GENERAL] Is my standby fully connected?

2015-06-01 Thread William Dunn
In 9.1+ you can monitor the state of your slave easily with the standby_state field of pg_stat_replication: SELECT standby_pid, standby_usesysid, standby_usename, standby_client_addr, standby_client_port, standby_state FROM pg_stat_replication; If the standby is

Re: [GENERAL] Can we simulate Oracle Flashback with pg_export_snapshot()?

2015-05-26 Thread William Dunn
<http://willjdunn.com>* On Fri, May 22, 2015 at 4:50 AM, Albe Laurenz wrote: > William Dunn wrote: > > Just had an idea and could use some feedback. If we start a transaction, > leave it idle, and use > > pg_export_snapshot() to get its snapshot_id MVCC will hold all the > tuples as

Re: [GENERAL] Queries for unused/useless indexes

2015-05-26 Thread William Dunn
)>(5*8192) AND NOT ((pg_stat_user_indexes.idx_scan=0 OR pg_stat_user_indexes.idx_scan=NULL) AND pg_stat_user_tables.seq_scan=0) ORDER BY perc_idx_used; *Will J. Dunn* *willjdunn.com <http://willjdunn.com>* On Tue, May 26, 2015 at 10:31 AM, William Dunn wrote:

Re: [GENERAL] Queries for unused/useless indexes

2015-05-26 Thread William Dunn
Melvin - thanks for sharing. Here is the query I use which lists the percent of queries against the table which use the index ordered by least used first. The 'pg_relation_size(relid)>(5*8192)' is used to remove any tables that would be so small the optimizer would just choose a table scan. SELE

[GENERAL] Can we simulate Oracle Flashback with pg_export_snapshot()?

2015-05-20 Thread William Dunn
Hello, Just had an idea and could use some feedback. If we start a transaction, leave it idle, and use pg_export_snapshot() to get its snapshot_id MVCC will hold all the tuples as of that transaction's start and any other transaction can see the state of the database as of that time using SET TRAN

Re: [GENERAL] Optimizing a read-only database

2015-05-18 Thread William Dunn
On Mon, May 18, 2015 at 10:54 AM, François Battail < francois.batt...@sipibox.fr> wrote: > Le 18/05/2015 16:38, William Dunn a écrit : > > * You can also run a CLUSTER command on one of your indexes to group >> data that is frequently accessed together into the same s

Re: [GENERAL] My index doesn't write anymore but read

2015-05-18 Thread William Dunn
Hello Ben, Looks like you need to tune autovacuum to be more aggressive. Make sure autovacuum=ON (the default), increase autovacuum_max_workers (at least 1 per database, more if autovacuum is falling behind), autovacuum_vacuum_scale_factor to be ~half of the default and can be set per table to be

Re: [GENERAL] Optimizing a read-only database

2015-05-18 Thread William Dunn
Hello François, - With read-only work loads you can make shared_buffers very large, like 40% of RAM available to the database. Usually you would keep it lower because in a write heavy workload large shared_buffers causes checkpoints to have huge IO, but since you are not making changes

Re: [GENERAL]

2015-05-17 Thread William Dunn
Hello Sachin, I hate to respond by suggesting an alternative but it may be good to try using pg_basebackup (Doc: http://www.postgresql.org/docs/9.1/static/app-pgbasebackup.html) to back-up your database. It takes a copy of the file system files rather than querying the data as an ordinary connecti

Re: [GENERAL] SELECT .. WHERE id IN(..)

2015-05-17 Thread William Dunn
Hello Maks, As I think Sam suspects the issue might be that you may not have enough RAM, or not enough RAM is allocated to shared_buffers, or you may have this table's data being evicted from shared_buffers because of some other queries, so while you are identifying all the rows in your fast index

Re: R: [GENERAL] Index on integer or on string field

2015-05-15 Thread William Dunn
Hello Francesco, You should probably set timing on, run an explain analyze, and use pgbadger to diagnose your performance issue. While it may be the case that comparison in the index might be slightly faster because of the modulo arithmetic, those in-memory operations are extremely fast and it is

Re: [GENERAL] finding tables about to be vacuum freezed

2015-05-12 Thread William Dunn
Hello Steve, Great monitoring query (https://gist.github.com/skehlet/36aad599171b25826e82). I suggest modifying the value "autovacuum_freeze_table_age" to "LEAST(autovacuum_freeze_table_age,(0.95*autovacuum_freeze_max_age)) AS autovacuum_freeze_table_age" since PostgreSQL implicitly limits vacuum_

Re: [GENERAL] PGFoundry Sample databases (particularly world)?

2015-05-05 Thread William Dunn
PgFoundry.org went down some months ago, I contacted webmaster Marc Fournier and he was able to get it back up but a lot of it no longer works and I don't think he responded to my follow-up. For the most part top pages are broken but sub-pages are still there (just very hard to navigate to and find

Re: [GENERAL] PostgreSQL HA config recommendations

2015-04-30 Thread William Dunn
procedure, but that all goes against the master database so the streaming replication is not a factor in that consideration. *William J. Dunn* *willjdunn.com <http://willjdunn.com>* *William J. Dunn* *P* 978-844-4427 | *dunn...@gmail.com * *du...@bu.edu * On Thu, Apr 30, 2015 at 9:02 AM, F

Re: [GENERAL] PostgreSQL HA config recommendations

2015-04-30 Thread William Dunn
procedure, but that all goes against the master database so the streaming replication is not a factor in that consideration. *William J. Dunn* *P* 978-844-4427 | *dunn...@gmail.com * *du...@bu.edu * On Thu, Apr 30, 2015 at 9:02 AM, Fabio Ugo Venchiarutti wrote: > > WAN delays can c

Re: [GENERAL] PostgreSQL HA config recommendations

2015-04-29 Thread William Dunn
The streaming replication built into PostgreSQL would work fine for your use case, assuming that you are OK with having only one primary supporting writes and any slaves being read only as it currently (9.0-9.4) only supports a single master. This will put minimal load on your primary server and in

Re: R: [GENERAL] DB on mSATA SSD

2015-04-23 Thread William Dunn
Additional things to consider for decreasing pressure on the cheap drives: - Another configuration parameter to look into is effective_io_concurrency. For SSD we typically set it to 1 io per channel of controller card not including the RAID parity drives. If you decrease this value Po

Re: [GENERAL] PL\pgSQL 'ERROR: invalid input syntax for type oid:' [PostgreSQL 9.3.6 and 9.4]

2015-04-17 Thread William Dunn
Thanks Adrian! Changing the declaration row_data to be of type RECORD (rather than pg_catalog.pg_class%ROWTYPE) resolved the error :) - Will *Will J Dunn* *willjdunn.com <http://willjdunn.com/>* On Thu, Apr 16, 2015 at 4:36 PM, Adrian Klaver wrote: > On 04/16/2015 07:52 AM, Wil

[GENERAL] PL\pgSQL 'ERROR: invalid input syntax for type oid:' [PostgreSQL 9.3.6 and 9.4]

2015-04-16 Thread William Dunn
Hello list, I am creating a plpgsql procedure in Postgres 9.4 (also testing in 9.3.6) to move all of the tables that are not in a default tablespace (pg_default, pg_global, or 0) into the tablespace pg_default. However when it executes I get an error 'ERROR: invalid input syntax for type oid:' wh

Re: [GENERAL] Problem with REFERENCES on INHERITS

2015-02-02 Thread William Gordon Rutherdale
On 02/02/15 10:11 AM, Tom Lane wrote: > If you did "select * from only primate" you would see that there is no > such row in the parent table, which is what the foreign key is being > enforced against. Thanks. That does a lot to clarify it. -Will -- Sent via pgsql-general mailing list (pgsq

Re: [GENERAL] Problem with REFERENCES on INHERITS

2015-02-02 Thread William Gordon Rutherdale
On 02/02/15 12:11 AM, David G Johnston wrote: > William Gordon Rutherdale wrote >> My problem: could someone please explain the semantics and why this >> behaviour makes sense -- or is it a design error or bug? > I didn't read your post in depth but I suspect you have no

[GENERAL] Problem with REFERENCES on INHERITS

2015-02-01 Thread William Gordon Rutherdale
Hi. I have encountered a problem with references when using INHERITS (on Postgres 9.1/9.2). Could someone please explain why this occurs. Consider this example. CREATE TABLE primate ( id SERIAL PRIMARY KEY, name TEXT, tale TEXT ); CREATE TABLE chimp ( human_friend TEXT ) INHERITS

[GENERAL] Ever increasing pg_clog disk usage v8.4

2014-11-30 Thread Powrie, William
ges DETAIL: 0 index row versions were removed. 0 index pages have been deleted, 0 are currently reusable. I never see any index pages being returned to the operating system which is the problem Does anyone know how I can reclaim the every growing ramdisk space? Rega

[GENERAL] copy/dump database to text/csv files

2014-07-24 Thread William Nolf
This is probably an easy one for most sql users but I don't use it very often. We have a postgres database that was used for an application we no longer use. However, we would like to copy/dump the tables to files, text or csv so we can post them to sharepoint. Copy seems to be what I wan

[GENERAL] PSQL 9.1.3 segmentation fault

2012-03-30 Thread Hu, William
I downloaded the stable version of postgresql-9.1.3.tar.gz, installed on a CentOS 5.7 final server. I used -with-openssl option with the configure, after starting the server, Psql would cause a segmentation fault, createuser did too. I don't think the postgresql log shows anything on this, plea

[GENERAL] FATAL: the database system is starting up

2011-10-26 Thread William E. Moreno A.
Solution: http://archives.postgresql.org/pgsql-general/2007-12/msg01339.php Solution: Message-id: <476d6de1.4050...@latnet.lv>   Problem: FATAL:  the database system is starting up   Solved:   change postgresql_flags in /etc/rc.conf to: postgresql_flags="-s -m fast" or postgresql_flags="-s -m sm

[GENERAL] upgrade

2011-02-02 Thread William Bruton
How do I know which version to upgrade to from 8.1.4? Regards, William Bruton Data Retrieval Corporation 13231 Champion Forest Dr Suite 401 Houston Tx 77069 Tel: 281 444-5398 Fax: 281 444-5397 24 Hrs: 832 752-0074 http://www.spidr.com/ <mailto:d...@spidr.com> d...@spi

Re: [GENERAL] Cannot unsubscribe

2010-12-22 Thread William Gordon Rutherdale (rutherw)
> -Original Message- > From: Adrian Klaver [mailto:adrian.kla...@gmail.com] > Sent: 21 December 2010 20:36 > To: pgsql-general@postgresql.org > Cc: William Gordon Rutherdale (rutherw) > Subject: Re: [GENERAL] Cannot unsubscribe > > On Tuesday 21 December 2010 4

[GENERAL] Cannot unsubscribe

2010-12-21 Thread William Gordon Rutherdale (rutherw)
unsub pgsql-general The unsubscribe command did not succeed. No e-mail addresses matching **** "William Gordon Rutherdale (rutherw)" are subscribed to the pgsql-general mailing list. Valid commands processed: 1 0 succeeded, 0 stalled, and 1 failed. Use

[GENERAL] How to select a postgresql table inside Oracle

2010-11-16 Thread Hu, William
Hi, I have a need to select some data in a Oracle database from a Postgresql table. I know how to do this among Oracle instances, eg. Select * from ta...@another_instance. Are there similar approach without replicate the database tables? Thanks in advance.

Re: [GENERAL] Triggers and locking

2010-09-21 Thread William Temperley
On 21 September 2010 18:39, Alban Hertroys wrote: > On 21 Sep 2010, at 16:13, William Temperley wrote: > >> Dear all, >> >> I have a single "source" table that is referenced by six >> specialization tables, which include: >> "journal_article"

[GENERAL] Triggers and locking

2010-09-21 Thread William Temperley
Dear all, I have a single "source" table that is referenced by six specialization tables, which include: "journal_article" "report" 4 more There is a "citation" column in the source, which is what will be displayed to users. This is generated by a trigger function on each specialization table

[GENERAL] Postgresql database for distributed transactions

2010-08-02 Thread Hu, William
advance. William Hu Trimet.org

Re: [GENERAL] [ODBC] resultset metadata libpq

2010-07-27 Thread William Furnass
On 27 July 2010 13:43, Ravi Katkar wrote: > > From: Ravi Katkar > Sent: Tuesday, July 27, 2010 5:45 PM > To: 'pgsql-general@postgresql.org'; 'pgsql-o...@postgresql.org' > Subject: resultset metadata libpq > > I wanted to retrieve the below metadata information for a column from > resultset. > > Co

[GENERAL] boualem guechtouli

2010-03-24 Thread william wayne
http://welltrade-hydraulik.com/virginie.html _ Hotmail: Trusted email with Microsoft’s powerful SPAM protection. http://clk.atdmt.com/GBL/go/210850552/direct/01/

[GENERAL] Holger Kalbas

2010-03-22 Thread william wayne
http://pacakm.w.interia.pl/eric.html _ The New Busy is not the old busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:

[GENERAL] Hans Samses

2010-03-21 Thread william wayne
http://wiaderko.110mb.com/mustapha.html _ Hotmail: Trusted email with Microsoft’s powerful SPAM protection. http://clk.atdmt.com/GBL/go/210850552/direct/01/

Re: [GENERAL] Error when creating table with boolean data type

2009-11-17 Thread William Carithers
OK, found it. I was trying to name a column with a keyword ('like'). The error message threw me off. Sorry for the spam. Bill On 11/17/09 4:04 PM, "William Carithers" wrote: > I get an "Error: relation "boolean" does not exist when attempting to crea

[GENERAL] Error when creating table with boolean data type

2009-11-17 Thread William Carithers
I get an "Error: relation "boolean" does not exist when attempting to create a table with columns of data type boolean. I using PostgreSQL 8.3.6 and the docs say that it supports boolean data type and even show some create table examples similar to mine. Sorry for such a newbie question but it's s

Re: [GENERAL] Emal reg expression

2009-10-29 Thread William Temperley
2009/10/28 Richard Huxton : > Xai wrote: >> i want to create a type for an email field but i'm not good with regx >> can some one help me? > > Google for "email regex". Be warned - this is very complicated if you > want to match *all* possible email addresses. > Just send your users an email askin

Re: [GENERAL] npgsql and postgres enum type

2009-10-15 Thread William Temperley
2009/10/15 Merlin Moncure : > On Thu, Oct 15, 2009 at 12:31 PM, danclemson wrote: >> >> Hi, >> >> As postgres now has enum type, does npgsql driver support the enum type? >> >> I use c# and npgsql as databse driver.  One of the database stored procedure >> takes enum as its parameter. >> >> What w

Re: [GENERAL] [Q] optmizing postgres for 'single client' / many small queries

2009-09-04 Thread William Temperley
Tom Lane writes: > Just out of curiosity, does anyone know of any ORM anywhere that doesn't > suck? They seem to be uniformly awful, at least in terms of their > interfaces to SQL databases. If there were some we could recommend, > maybe people would be less stuck with these bogus legacy archite

Re: [GENERAL] [PERFORM] Incr/Decr Integer

2009-07-16 Thread William Scott Jordan
ent functions, each being triggered on INSERT? Or would all three functions still be considered a single transaction, since they're all being called from the same insert? Any suggestions would be appreciated! -William Andres Freund wrote: On Thursday 16 July 2009 19:56:47 William Scott Jorda

Re: [GENERAL] [PERFORM] Incr/Decr Integer

2009-07-16 Thread William Scott Jordan
ifferent parts into three different functions, each being triggered on INSERT? Or would all three functions still be considered a single transaction, since they're all being called from the same insert? Any suggestions would be appreciated! -William Andres Freund wrote: On Thursday 16 Ju

Re: [GENERAL] Killing a data modifying transaction

2009-06-22 Thread William Temperley
2009/6/22 Tom Lane : > William Temperley writes: >> I'm wondering if I happened as I'd started the same query twice. >> The first had work_mem = 1MB so I tried to kill it and started another >> with work_mem = 1000MB, but both were attempting to insert the same i

Re: [GENERAL] Killing a data modifying transaction

2009-06-22 Thread William Temperley
2009/6/22 Tom Lane : > William Temperley writes: >> I've got two transactions I tried to kill 3 days ago using "select >> pg_cancel_backend()", then SIGTERM, and have since then been >> using 100% of a cpu core each. They were supposed to insert the >>

[GENERAL] Killing a data modifying transaction

2009-06-22 Thread William Temperley
Hi All, I've got two transactions I tried to kill 3 days ago using "select pg_cancel_backend()", then SIGTERM, and have since then been using 100% of a cpu core each. They were supposed to insert the results of large unions with PostGIS and appear to have failed. Could someone tell me what's the l

[GENERAL] Re: High I/O writes activity on disks causing images on browser to lag and not load

2009-06-04 Thread William Temperley
> Filtering out with the pid showed that it was the file > pgdata/global/pgstat.tmp >> Filtering out with the pid showed that it was the file >> pgdata/global/pgstat.tmp > > That's the statistics collector -- which makes sense, depending > on your settings, it has to write stats for every operation

Re: [GENERAL] Disconnected editing - versioning of databases

2009-04-15 Thread William Temperley
On Wed, Apr 15, 2009 at 9:34 AM, Dimitri Fontaine wrote: >> On Tue, 14 Apr 2009, William Temperley wrote: >> > I could potentially run a database in each of these countries and >> > provide 100% uptime, obviously raising the issue of version conflicts >> > that wo

[GENERAL] Disconnected editing - versioning of databases

2009-04-14 Thread William Temperley
Hi All I'm wondering if anyone can share any insights or experience with temporary versions of databases, allowing "disconnected editing" during Internet downtime. The use-case is that I run a Postgres database, hosted in the UK, but used by scientists in several other countries - Ecuador, Vietna

[GENERAL] Profiling custom datatypes

2009-03-25 Thread William Harrower
Hi, I'm attempting to profile (the memory usage and CPU time of) some code I've written as part of a custom datatype. I've attempted to utilise valgrind and cachegrind, but this doesn't seem to work as expected. The following is the command used: valgrind --tool=cachegrind --trace-children=y

Re: [GENERAL] in transaction - safest way to kill

2008-12-05 Thread William Temperley
>> >> Could anyone tell me what's the best thing to with idle >> transactions >> that are holding locks? On Fri, Dec 5, 2008 at 2:25 PM, Glyn Astill <[EMAIL PROTECTED]> wrote: > > select pg_cancel_backend(); > Thanks. Sorry for the basic question. Will -- Sent via pgsql-general mailing list (p

[GENERAL] in transaction - safest way to kill

2008-12-05 Thread William Temperley
Hi all Could anyone tell me what's the best thing to with idle transactions that are holding locks? I just killed the process as I wanted to get on with some work. I'm just not sure this is a good idea when we go into production. Cheers Will T -- Sent via pgsql-general mailing list (pgsql-gen

Re: [GENERAL] Very large tables

2008-11-28 Thread William Temperley
On Fri, Nov 28, 2008 at 5:46 PM, Simon Riggs <[EMAIL PROTECTED]> wrote: > > I would look carefully at the number of bits required for each float > value. 4 bytes is the default, but you may be able to use less bits than > that rather than rely upon the default compression scheme working in > your f

Re: [GENERAL] Very large tables

2008-11-28 Thread William Temperley
On Fri, Nov 28, 2008 at 3:48 PM, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > William Temperley escribió: >> So a 216 billion row table is probably out of the question. I was >> considering storing the 500 floats as bytea. > > What about a float array, float[]? I gues

[GENERAL] Very large tables

2008-11-28 Thread William Temperley
Hi all Has anyone any experience with very large tables? I've been asked to store a grid of 1.5 million geographical locations, fine. However, associated with each point are 288 months, and associated with each month are 500 float values (a distribution curve), i.e. 1,500,000 * 288 * 500 = 216 bi

Re: [GENERAL] pg_dump | pg_sql: insert commands and foreign key constraints

2008-09-24 Thread William Garrison
ot;default" options - what format does that write? Should I have used -Fp to make a plain text backup but not --inserts? Then it would be doing a COPY instead of an INSERT and maybe that would be faster. Oh well. Tomasz Ostrowski wrote: On 2008-09-23 19:03, William Garrison wrote: I ha

Re: [GENERAL] Error in ALTER DATABASE command

2008-09-23 Thread William Garrison
I found out about the quoting thing about 30 seconds after I made the post. :) Thanks everyone who replied. Douglas McNaught wrote: On Tue, Sep 23, 2008 at 11:49 AM, William Garrison <[EMAIL PROTECTED]> wrote: In Postgresql 8.2.9 on Windows, you cannot rename a database if th

[GENERAL] pg_dump | pg_sql: insert commands and foreign key constraints

2008-09-23 Thread William Garrison
I have several .SQL files created from pg_dump, and I find that when I feed them into psql that I get tons of foreign key errors because the INSERT statements in the dump are not in the correct order. After reading the docs, mailing lists, and googling, I see posts saying this problem was fixe

[GENERAL] Error in ALTER DATABASE command

2008-09-23 Thread William Garrison
In Postgresql 8.2.9 on Windows, you cannot rename a database if the name contains mixed case. To replicate: 1) Open the pgadmin tool. 2) Create a database named "MixedCase" (using the UI, not using a query window or using PSQL) 3) Open a query window, or use PSQL to issue the following command

[GENERAL] pg_restore questions

2008-09-19 Thread William Garrison
I have been optimizing my pg_restores (postgres 8.2.9 on Windows) and I am confused by some of the results I get when combining various command-line options. The -c option for "clean" does not do DROP IF EXISTS statements, it just does DROP. This results in an error if the object does not exi

Re: [GENERAL] Fastest way to restore a database

2008-09-12 Thread William Garrison
Thanks so much! So... if I am using pg_dump and pg_restore with a compressed backup, then it is using COPY, correct? And I think that would follow a CREATE TABLE statement as mentioned in the first link... so no WAL files written? Greg Smith wrote: On Fri, 12 Sep 2008, William Garrison

[GENERAL] Fastest way to restore a database

2008-09-12 Thread William Garrison
I know that PostgreSQL is slow at restoring databases. But there are some tricks to use when speeding it up. Here is a brief list I compiled from reading the docs and reading some forums. Is there a definitive list of things to do? * Turn off fsync So it won’t flush after every commit * Turn o

Re: [GENERAL] Install Postgres on a SAN volume?

2008-09-08 Thread William Garrison
Thanks. I notice that the link you provided says: "Per best practices, my postgres data directory, xlogs and WAL archives are on different filesystems (ZFS of course). " Why is this a best practice? Is there a reference for that? Greg Smith wrote: On Mon, 8 Sep 2008, William Garr

[GENERAL] Install Postgres on a SAN volume?

2008-09-08 Thread William Garrison
We are using PostgreSQL 8.2.9 on Windows, and we are setting up some new machines. We used to install PostgreSQL on C: and then we put the tablespaces onto our SAN drive (Z:). When we tried to mount the snapshots of the SAN we learned that they were useless since we only had the tablespaces,

[GENERAL] How to test something using ROLLBACK TRANSACTION

2008-09-04 Thread William Garrison
Coming from MS SQL server, if I ever change anything vital on a production system, or do any kind of major hackery on my own, I wrap it in a transaction first: BEGIN TRANSACTION; DELETE FROM vital_information WHERE primary_key = 10; ROLLBACK TRANSACTION; I then make sure that the result comes

Re: [GENERAL] Simple query not using index: why?

2008-09-03 Thread William Garrison
--- Original message ------ From: William Garrison <[EMAIL PROTECTED]> I am looking for records with duplicate keys, so I am running this query: SELECT fileid, COUNT(*) FROM file GROUP BY fileid HAVING COUNT(*)>1 The table has an index on fileid (non-unique index) so

Re: [GENERAL] hash partitioning

2008-09-03 Thread William Garrison
When I attended the PostgreSQL East conference, someone presented a way of doing this that they used for http://www.mailermailer.com/ and they did this: SET constraint_exclusion = on; EXPLAIN SELECT * FROM test WHERE id = 7 AND id % 4 = 3 Their business layer then generated the "AN

[GENERAL] Simple query not using index: why?

2008-09-03 Thread William Garrison
I am looking for records with duplicate keys, so I am running this query: SELECT fileid, COUNT(*) FROM file GROUP BY fileid HAVING COUNT(*)>1 The table has an index on fileid (non-unique index) so I am surprised that postgres is doing a table scan. This database is >15GB, and there

  1   2   3   4   >