[GENERAL] compiling postgres_fdw fails for 9.6.5

2017-10-06 Thread Sandeep Gupta
Hello, I am on Cent OS 6.8 machine. The Postgres is already installed in some install_dir/. I downloaded the source, configured it with prefix=install_dir and then moved to contrib/postgres_fdw dir. However make fails with following error: gcc -Wall -Wmissing-prototypes -Wpointer-arith

[GENERAL] error: initdb: could not look up effective user ID 21073: user does not exist

2017-10-04 Thread Sandeep Gupta
I install postgres 9.6.5 on CentOS 6.8. However, i am not able to init the database due to the following error. A bug (http://www.postgresql-archive.org/BUG-8139-initdb-Misleading-error-message-when-current-user-not-in-etc-passwd-td5754618.html) was reported with similar problem with but that was

Re: [GENERAL] sorry, too many clients already error

2017-05-17 Thread Sandeep Gupta
The log_connections helped. I was able to diagnose the problem. The connections are getting closed but my setup is actually generating too many connections. Thanks for helping with this. -sandeep On Tue, May 16, 2017 at 6:53 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Sandeep Gupta &l

[GENERAL] sorry, too many clients already error

2017-05-16 Thread Sandeep Gupta
I have set max_connection = 40. The usage is somewhat not typical. It is basically experiment runs that connect to the database and dump results there. The experiments connect through JDBC and they close the connection when they are done. I can verify that no more than 20 clients/experiments

Re: [GENERAL] character encoding of the postgres database

2017-05-10 Thread Sandeep Gupta
Thank you. On Wed, May 10, 2017 at 12:54 PM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: > On 05/10/2017 08:48 AM, Sandeep Gupta wrote: >> >> Currently, the postgres database by has SQL_ASCII encoding. >> >> psql -p 5771 postgres -l >>

[GENERAL] character encoding of the postgres database

2017-05-10 Thread Sandeep Gupta
Currently, the postgres database by has SQL_ASCII encoding. psql -p 5771 postgres -l List of databases Name| Owner | Encoding | Collate | Ctype | Access privileges ---+-+---+-+---+- postgres | sandeep

Re: [GENERAL] how to serialize insert followed by read(select) by different clients

2016-08-07 Thread Sandeep Gupta
, 2016 at 11:43 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Sandeep Gupta <gupta.sand...@gmail.com> writes: >> First program, lets say the writer, (using psql) appends to a table >> in the database. >> Second program, the reader, (python using alchemy) reads the da

[GENERAL] how to serialize insert followed by read(select) by different clients

2016-08-06 Thread Sandeep Gupta
Hi, Our usage of postgres is bit unconventional. It is used for passing data between programs (in real time). First program, lets say the writer, (using psql) appends to a table in the database. Second program, the reader, (python using alchemy) reads the data. This happens in loop, one

Re: [GENERAL] slow query question: more indexes considered harmful

2014-06-10 Thread Sandeep Gupta
= 23321 Although the planner picks the second one. What it is about the query planner that make it skip plans using the index on pid?. Thanks. Sandeep On Sun, May 18, 2014 at 9:43 PM, Sandeep Gupta gupta.sand...@gmail.com wrote: Hi, I have typical setup consisting of two tables

[GENERAL] slow query question: more indexes considered harmful

2014-05-18 Thread Sandeep Gupta
Hi, I have typical setup consisting of two tables (demography and ses) with a typical filter-join-groupby-orderby query. Schemas: demography (pid int, countyid int) ses (pid int, exposed_time int) query: select countyid, count(pid) from demography, ses where demography.pid = ses.pid and

[GENERAL] what is sublinks in query planner?

2014-03-28 Thread Sandeep Gupta
Hi, I looked for description of sublinks in the code as well as online but failed to come with any information. Was wondering someone can provide a line or two of what sublinks are suppose to do? Thanks. Sandeep

Re: [GENERAL] what is sublinks in query planner?

2014-03-28 Thread Sandeep Gupta
Hi Tom, Sure. Thanks for the info. This helps. I will look into primnodes.h as well. -Sandeep On Fri, Mar 28, 2014 at 3:56 PM, Tom Lane t...@sss.pgh.pa.us wrote: Sandeep Gupta gupta.sand...@gmail.com writes: I looked for description of sublinks in the code as well as online

Re: [Postgres-xc-general] [GENERAL] Tuple not found error during Index creation

2013-12-11 Thread Sandeep Gupta
...@translattice.comwrote: On Tue, Dec 10, 2013 at 11:23 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Wed, Dec 11, 2013 at 1:17 PM, Sandeep Gupta gupta.sand...@gmail.com wrote: Hi Michael, I can provide the table schema and the data over which indexing almost always fails with tuple

Re: [Postgres-xc-general] [GENERAL] Tuple not found error during Index creation

2013-12-10 Thread Sandeep Gupta
at 5:49 PM, Michael Paquier michael.paqu...@gmail.comwrote: On Tue, Dec 10, 2013 at 7:17 AM, Sandeep Gupta gupta.sand...@gmail.com wrote: We are trying to trace cause and potential solution of tuple not found error with postgres-xc. The problem happens when indexing a large file. It seems

Re: [GENERAL] Tuple not found error during Index creation

2013-12-09 Thread Sandeep Gupta
Agreed. However, the tuple not found error problem seems to happen with postgres as well, if not in the particular case index creation over large datasets. It would helpful to know in that scenario what are the fixes and how to avoid it in the first place. The solution/fixes for postgres will

Re: [GENERAL] Tuple not found error during Index creation

2013-12-09 Thread Sandeep Gupta
on this. -Sandeep On Mon, Dec 9, 2013 at 1:43 PM, Sandeep Gupta gupta.sand...@gmail.comwrote: Agreed. However, the tuple not found error problem seems to happen with postgres as well, if not in the particular case index creation over large datasets. It would helpful to know in that scenario what

Re: [GENERAL] what could cause postgres to crash?

2013-11-09 Thread Sandeep Gupta
on the net which tell how to fix this problem. But first would be good to confirm that it is OOM and, if not, then what exactly is causing this to happen. -Sandeep On Sat, Nov 9, 2013 at 10:46 AM, Scott Marlowe scott.marl...@gmail.comwrote: On Fri, Nov 8, 2013 at 8:16 PM, Sandeep Gupta gupta.sand

[GENERAL] what could cause postgres to crash?

2013-11-08 Thread Sandeep Gupta
Hi, My postgres sessions, after being idle for 5 --6 hrs, crash on their own. Sometimes with error messages sometimes without. The message I get appended below. I was looking for suggestion to narrow down as to what could have caused this problem. System log doesn't show anything. Thanks.

[GENERAL] Using PL/R with 9.3beta2

2013-09-15 Thread Sandeep Gupta
Hi, I compiled g postgres9.3beta2 with PL/R which works fine. However, when I execute the command create extension plr, I get following error: ERROR: could not load library /apps/packages/postgresql/9.3beta2/lib/plr.so: /apps/packages/postgresql/9.3beta2/lib/plr.so: undefined symbol:

Re: [GENERAL] demystifying nested loop vs. merge join query plan choice

2013-08-01 Thread Sandeep Gupta
: Sandeep Gupta gupta.sand...@gmail.com writes: details regarding buffer usage: [ 100% buffer hit rate ] Your database is evidently fully cached in memory. If that's the operating mode you expect, you need to change the planner's cost parameters, in particular reduce random_page_cost to equal

[GENERAL] demystifying nested loop vs. merge join query plan choice

2013-07-31 Thread Sandeep Gupta
I have two postgres instances each with a database of same schema. The dataset in both is ''same'' but for randomness i.e. both contain two tables pc(did) and tc(pid, did) that have almost same number of rows and have been generate from same distribution. However the query plan for the join

Re: [GENERAL] demystifying nested loop vs. merge join query plan choice

2013-07-31 Thread Sandeep Gupta
configuration? Regards Pavel 2013/7/31 Sandeep Gupta gupta.sand...@gmail.com: I have two postgres instances each with a database of same schema. The dataset in both is ''same'' but for randomness i.e. both contain two tables pc(did) and tc(pid, did) that have almost same number of rows

Re: [GENERAL] demystifying nested loop vs. merge join query plan choice

2013-07-31 Thread Sandeep Gupta
: shared hit=2235972 read=204867 Total runtime: 2386.914 ms (12 rows) On Wed, Jul 31, 2013 at 3:16 PM, Sandeep Gupta gupta.sand...@gmail.comwrote: Hi Pavel, Yes. The postgresql.conf is exactly the same. The have the same index and clustering and are on the same compute node as well

[GENERAL] group by query plan on already clustered index

2013-07-25 Thread Sandeep Gupta
On a table T with two fields, f1 and f2, the sql command select count(f2), f1 from T group by f1 result is seq scan followed by a sort on f1 (see the query plan below): GroupAggregate (cost=21566127.88..22326004.09 rows=987621 width=8) - Sort (cost=21566127.88..21816127.88