[GENERAL] querying the age of a row

2007-06-07 Thread Lonni J Friedman
Greetings, I've got a PostgreSQL-8.1.x database on a Linux box. I have a need to determine which rows in a specific table are less than 24 hours old. I've tried (and failed) to do this with the age() function. From what I can tell, age() only has granularity down to days, and seems to assume tha

Re: [GENERAL] querying the age of a row

2007-06-07 Thread Lonni J Friedman
imple query to select, update, or delete WHERE create_dt < (NOW() - interval '1 day')... HTH.... ""Lonni J Friedman"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Greetings, > I've got a PostgreSQL-8.1.x database on a Linux box.

Re: [GENERAL] Anyone use PG with kvm/virtio? Any gotchas or recommended settings?

2011-01-19 Thread Lonni J Friedman
I'm using it with Fedora14 inside the VM. No problems, although we've only been using it for a few months. You sure that your host HW isn't at fault? On Wed, Jan 19, 2011 at 10:58 AM, bubba postgres wrote: > > Looks like the recommended settings are using the virtio interface, > cache=none, and

[GENERAL] UPDATE failed with 'ERROR: index row requires 8968 bytes, maximum size is 8191'

2011-04-12 Thread Lonni J Friedman
Greetings, I've got a postgresql-8.4.7 instance running on 64bit Linux that recently failed a SQL UPDATE with the error: ERROR: index row requires 8968 bytes, maximum size is 8191 The index in question that failed is defined as: "results_failinfo_index" btree (failinfo) Its extermely rare, but n

[GENERAL] updating rows which have a common value forconsecutive dates

2011-04-13 Thread Lonni J Friedman
Greetings, I have a table full of automated test data, which continuously has new unique data inserted: Column |Type | Modifiers +-+- id | integer

Re: [GENERAL] updating rows which have a common value forconsecutive dates

2011-04-13 Thread Lonni J Friedman
then use rank() to number each test run > sequentially.  Then you can limit the results to  ( rank() <= 2 AND > current_status = 'FAILED' ). > > David J. > > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgres

Re: [GENERAL] updating rows which have a common value forconsecutive dates

2011-04-14 Thread Lonni J Friedman
ly as part of a "WITH" CTE. >  You for sure need to in order to. Properly utilize the rank() function > limiting. > > Dave > > On Apr 14, 2011, at 0:52, Lonni J Friedman wrote: > >> Hi David, >> Thanks for your reply.  I'm using 8.4.7, so window functions

[GENERAL] window function ordering not working as expected

2015-02-17 Thread Lonni J Friedman
Greetings, I have a postgresql-9.3.x database with a table with a variety of date stamped test results, some of which are stored in json format (natively in the database). I'm attempting to use some window functions to pull out specific data from the test results over a a time window, but part of t

Re: [GENERAL] window function ordering not working as expected

2015-02-17 Thread Lonni J Friedman
On Tue, Feb 17, 2015 at 4:18 PM, Tom Lane wrote: > Lonni J Friedman writes: >> I'm interested in seeing: >> * the date for the most recent result >> * test name (identifier) >> * most recent result (decimal value) >> * the worst (lowest decimal value) test

Re: [GENERAL] pgpool2 load balancing not working

2013-01-04 Thread Lonni J Friedman
On Fri, Jan 4, 2013 at 3:42 PM, Greg Donald wrote: > Sorry if this is the wrong list, but I've been stuck for a couple days > now. I tried pgpool-general but that list appears to not like me. > I'm not getting any posts and my post hasn't shown up in the archives. Specifically which address are

[GENERAL] data corruption when using base backups generated from hot standby

2013-01-10 Thread Lonni J Friedman
Greetings, I'm running postgres-9.2.2 in a Linux-x86_64 cluster with 1 master and several hot standby servers. Since upgrading to 9.2.2 from 9.1.x a few months ago, I switched from generating a base backup on the master, to generating it on a dedicated slave/standby (to reduce the load on the mast

[GENERAL] special procedure required when running pg_basebackup from a standby?

2013-01-13 Thread Lonni J Friedman
Greetings, I'm running postgres-9.2.2 in a Linux-x86_64 cluster with 1 master and several hot standby servers. Since upgrading to 9.2.2 from 9.1.x a few months ago, I switched from generating a base backup on the master, to generating it on a dedicated slave/standby (to reduce the load on the mast

Re: [GENERAL] broke postgres, how to fix??

2013-02-26 Thread Lonni J Friedman
Did you shut down the 'old' postgres before copying these files? Did you (re)configure the 'new' postgres to set its $PGDATA directory to the location of the 'new' files? On Fri, Feb 22, 2013 at 3:46 PM, JD Wong wrote: > I tried copying postgres over to a new directory. it was working until I >

Re: [GENERAL] broke postgres, how to fix??

2013-02-26 Thread Lonni J Friedman
On Tue, Feb 26, 2013 at 4:02 PM, JD Wong wrote: > Hi Adrian, yes I completely copied the config-file and data directories > over. > > Lonnie, I don't remember. I might not have shut down the "old" postgres, > yes I set PGDATA accordingly. That's guaranteed to break everything badly. -- Sent v

Re: [GENERAL] broke postgres, how to fix??

2013-02-26 Thread Lonni J Friedman
What is "read only style", and how does postgres know about this? http://www.postgresql.org/docs/9.2/static/backup-file.html > > Thanks, > -JD > > On Tue, Feb 26, 2013 at 7:04 PM, Lonni J Friedman > wrote: >> >> On Tue, Feb 26, 2013 at 4:02 PM, JD Wong wrot

Re: [GENERAL] Replication stopped on 9.0.2 after making change to conf file

2013-03-09 Thread Lonni J Friedman
It sounds like all you did was setup the slave from scratch with a fresh base backup, without understanding or debugging what caused everything to break. Clearly whatever was wrong on March 5 is still wrong, and nothing has been fixed. The first step in debugging this problem is to look at and/or

Re: [GENERAL] postgres 9.0.2 replicated database is crashing

2013-03-09 Thread Lonni J Friedman
That process merely sets up a new server, it doesn't start streaming, unless the server has been configured correctly. You state that the slave crashed after two hours. How did you make this determination? All you seem to be doing is setting up the slave from scratch repeatedly, and assuming tha

Re: [GENERAL] postgres 9.0.2 replicated database is crashing

2013-03-09 Thread Lonni J Friedman
On Sat, Mar 9, 2013 at 1:51 PM, akp geek wrote: > thank you. As you mentioned, I understood that I am starting the streaming > scratch which is not what I wanted to do. > > Here is what I am planning to . > > Our replication process was down since March5th. > > 1. Is it Ok to get all wals from Mar

Re: [GENERAL] postgres 9.0.2 replicated database is crashing

2013-03-09 Thread Lonni J Friedman
ing for the most straightforward path I'd recommend going to 9.0.12. Also be sure to read the release notes first. > > We use GIST indexes quite a bit. and we gis also > > I recently compiled postgres 9.2 .. > > Regards > > > > On Sat, Mar 9, 2013 at 5:09 PM, Lonn

Re: [GENERAL] replication behind high lag

2013-03-25 Thread Lonni J Friedman
On Mon, Mar 25, 2013 at 12:37 PM, AI Rumman wrote: > Hi, > > I have two 9.2 databases running with hot_standby replication. Today when I > was checking, I found that replication has not been working since Mar 1st. > There was a large database restored in master on that day and I believe > after th

Re: [GENERAL] replication behind high lag

2013-03-25 Thread Lonni J Friedman
On Mon, Mar 25, 2013 at 12:43 PM, AI Rumman wrote: > > > On Mon, Mar 25, 2013 at 3:40 PM, Lonni J Friedman > wrote: >> >> On Mon, Mar 25, 2013 at 12:37 PM, AI Rumman wrote: >> > Hi, >> > >> > I have two 9.2 databases running with hot_standby

Re: [GENERAL] replication behind high lag

2013-03-25 Thread Lonni J Friedman
On Mon, Mar 25, 2013 at 12:55 PM, AI Rumman wrote: > > > On Mon, Mar 25, 2013 at 3:52 PM, Lonni J Friedman > wrote: >> >> On Mon, Mar 25, 2013 at 12:43 PM, AI Rumman wrote: >> > >> > >> > On Mon, Mar 25, 2013 at 3:40 PM, Lonni J Friedman >&

Re: [GENERAL] replication behind high lag

2013-03-25 Thread Lonni J Friedman
On Mon, Mar 25, 2013 at 1:23 PM, AI Rumman wrote: > > > On Mon, Mar 25, 2013 at 4:03 PM, AI Rumman wrote: >> >> >> >> On Mon, Mar 25, 2013 at 4:00 PM, Lonni J Friedman >> wrote: >>> >>> On Mon, Mar 25, 2013 at 12:55 PM, AI Rumman wrote:

Re: [GENERAL] UNLOGGED TEMPORARY tables?

2013-03-25 Thread Lonni J Friedman
I'm pretty sure that unlogged tables and temp tables are two separate & distinct features, with no overlap in functionality. It would be nice if it was possible to create an unlogged temp table. On Sun, Mar 24, 2013 at 1:32 PM, aasat wrote: > I was tested write speed to temporary and unlogged ta

Re: [GENERAL] UNLOGGED TEMPORARY tables?

2013-03-25 Thread Lonni J Friedman
On Mon, Mar 25, 2013 at 4:49 PM, Michael Paquier wrote: > > > On Tue, Mar 26, 2013 at 8:26 AM, Lonni J Friedman > wrote: >> >> I'm pretty sure that unlogged tables and temp tables are two separate >> & distinct features, with no overlap in functionality.

Re: [GENERAL] Streaming replication slave crash

2013-03-29 Thread Lonni J Friedman
Looks like you've got some form of coruption: page 1441792 of relation base/63229/63370 does not exist The question is whether it was corrupted on the master and then replicated to the slave, or if it was corrupted on the slave. I'd guess that the pg_dump tried to read from that page and barfed.

Re: [GENERAL] corrupted item pointer in streaming based replication

2013-04-03 Thread Lonni J Friedman
You should figure out what base/16384/114846.39 corresponds to inside the database. If you're super lucky its something unimportant and/or something that can be recreated easily (like an index). If its something important, then you're only option is to try to drop the object and restore it from t

Re: [GENERAL] Replication terminated due to PANIC

2013-04-25 Thread Lonni J Friedman
If its really index corruption, then you should be able to fix it by reindexing. However, that doesn't explain what caused the corruption. Perhaps your hardware is bad in some way? On Wed, Apr 24, 2013 at 10:46 PM, Adarsh Sharma wrote: > Thanks Sergey for such a quick response, but i dont think

Re: [GENERAL] pg_basebackup, requested WAL has already been removed

2013-05-10 Thread Lonni J Friedman
Its definitely not a bug. You need to set/increase wal_keep_segments to a value that ensures that they aren't recycled faster than the time required to complete the base backup (plus some buffer). On Fri, May 10, 2013 at 9:48 AM, Sergey Koposov wrote: > Hi, > > I've recently started to use pg_ba

Re: [GENERAL] pg_basebackup, requested WAL has already been removed

2013-05-10 Thread Lonni J Friedman
Sergey Koposov wrote: > > On Fri, 10 May 2013, Lonni J Friedman wrote: > >> Its definitely not a bug. You need to set/increase wal_keep_segments >> to a value that ensures that they aren't recycled faster than the time >> required to complete the base back

Re: [GENERAL] Deploying PostgreSQL on CentOS with SSD and Hardware RAID

2013-05-10 Thread Lonni J Friedman
On Fri, May 10, 2013 at 10:20 AM, Merlin Moncure wrote: > On Fri, May 10, 2013 at 12:03 PM, David Boreham > wrote: >> On 5/10/2013 10:21 AM, Merlin Moncure wrote: >>> >>> As it turns out the list of flash drives are suitable for database use is >>> surprisingly small. The s3700 I noted upthread

Re: [GENERAL] Deploying PostgreSQL on CentOS with SSD and Hardware RAID

2013-05-10 Thread Lonni J Friedman
On Fri, May 10, 2013 at 11:23 AM, Steven Schlansker wrote: > > On May 10, 2013, at 7:14 AM, Matt Brock wrote: > >> Hello. >> >> We're intending to deploy PostgreSQL on Linux with SSD drives which would be >> in a RAID 1 configuration with Hardware RAID. >> >> My first question is essentially: ar

Re: [GENERAL] pg_upgrade link mode

2013-05-16 Thread Lonni J Friedman
On Thu, May 16, 2013 at 11:03 AM, Igor Neyman wrote: > > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of AI Rumman > Sent: Thursday, May 16, 2013 1:56 PM > To: Fabio Rueda Carrascosa > Cc: pgsql-general > Subject: Re: [GENERAL] pg_upgrade link m

[GENERAL] how to reference variables in pgbench custom scripts?

2013-06-18 Thread Lonni J Friedman
I'm attempting to write a custom pgbench script (called via the -f option), with a variable set at the top with: \setrandom aid 100 50875000 However, I can't quite figure out how to reference the new aid variable. The documentation simply states that a variable is referenced with a colon in front

[GENERAL] 9.3-beta postgres-fdw COPY error

2013-06-21 Thread Lonni J Friedman
Greetings, I'm trying to test out the new postgres-fdw support in postgresql-9.3 (beta) in preparation for an upgrade from 9.2 later this year. So far, everything is working ok, however one problem I'm encountering is with the COPY command. When I run it against a foreign table (which is also in a

Re: [GENERAL] 9.3-beta postgres-fdw COPY error

2013-06-21 Thread Lonni J Friedman
I was afraid someone would say that. Is this a limitation that might be removed in the future (like 9.4), or is there a technical reason why its not possible to do a COPY against a foreign table? On Fri, Jun 21, 2013 at 10:52 AM, Adrian Klaver wrote: > On 06/21/2013 10:39 AM, Lonni J Fried

Re: [GENERAL] Standby stopped working after PANIC: WAL contains references to invalid pages

2013-06-22 Thread Lonni J Friedman
Looks like some kind of data corruption. Question is whether it came from the master, or was created by the standby. If you re-seed the standby with a full (base) backup, does the problem go away? On Sat, Jun 22, 2013 at 12:43 PM, Dan Kogan wrote: > Hello, > > > > Today our standby instance sto

Re: [GENERAL] Standby stopped working after PANIC: WAL contains references to invalid pages

2013-06-22 Thread Lonni J Friedman
, caught up and has been working for about 2 hours. > > The file in the error message was an index. We rebuilt it just in case. > Is there any way to debug the issue at this point? > > > > -----Original Message- > From: Lonni J Friedman [mailto:netll...@gmail.com] > S

[GENERAL] upgrading from 9.3-beta1 to 9.3-beta2 requires dump & reload?

2013-07-24 Thread Lonni J Friedman
Greetings, I just got around to upgrading from 9.3-beta1 to 9.3-beta2, and was surprised to see that the server was refusing to start. In the log, I'm seeing: 2013-07-24 13:41:47 PDT [7083]: [1-1] db=,user= FATAL: database files are incompatible with server 2013-07-24 13:41:47 PDT [7083]: [2-1] d

Re: [GENERAL] upgrading from 9.3-beta1 to 9.3-beta2 requires dump & reload?

2013-07-24 Thread Lonni J Friedman
On Wed, Jul 24, 2013 at 2:05 PM, Tom Lane wrote: > Alvaro Herrera writes: >> Lonni J Friedman escribió: >>> I'm using the RPMs from yum.postgresql.org on RHEL6. Is this >>> expected, intentional behavior? Do I really need to dump & reload to >>>

[GENERAL] postgres FDW cost estimation options unrecognized in 9.3-beta1

2013-07-26 Thread Lonni J Friedman
Greetings, I have a postgresql-9.3-beta1 cluster setup (from the yum.postgresql.org RPMs), where I'm experimenting with the postgres FDW extension. The documentation ( http://www.postgresql.org/docs/9.3/static/postgres-fdw.html ) references three Cost Estimation Options which can be set for a fore

Re: [GENERAL] postgres FDW cost estimation options unrecognized in 9.3-beta1

2013-07-26 Thread Lonni J Friedman
On Fri, Jul 26, 2013 at 3:28 PM, Tom Lane wrote: > Lonni J Friedman writes: >> nightly=# ALTER SERVER cuda_db10 OPTIONS (SET use_remote_estimate 'true') ; >> ERROR: option "use_remote_estimate" not found > >> Am I doing something wrong, or is this a

Re: [GENERAL] Streaming Replication Randomly Locking Up

2013-08-15 Thread Lonni J Friedman
I've never seen this happen. Looks like you might be using 9.1? Are you up to date on all the 9.1.x releases? Do you have just 1 slave syncing from the master? Which OS are you using? Did you verify that there aren't any network problems between the slave & master? Or hardware problems (like the

Re: [GENERAL] Streaming Replication Randomly Locking Up

2013-08-15 Thread Lonni J Friedman
syncs right > back up and all if working again so if it is a network issue, the > replication is just stopping after some hiccup instead of retrying and > resuming when things are back up. > > Thanks! > > > > On Thu, Aug 15, 2013 at 11:32 AM, Lonni J Friedman > wrote:

Re: [GENERAL] Streaming Replication Randomly Locking Up

2013-08-15 Thread Lonni J Friedman
gt; #log_min_messages = warning > #log_min_error_statement = error > #log_min_duration_statement = -1 > #log_checkpoints = off > #log_connections = off > #log_disconnections = off > #log_error_verbosity = default > > I'm going to have a look at the NICs to make s

Re: [GENERAL] WAL Replication Working but Not Working

2013-08-21 Thread Lonni J Friedman
The first thing to do is look at your server logs around the time when it stopped working. On Wed, Aug 21, 2013 at 7:08 AM, Joseph Marlin wrote: > We're having an issue with our warm standby server. About 9:30 last night, it > stopped applying changes it received in WAL files that are shipped ov

[GENERAL] upgrade from 9.2.x to 9.3 causes significant performance degradation

2013-09-17 Thread Lonni J Friedman
Greetings, I'm running a PostgreSQL 9.3.0 cluster (1 master with two streaming replication hot standby slaves) on RHEL6-x86_64. Yesterday I upgraded from 9.2.4 to 9.3.0, and since the upgrade I'm seeing a significant performance degradation. PostgreSQL simply feels slower. Nothing other than the

Re: [GENERAL] upgrade from 9.2.x to 9.3 causes significant performance degradation

2013-09-17 Thread Lonni J Friedman
On Tue, Sep 17, 2013 at 9:54 AM, Eduardo Morras wrote: > On Tue, 17 Sep 2013 09:19:29 -0700 > Lonni J Friedman wrote: > >> Greetings, >> I'm running a PostgreSQL 9.3.0 cluster (1 master with two streaming >> replication hot standby slaves) on RHEL6-x86_64. Yeste

Re: [GENERAL] upgrade from 9.2.x to 9.3 causes significant performance degradation

2013-09-17 Thread Lonni J Friedman
Thanks for your reply. Comments/answers inline below On Tue, Sep 17, 2013 at 11:28 AM, Jeff Janes wrote: > On Tue, Sep 17, 2013 at 11:22 AM, Lonni J Friedman > wrote: >> >> >> > c) What does logs say? >> >> The postgres server logs look perfectly no

Re: [GENERAL] upgrade from 9.2.x to 9.3 causes significant performance degradation

2013-09-17 Thread Lonni J Friedman
On Tue, Sep 17, 2013 at 3:47 PM, Andres Freund wrote: > Hi, > > On 2013-09-17 09:19:29 -0700, Lonni J Friedman wrote: >> I'm running a PostgreSQL 9.3.0 cluster (1 master with two streaming >> replication hot standby slaves) on RHEL6-x86_64. Yesterday I upgraded >>

Re: [GENERAL] upgrade from 9.2.x to 9.3 causes significant performance degradation

2013-09-18 Thread Lonni J Friedman
On Wed, Sep 18, 2013 at 2:02 AM, Kevin Grittner wrote: > Lonni J Friedman wrote: > >> top shows over 90% of the load is in sys space. vmstat output >> seems to suggest that its CPU bound (or bouncing back & forth): > > Can you run `perf top` during an episode and see

Re: [GENERAL] upgrade from 9.2.x to 9.3 causes significant performance degradation

2013-09-18 Thread Lonni J Friedman
On Wed, Sep 18, 2013 at 2:02 AM, Kevin Grittner wrote: > Lonni J Friedman wrote: > >> top shows over 90% of the load is in sys space. vmstat output >> seems to suggest that its CPU bound (or bouncing back & forth): > > Can you run `perf top` during an episode and see

[GENERAL] partitioned table + postgres_FDW not working in 9.3

2013-09-24 Thread Lonni J Friedman
Greetings, I've got two different 9.3 clusters setup, a & b (on Linux if that matters). On cluster b, I have a table (nppsmoke) that is partitioned by date (month), which uses a function which is called by a trigger to manage INSERTS (exactly as documented in the official documentation for partiti

[GENERAL] postgres FDW doesn't support sequences?

2013-09-25 Thread Lonni J Friedman
I've got two 9.3 clusters, with a postgres foreign data wrapper (FDW) setup to point from one cluster to the other. One of the (foreign) tables associated with the foreign server has a bigint sequence for its primary key, defined as: id | bigint | not null default

Re: [GENERAL] postgres FDW doesn't support sequences?

2013-09-25 Thread Lonni J Friedman
On Wed, Sep 25, 2013 at 2:47 PM, Tom Lane wrote: > Lonni J Friedman writes: >> If I INSERT a new row into the local table (not the foreign table >> version), without specifying the 'id' column explicitly, it >> automatically is assigned the nextval in the seq

Re: [GENERAL] partitioned table + postgres_FDW not working in 9.3

2013-09-26 Thread Lonni J Friedman
anada wrote: > Hi Lonni, > > 2013/9/25 Lonni J Friedman : >> The problem that I'm experiencing is if I attempt to perform an INSERT >> on the foreign nppsmoke table on cluster a, it fails claiming that the >> table partition which should hold the data in the

Re: [GENERAL] partitioned table + postgres_FDW not working in 9.3

2013-09-26 Thread Lonni J Friedman
On Thu, Sep 26, 2013 at 8:52 AM, Tom Lane wrote: > Lonni J Friedman writes: >> Thanks for your reply. This sounds like a relatively simple >> workaround, so I'll give it a try. Is the search_path of the remote >> session that postgres_fdw forces considered to b

[GENERAL] pg_basebackup: ERROR: could not find any WAL files (9.3)

2013-09-26 Thread Lonni J Friedman
Greetings, I've recently pushed a new postgres-9.3 (Linux-x86_64/RHEL6) cluster into production, with one master, and two hot standby streaming replication slaves. Everything seems to be working ok, however roughly half of my pg_basebackup attempts are failing at the very end with the error: pg_b

Re: [GENERAL] Disallow access from psql, or allow access only from specific client app

2011-07-24 Thread Lonni J Friedman
On Sun, Jul 24, 2011 at 2:46 PM, Kurt Buff wrote: > On Sun, Jul 24, 2011 at 14:36, Mario Puntin wrote: >> >> Hi everybody: >> I searched the web trying to find an answer to this, but found none. I have >> a postgresql server and a database, and I granted access to some users. >> However I want th

[GENERAL] streaming replication: one problem & several questions

2011-08-10 Thread Lonni J Friedman
Greetings, I've got three Linux systems (each with Fedora15-x86_64 running PostgreSQL-9.0.4). I'm attempting to get a basic streaming replication setup going with one master & two standby servers. At this point, the replication portion appears to be working. I can run an 'update' statement on th

Re: [GENERAL] streaming replication: one problem & several questions

2011-08-11 Thread Lonni J Friedman
On Thu, Aug 11, 2011 at 8:17 AM, Pedro Sam wrote: > Do your machines have the same architecture?  (64 bit vs 32 bit) Yes, they're all Fedora15-x86_64. -- ~ L. Friedman                                    netll...@gmail.com Llam

Re: [GENERAL] streaming replication: one problem & several questions

2011-08-17 Thread Lonni J Friedman
On Mon, Aug 15, 2011 at 9:34 PM, Fujii Masao wrote: > On Thu, Aug 11, 2011 at 7:19 AM, Lonni J Friedman wrote: >> First the problem.  On *only* one of the two standby servers, I'm >> seeing errors like the following whenever I issue any SQL commands on >> the master w

[GENERAL] pg_restore with -j fails (works without -j option)

2011-08-25 Thread Lonni J Friedman
Greetings, I've got a postgresql-9.0.4 cluster running on a Linux-x86_64 system. I'm going to need to do some maintanence next week which will require dumping & reloading the database on a different physical system. Since I'm interested in minimizing downtime, I figured I'd use pg_restore's "-j" op

Re: [GENERAL] pg_restore with -j fails (works without -j option)

2011-08-26 Thread Lonni J Friedman
On Thu, Aug 25, 2011 at 7:41 PM, Tom Lane wrote: > Lonni J Friedman writes: >> [ this doesn't work: ] >> $ cat 2011-08-25-1314280801-nightly.out | pg_restore -j2 -U lfriedman -v -d >> nightly > > It's basically impossible for that to work.  -j implies spawn

Re: [GENERAL] pg_restore with -j fails (works without -j option)

2011-08-28 Thread Lonni J Friedman
On Sun, Aug 28, 2011 at 6:56 PM, Tom Lane wrote: > I wrote: >> Lonni J Friedman writes: >>> [ this doesn't work: ] >>> $ cat 2011-08-25-1314280801-nightly.out | pg_restore -j2 -U lfriedman -v -d >>> nightly >>> pg_restore: [custom archive

[GENERAL] heavy swapping, not sure why

2011-08-29 Thread Lonni J Friedman
I have several Linux-x68_64 based dedicated PostgreSQL servers where I'm experiencing significant swap usage growth over time. All of them have fairly substantial amounts of RAM (not including swap), yet the amount of swap that postgres is using ramps up over time and eventually hurts performance

Re: [GENERAL] heavy swapping, not sure why

2011-08-29 Thread Lonni J Friedman
On Mon, Aug 29, 2011 at 1:46 PM, Alan Hodgson wrote: > On August 29, 2011 01:36:07 PM Lonni J Friedman wrote: >> I have several Linux-x68_64 based dedicated PostgreSQL servers where >> I'm experiencing significant swap usage growth over time. > > It's the Linux kern

Re: [GENERAL] heavy swapping, not sure why

2011-08-29 Thread Lonni J Friedman
On Mon, Aug 29, 2011 at 2:24 PM, Scott Marlowe wrote: > On Mon, Aug 29, 2011 at 2:57 PM, Lonni J Friedman wrote: >> On Mon, Aug 29, 2011 at 1:46 PM, Alan Hodgson wrote: >>> On August 29, 2011 01:36:07 PM Lonni J Friedman wrote: >>>> I have several Linux-x68_64 base

Re: [GENERAL] heavy swapping, not sure why

2011-08-29 Thread Lonni J Friedman
On Mon, Aug 29, 2011 at 2:38 PM, Merlin Moncure wrote: > On Mon, Aug 29, 2011 at 3:36 PM, Lonni J Friedman wrote: >> I have several Linux-x68_64 based dedicated PostgreSQL servers where >> I'm experiencing significant swap usage growth over time.  All of them >> have

Re: [GENERAL] heavy swapping, not sure why

2011-08-29 Thread Lonni J Friedman
On Mon, Aug 29, 2011 at 2:51 PM, Scott Marlowe wrote: > On Mon, Aug 29, 2011 at 3:38 PM, Lonni J Friedman wrote: >> On Mon, Aug 29, 2011 at 2:24 PM, Scott Marlowe >> wrote: >>> On Mon, Aug 29, 2011 at 2:57 PM, Lonni J Friedman >>> wrote: >>>>

Re: [GENERAL] heavy swapping, not sure why

2011-08-29 Thread Lonni J Friedman
On Mon, Aug 29, 2011 at 3:17 PM, Merlin Moncure wrote: > On Mon, Aug 29, 2011 at 4:45 PM, Lonni J Friedman wrote: >>> using any C code in the backend? this includes 3rd party libraries >>> which link in C, including postgis, pljava, xml2, etc.  Any features >>>

Re: [GENERAL] heavy swapping, not sure why

2011-08-29 Thread Lonni J Friedman
On Mon, Aug 29, 2011 at 5:42 PM, Tom Lane wrote: > Lonni J Friedman writes: >> I have several Linux-x68_64 based dedicated PostgreSQL servers where >> I'm experiencing significant swap usage growth over time.  All of them >> have fairly substantial amounts of RAM (no

Re: [GENERAL] heavy swapping, not sure why

2011-08-30 Thread Lonni J Friedman
On Mon, Aug 29, 2011 at 6:54 PM, peixubin wrote: > You should monitor PageTables value in /proc/meminfo.if the value larger than > 1G,I  Suggest enable hugepages . > > To monitor PageTables: >   # cat /proc/meminfo |grep -i pagetables $ cat /proc/meminfo |grep -i pagetables PageTables: 608

Re: [GENERAL] heavy swapping, not sure why

2011-08-30 Thread Lonni J Friedman
On Tue, Aug 30, 2011 at 3:00 AM, Boszormenyi Zoltan wrote: > Hi, > > 2011-08-29 22:36 keltezéssel, Lonni J Friedman írta: >> ...  I read that >> (max_connections * work_mem) should never exceed physical RAM, and if >> that's accurate, then I suspect that's

Re: [GENERAL] heavy swapping, not sure why

2011-08-30 Thread Lonni J Friedman
On Mon, Aug 29, 2011 at 5:42 PM, Tom Lane wrote: > Lonni J Friedman writes: >> I have several Linux-x68_64 based dedicated PostgreSQL servers where >> I'm experiencing significant swap usage growth over time.  All of them >> have fairly substantial amounts of RAM (no

Re: [GENERAL] heavy swapping, not sure why

2011-08-30 Thread Lonni J Friedman
On Tue, Aug 30, 2011 at 2:55 PM, John R Pierce wrote: > On 08/30/11 12:18 PM, Tom Lane wrote:            total       used       free     shared    buffers     cached >>  Mem:         56481      55486        995          0         15 >>  53298 >>  -/+ buffers/cache:       2

Re: [GENERAL] psql with option -c fails..

2011-09-21 Thread Lonni J Friedman
You can't enclose the query in single quotes and then also use single quotes inside the query. Either escape the quotes inside the query, or enclose the query in double quotes. On Wed, Sep 21, 2011 at 7:54 AM, akp geek wrote: > Hi all - >                I am trying to run the psql command the fo

[GENERAL] significant performance hit whenever autovacuum runs after upgrading from 9.0 -> 9.1

2012-05-21 Thread Lonni J Friedman
Greetings, I have a 4 server postgresql-9.1.3 cluster (one master doing streaming replication to 3 hot standby servers). All of them are running Fedora-16-x86_64. Last Friday I upgraded the entire cluster from Fedora-15 with postgresql-9.0.6 to Fedora-16 with postgresql-9.1.3. I made no changes

[GENERAL] Re: significant performance hit whenever autovacuum runs after upgrading from 9.0 -> 9.1

2012-05-22 Thread Lonni J Friedman
No one has any ideas or suggestions, or even questions? If someone needs more information, I'd be happy to provide it. This problem is absolutely killing me. On Mon, May 21, 2012 at 2:05 PM, Lonni J Friedman wrote: > Greetings, > I have a 4 server postgresql-9.1.3 cluster (one m

[GENERAL] pg_basebackup blocking all queries

2012-05-22 Thread Lonni J Friedman
Greetings, I have a 4 server postgresql-9.1.3 cluster (one master doing streaming replication to 3 hot standby servers). All of them are running Fedora-16-x86_64. Last Friday I upgraded the entire cluster from Fedora-15 with postgresql-9.0.6 to Fedora-16 with postgresql-9.1.3. I'm finding that I

Re: [GENERAL] pg_basebackup blocking all queries

2012-05-22 Thread Lonni J Friedman
rlowe wrote: > Do the queries here help? > > http://wiki.postgresql.org/wiki/Lock_Monitoring > > On Tue, May 22, 2012 at 12:42 PM, Lonni J Friedman wrote: >> Greetings, >> I have a 4 server postgresql-9.1.3 cluster (one master doing streaming >> replication to 3 hot stan

Re: [GENERAL] Re: significant performance hit whenever autovacuum runs after upgrading from 9.0 -> 9.1

2012-05-23 Thread Lonni J Friedman
Thanks for your reply. On Tue, May 22, 2012 at 7:19 PM, Andy Colson wrote: >  On Mon, May 21, 2012 at 2:05 PM, Lonni J Friedman >  wrote: >>> >>> Greetings, >>> >>> When I got in this morning, I found >>> an autovacuum process that had

Re: [GENERAL] Re: significant performance hit whenever autovacuum runs after upgrading from 9.0 -> 9.1

2012-05-23 Thread Lonni J Friedman
On Wed, May 23, 2012 at 9:37 AM, Tom Lane wrote: > Lonni J Friedman writes: >> After banging my head on the wall for  a long time, I happened to >> notice that khugepaged was consuming 100% CPU every time autovacuum >> was running.  I did: >> echo "madvise"

Re: [GENERAL] Re: significant performance hit whenever autovacuum runs after upgrading from 9.0 -> 9.1

2012-05-23 Thread Lonni J Friedman
On Wed, May 23, 2012 at 12:36 PM, Gavin Flower wrote: > On 24/05/12 05:09, Lonni J Friedman wrote: > > On Wed, May 23, 2012 at 9:37 AM, Tom Lane wrote: > > Lonni J Friedman writes: > > After banging my head on the wall for  a long time, I happened to > notice that khug

Re: [GENERAL] Re: significant performance hit whenever autovacuum runs after upgrading from 9.0 -> 9.1

2012-05-23 Thread Lonni J Friedman
On Wed, May 23, 2012 at 3:33 PM, Tom Lane wrote: > Gavin Flower writes: >>> 16 core Xeon X5550 2.67GHz >>> 128GB RAM >>> $PGDATA sits on a RAID5 array comprised of 3 SATA disks.  Its Linux's >>> md software RAID. > >> How does this compare to your other machines running the same, or >> similar, d

Re: [GENERAL] Re: significant performance hit whenever autovacuum runs after upgrading from 9.0 -> 9.1

2012-05-24 Thread Lonni J Friedman
On Wed, May 23, 2012 at 2:45 PM, Gavin Flower wrote: > On 24/05/12 08:18, Lonni J Friedman wrote: > > On Wed, May 23, 2012 at 12:36 PM, Gavin Flower > wrote: > > On 24/05/12 05:09, Lonni J Friedman wrote: > > On Wed, May 23, 2012 at 9:37 AM, Tom Lane wrote: >

Re: [GENERAL] Re: significant performance hit whenever autovacuum runs after upgrading from 9.0 -> 9.1

2012-05-24 Thread Lonni J Friedman
On Thu, May 24, 2012 at 12:34 PM, Tom Lane wrote: > Lonni J Friedman writes: >> No, not lots of subqueries or ORDERing, and most queries only touch a >> single table.  However, I'm honestly not sure that I'm following where >> you're going with this.   The

Re: [GENERAL] Re: significant performance hit whenever autovacuum runs after upgrading from 9.0 -> 9.1

2012-05-25 Thread Lonni J Friedman
On Thu, May 24, 2012 at 12:57 PM, Tom Lane wrote: > Lonni J Friedman writes: >> On Thu, May 24, 2012 at 12:34 PM, Tom Lane wrote: >>> Can you correlate the performance hit with any specific part of >>> autovacuum? In particular, I'm wondering if it matters wheth

[GENERAL] autovacuum running for a long time on a new table with 1 row

2012-05-31 Thread Lonni J Friedman
Running 9.1.3 on Linux-x86_64. I'm seeing autovacuum running for the past 6 hours on a newly created table that only has 1 row of data in it. This table did exist previously, but was dropped & recreated. I'm not sure if that might explain this behavior. When I strace the autovacuum process, I se

Re: [GENERAL] autovacuum running for a long time on a new table with 1 row

2012-06-01 Thread Lonni J Friedman
On Fri, Jun 1, 2012 at 10:34 AM, Tom Lane wrote: > Lonni J Friedman writes: >> Running 9.1.3 on Linux-x86_64.  I'm seeing autovacuum running for the >> past 6 hours on a newly created table that only has 1 row of data in >> it.  This table did exist previously, b

Re: [GENERAL] autovacuum running for a long time on a new table with 1 row

2012-06-01 Thread Lonni J Friedman
On Fri, Jun 1, 2012 at 10:54 AM, Tom Lane wrote: > Lonni J Friedman writes: >> On Fri, Jun 1, 2012 at 10:34 AM, Tom Lane wrote: >>> This seems to have been noticed and fixed in HEAD: >>> http://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=b4e07

Re: [GENERAL] pg_basebackup blocking all queries

2012-06-06 Thread Lonni J Friedman
ce on any query (read or write) being horrible (seconds to minutes). As soon as the basebackup completes, perf returns to normal (and the load drops back down to 1.00 or less). How can I debug what's wrong? On Tue, May 22, 2012 at 3:20 PM, Lonni J Friedman wrote: > Thanks for your reply.  

Re: [GENERAL] efficiency of wildcards at both ends

2012-06-20 Thread Lonni J Friedman
On Wed, Jun 20, 2012 at 10:10 AM, Sam Z J wrote: > Hi all > > I'm curious how is wildcards at both ends implemented, e.g. LIKE '%str%' > How efficient is it if that's the only search criteria against a large > table? how much does indexing the column help and roughly how much more > space is neede

Re: [GENERAL] big database resulting in small dump

2012-07-20 Thread Lonni J Friedman
On Fri, Jul 20, 2012 at 11:05 AM, Ilya Ivanov wrote: > I have a 8.4 database (installed on ubuntu 10.04 x86_64). It holds Zabbix > database. The database on disk takes 10Gb. SQL dump takes only 2Gb. I've > gone through > http://archives.postgresql.org/pgsql-general/2008-08/msg00316.php and got > s

Re: [GENERAL] big database resulting in small dump

2012-07-20 Thread Lonni J Friedman
On Fri, Jul 20, 2012 at 11:23 AM, Tom Lane wrote: > Lonni J Friedman writes: >> On Fri, Jul 20, 2012 at 11:05 AM, Ilya Ivanov wrote: >>> I have a 8.4 database (installed on ubuntu 10.04 x86_64). It holds Zabbix >>> database. The database on disk takes 10Gb. SQL dump t

Re: [GENERAL] insert binary data into a table column with psql

2012-07-24 Thread Lonni J Friedman
On Tue, Jul 24, 2012 at 2:22 PM, John R Pierce wrote: > On 07/24/12 1:28 PM, jkells wrote: >> >> from psql >> I have tried several ways including creating a function to read a file >> without any success but basically I want to do something like the >> following from a bash shell >> >> psql -c "i

Re: [GENERAL] insert binary data into a table column with psql

2012-07-24 Thread Lonni J Friedman
On Tue, Jul 24, 2012 at 7:16 PM, Tom Lane wrote: > jtkells writes: >> Thanks much for your reply, that does the trick quite nicely. But, I just >> came to the realization that this only works if your are running the >> client and the file both resides on the database server. I thought that >> I

Re: [GENERAL] File system level backup

2012-07-26 Thread Lonni J Friedman
On Thu, Jul 26, 2012 at 3:39 AM, Manoj Agarwal wrote: > Hi, > > > > I have two virtual machines with two different versions of Postgresql. One > machine contains Postgres 7.4.19 and another has Postgres 8.4.3. I also > have other instances of these two virtual machines. I need to transfer the >

Re: [GENERAL] initial sync of multiple streaming slaves simultaneously

2012-09-19 Thread Lonni J Friedman
On Wed, Sep 19, 2012 at 8:59 AM, Mike Roest wrote: > Hey Everyone, > We currently have a 9.1.5 postgres cluster running using streaming > replication. We have 3 nodes right now > > 2 - local that are setup with pacemaker for a HA master/slave set failover > cluster > 1 - remote as a DR. > > C

Re: [GENERAL] initial sync of multiple streaming slaves simultaneously

2012-09-19 Thread Lonni J Friedman
Just curious, is there a reason why you can't use pg_basebackup ? On Wed, Sep 19, 2012 at 12:27 PM, Mike Roest wrote: > >> Is there any hidden issue with this that we haven't seen. Or does anyone >> have suggestions as to an alternate procedure that will allow 2 slaves to >> sync concurrently. >

  1   2   3   >