Re: [GENERAL] How the Planner in PGStrom differs from PostgreSQL?

2016-11-17 Thread Amit Langote
On Thu, Nov 17, 2016 at 7:09 PM, Mark Anns wrote: > Can u explain this statement "check whether the scan qualifier can > be executable on GPU device" > > What are the scan qualifiers? > > How to determine whether they are device executable or not? > > The cost estimates are entirely based on numb

Re: [GENERAL] [HACKERS] Change in order of criteria - reg

2016-06-01 Thread Amit Langote
On 2016/06/01 13:07, sri harsha wrote: > Hi, > > In PostgreSQL , does the order in which the criteria is given matter ?? > For example > > Query 1 : Select * from TABLE where a > 5 and b < 10; > > Query 2 : Select * from TABLE where b <10 and a > 5; > > Are query 1 and query 2 the same in P

Re: [GENERAL] pg_restore casts check constraints differently

2016-03-30 Thread Amit Langote
On Wed, Mar 30, 2016 at 6:45 AM, Tom Lane wrote: > Joshua Ma writes: >> This might not be a common case, but we're using pg_dump in a testing >> environment to check migrations - 1) we initialize the db from HEAD, >> pg_dump it, 2) we initialize the db from migration_base.sql, apply >> migrations

Re: [GENERAL] Exclusively locking parent tables while disinheriting children.

2015-12-01 Thread Amit Langote
On Wed, Sep 16, 2015 at 12:10 AM, Thom Brown wrote: > On 7 August 2015 at 12:34, Thom Brown wrote: >> On 30 July 2015 at 13:35, Rowan Collins wrote: >>> So what I want to understand is what the risk of adding this lock are - >>> under what circumstances would I expect to see dead locks if I manu

Re: [GENERAL] Where should I post 3rd party product announcements?

2014-10-14 Thread Amit Langote
On Tue, Oct 14, 2014 at 4:58 PM, Jonathan Neve wrote: > Hello, > > I am the author of a database replication solution to which I recently added > Postgres support. I would like to let the PG community know about it and I > therefore posted a message to this list, but it didn't come through, > pres

Re: [GENERAL] Is it possible to create an index without keeping the indexed data in a column?

2014-07-31 Thread Amit Langote
On Fri, Aug 1, 2014 at 2:50 PM, Amit Langote wrote: > > Not sure exactly if it applies here; Re-reading the OP again, perhaps it doesn't. Sorry about the noise -- Amit -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscri

Re: [GENERAL] Is it possible to create an index without keeping the indexed data in a column?

2014-07-31 Thread Amit Langote
On Fri, Aug 1, 2014 at 10:48 AM, Michael Paquier wrote: > On Fri, Aug 1, 2014 at 4:47 AM, Larry White wrote: >> Is there a way to get Postgres to index the table as if the JSON were there, >> but not actually put the data in the table? >> I could either store the docs >> elsewhere and keep a refe

Re: [GENERAL] Request for Unsubscribe

2014-04-24 Thread Amit Langote
On Thursday, April 24, 2014, Bhim Kumar wrote: > Hi sir, > > I am getting a lot of mails which are tough to handle. > > Please unsubscribe my mail id, so that I would not get unwanted mail. > Use the subscribe/unsubscribe form here. http://www.postgresql.org/community/lists/subscribe/ -- Amit

Re: [DOCS] [GENERAL] About upgrading a (tuple?) lock in a rollback'd sub-transaction

2014-04-10 Thread Amit Langote
On Fri, Apr 11, 2014 at 11:52 AM, Alvaro Herrera wrote: > Amit Langote wrote: >> On Thu, Apr 10, 2014 at 10:25 PM, Rob Sargent wrote: >> > And it also tells you how to stop it --bibtex iirc >> >> Yeah, it's a caution against a potentially harmful usage anyway

Re: [GENERAL] About upgrading a (tuple?) lock in a rollback'd sub-transaction

2014-04-10 Thread Amit Langote
On Thu, Apr 10, 2014 at 10:25 PM, Rob Sargent wrote: > And it also tells you how to stop it --bibtex iirc > Yeah, it's a caution against a potentially harmful usage anyway. Users should not use it at all. I was just wondering if the description of the behavior, that is, potential disappearance o

[GENERAL] About upgrading a (tuple?) lock in a rollback'd sub-transaction

2014-04-09 Thread Amit Langote
Hi, Currently there is a warning against the following in manual: BEGIN; SELECT * FROM mytable WHERE key = 1 FOR UPDATE; SAVEPOINT s; UPDATE mytable SET ... WHERE key = 1; ROLLBACK TO s; here: http://www.postgresql.org/docs/9.2/static/sql-select.html IIUC, it says if the lock-upgrading sub-tran

Re: [GENERAL] Table Rewrite During ALTER TABLE ... ADD COLUMN ... DEFAULT NULL

2014-04-02 Thread Amit Langote
On Thu, Apr 3, 2014 at 1:19 PM, Tom Lane wrote: > Amit Langote writes: >> On Thu, Apr 3, 2014 at 12:54 PM, Tom Lane wrote: >>> Some experimentation suggests that we are smart about "DEFAULT NULL" >>> unless the column type requires a length-coercio

Re: [GENERAL] Table Rewrite During ALTER TABLE ... ADD COLUMN ... DEFAULT NULL

2014-04-02 Thread Amit Langote
On Thu, Apr 3, 2014 at 1:19 PM, Tom Lane wrote: > Amit Langote writes: >> On Thu, Apr 3, 2014 at 12:54 PM, Tom Lane wrote: >>> Some experimentation suggests that we are smart about "DEFAULT NULL" >>> unless the column type requires a length-coercio

Re: [GENERAL] Table Rewrite During ALTER TABLE ... ADD COLUMN ... DEFAULT NULL

2014-04-02 Thread Amit Langote
On Thu, Apr 3, 2014 at 12:54 PM, Tom Lane wrote: > Amit Langote writes: >> When I do the following: > >> ALTER TABLE table ADD COLUMN numeric(x) DEFAULT NULL; > >> The table is rewritten whereas notes section on the manual page for >> ALTER TABLE says otherwise

[GENERAL] Table Rewrite During ALTER TABLE ... ADD COLUMN ... DEFAULT NULL

2014-04-02 Thread Amit Langote
Hi, When I do the following: ALTER TABLE table ADD COLUMN numeric(x) DEFAULT NULL; The table is rewritten whereas notes section on the manual page for ALTER TABLE says otherwise (which holds true for most of the cases though). http://www.postgresql.org/docs/devel/static/sql-altertable.html As

Re: [NOVICE][GENERAL] Convert Datum to an user-defined data type?

2014-03-10 Thread Amit Langote
On Mon, Mar 10, 2014 at 11:09 PM, Anh Pham wrote: > Hi everyone, > I have created a new data types using SQL in a database: > > CREATE TYPE type1 AS ( > score integer, > time integer[], > ); > > I also created a server extension module (C code), and I was able to > retrieve a Datum value of type1

Re: [GENERAL] execute table query in backend

2014-03-05 Thread Amit Langote
On Tue, Mar 4, 2014 at 12:38 AM, Anh Pham wrote: > Hi, > I am trying to extend the server backend by writing a new module. > Basically, it tries to retrieve tuples from a specific table using some > predefined qualifications (equivalent to "SELECT FROM WHERE" client sql > statement ). > Is there a

Re: [GENERAL] How are pg_operator and pg_type related with each other?

2014-01-15 Thread Amit Langote
may be overloaded for different types; but point to take from this is that any "<" uses the statistic called histogram.) -- Amit Langote -- 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] pg_depend OBJID not found

2014-01-15 Thread Amit Langote
On Wed, Jan 15, 2014 at 8:37 PM, saggarwal wrote: > hi > > Any help appreciated (newbie to pgsql) > I have a function f_Sanjeev and create a view > create view v_sanjeev as select * from f_sanjeev() > > the view has and OBJID o

Re: [GENERAL] how is text-equality handled in postgresql?

2014-01-15 Thread Amit Langote
On Wed, Jan 15, 2014 at 9:02 PM, Ivan Voras wrote: > On 15/01/2014 12:36, Amit Langote wrote: >> On Wed, Jan 15, 2014 at 7:39 PM, Ivan Voras wrote: >>> On 15/01/2014 10:10, Gábor Farkas wrote: >>>> hi, >>>> >>>> when i create an uniqu

Re: [GENERAL] how is text-equality handled in postgresql?

2014-01-15 Thread Amit Langote
strings are * equal. Believing that would be bad news for a number of reasons, * so we follow Perl's lead and sort "equal" strings according to * strcmp(). */ if (result == 0) result = strc

Re: [GENERAL] How to specify/mock the statistic data of tables in PostgreSQL

2014-01-10 Thread Amit Langote
o optimize the join order (by setting > join_collapse_limit and from_collapse_limit to 1) , is there any other > factor that may affect the structure of execution plan regardless of the > data access method. > > 2014-01-10 > ____ > ygnhzeus > _

Re: [GENERAL] How to specify/mock the statistic data of tables in PostgreSQL

2014-01-10 Thread Amit Langote
es, using random sampling), I guess you'd need to go through its code in the source file "src/backend/commands/analyze.c". -- Amit Langote -- 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] Bugs revealed by static code analysis

2013-12-25 Thread Amit Langote
On Wed, Dec 25, 2013 at 9:41 PM, Fernando Correia wrote: > As a PostgreSQL user, I'd like to bring to the attention of the community > and the developers that Andrey Karpov from PVS-Studio published an article > listing several potential bugs in PostgreSQL. These bugs were revealed by > code analy

Re: [GENERAL] unexpected pageaddr error in db log

2013-12-18 Thread Amit Langote
On Thu, Dec 19, 2013 at 12:25 PM, wd wrote: > > hi, > > We have upgrade our database from PostgreSQL 9.2.4 to 9.3.2, use dump & > restore in a fresh db created by initdb. > > Then use pg_basebackup created 2 slave db, the error occur when start the > database. > > db1 > > [2013-12-19 04:00:5

Re: [GENERAL] pg_trgm module: no convertion into Trigrams on one side when comparing

2013-11-14 Thread Amit Langote
On Thu, Nov 14, 2013 at 9:05 PM, Janek Sendrowski wrote: > Hi Amit, > > Thanks for your answer. > > My issue is that I still need a ranking like the similarity when comparing > trigrams. > I'm working on a similarity search, which determindes similiar sentences from > my table. > > The usual sim

Re: [GENERAL] pg_trgm module: no convertion into Trigrams on one side when comparing

2013-11-13 Thread Amit Langote
On Thu, Nov 14, 2013 at 2:37 AM, Janek Sendrowski wrote: > Hi, > I'm using the pg_trgm module, > Is there a possibility not to convert one side of the string when comparing? > I need a kind of reference string containing only certain trigrams. > It's not possible to build every kind of string usin

Re: [GENERAL] GIN fast update technique and work_mem

2013-10-24 Thread Amit Langote
On Thu, Oct 24, 2013 at 7:26 PM, Andres Freund wrote: > On 2013-10-24 18:40:46 +0900, Amit Langote wrote: >> While going through the documentation for GIN fast update technique, I read - >> >> "...or if the pending list becomes too large (larger than work_mem), >&

[GENERAL] GIN fast update technique and work_mem

2013-10-24 Thread Amit Langote
Hi, While going through the documentation for GIN fast update technique, I read - "...or if the pending list becomes too large (larger than work_mem), the entries are moved to the main GIN data structure using the same bulk insert techniques used during initial index creation." The "work_mem" li

Re: [GENERAL] A client and server encoding question

2013-10-22 Thread Amit Langote
On Tue, Oct 22, 2013 at 7:00 PM, Albe Laurenz wrote: > Amit Langote wrote: >> With a server initdb'd with UTF8 encoding , if I create a table with a >> client using LATIN1 encoding and later try to work with the relation >> with a client using UTF8 encoding (both the

[GENERAL] A client and server encoding question

2013-10-22 Thread Amit Langote
E Time: 16.954 ms But, I had an impression that above shouldn't have caused any problem? Should UTF8 handle the situation gracefully? Or am I missing something? -- Amit Langote -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

[GENERAL] Links in docs broken

2013-10-18 Thread Amit Langote
Hi, In 9.2 docs, the first link (i18ngurus) in the further reading section here: http://www.postgresql.org/docs/9.2/static/multibyte.html seems to be broken. Should it be updated/removed? (I see it's removed in 9.3 docs) -- Amit Langote -- Sent via pgsql-general mailing list (pgsql-ge

Re: [GENERAL] Why there are no max_wal_receivers

2013-10-07 Thread Amit Langote
On Tue, Oct 8, 2013 at 3:05 PM, 高健 wrote: > Hello: > > > > > > Thank you all for kindly replying my question. > > > I read the documentation about pg_basebackup. > > > The description says: > > The server must also be configured with max_wal_senders set high enough to > leave at least one session

Re: [GENERAL] Why there are no max_wal_receivers

2013-10-06 Thread Amit Langote
the primary server may be running multiple WAL senders, there is only one WAL receiver on each standby server. -- Amit Langote -- 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] logging statements in PostgreSQL

2013-09-25 Thread Amit Langote
el query plans are logged. http://www.postgresql.org/docs/devel/static/auto-explain.html -- Amit Langote -- 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] Bottlenecks with large number of relation segment files

2013-08-05 Thread Amit Langote
On Mon, Aug 5, 2013 at 5:01 PM, KONDO Mitsumasa wrote: > Hi Amit, > > > (2013/08/05 15:23), Amit Langote wrote: >> >> May the routines in fd.c become bottleneck with a large number of >> concurrent connections to above database, say something like "pgbench

[GENERAL] Bottlenecks with large number of relation segment files

2013-08-04 Thread Amit Langote
"pgbench -i -s 3500" would be. May the routines in fd.c become bottleneck with a large number of concurrent connections to above database, say something like "pgbench -j 8 -c 128"? Is there any other place I should be paying attention to? -- Amit Langote -- Sent via pgsql-

Re: [GENERAL] [HACKERS] maintenance_work_mem and CREATE INDEX time

2013-07-29 Thread Amit Langote
Hi Jeff, On Tue, Jul 30, 2013 at 3:25 AM, Jeff Janes wrote: > On Tue, Jul 23, 2013 at 10:56 PM, Amit Langote > wrote: >> On Wed, Jul 24, 2013 at 3:20 AM, Jeff Janes wrote: >>> >>> The heap structure used in external sorts is cache-unfriendly. The >>&

Re: [GENERAL] SQL for multimedia retrieval

2013-07-29 Thread Amit Langote
tore and retrieve the indexed content using PostgreSQL. -- Amit Langote -- 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] Snapshot backups

2013-07-28 Thread Amit Langote
DO location (identified as "START WAL LOCATION:" field in the backup_label file.) While you are reading the code, you can read the comment above the function read_backup_label() in src/backend/access/transam/xlog.c -- Amit Langote

Re: [GENERAL] async streaming and recovery_target_timeline=latest

2013-07-28 Thread Amit Langote
there shouldn't have been like 0010146A0001 instead of 000F146A0001. This patch recently applied to 9.1.9 (but not in any stable release so far) solves this problem as far as I can see. Try and see if you can patch it: http://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=424cc31a3785bd01108e6f4b20941c6442d3d2d0 -- Amit Langote -- 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] How to do incremental / differential backup every hour in Postgres 9.1?

2013-07-26 Thread Amit Langote
7;t need to manually move any of the files in pg_xlog/, PostgreSQL automatically gets rid of or recycles the files. > 4. Do I need to backup the .backup files in the archive folder or just the > 16,384KB WAL files? > Your archiving setup (that is archive_command) should take care of all t

Re: [GENERAL] Fastest Index/Algorithm to find similar sentences

2013-07-25 Thread Amit Langote
development phase, but you could give it a try and see if it can perform better where pg_trgm can not. -- Amit Langote -- 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] [HACKERS] maintenance_work_mem and CREATE INDEX time

2013-07-23 Thread Amit Langote
On Wed, Jul 24, 2013 at 3:20 AM, Jeff Janes wrote: > On Mon, Jul 22, 2013 at 9:11 PM, Amit Langote wrote: >> Hello, >> >> While understanding the effect of maintenance_work_mem on time taken >> by CREATE INDEX, I observed that for the values of >> maintenance

Re: [GENERAL] [HACKERS] maintenance_work_mem and CREATE INDEX time

2013-07-23 Thread Amit Langote
On Wed, Jul 24, 2013 at 11:30 AM, Amit Langote wrote: > On Wed, Jul 24, 2013 at 6:02 AM, Jeff Janes wrote: >> If you are using trace_sort to report that, it reports the switch as >> happening as soon as it runs out of memory. >> >> At point, all we have been doing is

Re: [GENERAL] [HACKERS] maintenance_work_mem and CREATE INDEX time

2013-07-23 Thread Amit Langote
On Wed, Jul 24, 2013 at 6:02 AM, Jeff Janes wrote: > On Tue, Jul 23, 2013 at 1:23 AM, Amit Langote wrote: >> On Tue, Jul 23, 2013 at 1:11 PM, Amit Langote >> wrote: >>> Hello, >>> >>> While understanding the effect of maintenance_work_mem on time take

Re: [GENERAL] maintenance_work_mem and CREATE INDEX time

2013-07-23 Thread Amit Langote
On Tue, Jul 23, 2013 at 1:11 PM, Amit Langote wrote: > Hello, > > While understanding the effect of maintenance_work_mem on time taken > by CREATE INDEX, I observed that for the values of > maintenance_work_mem less than the value for which an internal sort is > performed,

[GENERAL] maintenance_work_mem and CREATE INDEX time

2013-07-22 Thread Amit Langote
anyway. Does that make sense? -- Amit Langote -- 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] Full text search

2013-07-12 Thread Amit Langote
? That would be helpful. -- Amit Langote -- 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] How can you get "WAL segment has already been removed" when doing synchronous replication ?!

2013-07-12 Thread Amit Langote
l_keep_segments ? > > I know that I can increase wal_keep_segments to "solve" it, but > shouldn't it be *impossible* to happen with synchronous replication? > After all - all commits should wait for slave to be 100% up to date! > Is it possible that xlog recycling might have

Re: [GENERAL] Archiving and recovering pg_stat_tmp

2013-06-25 Thread Amit Langote
tats reporting tool (like pg_statsinfo) would be the only way to preserve such historic (snapshots-like) information about those statistics. Server itself doesn't have any mechanism to preserve any historical information like those stats, am I right in saying that? -- Amit Langote --

Re: [GENERAL] Archiving and recovering pg_stat_tmp

2013-06-25 Thread Amit Langote
Surprisingly it > works with no complaints about wrong pgstat.stats > Do you have only one archive set up? What do you mean when you mention "backup1" archive? What kind of complaints did you see when you did in past? I am not aware of such errors; am I missing some? -- Amit Langote -- 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] Migration from DB2 to PostgreSQL

2013-06-21 Thread Amit Langote
- > > select to_oid('testdata'); > > Can anyone tell me that how I can implement above function for conversion? > Sachin, check if this link is related: http://stackoverflow.com/a/10139455/683402 + Here (from official PG docs): http://www.postgresql.org/docs/9.2/sta

Re: [GENERAL] File System backup

2013-06-21 Thread Amit Langote
sue it? Is that after OS restarts?) Did you, by any chance, use "restart" whereas you should have used "start" assuming you are using pg_ctl for the same? Issuing "restart" requires that you should already have server running (and that means postmaster.pid should be the

Re: [GENERAL] Archiving and recovering pg_stat_tmp

2013-06-20 Thread Amit Langote
s, of pg_stat/*.stat), though I am not sure if that would be correct. I doubt if WAL replay (as in a consistent recovery mechanism :-) ) accounts for the stats. I guess stats are not WAL logged (like changes to table data) since they are managed using temporary files in pg_stat_temp and hence may not be recoverable using WAL replay to a particular state using PITR. but I may be wrong. Thoughts? -- Amit Langote -- 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] Archiving and recovering pg_stat_tmp

2013-06-20 Thread Amit Langote
On Thu, Jun 20, 2013 at 8:32 PM, Amit Langote wrote: > On Thu, Jun 20, 2013 at 6:05 PM, Sameer Thakur wrote: >>>Documentation mentions following: >> Thanks, but how does this relate to statistics recovery wrt PITR? > > Upon clean server shutdown, you have the statisti

Re: [GENERAL] Archiving and recovering pg_stat_tmp

2013-06-20 Thread Amit Langote
ts across server restarts, which, might even be applicable to a PITR, as far as I can understand. This would need some testing, though, to be sure that it is the case. -- Amit Langote -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscript

Re: [GENERAL] Archiving and recovering pg_stat_tmp

2013-06-20 Thread Amit Langote
d/1718942738eb65c8407fcd864883f...@fuzzy.cz When I checked on my 9.4dev installation, I found $PGDATA/pg_stat and there were per database .stat files. -- Amit Langote -- 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] Migration from DB2 to PostgreSQL

2013-06-19 Thread Amit Langote
On Thu, Jun 20, 2013 at 11:10 AM, Chris Angelico wrote: > On Thu, Jun 20, 2013 at 12:09 PM, Amit Langote > wrote: >> Umm, my bad! I almost forgot I could write pure SQL function bodies. >> Although, why does following happen? (sorry, a 8.4.2 installation) : >> >>

Re: [GENERAL] Migration from DB2 to PostgreSQL

2013-06-19 Thread Amit Langote
On Thu, Jun 20, 2013 at 10:54 AM, Chris Angelico wrote: > On Thu, Jun 20, 2013 at 11:35 AM, Amit Langote > wrote: >> On Thu, Jun 20, 2013 at 10:27 AM, Chris Angelico wrote: >>> If your wrapper function is written in SQL and is trivial (eg ignore >>> the third pa

Re: [GENERAL] Migration from DB2 to PostgreSQL

2013-06-19 Thread Amit Langote
Hi, On Thu, Jun 20, 2013 at 10:27 AM, Chris Angelico wrote: > On Thu, Jun 20, 2013 at 11:10 AM, Amit Langote > wrote: >> If this particular function is to be used repeatedly in a single >> query, would the cost of having a wrapper function around the original >> fu

Re: [GENERAL] Migration from DB2 to PostgreSQL

2013-06-19 Thread Amit Langote
o > write a function that just ignores the third argument. > Just wondering: If this particular function is to be used repeatedly in a single query, would the cost of having a wrapper function around the original function be too large? For example, if this function appears in a WHERE clause

Re: [GENERAL] More buffers used than a relation's relpages

2013-06-04 Thread Amit Langote
On Tue, Jun 4, 2013 at 10:04 PM, Andres Freund wrote: > On 2013-06-04 11:29:44 +0900, Amit Langote wrote: >> In what cases can a relation use more buffers (in shared memory) than >> its pg_class.relpages? > > relpages is primarily updated by (auto-)vacuum, (auto-)analyze, so

Re: [GENERAL] More buffers used than a relation's relpages

2013-06-03 Thread Amit Langote
On Tue, Jun 4, 2013 at 12:17 PM, Jeff Janes wrote: > On Monday, June 3, 2013, Amit Langote wrote: >> >> Hello, >> >> In what cases can a relation use more buffers (in shared memory) than >> its pg_class.relpages? > > > I think relpages only counts page

[GENERAL] More buffers used than a relation's relpages

2013-06-03 Thread Amit Langote
|3548 | 3547 abc_2_idx|3209 | 3209 ... ... -- Amit Langote -- 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] How to check if Postgresql files are OK

2013-05-27 Thread Amit Langote
g is to have > frequent, tested, backups. > How does one validate a backup? Is there any generally practiced way of doing that? Or what do you mean when you say "tested" backups? -- Amit Langote -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make change

Re: [GENERAL] Seq Scan cost shown to be (cost=10000000000.00..10000000001.10)

2013-05-27 Thread Amit Langote
> When one uses “enable_” settings to adjust planner behavior, PostgreSQL > just sets really high costs for the operations affected (like the one you > see). > > As SeqScan is the only possible way to execute your query, it is still > choosen. > I get it. Thanks! -- Amit L

Re: [GENERAL] Seq Scan cost shown to be (cost=10000000000.00..10000000001.10)

2013-05-27 Thread Amit Langote
sets the start cost to the high value (100). > Oh, okay, thanks! -- Amit Langote -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Seq Scan cost shown to be (cost=10000000000.00..10000000001.10)

2013-05-27 Thread Amit Langote
nd of default max or something like that for such abnormal cases? -- Amit Langote -- 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] Human readable or full text of xlog (pg_xlog) for vs 9.2

2013-05-26 Thread Amit Langote
e would have to wait for others to reply on this thread to point out any others means to recover your data, if any. -- Amit Langote -- 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] Human readable or full text of xlog (pg_xlog) for vs 9.2

2013-05-26 Thread Amit Langote
r do you have a backup you could restore to using PITR? -- Amit Langote -- 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] There are many processes created and died frequently during PostgreSQl idle

2013-05-26 Thread Amit Langote
ovacuum launcher, which periodically forks autovacuum worker processes to perform vacuum activity. You might want to read more about them here: http://www.postgresql.org/docs/9.2/static/routine-vacuuming.html#AUTOVACUUM -- Amit Langote -- Sent via pgsql-general mailing list (pgsql-general@postgresql

Re: [GENERAL] pg_receivexlog 9.2 client working with 9.1 server?

2013-05-26 Thread Amit Langote
27;s okay using 9.2 pg_receievexlog with a 9.1 server. -- Amit Langote -- 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] Why does row estimation on nested loop make no sense to me

2013-05-20 Thread Amit Langote
ould like to know if you still get the same row estimates (after explain) and also if possible, the value that is computed from that formula. Do they resemble each other? -- Amit Langote -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscript

Re: [GENERAL] Why does row estimation on nested loop make no sense to me

2013-05-20 Thread Amit Langote
I also found one other discussion which has similar issues addressed: http://postgresql.1045698.n5.nabble.com/Bogus-nestloop-rows-estimate-in-8-4-7-td5710254.html -- Amit Langote -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Why does row estimation on nested loop make no sense to me

2013-05-20 Thread Amit Langote
c/row-estimation-examples.html It also refers where in source code these table size estimations are done. Hope this helps. -- Amit Langote -- 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] Why does row estimation on nested loop make no sense to me

2013-05-17 Thread Amit Langote
ted to the fact that the nested-loop > row estimation does not appear to be derived from the nodes below it - it is > off by orders of magnitude. I've never seen this before. > That aside, yes - I did analyze and tweak stats target during experimentation > - no change. Did you

Re: [GENERAL] Why does row estimation on nested loop make no sense to me

2013-05-17 Thread Amit Langote
On Sat, May 18, 2013 at 1:47 AM, Jeff Amiel wrote: > > > > > - Original Message ----- > From: Amit Langote > To: Jeff Amiel > Cc: "pgsql-general@postgresql.org" > Sent: Friday, May 17, 2013 11:37 AM > Subject: Re: [GENERAL] Why does row estimati

Re: [GENERAL] Why does row estimation on nested loop make no sense to me

2013-05-17 Thread Amit Langote
On Sat, May 18, 2013 at 1:25 AM, Jeff Amiel wrote: > On most nested loops that I do explain/explain analyze on, the row estimation > for the nested-loop itself is a product of the inner nodes of the nested loop. > However in this case, I am stumped! > > explain > select era.child_entity from en

Re: [GENERAL] Comunication protocol

2013-05-17 Thread Amit Langote
you understand distinct phases of connection and subsequent operation over the established connection. -- Amit Langote -- 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] PAM implementation in PG 9.2.3

2013-05-12 Thread Amit Langote
g is a bug in PAM authentication code in the backend that needs to resolved. This has been reported on pgsql-hackers. -- Amit Langote -- 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] PAM implementation in PG 9.2.3

2013-05-08 Thread Amit Langote
r, if you specify -W option, psql won't connect before it accepts password. You can try this (and see that no authentication failure is logged) I think log entries just mean the authentication has failed with PAM-specific error message. -- Amit Langote -- Sent via pgsql-general ma

[GENERAL] Position() Bug ? In PostgreSQL 9.2

2013-05-02 Thread Amit Langote
something similar, it returns first index (which is 1) of the main string (haystack!). Although this does not answer if it's a bug or not, I tend to think it is deliberate. -- Amit Langote -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your sub

Re: [GENERAL] Position() Bug ? In PostgreSQL 9.2

2013-05-02 Thread Amit Langote
> position > -- > 1 > (1 row) > > Kindly let me know, if anything i miss here. > > Regards, > Dinesh > manojadinesh.blogspot.com -- Amit Langote -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Confusing comment in xlog.c or am I missing something?

2013-05-01 Thread Amit Langote
I was just going through the xlog.c and I came across following which confused me: Given, src/include/access/xlogdefs.h #define XLogSegsPerFile (((uint32) 0x) / XLogSegSize) #define XLogFileSize(XLogSegsPerFile * XLogSegSize) Also, typedef struct XLogRecPtr { uint32