[GENERAL] wide row insert via Postgres jdbc driver

2014-09-22 Thread Sameer Kumar
Hi, I am working with a vendor and planning to deploy their application on PostgreSQL as backend. They have cautioned the customer that PostgreSQL's jdbc driver v9.1 (build 900) has issues which causes deadlocks while "wide record inserts". Is there any such known problem which anyone else has en

Re: [GENERAL] wide row insert via Postgres jdbc driver

2014-09-26 Thread Sameer Kumar
On Tue, Sep 23, 2014 at 9:24 PM, Bill Moran wrote: > On Tue, 23 Sep 2014 14:12:22 +0200 > Thomas Kellerer wrote: > > > Sameer Kumar schrieb am 23.09.2014 um 07:24: > > > I am working with a vendor and planning to deploy their application > > > on PostgreSQL as

Re: [GENERAL] how to delay sync by a set time, hour or day?

2014-11-19 Thread Sameer Kumar
On 20 Nov 2014 06:11, "John Smith" wrote: > > On 11/19/14, Michael Paquier wrote: > > On Wed, Nov 19, 2014 at 8:37 AM, John Smith wrote: > >> > >> i want to setup a standby slave that listens 24/7 but only syncs when told > >> to. > >> > >> setting "pause_at_recovery_target (boolean)" in recover

Re: [GENERAL] Detecting master/slave

2014-11-21 Thread Sameer Kumar
On 21 Nov 2014 22:14, "Steve Pribyl" wrote: > > Is there a better/recommended way to determine which host in a cluster is the master or slave besides rescue.conf or pg_stat_replication? Just looking for the "right" way to know which host is which. > You may query select pg_is_in_recovery(); Th

Re: [GENERAL] Estimating WAL usage during pg_basebackup

2014-11-25 Thread Sameer Kumar
On Fri, Oct 31, 2014 at 2:52 AM, Mike Blackwell wrote: > I need to get an idea of how much WAL space will be required during a long > (many hours) pg_basebackup over a relatively slow network connection. This > is for a server that's not yet running PITR / streaming. > > Any thoughts? > ​You ma

Re: [GENERAL] is there a warm standby sync trigger?

2014-11-25 Thread Sameer Kumar
you could have used* pg_pause_recovery() / pg_resume_recovery()*​ ​To pause when needed and continue later. e.g. when you are doing bulk loads or during a window when you see network congestion. ​ Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD.* 101 Cecil Street, #11-1

Re: [GENERAL] is there a warm standby sync trigger?

2014-11-27 Thread Sameer Kumar
to be in hot standby mode to use > them. > ​Sorry, I used the functions names used in code (my bad). Thanks for pointing out it is pg_xlog_replay_pause() ​ and pg_xlog_replay_resume() Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng B

Re: [GENERAL] High Availability Cluster

2014-12-03 Thread Sameer Kumar
​Consider trying pgpool. It has an HA mode (and I think the latest version works using a heartbeat, the older one uses watchdog). If you are up for a commercial product, you may want to consider using something like EnterpriseDB's failover manager. ​ Best Regards, *Sameer Kumar | Databa

Re: [GENERAL] Synchronous Replication Timeout

2014-12-03 Thread Sameer Kumar
ealing with two-phase > commits instead? At the moment it hangs forever on ‘prepare transaction’, > ‘commit prepared’ and ‘rollback prepared’ commands. > > Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 06

Re: [GENERAL] recovering from "too many failures" wal error

2014-12-03 Thread Sameer Kumar
it=off; -- needed only if you are replicating to synchronous slaves select pg_switch_xlog(); -- though not neccessary select pg_start_backup('test');​ select pg_stop_backup(); I use these commands to test if archival is working fine or to force archival Best Regards, *Sameer Kumar | Da

Re: [GENERAL] High Availability Cluster

2014-12-03 Thread Sameer Kumar
; > ​Thanks for adding the details. ​ > > If you are up for a commercial product, you may want to consider using > > something like EnterpriseDB's failover manager. > > Commercial support for pgpool-II is provided by the way. > ​ Noted :)​ Best Regards, *Sameer Ku

Re: [GENERAL] Idle Sessions inTransaction with RELEASE_EXEC_SVP queries and locks

2014-12-09 Thread Sameer Kumar
es in languages viz python which would start an implicit transaction even when you fire a select statement. What is the kind of lock and what is their granted status? What is the isolation level that you use in application? Regards Sameer Kumar Ashnik Pte Ltd, Singapore

Re: [GENERAL] Pausing log shipping for streaming replication

2014-12-15 Thread Sameer Kumar
On 16 Dec 2014 01:13, "Joseph Kregloh" wrote: > > Hello, > > I have a master multi slave streaming replication setup. One master and two slaves. I need to do some maintenance on one of the slaves as one of the drives died however there is some other weird things going on in that array that I would

Re: [GENERAL] Pausing log shipping for streaming replication

2014-12-17 Thread Sameer Kumar
full, should not you start polling the secondary wal archive that you have spcifcied in archive.sh? ​ > archive_cleanup_command = 'pg_archivecleanup /usr/local/pgsql/archive/ %r' > I generally don't prefer this since archives are helpful for a PITR as well so I prefer cleaning them up manua

Re: [GENERAL] help troubleshooting invalid page header error

2014-12-26 Thread Sameer Kumar
On 23 Dec 2014 12:05, "Cory Zue" wrote: > > Hi all, > > Our postgres instance on one of our production machines has recently been returning errors of the form "DatabaseError: invalid page header in block 1 of relation base/16384/76623" from normal queries. I've been reading that these are often li

Re: [GENERAL] Does anyone user pg-pool II on real production ? Please help me.

2015-01-06 Thread Sameer Kumar
On 6 Jan 2015 03:02, "tuanhoanganh" wrote: > > Hello everybody > > Does anyone user pg-pool II on real production ? Yes we have a customer using it in load balancing mode and another one using it with Watchdog for high availability. > How many slave do you have? and how many size of database ? >

Re: [GENERAL] Stuck trying to backup large database - best practice?

2015-01-12 Thread Sameer Kumar
eing removed​ ? ​ So it is possible for the client to fall behind and have a WAL file be > recycled before it can be transferred. If you are experiencing this then > again wal_keep_segments is way of forcing Postgres to keep WAL files > around. The basic concept is that by default WAL files a

[GENERAL] Re: [HACKERS] Check that streaming replica received all data after master shutdown

2015-01-15 Thread Sameer Kumar
On Wed, Jan 14, 2015 at 2:11 AM, Heikki Linnakangas wrote: > On 01/13/2015 12:11 PM, Vladimir Borodin wrote: > >> >> 05 янв. 2015 г., в 18:15, Vladimir Borodin написал(а): >> >> Hi all. >>> >>> I have a simple script for planned switchover of PostgreSQL (9.3 and >>> 9.4) master to one of its re

[GENERAL] Re: [HACKERS] Check that streaming replica received all data after master shutdown

2015-01-15 Thread Sameer Kumar
from that you want this check, I suppose > you're not guaranteed not to have trouble or not trusting the > mechanism itself. > > ​Right! I was coming from the point that if master has shutdown gracefully then you don't really need to worry about ensuring with such checks on St

Re: [GENERAL] Postgres seems to use indexes in the wrong order

2015-01-24 Thread Sameer Kumar
make better decisions. > > ​What are the values for below parameters- - random_page_cost - seq_page_cost ​- effective_cache_size > I already did an analyze on the table. Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Buil

Re: [GENERAL] Postgres seems to use indexes in the wrong order

2015-01-26 Thread Sameer Kumar
fic column- alter table alter column set statistics 1000; analyze ; ​ Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069533 M: *+65 8110 0350* T: +65 6438 3504 | www.ashnik.com *[image: icons]* [image:

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

2017-04-26 Thread Sameer Kumar
12 which will be updated as well later this > quarter. > Do you have a test environment? If I were you I would have a non-prod that mimics my production setup exactly and I would apply the patch there first. -- -- Best Regards, *Sameer Kumar | Senior Solution Architect* *ASHNIK PTE

[GENERAL] [HACKERS] [pgrpm-HACKERS]SPEC file for PostgreSQL

2013-12-06 Thread Sameer Kumar
access to it? Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD.*101 Cecil Street, #11-11 Tong Eng Building, Singapore 069533 M : *+65 8110 0350 <%2B65%208110%200350>* T: +65 6438 3504 | www.ashnik.com www.facebook.com/ashnikbiz | www.twitter.com/ashnikbiz [image: email pat

Re: [GENERAL] [HACKERS] [pgrpm-HACKERS]SPEC file for PostgreSQL

2013-12-06 Thread Sameer Kumar
On Fri, Dec 6, 2013 at 6:30 PM, Albe Laurenz wrote: > Sameer Kumar wrote: > > I am trying to do a custom build (and generate binary and source RPM) > package for PostgreSQL. > > > > I know community already has a RPM package, but I am trying to do a > custom build.

Re: [GENERAL] [HACKERS] [pgrpm-HACKERS]SPEC file for PostgreSQL

2013-12-06 Thread Sameer Kumar
Thanks everyone for helping. If I were you, I'd simply take the community spec and modify it for my > needs, it is already really complete and contains automatic management of > for example translation files, smth that is always a pain to maintain > manually. I agree and that is why I asked for

[GENERAL] Trigger Firing Order

2013-12-10 Thread Sameer Kumar
create their own triggers, I won't have control over this. Also, this could be an issue for me if I write business logic in triggers. Any better way known to work in PostgreSQL? Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD.*101 Cecil Street, #11-11 Tong Eng Building, Sing

Re: [GENERAL] Trigger Firing Order

2013-12-11 Thread Sameer Kumar
> > But with certain packaged products who create their own triggers, I won't >> have control over this. > I don't have a lot of sympathy for that argument. If the product is > capable of creating Postgres-compatible triggers at all, it should be > aware that the name is a significant property,

Re: [GENERAL] Trigger Firing Order

2013-12-11 Thread Sameer Kumar
That sounds like a nice suggestion. I guess it could get rid of most of the issues I forsee. I should follow that for my cases too. I guess we can live without an ORDER clause. Thanks everyone for helping.

Re: postgresql.org inconsistent (Re: [GENERAL] PG replication across DataCenters)

2013-12-11 Thread Sameer Kumar
To be honest your request/demand expectation is quite unfair. have you seen cross link on Suse and Red Hat and Ubuntu and SE Linux and Debian and... (well I would need a google search for adding more here) By far I guess PostgreSQL community documentation is the one of the most organized doc store

Re: [GENERAL] PG replication across DataCenters

2013-12-23 Thread Sameer Kumar
Though I will agree that slony is a nice and a great tool w.r.t. replication (specifically selective replication). But I would dis-agree on below points: * Cascading replication chains (a really big deal when you want multiple slaves in the secondary facility and don't want to hog your band

Re: [GENERAL] Some good news ([i...@arin.net: [arin-announce] ARIN Database Migration Completed])

2013-12-23 Thread Sameer Kumar
On Sun, Dec 15, 2013 at 11:57 PM, Andrew Sullivan wrote: > I thought people'd like to know about this. For those who don't know, > ARIN is the Regional Internet Registry for North America and the > Carribean. That is, if you have an IP address and you are operating > in that region, you depend o

Re: [GENERAL] PG replication across DataCenters

2013-12-29 Thread Sameer Kumar
>> > * Quick and easy movement of the master to any of the database in >> > >> > the cluster without destroying replication. >> > >> > Again, which version? Re-mastering is made simple in v9.3. >> I'm not seeing that in the documentation. In fact, what I'm finding >> seems to suggest the opposi

Re: [GENERAL] PG replication across DataCenters

2013-12-29 Thread Sameer Kumar
> > What I don't see streaming working for is DR drills. I need to, in a > controlled manner, move the entire application to the secondary datacenter, > while keeping all the nodes in sync, make sure everything operates properly > from there (which means allowing database updates), then move it al

Re: [GENERAL] authentication failure

2014-01-04 Thread Sameer Kumar
uld be multiple PostgreSQL installations. And I guess that is what Tom meant here. Can you try $ which psql $ which pg_clt Can you set your $PGUSER variable to postgres and then try? $ export $PGUSER=postgres Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD.*101 Cecil Street,

Re: [GENERAL] authentication failure

2014-01-05 Thread Sameer Kumar
On Sun, Jan 5, 2014 at 6:45 PM, Jayadevan wrote: > Sameer Kumar wrote > > This only tells that there is one instance running! > > > > There could be multiple PostgreSQL installations. And I guess that is > what > > Tom meant here. > > I doubt that was what To

Re: [GENERAL] file system level backup

2014-01-05 Thread Sameer Kumar
I am not sure if you have already answered it and I have somehow missed it: - Are these 'a' and 'b' on two different servers? ( I think they are on different servers) - Did you stop the server on 'b' before you replaced the files and attempted a startup? > thanks. it doesn't help. i also tried pg_

Re: [GENERAL] Re: After dump/restoring from 32bit 8.4-windows to 64bit 9.2.4-linux experiencing 10x slowdown on queries

2014-01-07 Thread Sameer Kumar
CCing the group On Tue, Jan 7, 2014 at 9:29 PM, Sameer Kumar wrote: > > > On Fri, Dec 20, 2013 at 1:44 AM, jon@stylesage wrote: > >> Hi, did you find a resolution to this issue? I'm running into the same >> problem now! >> >> >> > DO a few ch

Re: [GENERAL] table design and data type choice

2014-01-08 Thread Sameer Kumar
one column. If the queries are always going to be based on vote='up' or vote=1 or vote=t (?), then you can use partial indexes to optimize the access and updates etc. http://www.postgresql.org/docs/9.3/static/indexes-partial.html Best Regards, *Sameer Kumar | Database Consultant* *ASHN

Re: [GENERAL] Sudden slow down and spike in system CPU causes max_connections to get exhausted

2014-01-08 Thread Sameer Kumar
but are idle for long). Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD. *101 Cecil Street, #11-11 Tong Eng Building, Singapore 069533 M : *+65 8110 0350* T: +65 6438 3504 | www.ashnik.com www.facebook.com/ashnikbiz | www.twitter.com/ashnikbiz [image: email patch] This

Re: [GENERAL] How to know server status variable in postgresql?

2014-01-08 Thread Sameer Kumar
want to collect? That command in MySQL may be giving you few counters, but which of those are of your interest? Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD.*101 Cecil Street, #11-11 Tong Eng Building, Singapore 069533 M : *+65 8110 0350* T: +65 6438 3504 | www.ashni

Re: [GENERAL] Last inserted row id with complex PK

2014-01-08 Thread Sameer Kumar
es and use it over here? Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD. *101 Cecil Street, #11-11 Tong Eng Building, Singapore 069533 M : *+65 8110 0350* T: +65 6438 3504 | www.ashnik.com www.facebook.com/ashnikbiz | www.twitter.com/ashnikbiz [image: email patch] This

Re: [GENERAL] How to know server status variable in postgresql?

2014-01-08 Thread Sameer Kumar
s waiting. Number of locks waiting. > Locks held. Number of locks held. > Process holding locks. Number of processes holding locks. > > how to collect these details by using query. now i find queries for > sonnections. but i dont know anout others. please help me.@Sameer Kumar >

Re: [GENERAL] argument of CASE/WHEN must not return a set

2014-01-09 Thread Sameer Kumar
THEN cast(ARRAY_TO_STRING( REGEXP_MATCHES('12-70510','^[0-9,0-9.0-9]+') , ',') as varchar(100)) ELSE '' END AS "12-70510"; But anyways, I think the best way to do it is the way you have already figured (check the plan

Re: [GENERAL] argument of CASE/WHEN must not return a set

2014-01-09 Thread Sameer Kumar
On Thu, Jan 9, 2014 at 6:05 PM, Sameer Kumar wrote: > > On Thu, Jan 9, 2014 at 1:26 AM, George Weaver wrote: > >> ARRAY_TO_STRING( REGEXP_MATCHES('12-70510','^[0-9,0-9.0-9]+') >> development(# , ',') > &

Re: [GENERAL] argument of CASE/WHEN must not return a set

2014-01-10 Thread Sameer Kumar
On Fri, Jan 10, 2014 at 12:02 AM, George Weaver wrote: > Thanks David, > > I found that if the whole expression is made a sub-select it works: > I too eventually got there. :-) Check the plan for two queries that you have. Best Regards, *Sameer Kumar | Database Consultant* *ASH

Re: [GENERAL] How to know server status variable in postgresql?

2014-01-11 Thread Sameer Kumar
On Fri, Jan 10, 2014 at 2:57 PM, ambilalmca wrote: > @ sameer khan, That's Sameer Kumar :-) > i got query for all except > *Number of cached blocks read, > check pg_stat_all_tables > Number of cached index blocks read, check pg_stat_all_indexes > Number of cach

Re: [GENERAL] DB Authentication Design

2014-01-12 Thread Sameer Kumar
On 12 Jan 2014 22:31, "François Beausoleil" wrote: > > Hi all, > > I'm thinking that all apps that connect to the database should have their own user. For example, the web application process is one user, then a report builder process should have another user, and a different process that imports

Re: [GENERAL] pg_basebackup failing

2014-01-15 Thread Sameer Kumar
up the referenced file somehow? > Partitions on the parent table. > > Which might have other implications on the performance if the queries do not use Partition key in where clause. Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD. *101 Cecil Street, #11-11 Tong Eng Buildi

Re: [GENERAL] Correct query to check streaming replication lag

2014-01-17 Thread Sameer Kumar
) THEN 0 ELSE EXTRACT (EPOCH FROM now() - > pg_last_xact_replay_timestamp()) END AS log_delay; > For reason same as above, this won't be exact but the most accurate you can get. Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD.*101 Cecil Street, #11-11 Tong Eng Building, Singapore 069533

Re: [GENERAL] Correct query to check streaming replication lag

2014-01-17 Thread Sameer Kumar
On Fri, Jan 17, 2014 at 5:31 PM, Granthana Biswas wrote: > > > Thank you Sameer for your reply. Is there any other query that would help > get exact replication lag? > > You 2nd Query is the most accurate you can get. > 2. SELECT CASE WHEN pg_last_xlog_receive_location() = >>> pg_last_xlog_repl

Re: [GENERAL] Correct query to check streaming replication lag

2014-01-18 Thread Sameer Kumar
Well in that case monitoring pending wal bytes would make more sense. Regards Sameer PS: Sent from my Mobile device. Pls ignore typo n abb

Re: [GENERAL] [HACKERS] using rpmbuild with PostgreSQL 9.2.6 source code

2014-01-20 Thread Sameer Kumar
> you need installed devel packages > > > I tried to install these packages (uuid-devel and systemd-unit) but yum can not locate these packages. I tried to install selinux-policy but I found out that selinux-policy 3.7.19 is already installed and is the latest package available in Red Hat repositor

Re: [GENERAL] using rpmbuild with PostgreSQL 9.2.6 source code

2014-01-20 Thread Sameer Kumar
Hi, Thanks everyone for your help! I am trying to build on ppc and also trying to play with a few other parameters e.g. segment size and pagesize. Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD.*101 Cecil Street, #11-11 Tong Eng Building, Singapore 069533 M : *+65 8110

Re: [GENERAL] using rpmbuild with PostgreSQL 9.2.6 source code

2014-01-20 Thread Sameer Kumar
Hi, I still get issues with uuid-devel. [root@pflex75 SOURCES]# rpmbuild -ba postgresql-9.2.spec error: Failed build dependencies: uuid-devel is needed by postgresql92-9.2.6-2PGDG.el6.ppc64 On googling a bit I found that uuid-devel is libuuid-devel on RHEL (is that the case?). I have b

Re: [GENERAL] Correct query to check streaming replication lag

2014-01-20 Thread Sameer Kumar
.168.0.20 (standby host) pg_last_xlog_receive_location --- 0/200 (1 row) $ psql -c "select pg_last_xlog_replay_location()" -h192.168.0.20 (standby host) pg_last_xlog_replay_location -- 0/200 (1 row) Best Regards, *Sameer Kuma

Re: [GENERAL] Correct query to check streaming replication lag

2014-01-20 Thread Sameer Kumar
ication_name; > This is much more simple, but I guess would work only with v9.2 and higher (?). Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD. *101 Cecil Street, #11-11 Tong Eng Building, Singapore 069533 M : *+65 8110 0350* T: +65 6438 3504 | www.ashnik.com www.faceboo

Re: [GENERAL] Correct query to check streaming replication lag

2014-01-20 Thread Sameer Kumar
> > > > We are already using the following query: > > SELECT CASE WHEN pg_last_xlog_receive_location( > ) = pg_last_xlog_replay_location() THEN 0 ELSE EXTRACT (EPOCH FROM now() - > pg_last_xact_replay_timestamp()) END AS log_delay; > > This is (delay) not the correct thing to monitor. We cannot u

Re: [GENERAL] Fully-automatic streaming replication failover when master dies?

2014-01-23 Thread Sameer Kumar
process or an async replication? I guess what he is asking for is automation of whatever feature PostgreSQL already supports. Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD.*101 Cecil Street, #11-11 Tong Eng Building, Singapore 069533 M : *+65 8110 0350 <%2B65%208110%2

Re: [GENERAL] problem connecting to postgres via apache

2014-01-23 Thread Sameer Kumar
trying to connect using TCP/IP > not a socket. > > What is your connection string? In addition to what has been already asked, can you also check if your firewall is running? Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD. *101 Cecil Street, #11-11 Tong Eng Building, Si

Re: [GENERAL] Fully-automatic streaming replication failover when master dies?

2014-01-23 Thread Sameer Kumar
e promoted, you > should make a discion on this. Pgpool-II cannot guess your will. Can't we decide based on the xlog location replayed on each standby? Whichever is ahead gets the priority (the idea is to lose least number of transactions). Best Regards, *Sameer Kumar | Database Consulta

Re: [GENERAL] Fully-automatic streaming replication failover when master dies?

2014-01-26 Thread Sameer Kumar
then may be my arguments are all wrong (and I am sorry to everyone). ACID (primarily isolation and serilization) would make a big deal here. Multi Master with Relational databases is an all together different thing. Anyways I doubt that "PostgreSQL supports synchronous multi-master" Best Regard

Re: [GENERAL] Fully-automatic streaming replication failover when master dies?

2014-01-26 Thread Sameer Kumar
bles which are shared across different nodes, but that is not the best way of utilizing features of PostgresXC] I think it is not apt to call it "synchronous" (since there is no replication happening). Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD.*101 Cecil Street, #1

Re: [GENERAL] Simple Web-based alternative to PgAdmin

2014-02-19 Thread Sameer Kumar
d display a result set. A web-based tool: http://www.postgresql.org/about/news/1485/ Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069533 M: *+65 8110 0350* T: +65 6438 3504 | www.ashnik.com *[image: icons]* [

Re: [GENERAL] Possible to improve optimisation / index usage based on domain properties of a function

2014-02-19 Thread Sameer Kumar
> > > Hi all, > > Take the following scenario > > I have a set of partitions inherited from a parent table, called *streams* > . > One of the properties of these tables is a timestamp field, nothing fancy > about it. > > I also have a qualified index on this field. > > > I've noticed that if I perf

Re: [GENERAL] Possible to improve optimisation / index usage based on domain properties of a function

2014-02-19 Thread Sameer Kumar
ct records based on an expression too [e.g. when date(stream_date)=24-Jan-2014, send it to Partition_24Jan14]. I am not sure if query planner would go to a particular partition when we query based on date(stream_date). I need to test this. Best Regards, *Sameer Kumar | Database Consulta

Re: [GENERAL] Adding a non-null column without noticeable downtime

2014-02-25 Thread Sameer Kumar
I think index should help. Why don't you try it out and check the explain plan of it? If you are planning to break it down as below: 1. ALTER TABLE "foo" ADD COLUMN "bar" boolean; 2. UPDATE foo SET bar = False; -- Done in batches 3. ALTER TABLE "foo" ALTER COLUMN "bar" SET DEFAULT False; 4. ALTER T

Re: [GENERAL] Join Bad Performance on different data types

2014-03-03 Thread Sameer Kumar
ight have to disable sequential scans set enable_seqscan=off; And then fire the query. Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069533 M: *+65 8110 0350* T: +65 6438 3504 | www.ashnik.com *[image: icons]* [

Re: [GENERAL] Join Bad Performance on different data types

2014-03-04 Thread Sameer Kumar
do that]. It should be fine, unless you are developing a product which can be used with someother RDBMS and hence you don't want to introduce a PostgreSQL specific line in code. Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building,

Re: [GENERAL] Remote troubleshooting session connection?

2014-04-08 Thread Sameer Kumar
? I guess 9.3 has a freeze option which might help you. I am not sure if the API supports it. Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069533 M: *+65 8110 0350* T: +65 6438 3504 | www.ashnik.com *

[GENERAL] Oracle to PostgreSQL replication

2014-05-06 Thread Sameer Kumar
is running on RHEL. Is there any commercial or open source tool available to achieve this? I was wondering has anyone used foreign data wrapper or Best Regards, *Sameer Kumar | Database Consultant* *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069533 M: *+65 8110

Re: [GENERAL] Oracle to PostgreSQL replication

2014-05-07 Thread Sameer Kumar
Thanks alot everyone! I guess I will be exploring more on oracle foreign data wrapper. Has anyone tried using oracle_fdw with Oracle RAC? I am wondering how would it handle failovers.

<    1   2