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

Re: [GENERAL] [pgsql-GENERAL] AUTOVACUUM and Streaming Replication in v9.5

2016-12-15 Thread Sameer Kumar
On Fri, 16 Dec 2016, 12:10 a.m. Sameer Kumar, wrote: > Hi, > > I was wondering if there is some change in the way > max_standby_streaming_delay and hot_standby_feedback work in v9.5. > > Below is a scenario which I had built to test out something but the > behavior confuse

[GENERAL] [pgsql-GENERAL] AUTOVACUUM and Streaming Replication in v9.5

2016-12-15 Thread Sameer Kumar
hot_standby_feedback is off, I might face an issue with rows being removed by vacuum. But that did not happen. Can someone help me to understand how MVCC, autovacuum work with Streaming replication. Regards Sameer -- -- Best Regards, *Sameer Kumar | DB Solution Architect* *ASHNIK PTE. LTD.* 101 Cecil

Re: [GENERAL] Migrating data from DB2 zOS to PostgreSQL

2016-12-06 Thread Sameer Kumar
e help on how we can migrate data from DB2 zOS database to > > postgres database. > > > > Are there any utilities present? Any thoughts how we should approach? > > You can use this utility: https://github.com/dalibo/db2topg > > The README should provide all needed i

Re: [GENERAL] Query regarding deadlock

2016-11-24 Thread Sameer Kumar
> > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- -- Best Regards, *Sameer Kumar | DB Solution Architect* *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong

Re: [GENERAL] Query regarding deadlock

2016-11-24 Thread Sameer Kumar
ke changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- -- Best Regards, *Sameer Kumar | DB Solution Architect* *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069533 T: +65 6438 3504 | www.ashnik.com Skype: sameer.ashnik | T: +65 8110 0350 [image: www.ashnik.com] <http://www.ashnik.com/>​

Re: [GENERAL] Get date timestamp(3) without time zone column - PGSQL 9.5

2016-09-04 Thread Sameer Kumar
_trunc('day', tasks_start at TIME ZONE 'EST') Note: I have not tried this statement Is this something you are going to use often? If that is the case then consider to re-model your query. The moment you use an expression on a column it would not use a normal BTree index. >

Re: [GENERAL] PG vs ElasticSearch for Logs

2016-08-22 Thread Sameer Kumar
other components of Elastic Stack like logstash and beats. They can be helpful even when you use Postgres as the end point. Otherwise (IMHO), you would spend a lot of time writing scripts and jobs to capture and stream logs. If I were you, I would not want to do that. > Regards, >

Re: [GENERAL] PG vs ElasticSearch for Logs

2016-08-19 Thread Sameer Kumar
; In the end, PG or ES, all depends on what you want. > > -Andy > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 Skype: sameer.ashnik | www.ashnik.com

Re: [GENERAL] PG vs ElasticSearch for Logs

2016-08-19 Thread Sameer Kumar
his data once it is in Postgres. > Regards, > Thomas > > > -- > Thomas Guettler http://www.thomas-guettler.de/ > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpre

Re: [GENERAL] Limit Heap Fetches / Rows Removed by Filter in Index Scans

2016-08-19 Thread Sameer Kumar
On Fri, Aug 19, 2016 at 2:25 PM Victor Blomqvist wrote: > On Fri, Aug 19, 2016 at 1:31 PM, Sameer Kumar > wrote: > >> >> >> On Fri, 19 Aug 2016, 1:07 p.m. Victor Blomqvist, wrote: >> >>> Hi, >>> >>> Is it possible to break/limit

Re: [GENERAL] Limit Heap Fetches / Rows Removed by Filter in Index Scans

2016-08-18 Thread Sameer Kumar
ed the TABLESAMPLE clause in v9.5? https://wiki.postgresql.org/wiki/TABLESAMPLE_Implementation > Thanks! > /Victor > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 Skype: sameer.ashnik | www.ashnik.com

Re: [GENERAL] Question about performance - Postgres 9.5

2016-08-16 Thread Sameer Kumar
table would > generally be a good idea, which makes it easy for tracking activities. > > Regards, > Venkata B N > > Fujitsu Australia > > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 Skype: sameer.ashnik | www.ashnik.com

Re: [GENERAL] Running pg_dump from a slave server

2016-08-16 Thread Sameer Kumar
ions of a table at once - it might lead a page level lock which might conflict with SELECT/share locks on standby 2. Any REINDEX operations 3. DDL operation 4. VACUUM FULL -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 Skype: sameer.ashnik | www.ashnik.com

Re: [GENERAL] Running pg_dump from a slave server

2016-08-16 Thread Sameer Kumar
On Wed, Aug 17, 2016 at 12:00 PM Venkata B Nagothi wrote: > On Wed, Aug 17, 2016 at 1:31 PM, Sameer Kumar > wrote: > >> >> >> On Wed, Aug 17, 2016 at 10:34 AM Patrick B >> wrote: >> >>> Hi guys, >>> >>> I'm using PostgreSQ

Re: [GENERAL] Running pg_dump from a slave server

2016-08-16 Thread Sameer Kumar
On Wed, Aug 17, 2016 at 11:36 AM Patrick B wrote: > > > 2016-08-17 15:31 GMT+12:00 Sameer Kumar : > >> >> >> On Wed, Aug 17, 2016 at 10:34 AM Patrick B >> wrote: >> >>> Hi guys, >>> >>> I'm using PostgreSQL 9.2 and I got

Re: [GENERAL] Running pg_dump from a slave server

2016-08-16 Thread Sameer Kumar
I would not recommend doing this if you use your standby for other read queries or for high availability. Another option would be avoid such queries which causes Exclusive Lock on the master database during pg_dump. Cheers > > Patrick > -- -- Best Regards Sameer Kumar | DB Solution Architect

Re: [GENERAL] Critical failure of standby

2016-08-15 Thread Sameer Kumar
s email are confidential and may be subject to legal or > professional privilege and copyright. No representation is made that this > email is free of viruses or other defects. If you have received this > communication in error, you may not copy or distribute any part of it or > otherwise disclose its contents to anyone. Please advise the sender of your > incorrect receipt of this correspondence. -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 Skype: sameer.ashnik | www.ashnik.com

Re: [GENERAL] RowExclusiveLock timeout while autovacuum

2016-08-14 Thread Sameer Kumar
> Aug 10 15:28:39 DB-1 postgres[3314]: [17-2] STATEMENT: INSERT INTO > > ActiveRadiussession(AccountSessionId,StationMAC,StationIP,StationIPV6,ApMAC,SSID,Username,WlanMAC,ChargeableUserIdentity,NASIPAddress,SessionStartTime,Port, > ZoneWlanInfo, AppVMInstanceIP) > values($1,$2,$3,$4,$5

Re: [GENERAL] How to stop script executions

2016-07-26 Thread Sameer Kumar
On Tue, 26 Jul 2016, 9:20 p.m. Dev Kumkar, wrote: > On Tue, Jul 26, 2016 at 6:29 PM, Sameer Kumar > wrote: > > You mean you don't want any routines/functions written in Pl/perl or >> PL/pythin to get executed? >> >> If that is what you are looking for them sim

Re: [GENERAL] How to stop script executions

2016-07-26 Thread Sameer Kumar
to achieve this? > > Regards... > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

Re: [GENERAL] Database and Table stats gets reset automatically

2016-07-25 Thread Sameer Kumar
On Mon, 25 Jul 2016, 10:35 p.m. Adrian Klaver, wrote: > On 07/25/2016 07:28 AM, Sameer Kumar wrote: > > > > > > On Mon, 25 Jul 2016, 10:10 p.m. Adrian Klaver, > > mailto:adrian.kla...@aklaver.com>> wrote: > > > > On 07/24/2016 09:58 PM, Sameer Kum

Re: [GENERAL] Database and Table stats gets reset automatically

2016-07-25 Thread Sameer Kumar
On Mon, 25 Jul 2016, 10:10 p.m. Adrian Klaver, wrote: > On 07/24/2016 09:58 PM, Sameer Kumar wrote: > > Hi, > > > > I have PostgreSQL v9.4.4 running in my environment. It has been up for > > over 2 years now. I noticed that suddenly the statistics have been reset

[GENERAL] Database and Table stats gets reset automatically

2016-07-24 Thread Sameer Kumar
argest value is from pg_stat_user_tables. tup_returned (470440261405). Does the statistics get reset automatically when the value for one of the statistics reaches the high number supported by int4? I am running on Red Hat 6.7. Regards Sameer -- -- Best Regards Sameer Kumar | DB Solution Architect *AS

Re: [GENERAL] PG user group in the Kuala Lumpur area?

2016-07-21 Thread Sameer Kumar
und here. > > About myself, I am German, currently traveling back and forth between > Germany and Malaysia. > > Torsten > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mai

Re: [GENERAL] pg_dump without any SET command in header of output plain text sql file

2016-07-21 Thread Sameer Kumar
sional: http://www.postgrespro.com > The Russian Postgres Company > > > On 20.07.2016 21:02, Sameer Kumar wrote: > > > > On Thu, 21 Jul 2016, 1:17 a.m. Alex Ignatov, > wrote: > >> Hello everyone! >> >> Is there any way to make pg_dump(9.5) to dump table (with da

Re: [GENERAL] pg_dump without any SET command in header of output plain text sql file

2016-07-20 Thread Sameer Kumar
on: > http://www.postgresql.org/mailpref/pgsql-general > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

Re: [GENERAL] MongoDB 3.2 beating Postgres 9.5.1?

2016-07-18 Thread Sameer Kumar
-- > > Bitmap Heap Scan on json_tables (cost=113.50..37914.64 rows=1 > width=1261) (actual time=779.261..29815.262 rows=909091 loops=1) >Recheck Cond: (data @> '{"name": "AC3 Case Red"}'::jsonb) > Rows Remove

Re: [GENERAL] Slow query on primary server runs fast on hot standby

2016-07-15 Thread Sameer Kumar
GB > work_mem = 42MB > maintenance_work_mem = 2GB > effective_cache_size = 44GB > > what are the values of random_page_cost and seq_page_cost? Also what might help here is the number of rows and pages in the table - select relpages,reltuples, relname from pg_class where relname in ('

Re: [GENERAL] pg_restore out of memory

2016-07-12 Thread Sameer Kumar
urs... > We couldn't use the directory -Fd dump because it's postgresql 9.1. > The original database is still on the server, this is a test restore. > > We have about one or two months of slack before we really need to remove > them from the server to recover space. > > > -- > Miguel Ramos > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

Re: [GENERAL] [BUGS] Where clause in pg_dump: need help

2016-07-08 Thread Sameer Kumar
On Fri, 8 Jul 2016, 8:06 p.m. Prashanth Adiyodi, wrote: > Hi Sameer, Please see comments inline > > > > > > *Prashanth Adiyodi * > > *Technical Account Manager* > > *Skype: prashanth.adiyodi* > > *Mob: +91-9819488395* > > [image: celltick] > >

Re: [GENERAL] [BUGS] Where clause in pg_dump: need help

2016-07-08 Thread Sameer Kumar
on the sql server side ) > > You still can have problems IF you have updates to the tables, or > deletions, or . But > if you just have insertions, copy is easy to do. > > Francisco Olarte. > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

Re: [GENERAL] pasting a lot of commands to psql

2016-07-07 Thread Sameer Kumar
tools like TeamViewer or WebEx etc over slow network > Dmitry Shalashov, surfingbird.ru & relap.io > > 2016-07-07 20:26 GMT+03:00 Sameer Kumar : > >> >> >> On Fri, 8 Jul 2016, 1:23 a.m. Dmitry Shalashov, >> wrote: >> >>> Hi everyone. >>> >&

Re: [GENERAL] pasting a lot of commands to psql

2016-07-07 Thread Sameer Kumar
lend.ru' > > b2b(> INSERT INTO oko_topsites VALUES('russian_federation','calorizator.ru > ',0,NULL,5) > > Unclosed quotes, unclosed parenthesis - anyway it wont work. > > How to safely insert big number of statements to psql at once? > I am aware abo

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Sameer Kumar
On Thu, Jul 7, 2016 at 11:37 AM Patrick B wrote: > 2016-07-07 15:19 GMT+12:00 Sameer Kumar : > >> >> >> On Thu, Jul 7, 2016 at 11:02 AM Patrick B >> wrote: >> >>> 2016-07-07 14:55 GMT+12:00 Sameer Kumar : >>> >>>> >>>&

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Sameer Kumar
On Thu, Jul 7, 2016 at 11:02 AM Patrick B wrote: > 2016-07-07 14:55 GMT+12:00 Sameer Kumar : > >> >> >> On Thu, 7 Jul 2016, 10:32 a.m. Patrick B, >> wrote: >> >>> The slave02 server will be a copy of the DB into Amazon. There will be a >>>

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Sameer Kumar
opy the archives generated on master to a shared location or may be copy it to S3 bucket 2. Archive generated on master is rsync (schedule basis) to EC2 3. pg_receivexlog running on EC2 to copy WAL from slave01 can just be a archive_command and archive_mode = on? > Setting these parameters on

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Sameer Kumar
meline, and slave02 won't be able to > become a master in the future. > No, you should not have a problem. Since rsync will also copy the timeline related files to slave02 > Is that right? > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil S

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Sameer Kumar
On Thu, 7 Jul 2016, 9:59 a.m. John R Pierce, wrote: > On 7/6/2016 6:52 PM, Sameer Kumar wrote: > > >> the only way to archive the wal_files from a slave into another slave on >> PostgreSQL 9.2, is by using pg_reveivexlog? >> > > Yes. Though I have never tried th

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Sameer Kumar
On Thu, 7 Jul 2016, 9:52 a.m. Sameer Kumar, wrote: > > > On Thu, 7 Jul 2016, 9:51 a.m. Patrick B, wrote: > >> >>> >>> On Thu, 7 Jul 2016, 9:20 a.m. Patrick B, >>> wrote: >>> >>>> Hi guys, >>>> >>>> I

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Sameer Kumar
l >> >> It might be helpful as it does something similar to archiving but using >> streaming protocol (so I think it should work even in cascaded mode). But >> since it works using streaming protocol, max_wal_senders on slave01 will be >> 2(what you have set now) + 1 (fo

Re: [GENERAL] Cascade streaming replication + wal_files - Pgsql 9.2

2016-07-06 Thread Sameer Kumar
ed mode). But since it works using streaming protocol, max_wal_senders on slave01 will be 2(what you have set now) + 1 (for pg_reveivexlog) > Cheers guys! > Patrick > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

Re: [GENERAL] pg_dump fundenental question

2016-07-05 Thread Sameer Kumar
mat ( > -Fc ), it's much more flexible ( andyou can have the sql script but > asking pg_restore to generate it if you need it, but not the other way > round ). > > > Francisco Olarte. > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To

Re: [GENERAL] What Causes Access Exclusive Lock?

2016-06-23 Thread Sameer Kumar
On Fri, 24 Jun 2016, 6:23 a.m. Jeff Janes, wrote: > On Thu, Jun 23, 2016 at 10:54 AM, Sameer Kumar > wrote: > > > > > > On Fri, 24 Jun 2016, 1:47 a.m. Jeff Janes, wrote: > >> > >> On Thu, Jun 23, 2016 at 8:14 AM, Sameer Kumar > >> wrot

Re: [GENERAL] What Causes Access Exclusive Lock?

2016-06-23 Thread Sameer Kumar
On Fri, 24 Jun 2016, 1:54 a.m. Sameer Kumar, wrote: > > > On Fri, 24 Jun 2016, 1:47 a.m. Jeff Janes, wrote: > >> On Thu, Jun 23, 2016 at 8:14 AM, Sameer Kumar >> wrote: >> > >> > Hi, >> > >> > I just wanted to understand what are the

Re: [GENERAL] What Causes Access Exclusive Lock?

2016-06-23 Thread Sameer Kumar
On Fri, 24 Jun 2016, 1:47 a.m. Jeff Janes, wrote: > On Thu, Jun 23, 2016 at 8:14 AM, Sameer Kumar > wrote: > > > > Hi, > > > > I just wanted to understand what are the commands which will acquire > Access > > Exclusive Lock on a table? In my knowledge b

Re: [GENERAL] What Causes Access Exclusive Lock?

2016-06-23 Thread Sameer Kumar
On Thu, Jun 23, 2016 at 11:57 PM Adrian Klaver wrote: > On 06/23/2016 08:14 AM, Sameer Kumar wrote: > > > > Hi, > > > > I just wanted to understand what are the commands which will acquire > > Access Exclusive Lock on a table? In my knowledge below operations

[GENERAL] What Causes Access Exclusive Lock?

2016-06-23 Thread Sameer Kumar
mode specified) I am using PostgreSQL v9.4. Regards Sameer -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

Re: [GENERAL] Protect a table against concurrent data changes while allowing to vacuum it

2016-06-22 Thread Sameer Kumar
an use function with SELECT on same table in CHECK constraint. So test it out first. If this works, any insert trying to get the 4th record in table would fail. A last resort could be using triggers. But either of these approaches will cause issues if you have high concurrency. > > > On

Re: [GENERAL] Protect a table against concurrent data changes while allowing to vacuum it

2016-06-22 Thread Sameer Kumar
your records, instead of locking them. Or look at advisory locks (but that depends on your Postgres version). > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-gener

Re: [GENERAL] pg_dump from a hot standby replication slave

2016-06-20 Thread Sameer Kumar
gt; > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

Re: [GENERAL] Hot disable WAL archiving

2016-06-17 Thread Sameer Kumar
> > Make sure to perform a base backup as soon as your bulk load is finished. > > Yours, > Laurenz Albe > > -- > > Francesco, > > Check CREATE UNLOGGED TABLE... in the docs. > > Regards, > Igor > > > -- > Sent via pgsql-general mailing list (pgsql-genera

Re: [GENERAL] Re: regarding schema only migration from sqlserver to postgres with runmtk.sh

2016-06-16 Thread Sameer Kumar
J.​ > > > > > > > > > > > > I've never used this tool so like everyone else I am guessing here > > but having quickly looked at the documentation have you tried > > specifying the '-targetdbtype postgres' in addition to the > > '-sourcedbtype sqlserver' that you have already specified? > > > > Neil A > > > > > > > > > > -- > > Sent via pgsql-general mailing list (pgsql-general@postgresql.org > > <mailto:pgsql-general@postgresql.org>) > > To make changes to your subscription: > > http://www.postgresql.org/mailpref/pgsql-general > > > > > > That appears to be an issue finding the right Java library to connect to > Postgres. The documentation here outlines where to download and install > the JDBC drivers > > https://www.enterprisedb.com/docs/en/9.5/migrate/Postgres_Plus_Migration_Guide.1.13.html# > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

Re: [GENERAL] connection pooling, many users, many datasources

2016-06-08 Thread Sameer Kumar
not sure if this is the reason or right use case for SET ROLE. Using different users (either with same app server or different) is the best way if ensuring data is not accessible across organizations. > Are there other options? > > Profuse appreciation for your thoughts and suggestions, >

Re: [GENERAL] WAL's listing in pg_xlog by some sql query

2016-06-02 Thread Sameer Kumar
On Fri, Jun 3, 2016 at 4:30 AM Stephen Frost wrote: > * Sameer Kumar (sameer.ku...@ashnik.com) wrote: > > On Fri, 3 Jun 2016, 12:14 a.m. Alex Ignatov, > > wrote: > > > Can I list all WAL files in pg_xlog by using some sql query in > Postgres? > > > >

Re: [GENERAL] WAL's listing in pg_xlog by some sql query

2016-06-02 Thread Sameer Kumar
> The Russian Postgres Company > > > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

Re: [GENERAL] Replication

2016-06-02 Thread Sameer Kumar
ut probably you can check the pid of wal receiver and find out what host it is connected to (should be possible from network stats). > --Scott > > > >> Regards, >>> >>> Bertrand >>> >> >> >> >> -- >> *Melvin Davidson* >

Re: [GENERAL] 9.6beta, parallel execution and cpu_tuple_cost

2016-05-27 Thread Sameer Kumar
lan without parallel worker. Perhaps if you reduce the both parameters by same factor/margin, you can see that parallel execution will be preffered when it is of lower cost. > Regards > Thomas > > > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

Re: [GENERAL] archive_command during database shutdown

2016-05-25 Thread Sameer Kumar
l mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

Re: [GENERAL] Postgresql-MongoDb foreigndata wrapper

2016-05-22 Thread Sameer Kumar
g=en&referral=alukaraju2...@gmail.com&idSignature=22> > > On Mon, May 23, 2016 at 10:37 AM, Sameer Kumar > wrote: > >> >> >> On Mon, 23 May 2016, 1:03 p.m. aluka raju, >> wrote: >> >>> Hello, >>> >>> I want use my da

Re: [GENERAL] Postgresql-MongoDb foreigndata wrapper

2016-05-22 Thread Sameer Kumar
.@gmail.com&idSignature=22> > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

Re: [GENERAL] How to view creation date and time of a relation

2016-05-19 Thread Sameer Kumar
created. Though I don't think this infra has been built for this very purpose. > -- > john r pierce, recycling bits in santa cruz > > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

Re: [GENERAL] Use of array_agg and array string on inner query

2016-05-18 Thread Sameer Kumar
ead if bested select and use that with OUTER JOIN or may be in the inner query use a correlated where clause (where t1.c2=t2.c2) > to get me the output desired. > > Thanks > Shankha Banerjee > > > On Wed, May 18, 2016 at 1:57 PM, Sameer Kumar > wrote: > > > >

Re: [GENERAL] Use of array_agg and array string on inner query

2016-05-18 Thread Sameer Kumar
put is : > > c1 | c2 | array_to_string > ++- > 2 | 20 | 2,3 > 1 | 10 | 2,3 > 3 | 30 | 2,3 > > Could one of you help me with the correct query. > > > May you should share some more details of exactly what you are expecting and what is the

Re: [GENERAL] Update or Delete causes canceling of long running slave queries

2016-05-12 Thread Sameer Kumar
gt; > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

Re: [GENERAL] Streaming replication, master recycling

2016-05-11 Thread Sameer Kumar
ve and then other way > round, but, this can be clarified only if you let us know the postgresql > version. This is quite tricky in 9.2.x and from 9.3.x. > > Regards, > Venkata B N > > Fujitsu Australia > > > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

Re: [GENERAL] COPY command & binary format

2016-05-10 Thread Sameer Kumar
On Tue, May 10, 2016 at 4:36 PM Sameer Kumar wrote: > On Tue, May 10, 2016 at 4:26 PM Nicolas Paris wrote: > >> Hello, >> >> What is the way to build a binary format (instead of a csv) ? Is there >> specification for this file ? >> http://www.postgres

Re: [GENERAL] COPY command & binary format

2016-05-10 Thread Sameer Kumar
ld be far faster, and maybe safer than CSVs > I don't think assumption is right. COPY is not meant for backup, it is for LOAD and UN-LOAD. What you probably need is pg_dump with -Fc format. http://www.postgresql.org/docs/current/static/app-pgdump.html > > Thanks by advance, &

Re: [GENERAL] Inserting into a master table with partitions does not return rows affected.

2016-05-10 Thread Sameer Kumar
902708.html > Sent from the PostgreSQL - general mailing list archive at Nabble.com. > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- -- Best Regards Sam

Re: [GENERAL] index question

2016-05-02 Thread Sameer Kumar
hat are worth > investigating.​ > > > ​David J.​ > > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

Re: [GENERAL] index question

2016-05-02 Thread Sameer Kumar
the bloats percentage in the index. If this is true, perhaps a reindex might help. > "idx_scan", "idx_tup_read" and "idx_tup_fetch" are 0. > So, it's safe to say that they are not being used, is that right? > > But some indexes have almost 100GB on the size column. This means they are > not being used now, but they could be used in the past? > > - Is it safe to remove them? > > Cheers > Lucas > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

Re: [GENERAL] Issue during postgresql startup

2016-04-28 Thread Sameer Kumar
gt; strictly prohibited. If you have > received this email in error please delete it and notify the sender > immediately. . > > --- > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription:

Re: [GENERAL] Slow join over three tables

2016-04-26 Thread Sameer Kumar
s. The system has a total memory of > 24 GB, runs on Debian and uses an 4Ghz 8 core i7-4790 processor. > > Some important postgresql.conf readouts: > > - shared_buffers = 4GB > - work_mem = 64MB > - maintenance_work_mem = 1GB > - checkpoint_segments = 50 > - checkpoint_completion_target = 0.9 > - autovacuum = on > > Is there something I am missing here? Any help on getting this join faster > is much appreciated. > > Cheers, > Tim > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

Re: [GENERAL] Error: no connection to the server

2016-04-25 Thread Sameer Kumar
(pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

Re: [GENERAL] [NOVICE] Fwd: Process scheduling in postgres

2016-04-22 Thread Sameer Kumar
ble(s)? Which version of PostgreSQL? What's the version of OS? Check out the locks which are not granted yet - pg_locks.granted > Your help is appreciated. > > Thanks and regards, > Vineel. > > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

Re: [GENERAL] Invalid data read from synchronously replicated hot standby

2016-04-21 Thread Sameer Kumar
p makes sense. > I am not sure if it is because of that but you are on an old patch. Upgrade to latest (I guess 9.1.21). Once you have upgraded, re-create the stand by from scratch using a basebackup and then see if the error is still there. > Best regards, > Martin > -- -- Best Re

Re: [GENERAL] I can't see wal receiver process in one node

2016-04-05 Thread Sameer Kumar
m. > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

Re: [GENERAL] template1 being accessed

2016-04-05 Thread Sameer Kumar
l-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

Re: [GENERAL] pgDay Asia / talks / lightning talks

2016-02-25 Thread Sameer Kumar
; -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- -- Best Regards Sameer Kumar | DB Solution Architect *ASHNIK PTE. LTD.* 101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533 T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

Re: [GENERAL] very slow queries and ineffective vacuum

2015-07-02 Thread Sameer Kumar
On Thu, Jul 2, 2015 at 9:57 PM Lukasz Wrobel < lukasz.wro...@motorolasolutions.com> wrote: > Hello again. > > Thank you for all your responses. I will try to clarify more and attempt > to answer the questions you raised. > > I'm attaching the postgresql.conf this time. I cannot supply you guys wit

Re: [GENERAL] very slow queries and ineffective vacuum

2015-07-01 Thread Sameer Kumar
On Wed, Jul 1, 2015 at 4:51 AM Pavel Stehule wrote: > Hi > > What is an output of VACUUM VERBOSE statement? > > VACUUM can be blocked by some forgotten transaction. Check your > pg_stat_activity table for some old process in "idle in transaction" state. > Then connection should not be reused, and

Re: [GENERAL] very slow queries and ineffective vacuum

2015-07-01 Thread Sameer Kumar
On Wed, Jul 1, 2015 at 3:37 AM Lukasz Wrobel < lukasz.wro...@motorolasolutions.com> wrote: > Hello. > > I have multiple problems with my database, the biggest of which is how to > find out what is actually wrong. > > First of all I have a 9.3 postgres database that is running for about a > month.

Re: [GENERAL] WAL log archival on standby

2015-06-20 Thread Sameer Kumar
On Fri, 19 Jun 2015 13:46 Michael Paquier wrote: On Fri, Jun 19, 2015 at 2:38 PM, James Sewell wrote: Hey All, Is it possible to create WAL archive files on standby servers when using streaming replication? Yes and no, standbys do not archive WAL in ~9.4, but you could use archive_mode = 'al

Re: [GENERAL] pg_xlog on a hot_stanby slave

2015-06-18 Thread Sameer Kumar
On Thu, 18 Jun 2015 15:17 Xavier 12 wrote: On 18/06/2015 04:00, Sameer Kumar wrote: On Wed, 17 Jun 2015 15:24 Xavier 12 wrote: On 17/06/2015 03:17, Sameer Kumar wrote: On Tue, 16 Jun 2015 16:55 Xavier 12 wrote: Hi everyone, Questions about pg_xlogs again... I have two Postgresql

Re: [GENERAL] pg_xlog on a hot_stanby slave

2015-06-17 Thread Sameer Kumar
On Wed, 17 Jun 2015 15:24 Xavier 12 wrote: On 17/06/2015 03:17, Sameer Kumar wrote: On Tue, 16 Jun 2015 16:55 Xavier 12 wrote: Hi everyone, Questions about pg_xlogs again... I have two Postgresql 9.1 servers in a master/slave stream replication (hot_standby). Psql01 (master) is backuped

Re: [GENERAL] pg_xlog on a hot_stanby slave

2015-06-16 Thread Sameer Kumar
On Tue, 16 Jun 2015 16:55 Xavier 12 wrote: Hi everyone, Questions about pg_xlogs again... I have two Postgresql 9.1 servers in a master/slave stream replication (hot_standby). Psql01 (master) is backuped with Barman and pg_xlogs is correctly purged (archive_command is used). Hower, Psql02 (sl

Re: [GENERAL] Streaming replication and an archivelog

2015-05-09 Thread Sameer Kumar
On Fri, May 8, 2015 at 2:29 PM James Sewell wrote: > Hello All, > > I am running 9.4 on Centos. > > I have three servers, one master and two slaves. The slaves have the > following recovery.conf > > standby_mode = 'on' > primary_conninfo = 'user=postgres host=mastervip port=5432' > restore_comman

Re: [GENERAL] Limiting user from changing its own attributes

2015-05-04 Thread Sameer Kumar
On Tue, May 5, 2015 at 1:44 PM David G. Johnston wrote: > On Mon, May 4, 2015 at 10:23 PM, Sameer Kumar > wrote: > >> Sorry about the long silence on this. >> >> On Mon, Apr 13, 2015 at 3:34 PM David G. Johnston < >> david.g.johns...@gmail.com> wrote:

Re: [GENERAL] Limiting user from changing its own attributes

2015-05-04 Thread Sameer Kumar
Sorry about the long silence on this. On Mon, Apr 13, 2015 at 3:34 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Sun, Apr 12, 2015 at 10:23 PM, Sameer Kumar > wrote: > >> On Mon, Apr 13, 2015 at 1:03 PM Jim Nasby >> wrote: >> > >>>

Re: [GENERAL] Re: Hot standby problems: consistent state not reached, no connection to master server.

2015-04-14 Thread Sameer Kumar
On Tue, 14 Apr 2015 11:59 Ilya Ashchepkov wrote: On Mon, 13 Apr 2015 12:24:11 -0700 Adrian Klaver wrote: > On 04/13/2015 11:25 AM, Ilya Ashchepkov wrote: > > On Mon, 13 Apr 2015 10:06:05 -0700 > > Adrian Klaver wrote: > > > >> On 04/13/2015 09:42 AM, Ilya Ashchepkov wrote: > >>> On Sun, 12 Ap

Re: [GENERAL] Limiting user from changing its own attributes

2015-04-12 Thread Sameer Kumar
On Mon, Apr 13, 2015 at 1:03 PM Jim Nasby wrote: > On 4/12/15 11:55 PM, Sameer Kumar wrote: > > > > On Mon, 13 Apr 2015 11:35 Jim Nasby > <mailto:jim.na...@bluetreble.com>> wrote: > > > > On 4/11/15 4:11 PM, Sameer Kumar wrote: > > >

Re: [GENERAL] Limiting user from changing its own attributes

2015-04-12 Thread Sameer Kumar
On Mon, 13 Apr 2015 11:35 Jim Nasby wrote: On 4/11/15 4:11 PM, Sameer Kumar wrote: > Pg_settings currently has an upper bound column - though it is a > view and that value cannot be changed that I know of. > > > I guess that upper bound column is more of the limit tha

Re: [GENERAL] Limiting user from changing its own attributes

2015-04-11 Thread Sameer Kumar
On Sat, 11 Apr 2015 16:05 David G. Johnston wrote: On Friday, April 10, 2015, Sameer Kumar wrote: On Sat, Apr 11, 2015 at 12:57 AM David G. Johnston < david.g.johns...@gmail.com> wrote: On Fri, Apr 10, 2015 at 9:01 AM, Sameer Kumar wrote: Yes either an upper bound to which use

Re: [GENERAL] Limiting user from changing its own attributes

2015-04-10 Thread Sameer Kumar
On Sat, Apr 11, 2015 at 12:57 AM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Fri, Apr 10, 2015 at 9:01 AM, Sameer Kumar > wrote: > >> Hi, >> >> In PostgreSQL a user can alter itself to change its user level >> parameters. e.g.

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] 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

[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

[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

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

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 ? >

  1   2   >