Re: Fwd: [HACKERS] patch: make_timestamp function

2014-02-20 Thread Pavel Stehule
Hello updated patch without timetz support Regards Pavel 2014-02-19 21:20 GMT+01:00 Alvaro Herrera alvhe...@2ndquadrant.com: Pavel Stehule escribió: I though about it, and now I am thinking so timezone in format 'Europe/Prague' is together with time ambiguous We can do it, but we

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-20 Thread Craig Ringer
(Top post, on phone) The @number part is optional. It indicates an export ordinal. (You don't want to know, if you do, see MSDN). If you remove them or change them then binaries linked to the older version will fail to link to the newer; it breaks binary compat. The ordinals are part of the

Re: [HACKERS] Selecting large tables gets killed

2014-02-20 Thread amul sul
Hi, I tried reproduce this bug on CENTOS 6.4 as well as on UBUNTU 13.04. My Base machine is Window 7 and CentOs, Ubuntu is in VM. CENTOS : [amul@localhost postgresql]$ uname -a Linux localhost.localdomain 2.6.32-358.6.1.el6.x86_64 #1 SMP Tue Apr 23 19:29:00 UTC 2013 x86_64 x86_64 x86_64

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-20 Thread Hiroshi Inoue
(2014/02/18 0:02), Dave Page wrote: On Mon, Feb 17, 2014 at 2:58 PM, Tom Lane t...@sss.pgh.pa.us wrote: Dave Page dp...@pgadmin.org writes: On Fri, Feb 14, 2014 at 5:32 PM, Tom Lane t...@sss.pgh.pa.us wrote: (BTW, narwhal is evidently not trying to build plpython. I wonder why not?) Not

Re: [HACKERS] [review] PostgreSQL Service on Windows does not start if data directory given is relative path

2014-02-20 Thread Rajeev rastogi
On 18 February 2014 21:47, MauMau Wrote: We already have two different versions of make_absolute_path() in the tree - one in src/backend/utils/init/miscinit.c and one in src/test/regress/pg_regress.c. I don't think we need a third one. If we put it in port/ like this patch done,

Re: [HACKERS] Selecting large tables gets killed

2014-02-20 Thread amul sul
I am sorry,  My Ubuntu info was wrong in previous mail, correct one as follow UBUNTU: [amul@localhost postgresql]$ uname -a Linux localhost.localdomain 2.6.32-358.6.1.el6.x86_64 #1 SMP Tue Apr 23 19:29:00 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux amul@amul:~/work/postgresql$ uname -a Linux amul

Re: [HACKERS] Re: [COMMITTERS] pgsql: Add a GUC to report whether data page checksums are enabled.

2014-02-20 Thread Heikki Linnakangas
On 02/20/2014 04:15 AM, Peter Geoghegan wrote: On Wed, Feb 19, 2014 at 4:49 PM, Michael Paquier michael.paqu...@gmail.com wrote: +1 for back-patching. Back-patching would be interesting for existing applications, but -1 as it is a new feature :) I think that it rises to the level of an

Re: [HACKERS] Selecting large tables gets killed

2014-02-20 Thread Ashutosh Bapat
I found a very simple repro on my machine postgres=# select x, x, lpad('string', 100, x::text) from generate_series(1, 1000) x; Killed So this is just about fetching huge data through psql. But if I reduce the number of rows by 10 times, it gives result without getting killed.

Re: [HACKERS] Selecting large tables gets killed

2014-02-20 Thread Ian Lawrence Barwick
2014-02-20 16:16 GMT+09:00 Ashutosh Bapat ashutosh.ba...@enterprisedb.com: Hi All, Here is a strange behaviour with master branch with head at (...) Looks like a bug in psql to me. Does anybody see that behaviour? It's not a bug, it's your VM's OS killing off a process which is using up too

Re: [HACKERS] Selecting large tables gets killed

2014-02-20 Thread Pavan Deolasee
On Thu, Feb 20, 2014 at 2:32 PM, Ashutosh Bapat ashutosh.ba...@enterprisedb.com wrote: May be each setup has it's own breaking point. So trying with larger number might reproduce the issue. I tried to debug it with gdb, but all it showed me was that psql received a SIGKILL signal. I am

Re: [HACKERS] Patch: show xid and xmin in pg_stat_activity and pg_stat_replication

2014-02-20 Thread Christian Kruse
Hi, On 18.02.2014 22:02, Andres Freund wrote: Not really sure which way is better. One dev against it, one dev not sure. Enough for me to change it :) Will post a new patch this evening. Best regards, -- Christian Kruse http://www.2ndQuadrant.com/ PostgreSQL Development,

Re: [HACKERS] Selecting large tables gets killed

2014-02-20 Thread Ashutosh Bapat
Ian, Pavan, That's correct, OS is killing the process You are correct, the OS is killing the process 3766 Feb 20 14:30:14 ubuntu kernel: [23820.175868] Out of memory: Kill process 34080 (psql) score 756 or sacrifice child 3767 Feb 20 14:30:14 ubuntu kernel: [23820.175871] Killed process 34080

Re: [HACKERS] GIN improvements part2: fast scan

2014-02-20 Thread Heikki Linnakangas
On 02/09/2014 12:11 PM, Alexander Korotkov wrote: I've rebased catalog changes with last master. Patch is attached. I've rerun my test suite with both last master ('committed') and attached patch ('ternary-consistent'). Thanks! method | sum

Re: [HACKERS] Selecting large tables gets killed

2014-02-20 Thread Bernd Helmle
--On 20. Februar 2014 14:49:28 +0530 Ashutosh Bapat ashutosh.ba...@enterprisedb.com wrote: If I set some positive value for this variable, psql runs smoothly with any size of data. But unset that variable, and it gets killed. But it's nowhere written explicitly that psql can run out of

Re: [HACKERS] Selecting large tables gets killed

2014-02-20 Thread Ashutosh Bapat
On Thu, Feb 20, 2014 at 3:26 PM, Bernd Helmle maili...@oopsware.de wrote: --On 20. Februar 2014 14:49:28 +0530 Ashutosh Bapat ashutosh.ba...@enterprisedb.com wrote: If I set some positive value for this variable, psql runs smoothly with any size of data. But unset that variable, and it

Re: [HACKERS] [bug fix] pg_ctl fails with config-only directory

2014-02-20 Thread Heikki Linnakangas
On 02/01/2014 12:28 PM, Christian Kruse wrote: On 31/01/14 22:17, MauMau wrote: Thanks for reviewing the patch. Fixed. I'll add this revised patch to the CommitFest entry soon. Looks fine for me. Set it to „waiting for commit.“ Hmm, why do this only on Windows? If postgres -C is safe

Re: [HACKERS] inherit support for foreign tables

2014-02-20 Thread Etsuro Fujita
(2014/02/20 15:47), Kyotaro HORIGUCHI wrote: Although my concerns here are only two points, unanticipated application and maintenancibility. I gave a consideration on these issues again. Sorry, I misunderstood what you mean by unanticipated application. Then, I think it could be enough by

Re: [HACKERS] Priority table or Cache table

2014-02-20 Thread Ashutosh Bapat
On Thu, Feb 20, 2014 at 10:23 AM, Haribabu Kommi kommi.harib...@gmail.comwrote: On Thu, Feb 20, 2014 at 2:26 PM, Amit Kapila amit.kapil...@gmail.comwrote: On Thu, Feb 20, 2014 at 6:24 AM, Haribabu Kommi kommi.harib...@gmail.com wrote: On Thu, Feb 20, 2014 at 11:38 AM, Tom Lane

Re: [HACKERS] [bug fix] pg_ctl fails with config-only directory

2014-02-20 Thread MauMau
From: Heikki Linnakangas hlinnakan...@vmware.com Hmm, why do this only on Windows? If postgres -C is safe enough to run as Administrator on Windows, why not allow running it as root on Unix as well? Even if there's no particular need to allow it as root on Unix, fewer #ifdefs is good. Yes, I

Re: [HACKERS] Selecting large tables gets killed

2014-02-20 Thread Marti Raudsepp
On Thu, Feb 20, 2014 at 12:07 PM, Ashutosh Bapat ashutosh.ba...@enterprisedb.com wrote: That seems a good idea. We will get rid of FETCH_COUNT then, wouldn't we? No, I don't think we want to do that. FETCH_COUNT values greater than 1 are still useful to get reasonably tabulated output without

[HACKERS] Another possible corruption bug in 9.3.2 or possibly a known MultiXact problem?

2014-02-20 Thread Greg Stark
I have a database where a a couple rows don't appear in index scans but do appear in sequential scans. It looks like the same problem as Peter reported but this is a different database. I've extracted all the xlogdump records and below are the ones I think are relevant. You can see that lp 2 gets

Re: [HACKERS] GiST support for inet datatypes

2014-02-20 Thread Emre Hasegeli
2014-02-20 01:37, Tom Lane t...@sss.pgh.pa.us: Perhaps it would be acceptable to drop the btree_gist implementation and teach pg_upgrade to refuse to upgrade if the old database contains any such indexes. I'm not sure that solves the problem, though, because I think pg_upgrade will still

Re: [HACKERS] WAL Rate Limiting

2014-02-20 Thread Simon Riggs
On 19 February 2014 16:04, Robert Haas robertmh...@gmail.com wrote: Well, *I* don't think this is ready to go. A WAL rate limit that only limits WAL sometimes still doesn't impress me. Could you be specific in your criticism? Sometimes wouldn't impress anybody, but we need to understand

Re: [HACKERS] WAL Rate Limiting

2014-02-20 Thread Greg Stark
On Thu, Feb 20, 2014 at 1:45 PM, Simon Riggs si...@2ndquadrant.com wrote: On 19 February 2014 16:04, Robert Haas robertmh...@gmail.com wrote: Well, *I* don't think this is ready to go. A WAL rate limit that only limits WAL sometimes still doesn't impress me. Could you be specific in your

Re: [HACKERS] WAL Rate Limiting

2014-02-20 Thread Simon Riggs
On 19 February 2014 13:28, Greg Stark st...@mit.edu wrote: On Mon, Jan 20, 2014 at 5:37 PM, Simon Riggs si...@2ndquadrant.com wrote: Agreed; that was the original plan, but implementation delays prevented the whole vision/discussion/implementation. Requirements from various areas include WAL

Re: [HACKERS] Selecting large tables gets killed

2014-02-20 Thread Tom Lane
Marti Raudsepp ma...@juffo.org writes: On Thu, Feb 20, 2014 at 12:07 PM, Ashutosh Bapat ashutosh.ba...@enterprisedb.com wrote: That seems a good idea. We will get rid of FETCH_COUNT then, wouldn't we? No, I don't think we want to do that. FETCH_COUNT values greater than 1 are still useful to

Re: [HACKERS] WAL Rate Limiting

2014-02-20 Thread Greg Stark
On Thu, Feb 20, 2014 at 2:43 PM, Simon Riggs si...@2ndquadrant.com wrote: The design choice of making the limit only apply to bulk ops is because that is where the main problem lies. Rate limiting will cause a loss of performance in the main line for non-bulk operations, so adding tests there

Re: [HACKERS] WAL Rate Limiting

2014-02-20 Thread Robert Haas
On Thu, Feb 20, 2014 at 9:43 AM, Simon Riggs si...@2ndquadrant.com wrote: The design choice of making the limit only apply to bulk ops is because that is where the main problem lies. Rate limiting will cause a loss of performance in the main line for non-bulk operations, so adding tests there

Re: [HACKERS] WAL Rate Limiting

2014-02-20 Thread Robert Haas
On Thu, Feb 20, 2014 at 10:10 AM, Greg Stark st...@mit.edu wrote: On Thu, Feb 20, 2014 at 2:43 PM, Simon Riggs si...@2ndquadrant.com wrote: The design choice of making the limit only apply to bulk ops is because that is where the main problem lies. Rate limiting will cause a loss of

Re: [HACKERS] Selecting large tables gets killed

2014-02-20 Thread Bernd Helmle
--On 20. Februar 2014 09:51:47 -0500 Tom Lane t...@sss.pgh.pa.us wrote: Yeah. The other reason that you can't just transparently change the behavior is error handling: people are used to seeing either all or none of the output of a query. In single-row mode that guarantee fails, since some

Re: [HACKERS] WAL Rate Limiting

2014-02-20 Thread Hannu Krosing
On 02/20/2014 04:16 PM, Robert Haas wrote: On Thu, Feb 20, 2014 at 9:43 AM, Simon Riggs si...@2ndquadrant.com wrote: The design choice of making the limit only apply to bulk ops is because that is where the main problem lies. Rate limiting will cause a loss of performance in the main line for

Re: [HACKERS] WAL Rate Limiting

2014-02-20 Thread Alvaro Herrera
Robert Haas escribió: On Thu, Feb 20, 2014 at 9:43 AM, Simon Riggs si...@2ndquadrant.com wrote: The design choice of making the limit only apply to bulk ops is because that is where the main problem lies. Rate limiting will cause a loss of performance in the main line for non-bulk

Re: [HACKERS] Another possible corruption bug in 9.3.2 or possibly a known MultiXact problem?

2014-02-20 Thread Andres Freund
Hi, On 2014-02-20 13:25:35 +, Greg Stark wrote: I have a database where a a couple rows don't appear in index scans but do appear in sequential scans. It looks like the same problem as Peter reported but this is a different database. I've extracted all the xlogdump records and below are

Re: [HACKERS] Draft release notes up for review

2014-02-20 Thread Noah Misch
On Wed, Feb 19, 2014 at 08:29:38PM +0200, Marti Raudsepp wrote: On Sun, Feb 16, 2014 at 10:41 PM, Tom Lane t...@sss.pgh.pa.us wrote: Shore up GRANT ... WITH ADMIN OPTION restrictions (Noah Misch) I'm not familiar with the phrase Shore up, I think it should use more precise language: are the

Re: [HACKERS] pg_standby: Question about truncation of trigger file in fast failover

2014-02-20 Thread Neil Thombre
On Wed, Feb 19, 2014 at 1:42 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 02/19/2014 11:15 PM, Neil Thombre wrote: And that is where I have a question. I noticed that in pg_standby.c when we detect the word fast in the trigger file we truncate the file.

Re: [HACKERS] Minor performance improvement in transition to external sort

2014-02-20 Thread Jeremy Harris
On 09/02/14 17:11, Jeremy Harris wrote: On 06/02/14 18:21, Jeff Janes wrote: Did you try sorting already-sorted, reverse sorted, or pipe-organ shaped data sets? We will also need to test it on strings. I usually use md5(random()::text) to generate strings for such purposes, at least for a

Re: [HACKERS] jsonb and nested hstore

2014-02-20 Thread Peter Geoghegan
On Thu, Jan 30, 2014 at 11:07 AM, Andrew Dunstan and...@dunslane.net wrote: Updated patches for both pieces. Included is some tidying done by Teodor, and fixes for remaining whitespace issues. This now passes git diff --check master cleanly for me. So one thing that isn't clear from these

Re: [HACKERS] inherit support for foreign tables

2014-02-20 Thread Etsuro Fujita
(2014/02/20 19:55), Etsuro Fujita wrote: (2014/02/20 15:47), Kyotaro HORIGUCHI wrote: Although my concerns here are only two points, unanticipated application and maintenancibility. I gave a consideration on these issues again. Sorry, I misunderstood what you mean by unanticipated

Re: [HACKERS] Selecting large tables gets killed

2014-02-20 Thread Ashutosh Bapat
On Thu, Feb 20, 2014 at 9:00 PM, Bernd Helmle maili...@oopsware.de wrote: --On 20. Februar 2014 09:51:47 -0500 Tom Lane t...@sss.pgh.pa.us wrote: Yeah. The other reason that you can't just transparently change the behavior is error handling: people are used to seeing either all or none

Re: [HACKERS] walsender doesn't send keepalives when writes are pending

2014-02-20 Thread Amit Kapila
On Fri, Feb 14, 2014 at 5:35 PM, Andres Freund and...@2ndquadrant.com wrote: Hi, In WalSndLoop() we do: wakeEvents = WL_LATCH_SET | WL_POSTMASTER_DEATH | WL_TIMEOUT | WL_SOCKET_READABLE; if (pq_is_send_pending()) wakeEvents |= WL_SOCKET_WRITEABLE; else if

Re: [HACKERS] inherit support for foreign tables

2014-02-20 Thread Kyotaro HORIGUCHI
Hi, NOTICE: Child foregn table child01 is affected. NOTICE: Child foregn table child02 is affected NOTICE: Child foregn table child03 rejected 'alter tempmin set default' What do you think about this? It looks a bit too loud for me though... I think that's a good idea. I just

Re: [HACKERS] inherit support for foreign tables

2014-02-20 Thread Kyotaro HORIGUCHI
Hello, Then the second issue, however I don't have enough idea of how ALTER TABLE works, the complexity would be reduced if acceptance chek for alter actions would done on foreign server or data wrapper side, not on the core of ALTER TABLE. It would also be a help to output error

[HACKERS] Warning in pg_backup_archiver.c

2014-02-20 Thread Michael Paquier
Hi, While compiling on clang, I noticed the following warning: pg_backup_archiver.c:1950:32: warning: comparison of constant -1 with expression of type 'ArchiveFormat' (aka 'enum _archiveFormat') is always false [-Wtautological-constant-out-of-range-compare] if ((AH-format =

Re: [HACKERS] inherit support for foreign tables

2014-02-20 Thread Etsuro Fujita
(2014/02/21 15:23), Kyotaro HORIGUCHI wrote: NOTICE: Child foregn table child01 is affected. NOTICE: Child foregn table child02 is affected NOTICE: Child foregn table child03 rejected 'alter tempmin set default' What do you think about this? It looks a bit too loud for me though... I think