Re: [GENERAL] Installing PostgreSQL 10 on Mac OSX Undefined Symbol _heap_modify_tuple_by_cols

2017-10-25 Thread Ben Madin
to clarify, I commented them out, hence the # - it wasn't that I removed lines that were already commented out :) On 25 October 2017 at 22:21, Ben Madin wrote: > G'day Tom, > > Thanks for the feedback. I couldn't find anywhere that suggested that I > had set the CPP

Re: [GENERAL] Installing PostgreSQL 10 on Mac OSX Undefined Symbol _heap_modify_tuple_by_cols

2017-10-25 Thread Ben Madin
quot;/usr/local/pgsql/bin/pg_config" #export PGDATA="/usr/local/pgsql/data" and tried again - worked a treat! I haven't tried to work out which of these lines caused the problem, but hopefully if anyone else has a similar problem they might benefit! cheers Ben On 24 October 2017 at

[GENERAL] Installing PostgreSQL 10 on Mac OSX Undefined Symbol _heap_modify_tuple_by_cols

2017-10-22 Thread Ben Madin
found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[3]: *** [autoinc.so] Error 1 make[2]: *** [submake-contrib-spi] Error 2 make[1]: *** [all-test/regress-recurse] Error 2 make: *** [all-src-recurse] Error 2 cheers Ben -- Ben Madin

Re: [GENERAL] Isolation of schema renames

2017-08-09 Thread Ben Leslie
On 10 August 2017 at 12:14, Tom Lane wrote: > Ben Leslie writes: Thanks for the quick response, I appreciate it. > I'm wondering if I can/should expect schema renames to be isolated. Nope, you should not. That's fine. I think I can achieve what I want using an alte

[GENERAL] Isolation of schema renames

2017-08-09 Thread Ben Leslie
not (which I suspect is the case) is this documented somewhere, I couldn't find it (but that is probably me not looking hard enough / in the right place). Thanks, Ben

Re: [GENERAL] Upgrading postgresql minor version

2017-05-10 Thread Ron Ben
ogh כתב:På onsdag 10. mai 2017 kl. 16:55:50, skrev Ron Ben <ronb...@walla.co.il>:   I think you miss understood me. pg_dump dumps the data. the tables, functions and the data saved in them. I have daily backups for this so i'm not worried.   What i'm woried about are the "ex

Re: [GENERAL] Upgrading postgresql minor version

2017-05-10 Thread Ron Ben
er כתב:On 05/10/2017 06:08 AM, Ron Ben wrote:> I'm about to upgrade my postgresql to the latest 9.3 version> On my test server eveything works.> However I want to save a backup of my production server before the > upgrade...> I'm not sure how I do that.https://www.postgresq

[GENERAL] Upgrading postgresql minor version

2017-05-10 Thread Ron Ben
I'm about to upgrade my postgresql to the latest 9.3 version   On my test server eveything works. However I want to save a backup of my production server before the upgrade... I'm not sure how I do that.   It says that only system files are changed during upgrade... which folders exactly I need to

Re: [GENERAL] How to upgrade PostgreSQL minor version?

2017-04-26 Thread Ron Ben

Re: [GENERAL] How to upgrade PostgreSQL minor version?

2017-04-26 Thread Ron Ben
hich is not always the case. And as mentioned earlier 9.3.5 and 9.3.9 can create problems as they require specific checks.     I'd appriciate any insight.         ב אפר׳ 26, 2017 13:26, Sameer Kumar כתב: On Wed, Apr 26, 2017 at 4:41 PM Ron Ben <ronb...@walla.co.il> wrote:

[GENERAL] How to upgrade PostgreSQL minor version?

2017-04-26 Thread Ron Ben
I'm runing PostgreSQL 9.3.3 and I want to upgrade it to the latest 9.3 version The documontation does not specify what needs to be done other than "just install the executables". This is wierd as for example 9.3.5 release notes request to run a specifc query to  check for pg_multixact files left.  

Re: [GENERAL] Not sure this should be asked here but...

2017-04-23 Thread Ron Ben
ton כתב:On Sat, Apr 22, 2017 at 12:04 PM, Ron Ben <ronb...@walla.co.il> wrote:Why to use mailining list rather than forum? forum gives much more flexablitiy, easy to read and respond, allows to search for other simillar issues, topics can be tagged...   ​Was this intended to display irony re: &

[GENERAL] Not sure this should be asked here but...

2017-04-22 Thread Ron Ben
Why to use mailining list rather than forum? forum gives much more flexablitiy, easy to read and respond, allows to search for other simillar issues, topics can be tagged...    

Re: [GENERAL] Unable to upload backups

2017-04-19 Thread Ron Ben
But if you add another GRANT statment to user it won't be in the last.. you have no way of knowing the correct order of GRANTS. ב אפר׳ 19, 2017 17:26, Adrian Klaver כתב:On 04/19/2017 07:16 AM, Ron Ben wrote:> Here :)Thanks.See my previous response. Basically we need more information bef

Re: [GENERAL] Unable to upload backups

2017-04-19 Thread Ron Ben
Adrian Klaver כתב:On 04/19/2017 06:49 AM, Ron Ben wrote:Is it possible to get your email program to left justify text on sending? I can figure out the right justified text, it just takes me longer.> I think I may have found the problem.>> The role defined as:>> CREATE ROLE &quo

Re: [GENERAL] Unable to upload backups

2017-04-19 Thread Ron Ben
ake the last known command of grant? Sadly, when there are more than one role it's impossible to know which role was first. PostgreSQL shows them alphabeticly rather than by date so in case of overlaping instructions its impossible to know which one was first.ב אפר׳ 19, 2017 16:40, Adrian Kl

[GENERAL] Unable to upload backups

2017-04-19 Thread Ron Ben
Hi, I'm using PostgreSQL 9.3.2 I'm running the command:   psql -h testserver -U ronb -f backup.sql  -q -d foldertest  2>error.txt >output.txt This should generate my database in foldertest However this doesn't work. It's unable to create schemas in the error.txt i see "permission denied for databa

Re: [GENERAL] Nice to have features: Percentage function

2017-04-17 Thread Ron Ben
Hi, I know I can solve my issue localy but I think that percentage manipulation is commonly used by many users and while it's true that each one can create his own solution localy it would be nice if postgresql would have build in functions for that.   percentagee manipulation is a core fuctionalit

[GENERAL] Nice to have features: Percentage function

2017-04-15 Thread Ron Ben
Hi, I'm always finiding myself writing many varations of functions to calculate percentage. I think it would be nice if postgresql would have build in functions for that. I think the major functionality is something like the 3 ooptions here: https://percentagecalculator.net/   It may help to keep c

Re: [GENERAL] Request to add feature to the Position function

2017-03-29 Thread Ron Ben
eople will find usefull and it doesn't seem like a lot of work to implement it.ב מרץ 28, 2017 19:42, David G. Johnston כתב:On Tue, Mar 28, 2017 at 7:09 AM, Adrian Klaver <adrian.kla...@aklaver.com> wrote:On 03/28/2017 12:29 AM, Ron Ben wrote: Here is a refer to the stackoverflow question:

Re: [GENERAL] Request to add feature to the Position function

2017-03-28 Thread Ron Ben

[GENERAL] Request to add feature to the Position function

2017-03-27 Thread Ron Ben
Hi, position(substring in string) as listed here: https://www.postgresql.org/docs/9.1/static/functions-string.html locates sub string in a string.   It doesn't support locateing the substring from the back.   For example:   position('om' in 'Tomomas') gives 2   But if I want to locate the first oc

Re: [GENERAL] Google Cloud Platform, snapshots and WAL

2017-03-20 Thread Ben Chobot
> On Mar 20, 2017, at 6:31 AM, Moreno Andreo wrote: > > Hi everyone, > >I have my PostgreSQL 9.5 server running on a VM instance on Google Compute > Engine (Google Cloud Platform) on Debian Jessie (8.3), and I have another > dedicated VM instance that, every night at 3.00, takes a snapsho

Re: [GENERAL] Clustered index to preserve data locality in a multitenant application?

2016-08-31 Thread Ben Chobot
On Aug 31, 2016, at 2:55 PM, Nicolas Grilly wrote: > > It looks like Instagram has been using pg_reorg (the ancestor of pg_repack) > to keep all likes from the same user contiguous on disk, in order to minimize > disk seeks. > > http://instagram-engineering.tumblr.com/post/40781627982/handling

Re: [GENERAL] Using a VIEW as a temporary mechanism for renaming a table

2016-06-14 Thread Ben Buckman
rename a table. On Wed, Jun 8, 2016 at 3:55 PM, Berend Tober wrote: > Ben Buckman wrote: > >> Hello, >> I would like to rename a table with ~35k rows (on pgsql 9.4), let's say >> from `oldthings` to `newthings`. >> Our application is actively reading from and

Re: [GENERAL] Using a VIEW as a temporary mechanism for renaming a table

2016-06-08 Thread Ben Buckman
Oh yeah, the table structure will change after this is all done, but not in the middle of it. The view would only last a few minutes and maintain the exact same schema. Thanks for the tip re: deadlocks, I'll keep that in mind! Ben On Wed, Jun 8, 2016 at 1:24 PM, Andy Colson wrote: >

Re: [GENERAL] Using a VIEW as a temporary mechanism for renaming a table

2016-06-08 Thread Ben Buckman
Thanks Andy. My understanding, and please correct me if I'm wrong, is that the view will effectively inherit the table's constraints, because writes to the view that can't be written to the table will fail on the table. Re: "will the data be good data," what risks should I be considering? In term

[GENERAL] Using a VIEW as a temporary mechanism for renaming a table

2016-06-08 Thread Ben Buckman
nutes.) What are people's thoughts on this approach? Is there a flaw or potential danger that I should be aware of? Is there a simpler approach I should consider instead? Thank you -- [image: Shyp] *Ben Buckman / Platform Engineering* www.shyp.com Shipping made easy <https://www.shyp.com/>

Re: [GENERAL] CTE and function

2016-02-25 Thread Ben Primrose
ini_coefficient): create view tab as SELECT unnest(ARRAY[1,2,3,4]) AS col; SELECT gini_coefficient('tab','col'); Ben -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Gerhard Wiesinger

Re: [GENERAL] Is PRIMARY KEY the same as UNIQUE NOT NULL?

2016-02-07 Thread Ben Leslie
ome doc updates based on this discussion. > > http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=c477e84fe2471cb675234fce75cd6bb4bc2cf481 > > regards, tom lane Thanks Tom, I think with the documentation expressed this way I don't think I would have

[GENERAL] Is PRIMARY KEY the same as UNIQUE NOT NULL?

2016-01-30 Thread Ben Leslie
some point in the query engine, so my assumption that "meta-data" was only for external use seems incorrect. Are there any other cases that take advantage of PRIMARY KEY? (Maybe NATURAL joins?). Thanks, Ben -- 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] RAM of Postgres Server

2016-01-07 Thread Ben Chobot
On Jan 7, 2016, at 10:32 PM, Sachin Srivastava wrote: > > > Dear John, > > We are looking at more like 500-600 connections simultaneously in 1 day and I > want to say we get 1 to 12000 connections a day per db. Unless you have 300 cores to service those 500-600 simultaneous connections,

Re: [GENERAL] Extract giving wrong week of year

2015-09-28 Thread Ben Primrose
Thanks Tom! I need to read in more detail in the future, I'd hit the function definition, and scanned to find the keyword to get WOY. I'll switch my code to ISOYEAR per the doc. Ben -Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Friday, September 25, 2015

[GENERAL] Extract giving wrong week of year

2015-09-25 Thread Ben Primrose
All, I’m seeing some odd behavior from the extract function. Any idea why extract would think January 3rd of next year is the 53rd week of the year? Thanks Ben [bprimrose@primrose partitioning]$ psql Null display is "¤". Line style is unicode. Output format

Re: [GENERAL] pgpass (in)flexibility

2015-09-15 Thread Ben Chobot
On Sep 15, 2015, at 12:27 AM, Jim Nasby wrote: > > On 9/15/15 12:48 AM, Ben Chobot wrote: >> We're in a situation where we would like to take advantage of the pgpass >> hostname field to determine which password gets used. For example: >> >> psql -h prod-

[GENERAL] pgpass (in)flexibility

2015-09-14 Thread Ben Chobot
We're in a situation where we would like to take advantage of the pgpass hostname field to determine which password gets used. For example: psql -h prod-server -d foo # should use the prod password psql -h beta-server -d foo # should use the beta password This would *seem* to be simple, just put

Re: [GENERAL] in defensive of zone_reclaim_mode on linux

2015-09-06 Thread Ben Chobot
> On Sep 6, 2015, at 4:07 AM, Andres Freund wrote: > > To me that sounds like the negative impact of transparent hugepages > being mitigated to some degree by zone reclaim mode (which'll avoid some > cross-node transfers). FWIW: $ cat /sys/kernel/mm/transparent_hugepage/enabled always madvise

[GENERAL] in defensive of zone_reclaim_mode on linux

2015-09-04 Thread Ben Chobot
Over the last several months, I've seen a lot of grumbling about how zone_reclaim_mode eats babies, kicks puppies, and basically how you should just turn it off and live happily ever after. I thought I should add a counterexample, because that advice has not proven very good for us. Some facts

[GENERAL] Examples of projects that use Postgres "as API server"

2014-06-28 Thread Ben Ellis
base is just tables' and 'cram everything into the database!' Curiously, Ben

Re: [GENERAL] Any way to insert rows with ID used in another column

2014-04-05 Thread Ben Hoyt
, there's a "folder" column that's different for each inserted row, so typically I'd specify that directly in the multiple VALUES rows. -Ben On Thu, Apr 3, 2014 at 11:17 AM, Francisco Olarte wrote: > ( Forgot to hit reply all, so probably someone will get this twice, sorry &g

Re: [GENERAL] SSD Drives

2014-04-03 Thread Ben Chobot
On Apr 3, 2014, at 12:47 PM, John R Pierce wrote: > On 4/3/2014 9:26 AM, Joe Van Dyk wrote: >> Related, anyone have any thoughts on using postgresql on Amazon's EC2 SSDs? >> Been looking at >> http://aws.amazon.com/about-aws/whats-new/2013/12/19/announcing-the-next-generation-of-amazon-ec2-hi

[GENERAL] Any way to insert rows with ID used in another column

2014-04-03 Thread Ben Hoyt
'bar' || image_id_about_to_used_for_this_row::text || '.jpg') I tried using currval() to see if that'd work, but it gave an error, I guess because I was using it multiple times per session. Thanks, Ben

[GENERAL] Getting sequence-generated IDs from multiple row insert

2014-03-31 Thread Ben Hoyt
due to how SQL handles sets: http://postgresql.1045698.n5.nabble.com/PATCH-Enforce-that-INSERT-RETURNING-preserves-the-order-of-multi-rows-td5728579.html So currently I've changed my code to use RETURNING and then I'm ordering the results based on a secondary column that I know the order of. This works, but seems clunky, so I'm wondering if there's a nicer way. Thanks, Ben

Re: [GENERAL] Optimizing tables for known queries?

2014-02-10 Thread Ben Chobot
On Feb 9, 2014, at 2:48 PM, John Anderson wrote: > What I'm wondering is if there is a more denormalized view of this type of > data that would make those of types of queries quicker? That sounds like a materialized view?

Re: [GENERAL] PG replication across DataCenters

2013-12-09 Thread Ben Chobot
On Dec 9, 2013, at 8:09 AM, Thomas Harold wrote: > On 11/22/2013 5:57 AM, Albe Laurenz wrote: >> Kaushal Shriyan wrote: >>> I have read on the web that Postgresql DB supports replication >>> across data centers. Any real life usecase examples if it has been >>> implemented by anyone. >> >> Well,

Re: [GENERAL] 9.1.9 -> 9.1.10 causing corruption

2013-11-24 Thread Ben Chobot
For posterity, it appears my issues were https://wiki.postgresql.org/wiki/Nov2013ReplicationIssue. On Nov 4, 2013, at 3:48 PM, Ben Chobot wrote: > Anybody? I've tried this again on another streaming replication server, and > again had pg_toast errors until I re-basebackup'd

Re: [GENERAL] 9.1.9 -> 9.1.10 causing corruption

2013-11-04 Thread Ben Chobot
I'll have drained the clients from it anyway, so that's not a big deal for a temporary thing. On Nov 1, 2013, at 1:44 PM, Ben Chobot wrote: > I've got a bunch of independent database clusters, each with a couple of > streaming replication slaves. I'm starting to upgrade

[GENERAL] 9.1.9 -> 9.1.10 causing corruption

2013-11-01 Thread Ben Chobot
I've got a bunch of independent database clusters, each with a couple of streaming replication slaves. I'm starting to upgrade them to 9.1.10, but on 3 of the 3 I've tried so far, this has somehow resulted in data corruption. I'm hoping it was the upgrade itself that caused the corruption, inste

Re: [GENERAL] pg_dump resulting in excessive memory use by postmaster process

2013-10-21 Thread Ben
When you say self-contained test case, what is it exactly that you're looking for? A script that builds out a DB with hundreds of schemas/relations, a pg_basebackup or something else? Thanks! Ben -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-gener

[GENERAL] pg_dump resulting in excessive memory use by postmaster process

2013-10-21 Thread Ben
We've been using pg_dump and pg_restore for many years now and it has always worked well for us. However, we are currently undertaking a major db architecture to partition our tenant data into separate postgres schemas instead of storing all data in the public schema. When attempting to perform a p

Re: [GENERAL] async streaming and recovery_target_timeline=latest

2013-07-29 Thread Ben Chobot
On Jul 28, 2013, at 5:29 PM, Amit Langote wrote: > I think, the WAL recycling on standby names the recycled segments with > the latest timelineID (in this case it's 0x10) which creates WALs that > there shouldn't have been like 0010146A0001 instead of > 000F146A0001. This p

Re: [GENERAL] async streaming and recovery_target_timeline=latest

2013-07-28 Thread Ben Chobot
Anybody? On Jul 3, 2013, at 3:23 PM, Ben Chobot wrote: > We have an async streaming setup using 9.1.9 and 3 nodes - let's call them A, > B, and C. A is the master, B and C are slaves. Today, A crashed, so we made B > be the master and told C to follow along with the switch b

[GENERAL] async streaming and recovery_target_timeline=latest

2013-07-03 Thread Ben Chobot
We have an async streaming setup using 9.1.9 and 3 nodes - let's call them A, B, and C. A is the master, B and C are slaves. Today, A crashed, so we made B be the master and told C to follow along with the switch by changing the primary_conninfo in it's recovery.conf, making sure the history fil

Re: [GENERAL] 2 postgresql server on the same station : conflict?

2013-05-28 Thread Ben Chobot
On May 28, 2013, at 2:54 AM, image wrote: > Hello, > > On the same station, i have 2 postgresql server: one for my postgis db > (v9.1) and so another installed with opener^7 (9.2). Unfortunalty, i noticed > i'm obliged to stop service for my postgresql postgis (9.1) in order to use > openerp7 (po

Re: [GENERAL] Basic question on recovery and disk snapshotting

2013-04-30 Thread Ben Chobot
On Apr 27, 2013, at 10:40 AM, Yang Zhang wrote: > My question really boils down to: if we're interested in using COW > snapshotting (a common feature of modern filesystems and hosting > environments), would we necessarily need to ensure the data and > pg_xlog are on the same snapshotted volume? I

Re: [GENERAL] Hosting PG on AWS in 2013

2013-04-08 Thread Ben Chobot
On Apr 8, 2013, at 2:15 AM, Vincent Veyron wrote: > Could someone explain to me the point of using an AWS instance in the > case of the OP, whose site is apparently very busy, versus renting a > bare metal server in a datacenter? Well, at least in my experience, you don't go to AWS because the da

Re: [GENERAL] Hosting PG on AWS in 2013

2013-04-07 Thread Ben Chobot
On Apr 6, 2013, at 6:51 PM, David Boreham wrote: > First I need to say that I'm asking this question on behalf of "a friend", > who asked me what I thought on the subject -- I host all the databases > important to me and my livelihood, on physical machines I own outright. That > said, I'm curi

Re: [GENERAL] Splitting Postgres into Separate Clusters?

2013-03-11 Thread Ben Chobot
On Mar 9, 2013, at 11:54 AM, Paul Jungwirth wrote: > Hello, > > I'm running a specialized search engine that indexes a few tens of millions > of web pages, keeping everything in Postgres, and one problem I'm starting to > see is poor cache hit rates. My database has two or three tables just for

[GENERAL] speeding up ALTER ... SET NOT NULL

2013-03-11 Thread Ben Chobot
I'm in an unfortunate position of needing to add a unique, not null index to a very large table with heavy churn. Without having much impact, I can add a NULL column that reads default values from a sequence for new rows, and then do batch updates over time to fill in the old values but then

[GENERAL] bug, bad memory, or bad disk?

2013-02-14 Thread Ben Chobot
We have a Postgres server (PostgreSQL 9.1.6 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 64-bit) which does streaming replication to some slaves, and has another set of slaves reading the wal archive for wal-based replication. We had a bit of fun yesterday w

Re: [GENERAL] Restoring a database dump from 9.0 to 9.2

2013-02-08 Thread Ben Madin
arge table you can run it through sed to quote the offending bits If you can dump from 9.0 and restore into 9.1, can you dump from 9.1 and try restoring it into 9.2? Cheers Ben -- Ben Madin t: +61 8 6102 5535 m: +61 448 887 220 Sent from my iPhone, hence the speling... On 09/02/2013, at

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2013-02-06 Thread Ben Madin
x27; The '' suggests (I don't think I was the only one who thought this) that we were looking for a string comparison. I guess the NULL value is in there between the quotes. cheers Ben On 2013-02-07, at 00:01 , Tom Lane wrote: > Ben Madin writes: >> On 2013-02

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2013-02-06 Thread Ben Madin
round(st_distance_sphere( '010120BB108716D9CEF7A36240643BDF4F8DA741C0', post.the_point)/1000) < 150 AND spe.id = 9465; I'm really not sure what to do here. cheers Ben -- Ben Madin m : +61 448 887 220 e : b...@ausvet.com.au -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2013-02-05 Thread Ben Madin
lttypesid = 108 AND rlu.id = res.resultvalue::int WHERE rep.del IS false AND rep.projectid = 51 AND round(st_distance_sphere( '010120BB108716D9CEF7A36240643BDF4F8DA741C0', post.the_point)/1000) < '150' AND spe.id = '9465' AND rlu.id = '935'; ERRO

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2013-02-05 Thread Ben Madin
Thanks Adrian, On 2013-02-06, at 12:52 , Adrian Klaver wrote: > On 02/05/2013 08:24 PM, Ben Madin wrote: >> The full query is : >> >> {{{ >> SELECT rep.id, res8.reportid, >> round(st_distance_sphere('010120BB108716D9CEF7A36240643BDF4F8DA741C0&#x

Re: [GENERAL] ERROR: invalid input syntax for integer: "" - more confusion

2013-02-05 Thread Ben Madin
provide an example? Varchar an example would be 6 for level 1 field, and 6.34 for level 2. cheers Ben -- Ben Madin t : +61 8 6102 5535 m : +61 448 887 220 e : b...@ausvet.com.au AusVet Animal Health Services P.O. Box 5467 Broome WA 6725 Australia AusVet's website: http:/

Re: [GENERAL] ERROR: invalid input syntax for integer: ""

2013-02-05 Thread Ben Madin
many results, hence I'm not posting a reproducible example - yet!) cheers Ben -- Ben Madin m : +61 448 887 220 e : b...@ausvet.com.au -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] ERROR: invalid input syntax for integer: "" - more confusion

2013-02-05 Thread Ben Madin
ewhere? I have done a dump / reload, any other suggestions? cheers Ben -- Ben Madin m : +61 448 887 220 e : b...@ausvet.com.au -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] ERROR: invalid input syntax for integer: ""

2013-02-05 Thread Ben Madin
y is working on one machine (using a copy of the database downloaded and imported from the second machine last night) running 9.1.6, is there any reason it wouldn't work on the original machine - have there been any changes in casting that I didn't notice between 9.1

Re: [GENERAL] Determine if an index is a B-tree, GIST, or something else?

2013-01-17 Thread Ben Chobot
On Jan 17, 2013, at 10:03 AM, Paul Jungwirth wrote: > Is there any way to determine, by querying pg_index and other pg_* tables, > whether an index was created as `USING something`? I've already got a big > query joining pg_class, pg_index, etc. to pull out various attributes about > the index

Re: [GENERAL] How to store clickmap points?

2013-01-09 Thread Ben Chobot
On Jan 8, 2013, at 2:12 AM, aasat wrote: > Hi, > > I want to store clickmap points (X, Y and hits value) for website > > I currently have table like this > > CREATE TABLE clickmap ( > page_id integer, > date date, > x smallint, > y smallint, > hits integer > ) > > But this generated abou

Re: [GENERAL] large database

2012-12-11 Thread Ben Chobot
On Dec 11, 2012, at 2:25 AM, Chris Angelico wrote: > On Tue, Dec 11, 2012 at 7:26 AM, Mihai Popa wrote: >> Second, where should I deploy it? The cloud or a dedicated box? > > Forget cloud. For similar money, you can get dedicated hosting with > much more reliable performance. We've been looking

Re: [GENERAL] PSA: XFS and Linux Cache Poisoning

2012-11-12 Thread Ben Chobot
On Nov 12, 2012, at 7:37 AM, Shaun Thomas wrote: > Hey everyone, > > We recently got bit by this, and I wanted to make sure it was known to the > general community. > > In new(er) Linux kernels, including late versions of the 2.6 tree, XFS has > introduced dynamic speculative preallocation. Wh

Re: [GENERAL] Streaming replication failed to start scenarios

2012-10-23 Thread Ben Chobot
On Oct 22, 2012, at 6:57 AM, chinnaobi wrote: > Hi Laurenz Albe, > > I have tested using cygwin rsync in windows 2008 R2, just after restart the > server. > > for 10 GB it took nearly 5 minutes to sync, > for 50 GB it took nearly 30 minutes, -- too long Though there were no big > changes. > >

Re: [GENERAL] PostgreSQL Magazine

2012-10-17 Thread Fathi Ben Nasr
Thank You. On Wed, 2012-10-17 at 12:49 +0200, Albe Laurenz wrote: > Fathi Ben Nasr wrote: > > Is there a PostgreSQL magazine like the one sent by Oracle to whom > > requests it ? > > > > If answer is yes: how to sbscribe to it ? > > > > Else > > &

Re: [GENERAL] PostgreSQL Magazine

2012-10-17 Thread Fathi Ben Nasr
Thank You. On Wed, 2012-10-17 at 14:44 +0200, damien clochard wrote: > Le 17/10/2012 12:35, Fathi Ben Nasr a écrit : > > Hello, > > > > Hi > > > Is there a PostgreSQL magazine like the one sent by Oracle to whom > > requests it ? > > > > Postg

[GENERAL] PostgreSQL Magazine

2012-10-17 Thread Fathi Ben Nasr
Hello, Is there a PostgreSQL magazine like the one sent by Oracle to whom requests it ? If answer is yes: how to sbscribe to it ? Else I know this could cost a lot to print such magazines, but maybe a pdf version could be affordable. The main idea behind this is to "show" there a big active co

Re: [GENERAL] Trajectory of a [Pg] DBA

2012-10-04 Thread Ben Chobot
On Oct 4, 2012, at 1:44 PM, Thalis Kalfigkopoulos wrote: > Hi all. > > I'd like to tap into the list's experience regarding the job of a DBA > in general and Pg DBA in particular. > > I see that most of the DBA job posts ask for Sr or Ssr which is > understandable given that databases are among

Re: [GENERAL] surprising behavior or nothing to see here?

2012-10-03 Thread Ben Chobot
On Oct 3, 2012, at 11:50 AM, Tom Lane wrote: > Ben Chobot writes: >> 4. What might cause autovacuum analyze to make an index perform worse >> immediately, when a manual vacuum analyze does not have the same affect? And >> I'm not talking about changing things so t

[GENERAL] surprising behavior or nothing to see here?

2012-10-03 Thread Ben Chobot
Today we saw a couple behaviors in postgres we weren't expecting, and I'm not sure if there's something odd going on, or this is all business as usual and we never noticed before. In steady-state, we have a 32-core box with a fair amount of ram acting as a job queue. It's constantly busy insert

[GENERAL] bgwriter and pg_locks

2012-09-12 Thread Ben Chobot
In an attempt to get a hackfix for http://pgfoundry.org/tracker/index.php?func=detail&aid=1011203&group_id=1000411&atid=1376, I'm wonder if it's true that, when looking at pg_locks, the only pid which will have virtualxid = '1/1' and virtualtransaction = '-1/0' will be the bgwriter. That seems

Re: [GENERAL] can we avoid pg_basebackup on planned switches?

2012-08-07 Thread Ben Chobot
On Aug 7, 2012, at 9:32 AM, Fujii Masao wrote: > On Mon, Aug 6, 2012 at 3:29 AM, Ben Chobot wrote: >> >> Oh, I would have though that doing a clean shutdown of the old master (step >> 1) would have made sure that all the unstreamed wal records would be flushed >>

Re: [GENERAL] maximum number of databases and / or schemas in a single database instance

2012-08-06 Thread Ben Chobot
On Aug 4, 2012, at 12:24 PM, Menelaos PerdikeasSemantix wrote: > The following page: > > http://www.postgresql.org/about/ > > mentions some limits but not the following: > > [1] maximum number of databases per database server instance > [2] maximum number of schemas per database > > Is there e

Re: [GENERAL] can we avoid pg_basebackup on planned switches?

2012-08-05 Thread Ben Chobot
On Aug 5, 2012, at 11:12 AM, Fujii Masao wrote: > On Sat, Jul 28, 2012 at 2:00 AM, Ben Chobot wrote: >> We make heavy use of streaming replication on PG 9.1 and it's been great for >> us. We do have one issue with it, though, and that's when we switch master

Re: [GENERAL] can we avoid pg_basebackup on planned switches?

2012-08-04 Thread Ben Chobot
Anybody? On Jul 27, 2012, at 10:00 AM, Ben Chobot wrote: > We make heavy use of streaming replication on PG 9.1 and it's been great for > us. We do have one issue with it, though, and that's when we switch master > nodes - currently, the documentation says that you must r

[GENERAL] can we avoid pg_basebackup on planned switches?

2012-07-27 Thread Ben Chobot
We make heavy use of streaming replication on PG 9.1 and it's been great for us. We do have one issue with it, though, and that's when we switch master nodes - currently, the documentation says that you must run pg_basebackup on your old master to turn it into a slave. That makes sense when the

Re: [GENERAL] Promotion of standby to master

2012-06-29 Thread Ben Chobot
On Jun 29, 2012, at 12:16 PM, Andy Chambers wrote: > I understand that it's possible to promote a "hot standby" pg server > simply by creating the failover file. In a scenario where there are > multiple standby servers, is it possible to point the other standby > servers to the new master without

Re: [GENERAL] Catalog Bloat in Development - Frequently dropping/adding schemas and objects

2012-06-29 Thread Ben Madin
. cheers Ben On 30/06/2012, at 4:45 AM, David Johnston wrote: > In my current development environment I often drop some or all of the schemas > in the database and then re-create them schemas and the objects they contain. > When I go to bring up the database in my GUI it takes a con

[GENERAL] Customising pg directories

2012-06-28 Thread Ben Carbery
I am building a new server with a separate partition for data and xlogs. What is the correct way to do this? Can I create a symlink from /var/lib/pgsql/9.1/data -> /pg_data (and then a symlink in /pgdata for xlogs-> /pg_xlog) Or do I have to modify $PGDATA in the init script? This is all after in

Re: [GENERAL] Simple method to format a string?

2012-06-20 Thread Ben Chobot
On Jun 20, 2012, at 7:43 AM, Emi Lu wrote: > Good morning, > > Is there a simply method in psql to format a string? > > For example, adding a space to every three consecutive letters: > > abcdefgh -> *** *** *** > > Thanks a lot! > Emi I'm unaware of such a function (it seems like a generic f

Re: [GENERAL] Partitioning Advice

2012-06-10 Thread Ben Carbery
> do many of the statistical queries use the whole month's data? > have you considered partitioning the log table by day? if you can > reduce the number of rows involved in the table-scans by partitioning > it'll be help performance. > I am summarising by hour, day, week and month. So I guess par

Re: [GENERAL] Partitioning Advice

2012-06-07 Thread Ben Carbery
splitting off xlogs won't help. I archive (copy) these records off to the a new table every month and then use inheritance to access the entire logset.. log_master ..inherits log_active log_201205 log_201204 ..etc This is how I got the active table down to 10GB :) > > I don't say that that is guaranteed to help, but I have made good > experiences > with it. > > Yours, > Laurenz Albe > thanks, Ben

[GENERAL] Partitioning Advice

2012-06-05 Thread Ben Carbery
comments welcome. Ben

Re: [GENERAL] evaluating subselect for each row

2012-06-03 Thread Ben Chobot
On Jun 3, 2012, at 10:55 AM, Scott Ribe wrote: > As part of anonymizing some data, I want to do something like: > > update foo set bar = (select bar2 from fakes order by random() limit 1); it may or may not be an option, but "update foo set bar=md5(bar)" is a pretty simple way to redact data. -

Re: [GENERAL] why jasperserver has been changed from MySQL to PostGreSQL

2012-05-22 Thread Ben Chobot
On May 22, 2012, at 7:31 AM, farhad koohbor wrote: > My question is that why jasperserver changed its mind to PostGreSQL. Which of > the features of PostGreSQL are powerful than MySQL? > Could you please give me a clue? Postgres is more SQL-compliant and tends to work better at larger scale than

Re: [GENERAL] COPY from CSV, passing in default value?

2012-05-16 Thread Ben Madin
casting) the results from the temp table into the real table. cheers Ben On 15/05/2012, at 1:31 AM, adebarros wrote: > Assuming I have a table structured like so: > > CREATE TABLE salaries ( >Town varchar(30), >County varchar(30), >Supervisor varchar(30), >

Re: [GENERAL] .pgpass not working

2012-05-04 Thread Ben Chobot
On May 4, 2012, at 9:30 AM, Rebecca Clarke wrote: > I do not want to touch the pg_hba.conf so I have generated the .pgpass file. > The permissions is set to 600, and I have correctly inputted the details into > .pgpass, there are no leading spaces. > > myhostname:myport:*:postgres:mypassword >

Re: [GENERAL] SQLSTATE XX000 Internal Error 7

2012-05-02 Thread Ben Madin
G'day Tom, On 03/05/2012, at 11:57 AM, Tom Lane wrote: > Ben Madin writes: >> SQLSTATE[XX000]: Internal error: 7 ERROR: could not open file >> "base/102979/430122_fsm": Invalid argument > > [ scratches head ... ] AFAICS the only documented reason for ope

[GENERAL] logging query result size?

2012-05-02 Thread Ben Chobot
I'm not seeing anything in the docs, but is there a way in 9.1 to log the size of the query result in the same way that we can log the duration of the query? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailp

[GENERAL] SQLSTATE XX000 Internal Error 7

2012-05-02 Thread Ben Madin
posted this to the postgis list, as it looked as though this message is a postgresql message, not a postgis one. cheers Ben I'm running on : PostgreSQL 9.1.3 on x86_64-apple-darwin11.3.0, compiled by i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLV

  1   2   3   4   5   6   7   >