Re: [GENERAL] shared_buffers formula

2015-03-04 Thread Scott Marlowe
On Wed, Mar 4, 2015 at 4:50 AM, Bill Moran wrote: > On Wed, 4 Mar 2015 14:05:09 +0400 > Alexander Shutyaev wrote: > >> Thanks for the answer. Now, given this info I've calculated that our >> postgresql should occupy approx. 30,53 GB while the server has 125 GB of >> RAM. However we often see in t

Re: [GENERAL] Index corruption

2015-03-30 Thread Scott Marlowe
On Tue, Mar 24, 2015 at 12:49 PM, Bankim Bhavsar wrote: > Hello postgres experts, > > We are running a test that periodically abruptly kills postgres > process(equivalent to kill -9) and restarts it. > After running this test for 24 hrs or so, we see duplicate primary key > entries in postgres tab

Re: [GENERAL] unexpected (to me) sorting order

2015-04-09 Thread Scott Marlowe
On Wed, Apr 8, 2015 at 3:33 AM, Glyn Astill wrote: > >> From: Björn Lundin >>To: pgsql-general@postgresql.org >>Sent: Wednesday, 8 April 2015, 10:09 >>Subject: [GENERAL] unexpected (to me) sorting order >> >>select * from T_SORT order by NAME ; >> >>rollback; >> id |name >>+--

Re: [GENERAL] moving to PostgreSQL from MS-SQL and from Oracle, looking for feature comparison information

2015-05-10 Thread Scott Marlowe
On Sat, May 9, 2015 at 11:20 PM, Albe Laurenz wrote: > Maxim Boguk wrote: >> It's depend where a corruption happen, if pages become corrupted due to some >> problems with physical storage (filesystem) in that case a replica data >> should be ok. > > I would not count on that. > I have had a case

Re: [GENERAL] moving to PostgreSQL from MS-SQL and from Oracle, looking for feature comparison information

2015-05-10 Thread Scott Marlowe
On Sun, May 10, 2015 at 7:50 AM, Albe Laurenz wrote: > Scott Marlowe wrote: >> On Sat, May 9, 2015 at 11:20 PM, Albe Laurenz >> wrote: >>> Maxim Boguk wrote: >>>> It's depend where a corruption happen, if pages become corrupted due to >>>>

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

2015-05-15 Thread Scott Marlowe
On Fri, May 15, 2015 at 9:18 AM, Job wrote: > Hello, > > i have a table of about 10 millions of records, with the index on a string > field. > Actually is alphabetical; since queries are about 100/200 per seconds, i was > looking for a better way to improve performance and reduce workload. > > T

Re: [GENERAL] PG and undo logging

2015-05-23 Thread Scott Marlowe
On Sat, May 23, 2015 at 2:34 PM, Ravi Krishna wrote: > Is it true that PG does not log undo information, only redo. If true, > then how does it bring a database back to consistent state during > crash recovery. Just curious. PostgreSQL is NOT oracle. And it doesn't work like oracle. This is norma

Re: [GENERAL] How to skip duplicate records while copying from CSV to table in Postgresql using "COPY"

2015-05-24 Thread Scott Marlowe
On Sun, May 24, 2015 at 4:26 AM, Arup Rakshit wrote: > Hi, > > I am copying the data from a CSV file to a Table using "COPY" command. But > one thing that I got stuck, is how to skip duplicate records while copying > from CSV to tables. By looking at the documentation, it seems, Postgresql > do

Re: [GENERAL] How to craft a query that uses memory?

2015-06-19 Thread Scott Marlowe
Note that after cranking up work mem you then need a query that can use it. Quickest way to use LOTS of memory is to do a lot of unconstrained joins. select * from table a join table b on (true) join table c on (true) join table d on (true); Result set is size of a*b*c*d On Fri, Jun 19, 2015 at 7

Re: [GENERAL] Ubuntu 14.04 LTS install problem

2015-07-01 Thread Scott Marlowe
On Wed, Jul 1, 2015 at 3:05 AM, Urs Berner wrote: > Am 01.07.2015 um 09:08 schrieb Charles Clavadetscher: >> >> Hello Urs >> >> I could install PostgreSQL 9.4 on Ubuntu 14.04 without adding repositories >> (actually it was an upgrade and I had to move the data manually from 9.3 to >> 9.4). You may

Re: [GENERAL] How to get total count of queries hitting DB per day or per hour?

2015-07-09 Thread Scott Marlowe
On Thu, Jul 9, 2015 at 12:04 PM, Sheena, Prabhjot wrote: > Guys > > Is there a way to get total count of queries hitting > Postgresql DB(verison 9.3) per day or per hour ? I cannot turn on > log_statement=all coz that’s too much logging for our log file to handle. Is > there another

Re: [GENERAL] Delete rule does not prevent truncate

2015-07-23 Thread Scott Marlowe
On Thu, Jul 23, 2015 at 12:09 PM, Adrian Klaver wrote: > On 07/23/2015 04:57 AM, Tim Smith wrote: >> >> Andrew, >> >> From the manual: >> >> It is important to realize that a rule is really a command >> transformation mechanism, or command macro. The transformation happens >> before the execution

Re: [GENERAL] Delete rule does not prevent truncate

2015-07-24 Thread Scott Marlowe
On Fri, Jul 24, 2015 at 3:27 AM, Tim Smith wrote: > On 23 July 2015 at 19:25, Scott Marlowe wrote: >> stick to triggers, they're faster > > > Erm, not according to your beloved manual !!! > > 38.7. Rules Versus Triggers > > " a rule issuing one extra comma

Re: [GENERAL] Lots of stuck queries after upgrade to 9.4

2015-07-30 Thread Scott Marlowe
You might want to try pg replay: http://laurenz.github.io/pgreplay/ On Thu, Jul 30, 2015 at 7:23 AM, Spiros Ioannou wrote: > I'm very sorry but we don't have a synthetic load generator for our > testing setup, only production and that is on SLA. I would be happy to test > the next release though

Re: [GENERAL] PostgreSQL customer list

2015-08-19 Thread Scott Marlowe
On Tue, Aug 18, 2015 at 9:33 PM, Sridhar N Bamandlapally wrote: > Hi > > I need some top 10 customers list in financial or healthcare domain ( > irrespective of open-source or proprietary tool ) > > We need to showcase to our customer for building analytical database > > Please do share, it will b

Re: [GENERAL] Need Database Backup

2015-08-29 Thread Scott Marlowe
On Fri, Aug 28, 2015 at 11:27 PM, Murali N Rao wrote: > Sir, > > We were using newgenlib software which is having postgresql as backend. > > Suddenly Our Systems OS got corrupted and unable to start and we have taken > installed folder as backup from the drive but we are unable to restore and >

Re: [GENERAL] Need Database Backup

2015-08-30 Thread Scott Marlowe
e PGSQL in D:\program files\Postgresql > > I have whole folder having capacity of 1.53 GB > > and i have recently taken backup on 01st of August with Extension (.sql) > even i cant upload that. > > Please i request u to do the need ful > > Regards > > Murali N &

Re: [GENERAL] WAL Shipping and streaming replication

2015-09-28 Thread Scott Marlowe
On Mon, Sep 28, 2015 at 8:48 AM, CS DBA wrote: > All; > > We have a 3 node replication setup: > > Master (node1) --> Cascading Replication Node (node2) --> Downstream > Standby node (node3) > > We will be deploying WAL archiving from the master for PITR backups and > we'll use the staged WAL file

Re: [GENERAL] WAL Shipping and streaming replication

2015-09-28 Thread Scott Marlowe
On Mon, Sep 28, 2015 at 9:12 AM, Keith Fiske wrote: > > > On Mon, Sep 28, 2015 at 10:54 AM, Scott Marlowe > wrote: >> >> On Mon, Sep 28, 2015 at 8:48 AM, CS DBA >> wrote: >> > All; >> > >> > We have a 3 node replication setup: >&

Re: [GENERAL] RAID and SSD configuration question

2015-10-20 Thread Scott Marlowe
On Tue, Oct 20, 2015 at 7:30 AM, Merlin Moncure wrote: > On Tue, Oct 20, 2015 at 3:14 AM, Birta Levente wrote: >> Hi >> >> I have a supermicro SYS-1028R-MCTR, LSI3108 integrated with SuperCap module >> (BTR-TFM8G-LSICVM02) >> - 2x300GB 10k spin drive, as raid 1 (OS) >> - 2x300GB 15k spin drive, a

Re: [GENERAL] RAID and SSD configuration question

2015-10-20 Thread Scott Marlowe
> On Tue, Oct 20, 2015 at 9:33 AM, Scott Marlowe > wrote: >> We're running LSI MegaRAIDs at work with 10 SSD RAID-5 arrays, and we >> can get ~5k to 7k tps on a -s 1 pgbench with the write cache on. >> >> When we turn the write cache off, we get 15k to 20k

Re: [GENERAL] can postgres run well on NFS mounted partitions?

2015-11-10 Thread Scott Marlowe
On Tue, Nov 10, 2015 at 4:26 PM, anj patnaik wrote: > Thanks for the feedback. I have setup a second Linux VM (running RHEL 5.11) > and Postgres 9.4. I ran some insertions today from a client running on > Windows. The client does a loop of 30 updates. > > I am seeing about 10-20% increase in laten

Re: [GENERAL] can postgres run well on NFS mounted partitions?

2015-11-12 Thread Scott Marlowe
On Thu, Nov 12, 2015 at 11:19 AM, anj patnaik wrote: > The Linux VM where postgres is running over NFS is in a different location > than where I am. Both the NFS mounted storage and VM are on the same network > connected via 1GB ethernet switch. > > The physical server for the Linux VM has UPS. >

Re: [GENERAL] can postgres run well on NFS mounted partitions?

2015-11-12 Thread Scott Marlowe
On Thu, Nov 12, 2015 at 11:49 AM, Scott Marlowe wrote: > On Thu, Nov 12, 2015 at 11:19 AM, anj patnaik wrote: >> The Linux VM where postgres is running over NFS is in a different location >> than where I am. Both the NFS mounted storage and VM are on the same network >&

Re: [GENERAL] Silent data loss in its pure form

2016-05-30 Thread Scott Marlowe
On Mon, May 30, 2016 at 10:57 AM, Alex Ignatov wrote: > Following this bug reports from redhat > https://bugzilla.redhat.com/show_bug.cgi?id=845233 > > it rising some dangerous issue: > > If on any reasons you data file is zeroed after some power loss(it is the > most known issue on XFS in the pas

Re: [GENERAL] OT hardware recommend

2016-06-17 Thread Scott Marlowe
On Fri, Jun 17, 2016 at 2:36 PM, Andy Colson wrote: > Hi all. > > I have access to quite a few laptop HD's (10 to 15 of them at least), and > thought that might make a neat test box that might have some good IO speed. > > Needs to be cheap though, so linux with software raid, rack mount > preferr

Re: [GENERAL] Vacuum full: alternatives?

2016-06-20 Thread Scott Marlowe
On Mon, Jun 20, 2016 at 3:18 AM, Job wrote: > > Hello, > > we have a table with an heavy traffic of pg_bulkload and delete of records. > The size pass, in only one day, for example for 1Gb to 4Gb and then 1Gb back. > > We have important problems on size and the only way to gain free space is > is

Re: [GENERAL] Stored procedure version control

2016-06-29 Thread Scott Marlowe
On Wed, Jun 29, 2016 at 12:00 PM, Adrian Klaver wrote: > On 06/29/2016 09:37 AM, Mark Morgan Lloyd wrote: >> >> Elsewhere, somebody was asking how people implemented version control >> for stored procedures on (MS) SQL Server. >> >> The consensus was that this is probably best managed by using scr

Re: [GENERAL] Replication with non-read-only standby.

2016-06-30 Thread Scott Marlowe
On Thu, Jun 30, 2016 at 7:15 AM, Nick Babadzhanian wrote: > Setup: > 2 PostgreSQL servers are geographically spread. The first one is used for an > application that gathers data. It is connected to the second database that is > used to process the said data. Connection is not very stable nor is

Re: [GENERAL] psql connection option: statement_timeout

2016-07-03 Thread Scott Marlowe
On Sun, Jul 3, 2016 at 5:15 PM, Melvin Davidson wrote: > > > On Sun, Jul 3, 2016 at 6:54 PM, Craig Boyd wrote: > >> Hello All, >> >> I am something of a newbie and I am trying to understand how to pass >> connection options using the psql client. My understanding is that it is >> possible to do

Re: [GENERAL] psql connection option: statement_timeout

2016-07-03 Thread Scott Marlowe
correction: alter user reporting set statement_timemout=60 is handy for users that should never take a long time to connect. should read alter user reporting set statement_timemout=60 is handy for users that should never take a long time to run a statement. -- Sent via pgsql-general mailing l

Re: [GENERAL] MediaWiki + PostgreSQL is not ready for production?

2016-07-20 Thread Scott Marlowe
On Mon, Jul 18, 2016 at 10:14 PM, Tatsuo Ishii wrote: > I found following comment for using PostgreSQL with MediaWiki: > > https://www.mediawiki.org/wiki/Compatibility#Database > > "Anything other than MySQL or MariaDB is not recommended for > production use at this point." > > This is a sad and d

Re: [GENERAL] Uber migrated from Postgres to MySQL

2016-07-28 Thread Scott Marlowe
On Wed, Jul 27, 2016 at 9:51 AM, Geoff Winkless wrote: > On 27 July 2016 at 15:22, Scott Mead wrote: >> >> "The bug we ran into only affected certain releases of Postgres 9.2 and >> has been fixed for a long time now. However, we still find it worrisome that >> this class of bug can happen at al

Re: [GENERAL] Uber migrated from Postgres to MySQL

2016-07-28 Thread Scott Marlowe
On Thu, Jul 28, 2016 at 10:32 AM, Alex Ignatov wrote: > > Oh, so in contrast to "Oracle world" "Postgres world" DBA in their right > to do major upgrade without complete and tested backup? > Ok, I understand you. In Postgres world there always sky is blue and sun is > shining. Of course we hav

Re: [GENERAL] Uber migrated from Postgres to MySQL

2016-07-28 Thread Scott Marlowe
On Thu, Jul 28, 2016 at 11:23 AM, Alex Ignatov wrote: > > On 28.07.2016 19:43, Scott Marlowe wrote: >> >> On Thu, Jul 28, 2016 at 10:32 AM, Alex Ignatov >> wrote: >>> >>> Oh, so in contrast to "Oracle world" "Postgres world" DBA i

Re: [GENERAL] ON CONFLICT does not support deferrable unique constraints

2016-08-24 Thread Scott Marlowe
On Wed, Aug 24, 2016 at 6:05 AM, Andreas Joseph Krogh wrote: > > Hope some -hackers read this... > > Are there any plans to lift this restriction? I'm trying to figure out a method for making this work in my head. These two things seem kind of opposed to each other. -- Sent via pgsql-general m

Re: [GENERAL] What limits Postgres performance when the whole database lives in cache?

2016-09-02 Thread Scott Marlowe
On Fri, Sep 2, 2016 at 4:49 AM, dandl wrote: > Re this talk given by Michael Stonebraker: > > http://slideshot.epfl.ch/play/suri_stonebraker > > > > He makes the claim that in a modern ‘big iron’ RDBMS such as Oracle, DB2, MS > SQL Server, Postgres, given enough memory that the entire database liv

Re: [GENERAL] 2.5TB Migration from SATA to SSD disks - PostgreSQL 9.2

2016-09-02 Thread Scott Marlowe
On Thu, Sep 1, 2016 at 8:48 PM, Patrick B wrote: > Hi guys, > > I'll be performing a migration on my production master database server, > which is running PostgreSQL 9.2 atm, from SATA disks to SSD disks. > I've got some questions about it, and it would be nice if u guys could share > your experie

Re: [GENERAL] PostgreSQL Database performance

2016-09-06 Thread Scott Marlowe
On Fri, Sep 2, 2016 at 9:38 PM, Pradeep wrote: > Dear Team, > > > > Could you please help me, after changing the below parameters in PostgreSQL > configuration file it was not reflecting in OS level and also Database > performance is degrading. > > > > Example: I am using Windows 2008 R2 server .F

Re: [GENERAL] PostgreSQL Database performance

2016-09-06 Thread Scott Marlowe
On Tue, Sep 6, 2016 at 1:18 PM, Steve Atkins wrote: > >> On Sep 6, 2016, at 12:08 PM, Scott Marlowe wrote: >> >> On Fri, Sep 2, 2016 at 9:38 PM, Pradeep wrote: >>> >>> max_connections = 100 >>> shared_buffers = 512MB >>> effective_cache_

Re: [GENERAL] 2.5TB Migration from SATA to SSD disks - PostgreSQL 9.2

2016-09-08 Thread Scott Marlowe
On Wed, Sep 7, 2016 at 5:00 PM, Jim Nasby wrote: > On 9/2/16 11:44 AM, David Gibbons wrote: >> >> rsync -va /var/lib/pgsql/ /var/lib/pgsql2/ >> service postgres stop >> rsync -va /var/lib/pgsql/ /var/lib/pgsql2/ >> >> The second rsync will only copy the deltas from the first, it still has >> to go

Re: [GENERAL] Postgres UPGRADE from 9.2 to 9.4

2016-09-08 Thread Scott Marlowe
On Tue, Sep 6, 2016 at 5:25 PM, John R Pierce wrote: > On 9/6/2016 4:20 PM, Melvin Davidson wrote: >> >> If you use slony to replicate, you CAN have 9.2 on the master and 9.4 on >> the slave. > > > does rackspace support slony? how about amazon dms ? > > slony requires configuring replication on

Re: [GENERAL] 2.5TB Migration from SATA to SSD disks - PostgreSQL 9.2

2016-09-12 Thread Scott Marlowe
On Sun, Sep 11, 2016 at 3:26 AM, Patrick B wrote: > > > 2016-09-11 14:09 GMT+12:00 Jim Nasby : >> >> On 9/8/16 3:29 PM, David Gibbons wrote: >>> >>> >>> Isn't this heading in the wrong direction? We need to be more >>> precise than 0 (since 0 is computed off of rounded/truncated time >>>

Re: [GENERAL] Multiple multithreaded insert

2016-10-14 Thread Scott Marlowe
On Fri, Oct 14, 2016 at 7:12 AM, Арсен Арутюнян wrote: > Hi, everyone! > > I have a table: > > create table testpr(id serial,priority integer,unique(priority) DEFERRABLE, > primary key(id)); > This: > and a trigger which, when added to this table, automatically sets priority > as the maximum val

Re: [GENERAL] Strange? BETWEEN behaviour.

2016-10-20 Thread Scott Marlowe
On Thu, Oct 20, 2016 at 6:27 AM, Bjørn T Johansen wrote: > On Thu, 20 Oct 2016 14:04:51 +0200 > vinny wrote: > >> On 2016-10-20 13:51, Bjørn T Johansen wrote: >> > I have the following SQL: >> > >> > SELECT * from table WHERE date BETWEEN to_timestamp('20.10.2016 >> > 00:00:00','DD.MM. HH24:M

Re: [GENERAL] How to hint 2 coulms IS NOT DISTINCT FROM each other

2016-10-28 Thread Scott Marlowe
On Fri, Oct 28, 2016 at 10:29 AM, Kim Rose Carlsen wrote: > Hi > > I was wondering if there is a way to hint that two columns in two different > tables IS NOT DISTINCT FROM each other. So that the optimizer may assume if > table_a.key = 'test' THEN table_b.key = 'test' . > > The equals operator al

Re: [GENERAL] How to hint 2 coulms IS NOT DISTINCT FROM each other

2016-10-29 Thread Scott Marlowe
On Sat, Oct 29, 2016 at 6:55 AM, Kim Rose Carlsen wrote: >> try this :-D > >> create or replace function indf(anyelement, anyelement) returns anyelement >> as >> $$ >> select $1 = $2 or ($1 is null and $2 is null); >> $$ language sql; >> >> CREATE VIEW view_circuit_with_status AS ( >>SELECT

Re: [GENERAL] Turning slave into a master - PostgreSQL 9.2

2016-11-01 Thread Scott Marlowe
On Mon, Oct 31, 2016 at 8:01 PM, Patrick B wrote: > If I change recovery.conf: > > recovery_target_time = '2016-10-30 02:24:40' > > > I get error: > > FATAL: requested recovery stop point is before consistent recovery point You can try using pg_basebackup to get the replica setup. In 9.2 you got

Re: [GENERAL] Statistics on index usage

2016-11-01 Thread Scott Marlowe
On Tue, Nov 1, 2016 at 8:43 AM, François Battail wrote: > Dear List, > > does pgsql maintains statistics on index usage? I mean just a counter > for each index in the database, incremented each time time it is used. > It would be useful to help cleaning almost unused index and to avoid > poisoning

Re: [GENERAL] Turning slave into a master - PostgreSQL 9.2

2016-11-01 Thread Scott Marlowe
On Tue, Nov 1, 2016 at 1:43 PM, Patrick B wrote: > > > 2016-11-02 2:55 GMT+13:00 Scott Marlowe : >> >> On Mon, Oct 31, 2016 at 8:01 PM, Patrick B >> wrote: >> > If I change recovery.conf: >> > >> > recovery_target_time = '2016-

Re: [GENERAL] Hardware recommendations?

2016-11-02 Thread Scott Marlowe
On Wed, Nov 2, 2016 at 11:40 AM, Joshua D. Drake wrote: > On 11/02/2016 10:03 AM, Steve Atkins wrote: >> >> I'm looking for generic advice on hardware to use for "mid-sized" >> postgresql servers, $5k or a bit more. >> >> There are several good documents from the 9.0 era, but hardware has moved >>

Re: [GENERAL] Hardware recommendations?

2016-11-02 Thread Scott Marlowe
On Wed, Nov 2, 2016 at 4:19 PM, John R Pierce wrote: > On 11/2/2016 3:01 PM, Steve Crawford wrote: >> >> After much cogitation I eventually went RAID-less. Why? The only option >> for hardware RAID was SAS SSDs and given that they are not built on >> electro-mechanical spinning-rust technology it

Re: [GENERAL] Postgresql errors on Windows with F-Secure AntiVirus

2016-11-09 Thread Scott Marlowe
On Wed, Nov 9, 2016 at 11:29 AM, Moreno Andreo wrote: > Hi again, > our support team is reporting cases where postgres connections are > suddenly dropped, but reconnecting again soon everyting is OK. > Environment is PostgreSQL 9.1 on Windows (various versions) > Asfer some research, I found o

Re: [GENERAL] Postgresql errors on Windows with F-Secure AntiVirus

2016-11-09 Thread Scott Marlowe
On Wed, Nov 9, 2016 at 11:56 AM, Scott Marlowe wrote: > On Wed, Nov 9, 2016 at 11:29 AM, Moreno Andreo > wrote: >> Hi again, >> our support team is reporting cases where postgres connections are >> suddenly dropped, but reconnecting again soon everyting is OK. >

Re: [GENERAL] pg_dumpall: could not connect to database "template1": FATAL:

2016-11-12 Thread Scott Marlowe
On Sat, Nov 12, 2016 at 2:31 PM, Adrian Klaver wrote: > On 11/12/2016 01:20 PM, aws backup wrote: >> >> Hi, >> >> I try to make pg_dumpall backups from a PostgreSQL 9.5 server which is >> part of the DaVinci Resolve 12.5.3 App on a Mac OS X 10.11.6 system. >> >> Unfortunately I get following failu

Re: [GENERAL] Disabling inheritance with query.

2016-12-21 Thread Scott Marlowe
On Wed, Dec 21, 2016 at 3:36 PM, Edmundo Robles wrote: > Hi! > > i need disable inheritance from many tables in a query like > > "delete from pg_inherits where inhparent=20473" instead alter table ... > > but is safe? which is the risk for database if i delete it? You could change the s

Re: [GENERAL] Unique index problem

2015-12-20 Thread Scott Marlowe
On Sun, Dec 20, 2015 at 8:50 AM, Sterpu Victor wrote: > Hello > > I created a unique index that doesn't seem to work when one column is NULL. > Index is created like this: CREATE UNIQUE INDEX lab_tests_groups_siui_uni ON > lab_tests_groups_siui(id_lab_tests_siui, id_lab_tests_groups, valid_from, >

Re: [GENERAL] Unique index problem

2015-12-20 Thread Scott Marlowe
On Sun, Dec 20, 2015 at 9:00 AM, Scott Marlowe wrote: > On Sun, Dec 20, 2015 at 8:50 AM, Sterpu Victor wrote: >> Hello >> >> I created a unique index that doesn't seem to work when one column is NULL. >> Index is created like this: CREATE UNIQUE IN

Re: [GENERAL] Unique index problem

2015-12-21 Thread Scott Marlowe
On Sun, Dec 20, 2015 at 11:39 PM, Sterpu Victor wrote: > Thank you. > > I used the syntax with 2 indexes, it works for me. > But why does NULL != NULL? Because NULL literally means "an unknown, possibly unknowable value." You need to stop thinking of NULL as A value. It is not. -- Sent via pg

Re: [GENERAL] Code of Conduct: Is it time?

2016-01-05 Thread Scott Marlowe
On Tue, Jan 5, 2016 at 2:09 PM, Joshua D. Drake wrote: > On 01/05/2016 11:08 AM, Roland van Laar wrote: >> >> >> >> On January 5, 2016 5:47:16 PM GMT+01:00, "Joshua D. Drake" >> wrote: >>> >>> Hello, >>> >>> I had a hard time writing this email. I think Code of Conducts are >>> non-essential, a w

Re: [GENERAL] Postgresql 9.3 not coming up after restart in centos

2016-01-06 Thread Scott Marlowe
On Wed, Jan 6, 2016 at 12:36 PM, balajishanmu...@live.in wrote: > By application I mean centOS. > > We are starting and stopping Postgres using systemd service. We have a > service file called postgresql9.3.service which is used to start or stop > Postgres. > > Excerpts of postgresql9.3.service >

Re: [GENERAL] Postgresql 9.3 not coming up after restart in centos

2016-01-07 Thread Scott Marlowe
On Wed, Jan 6, 2016 at 2:08 PM, balajishanmu...@live.in wrote: > Most of the time I will be restarting centOS by issuing reboot command. Which > will do the orderly shutdown of all the service and sometimes just pull the > plug. > > But the issue appears to be random. Is there a way that before Po

Re: [GENERAL] Postgresql 9.3 not coming up after restart in centos

2016-01-07 Thread Scott Marlowe
On Thu, Jan 7, 2016 at 1:41 PM, balajishanmu...@live.in wrote: > Hi, > > For storage I am using a 2.5inch SATA 3 SSD hard disk. It is about 60 GB. I > am yet to get the log. I will post the Postgres log once I have it. > > Thanks! Yeah a lot of cheaper consumer grade SSDs don't fsync safely. Ther

Re: [GENERAL] Cannot create role, no default superuser role exists

2016-03-10 Thread Scott Marlowe
For future reference you can start the postmaster in single user mode and create a new postgres account or grant the current one superuser access if this happens again. Just google "Postgresql single user mode". -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make change

Re: [GENERAL] Regarding connection drops for every few minutes

2016-03-11 Thread Scott Marlowe
On Fri, Mar 11, 2016 at 2:22 AM, Durgamahesh Manne wrote: > hi > > the following info generating in pg_log > > LOG: could not receive data from client: Connection reset by peer > LOG: could not receive data from client: Connection reset by peer > LOG: could not receive data from client: Connect

Re: [GENERAL] Regarding connection drops for every few minutes

2016-03-11 Thread Scott Marlowe
On Fri, Mar 11, 2016 at 3:22 AM, Durgamahesh Manne wrote: > Hi Sir > > As per above discussion.GOOD response from PostgreSQL > > i am very happy to work on PostgreSQL.Super fast response only from postgres > team regarding i asked any question related to postgres > > regards > mahesh > > On Fr

Re: [GENERAL] PostgreSQL advocacy

2016-03-21 Thread Scott Marlowe
On Mon, Mar 21, 2016 at 7:44 AM, Mark Morgan Lloyd wrote: > If anybody puts together a "just the facts" document after Oracle's attack > on PostgreSQL in Russia, please make sure it's drawn to the attention of > this mailing list for the benefit of those who aren't in -advocacy. > > I was discussi

Re: [GENERAL] PostgreSQL advocacy

2016-03-22 Thread Scott Marlowe
On Tue, Mar 22, 2016 at 9:15 AM, Thomas Kellerer wrote: > Bruce Momjian schrieb am 22.03.2016 um 16:07: >> >> However, I do think database upgrades are easier with Oracle RAC > > I think you can do a rolling upgrade with a standby, but I'm not entirely > sure. I find Slony good for upgrading ver

Re: [GENERAL] I/O - Increase RAM

2016-04-13 Thread Scott Marlowe
On Wed, Apr 13, 2016 at 2:43 PM, drum.lu...@gmail.com wrote: > > Hi all, > > At the moment I'm having 100% I/O during the day. My server has SATA HDs, > and it can't be changed now. > So, to solve the problem (or at least try) I was thinking about double the > RAM, and by doing that, increasing t

Re: [GENERAL] Scaling Database for heavy load

2016-05-11 Thread Scott Marlowe
On Wed, May 11, 2016 at 4:09 AM, Digit Penguin wrote: > Hello, > > > we use PostgreSql 9.x in conjunction with BIND/DNS for some Companies with > about 1.000 queries per second. > Now we have to scale the system up to 100.000 queries per second (about). > > Bind/DNS is very light and i think can n

Re: [GENERAL] Corruption of files in PostgreSQL

2007-06-04 Thread Scott Marlowe
Paolo Bizzarri wrote: On 6/2/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Paolo Bizzarri" <[EMAIL PROTECTED]> writes: > On 6/2/07, Tom Lane <[EMAIL PROTECTED]> wrote: >> Please provide a reproducible test case ... > as explained above, the problem seems quite random. So I need to > understand what

Re: [GENERAL] Foreign keys and indexes

2007-06-05 Thread Scott Marlowe
Marc Compte wrote: Thanks to everyone for the prompt reply :) Good thing about answers is when they raise up new questiosn, so you can keep on learning all the time. This one answer, for instance, brings me another question. Does having a composite primary mean the system will create an indi

Re: [GENERAL] Corruption of files in PostgreSQL

2007-06-05 Thread Scott Marlowe
Greg Smith wrote: On Tue, 5 Jun 2007, Paolo Bizzarri wrote: On 6/4/07, Scott Marlowe <[EMAIL PROTECTED]> wrote: http://lwn.net/Articles/215868/ documents a bug in the 2.6 linux kernel that can result in corrupted files if there are a lot of processes accessing it at once. in fact, w

Re: [GENERAL] Running v8.1 amd v8.2 at the same time for a transition

2007-06-05 Thread Scott Marlowe
Vincenzo Romano wrote: Hi all. I need to run both 8.1 and 8.2 at the same time in order to check everything in 8.2 *before* shutting 8.1 down. I need to run both as I only have one machine available. I'm using a debian derivateive (Kubuntu) that provides a nice pg_wrapper mechanism to direct conn

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

2007-06-07 Thread Scott Marlowe
Anton Melser wrote: 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 l

Re: [GENERAL] Limitations on 7.0.3?

2007-06-08 Thread Scott Marlowe
ARTEAGA Jose wrote: Also worth mentioning is that I just this week found out about a very, very important parameter "shared buffers". Ever since the original person setup our PG (individual no longer with us) this DB had been running without any major glitches, albeit slow. All this time the shar

Re: [GENERAL] pg_xlog - files are guaranteed to be sequentialy named?

2007-06-13 Thread Scott Marlowe
Alvaro Herrera wrote: Johannes Konert wrote: Hi pgsql-list-members, I currently write a small script that deletes outdated xlog-files from my backup-location. Because I do not want to rely on creation-date, I found it usable to use the result of ln | sort -g -r Thus the newest WAL xlog-fil

Re: [GENERAL] DeadLocks...

2007-06-14 Thread Scott Marlowe
[EMAIL PROTECTED] wrote: I found a problem with my application which only occurs under high loads (isn't that always the case?). snippets of perl... insert into tokens (token) select values.token from (values TOKEN_LIST_STRING) as values(token) left outer join tokens t using (token) where t.tok

Re: [GENERAL] COPY Command and a non superuser user?

2007-06-14 Thread Scott Marlowe
Warren wrote: How do I get a non superuser user to be able to run the COPY command? You can copy to / from the stdin. non-superusers cannot run copy to / from a file, since the copy to / from a file does so with the access authority of the postgres user and could be used to do "bad things" T

Re: [GENERAL] allocate chunk of sequence

2007-06-15 Thread Scott Marlowe
Gary Fu wrote: hello, I try to allocate a chunk of ids from a sequence with the following proc. However, if I don't use the 'lock lock_table', the proc may not work when it runs at the same time by different psql sessions. Is there a better way without using the 'lock lock_table' ? a

Re: [GENERAL] allocate chunk of sequence

2007-06-20 Thread Scott Marlowe
PFC wrote: The chunk to be allocated is not the same size, so to set the increment value will not help. I'm sometimes not that subtle, so I'd just use a BIGINT sequence. Think about the largest chunk you'll ever get (probably less than 2^30 rows, yes ?), set this sequence increment to t

Re: [GENERAL] persistent db connections in PHP

2007-06-20 Thread Scott Marlowe
[EMAIL PROTECTED] wrote: This seems to be a problem with PHP, or at least my set up. I'm writing pages in basically the same way. Each page has an include at the top that gets you a database session. The function, either pg_connect() or mysql_connect(), is supposed to either create a new connect

Re: [GENERAL] standard LOB support

2007-06-20 Thread Scott Marlowe
EBIHARA, Yuichiro wrote: Hi, I'm developing a software that supports several RDBMSs including PostgreSQL. The software needs an ability to handle large objects and now it uses 'bytea' datatype for binary data and 'text' for text data. But for portability, I'd rather use BLOB and CLOB defined

Re: [GENERAL] VACUUM ANALYZE extremely slow

2007-06-20 Thread Scott Marlowe
Sergei Shelukhin wrote: This is my first (and, by the love of the God, last) project w/pgsql and everything but the simplest selects is so slow I want to cry. This is especially bad with vacuum analyze - it takes several hours for a database of mere 15 Gb on a fast double-core server w/2Gb of RAM

Re: [GENERAL] insane index scan times

2007-06-20 Thread Scott Marlowe
Sergei Shelukhin wrote: This is just an example isolating the problem. Actual queries contain more tables and more joins and return reasonable amount of data. Performance of big indices however is appalling, with planner always reverting to seqscan with default settings. I tried to pre-filter th

Re: [GENERAL] [PERFORM] [ADMIN] Postgres VS Oracle

2007-06-20 Thread Scott Marlowe
Andrew Kelly wrote: On Mon, 2007-06-18 at 13:02 -0400, Jonah H. Harris wrote: On 6/18/07, Andreas Kostyrka <[EMAIL PROTECTED]> wrote: As a cynic, I might ask, what Oracle is fearing? As a realist, I might ask, how many times do we have to answer this type of anti-commercial-data

Re: [GENERAL] Excell

2007-06-21 Thread Scott Marlowe
David Gardner wrote: Agreed ODBC is the way to go, depending on what you are doing, Access may be helpfull as an intermediate step. Joshua D. Drake wrote: Bob Pawley wrote: Hi All Is there a fast and easy method of transferring information between MS Excel and PostgreSQL?? odbc? Anot

Re: [GENERAL] persistent db connections in PHP

2007-06-21 Thread Scott Marlowe
ables in. You wouldn't expect to be given back the same connection (and hence the same temp tables) from a pool of connections - they're returned randomly. Scott Marlowe wrote: MySQL reuses old connections within the same script. PostgreSQL's php extension does not, it starts a new

Re: [GENERAL] Excell

2007-06-21 Thread Scott Marlowe
Csaba Nagy wrote: On Thu, 2007-06-21 at 16:45, Scott Marlowe wrote: Another option is to use your favorite scripting language and throw an excel header then the data in tab delimited format. Or even in excel xml format. Why would you need any scripting language ? COPY supports CSV

Re: [GENERAL] Throwing exceptions

2007-06-21 Thread Scott Marlowe
Germán Hüttemann Arza wrote: Hi, I need a way to throw a message in a function, when an exception occurs, but I don't want to write again and again the same message in every place I need to throw it. So, is there a way to handle this situation in a more general manner? Why not create a tabl

Re: [GENERAL] Establishing a primary key

2007-06-22 Thread Scott Marlowe
Bob Pawley wrote: I have numerous entries in a column of table 1, some of which are duplicated. I need to transfer this information to table 2 so that I have column that can be used as a primery key. Any help is appreciated. So, I take it you're wanting to have this so that table 1 stays a

Re: [GENERAL] Crash in PostgreSQL-8.2.4 while executing query

2007-07-07 Thread Scott Marlowe
On 7/7/07, rupesh bajaj <[EMAIL PROTECTED]> wrote: Hi, When I run the following query Postmaster crashes. For your reference I have attached information regarding the query (query plan, table , index, server log). My observation is that when Postmaster starts taking lot of memory because of which

Re: [GENERAL] [PERFORM] Parrallel query execution for UNION ALL Queries

2007-07-18 Thread Scott Marlowe
On 7/18/07, Benjamin Arai <[EMAIL PROTECTED]> wrote: Hi, If I have a query such as: SELECT * FROM (SELECT * FROM A) UNION ALL (SELECT * FROM B) WHERE blah='food'; Assuming the table A and B both have the same attributes and the data between the table is not partitioned in any special way, does

Re: [GENERAL] 8.2.4 signal 11 with large transaction

2007-07-20 Thread Scott Marlowe
On 7/20/07, Bill Moran <[EMAIL PROTECTED]> wrote: In response to Tom Lane <[EMAIL PROTECTED]>: > Bill Moran <[EMAIL PROTECTED]> writes: > > I'm now full of mystery and wonder. It would appear as if the > > underlying problem has something to do with PHP, but why should this > > cause a backend

Re: [GENERAL] Need help with bash script and postgresql

2007-07-23 Thread Scott Marlowe
On 7/23/07, Chuck Payne <[EMAIL PROTECTED]> wrote: Hey, I have spend the last several days looking for a website or how to that would show me how to call postgresql in bash script. I know that in mysql I can do like this for i in `cat myfile.txt` ; do mysql -uxxx -p -Asse mydatabase "inse

Re: [GENERAL] Linux distro

2007-08-01 Thread Scott Marlowe
On 8/1/07, Madison Kelly <[EMAIL PROTECTED]> wrote: > Joseph S wrote: > > I just moved one of my desktops and my laptop from Fedora 6 to Unbuntu > > 7.04 because Fedora lacked hardware support that Unbuntu and my Fedora > > machines had all sorts of problems like sound dropping out and machines > >

Re: [GENERAL] why is the LIMIT clause slowing down this SELECT?

2007-08-01 Thread Scott Marlowe
On 8/1/07, Mason Hale <[EMAIL PROTECTED]> wrote: > On a 8.1.9 version database that has been recently vacuumed and > analyzed, I'm seeing some dramatic performance degradation if a limit > clause is included in the query. This seems counter-intuitive to me. > > Here's the query and explain plan WIT

Re: [GENERAL] Linux distro

2007-08-01 Thread Scott Marlowe
On 8/2/07, Andrej Ricnik-Bay <[EMAIL PROTECTED]> wrote: > On 8/2/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > > PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND > > > 4735 root 18 0 52524 7204 4304 S 0.0 0.4 0:00.01 httpd > > > 4820 root 15 0 141m 6648

Re: [GENERAL] What do people like to monitor (or in other words, what might be nice in pgsnmpd)?

2007-08-02 Thread Scott Marlowe
I'd like to know what the age of the oldest running transaction is. i.e. hunt look out for old idle in transaction transactions that are holding up vacuuming. Info on the shared buffers like % used, % that hasn't been updated or seen in x minutes / hours / days. % used on various tablespaces con

Re: [GENERAL] how to detect the backup database every day

2007-08-07 Thread Scott Marlowe
On 8/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello all > > I use a crontab job to backup and restore my database every midnight every > day (using pg_dump and restore...) Backup from one machine, restore to another, right? > My cron job run well for a while. However, today I discover

  1   2   3   4   5   6   7   8   9   10   >