Re: [HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-01-31 Thread Kyotaro HORIGUCHI
Hello, I've managed to reconstruct windows build environment and tried to run the previous patch. - DSM implimentation seems divided into generic part (dsm.c) and platform dependent part(dsm_impl.c). This dsm_keep_segment puts WIN32 specific part directly into

Re: [HACKERS] Performance Improvement by reducing WAL for Update Operation

2014-01-31 Thread Amit Kapila
On Fri, Jan 31, 2014 at 12:33 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Jan 30, 2014 at 12:23 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Wed, Jan 29, 2014 at 8:13 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: After basic verification of

Re: [HACKERS] UNION ALL on partitioned tables won't use indices.

2014-01-31 Thread Kyotaro HORIGUCHI
Hello, No hurry. Thanks. The attached two patches are rebased to current 9.4dev HEAD and make check at the topmost directory and src/test/isolation are passed without error. One bug was found and fixed on the way. It was an assertion failure caused by probably unexpected type

Re: [HACKERS] [bug fix] psql \copy doesn't end if backend is killed

2014-01-31 Thread Dilip kumar
On 20 December 2013 19:43, MauMau Wrote [Problem] If the backend is terminated with SIGKILL while psql is running \copy table_name from file_name, the \copy didn't end forever. I expected \copy to be cancelled because the corresponding server process vanished. [Cause] psql could not

Re: [HACKERS] WIP patch (v2) for updatable security barrier views

2014-01-31 Thread Craig Ringer
On 01/31/2014 05:09 PM, Dean Rasheed wrote: I don't like this fix --- you appear to be adding another RTE to the rangetable (one not in the FROM list) and applying the rowmarks to it, which seems wrong because you're not locking the right set of rows. This is reflected in the change to the

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

2014-01-31 Thread Andres Freund
On 2014-01-30 12:27:43 -0500, Robert Haas wrote: Nope, but I think this patch is broken. It looks to me like it's conflating the process offset in the BackendStatus array with its backendId, which does not seem like a good idea even if it happens to work at present. Hm. I don't see how

Re: [HACKERS] Wait free LW_SHARED acquisition - v0.2

2014-01-31 Thread Andres Freund
Hi, On 2014-01-28 21:27:29 -0800, Peter Geoghegan wrote: On Fri, Nov 15, 2013 at 11:47 AM, Andres Freund and...@2ndquadrant.com wrote: 1) I've added an abstracted atomic ops implementation. Needs a fair amount of work, also submitted as a separate CF entry. (Patch 1 2) Commit

Re: [HACKERS] [PATCH] pg_basebackup: progress report max once per second

2014-01-31 Thread Sawada Masahiko
On Tue, Jan 21, 2014 at 7:17 AM, Oskari Saarenmaa o...@ohmu.fi wrote: 18.11.2013 07:53, Sawada Masahiko kirjoitti: On 13 Nov 2013, at 20:51, Mika Eloranta m...@ohmu.fi wrote: Prevent excessive progress reporting that can grow to gigabytes of output with large databases. I got error with

Re: [HACKERS] jsonb and nested hstore

2014-01-31 Thread Oleg Bartunov
Hmm, neither me, nor Teodor have experience and knowledge with populate_record() and moreover hstore here is virgin and we don't know the right behaviour, so I think we better take it from jsonb, once Andrew realize it. Andrew ? On Fri, Jan 31, 2014 at 4:52 AM, Andrew Dunstan and...@dunslane.net

Re: Fwd: [HACKERS] Proposal: variant of regclass

2014-01-31 Thread Amit Khandekar
There are duplicate oids in pg_proc.h : make[3]: Entering directory `/tmp/git-pg/src/backend/catalog' cd ../../../src/include/catalog '/usr/bin/X11/perl' ./duplicate_oids 3180 3195 3196 3197 - There is a whitespace diff in regoperatorin and regprocedurein() definition.

Re: [HACKERS] [bug fix or improvement?] Correctly place DLLs for ECPG apps in bin folder

2014-01-31 Thread Asif Naeem
Hi MauMau, I have't completed tested all the expects of submitted patch yet. I would like to share my findings so far. By looking at the patch I do feel that there is room for improvement in the patch, Instead of moving related dll's from lib directory to bin directory later in the installation

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Greg Stark
On Sun, Jan 26, 2014 at 5:45 PM, Andres Freund and...@2ndquadrant.com wrote: We're also seeing log entries about wal contains reference to invalid pages but these errors seem only vaguely correlated. Sometimes we get the errors but the tables don't grow noticeably and sometimes we don't get

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Andres Freund
On 2014-01-31 11:09:14 +, Greg Stark wrote: On Sun, Jan 26, 2014 at 5:45 PM, Andres Freund and...@2ndquadrant.com wrote: We're also seeing log entries about wal contains reference to invalid pages but these errors seem only vaguely correlated. Sometimes we get the errors but the

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Andres Freund
On 2014-01-31 11:09:14 +, Greg Stark wrote: On Sun, Jan 26, 2014 at 5:45 PM, Andres Freund and...@2ndquadrant.com wrote: We're also seeing log entries about wal contains reference to invalid pages but these errors seem only vaguely correlated. Sometimes we get the errors but the

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Greg Stark
On Fri, Jan 31, 2014 at 11:26 AM, Andres Freund and...@2ndquadrant.com wrote: The slightly more likely explanation for transient errors is that you hit the vacuum bug (061b079f89800929a863a692b952207cadf15886). That had only taken effect if HS has already assembled a snapshot, which can make

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Andres Freund
On 2014-01-31 11:46:09 +, Greg Stark wrote: On Fri, Jan 31, 2014 at 11:26 AM, Andres Freund and...@2ndquadrant.com wrote: The slightly more likely explanation for transient errors is that you hit the vacuum bug (061b079f89800929a863a692b952207cadf15886). That had only taken effect if

Re: [HACKERS] pg_basebackup and pg_stat_tmp directory

2014-01-31 Thread Fujii Masao
On Tue, Jan 28, 2014 at 5:51 PM, Magnus Hagander mag...@hagander.net wrote: On Tue, Jan 28, 2014 at 6:11 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Tue, Jan 28, 2014 at 9:26 AM, Fujii Masao masao.fu...@gmail.com wrote: Hi, The files in pg_stat_tmp directory don't need to be

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

2014-01-31 Thread Christian Kruse
Hi, I suspect we should have a new accessor function that takes a backend ID and copies the xid and xmin to pointers provided by the client while holding the lock. what do you think about the approach the attached patch implements? I'm not really sure if this is what you had in mind,

Re: [HACKERS] Add min and max execute statement time in pg_stat_statement

2014-01-31 Thread Mitsumasa KONDO
2014-01-31 Peter Geoghegan p...@heroku.com On Thu, Jan 30, 2014 at 12:32 PM, Tom Lane t...@sss.pgh.pa.us wrote: In reality, actual applications could hardly be further from the perfectly uniform distribution of distinct queries presented here. Yeah, I made the same point in different

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

2014-01-31 Thread MauMau
From: Christian Kruse christ...@2ndquadrant.com personally I really dislike constructs like you used: Thanks for reviewing the patch. Fixed. I'll add this revised patch to the CommitFest entry soon. Regards MauMau config_dir_win_v2.patch Description: Binary data -- Sent via

Re: [HACKERS] pg_basebackup and pg_stat_tmp directory

2014-01-31 Thread Mitsumasa KONDO
2014-01-31 Fujii Masao masao.fu...@gmail.com On Tue, Jan 28, 2014 at 5:51 PM, Magnus Hagander mag...@hagander.net wrote: On Tue, Jan 28, 2014 at 6:11 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Tue, Jan 28, 2014 at 9:26 AM, Fujii Masao masao.fu...@gmail.com wrote: Hi,

Re: [HACKERS] New option for pg_basebackup, to specify a different directory for pg_xlog

2014-01-31 Thread Fujii Masao
On Thu, Jan 30, 2014 at 9:37 AM, Haribabu Kommi kommi.harib...@gmail.com wrote: On Tue, Jan 28, 2014 at 1:17 PM, Peter Eisentraut wrote: On 11/30/13, 6:59 AM, Haribabu kommi wrote: To detect provided data and xlog directories are same or not, I reused the Existing make_absolute_path()

Re: [HACKERS] pg_basebackup and pg_stat_tmp directory

2014-01-31 Thread Fujii Masao
On Fri, Jan 31, 2014 at 10:18 PM, Mitsumasa KONDO kondo.mitsum...@gmail.com wrote: 2014-01-31 Fujii Masao masao.fu...@gmail.com On Tue, Jan 28, 2014 at 5:51 PM, Magnus Hagander mag...@hagander.net wrote: On Tue, Jan 28, 2014 at 6:11 AM, Amit Kapila amit.kapil...@gmail.com wrote: On

Re: [HACKERS] Exposing currentTransactionWALVolume

2014-01-31 Thread Fujii Masao
On Wed, Jan 15, 2014 at 2:12 AM, Simon Riggs si...@2ndquadrant.com wrote: Short patch to expose a function GetCurrentTransactionWALVolume() that gives the total number of bytes written to WAL by current transaction. Could you tell me the use case of this function? ISTM that it's less useful in

Re: [HACKERS] jsonb and nested hstore

2014-01-31 Thread Merlin Moncure
On Fri, Jan 31, 2014 at 4:03 AM, Oleg Bartunov obartu...@gmail.com wrote: Hmm, neither me, nor Teodor have experience and knowledge with populate_record() and moreover hstore here is virgin and we don't know the right behaviour, so I think we better take it from jsonb, once Andrew realize it.

Re: [HACKERS] Exposing currentTransactionWALVolume

2014-01-31 Thread Mitsumasa KONDO
I send you my review comment. 2014-01-15 Simon Riggs si...@2ndquadrant.com: Short patch to expose a function GetCurrentTransactionWALVolume() that gives the total number of bytes written to WAL by current transaction. * It's simple and good feature. It is useful for system management, and

Re: [HACKERS] updated emacs configuration

2014-01-31 Thread Robert Haas
On Thu, Jan 30, 2014 at 11:06 PM, Bruce Momjian br...@momjian.us wrote: On Thu, Jan 30, 2014 at 03:36:48PM -0500, Bruce Momjian wrote: On Thu, Jan 30, 2014 at 03:32:27PM -0500, Robert Haas wrote: Or this: - mp_int_copy(a, b); /* ok: 0 = r b */ - mp_int_copy(q, a); /* ok: q = a */ +

Re: [HACKERS] Add force option to dropdb

2014-01-31 Thread salah jubeh
$ createdb -U postgres hoge $ psql -d hoge -U postgres hoge=# create table test (col text); hoge=# insert into test select repeat(chr(code),1) from generate_series(1,10) code; Execute dropdb -k while the client is inserting many tuples into database $ dropdb -k hoge 2014-01-29 23:10:49

Re: [HACKERS] Prohibit row-security + inheritance in 9.4?

2014-01-31 Thread Stephen Frost
* Craig Ringer (cr...@2ndquadrant.com) wrote: On 01/31/2014 09:01 AM, Stephen Frost wrote: I don't see where this follows at all- clearly, you already get a subset of rows from the child than if you queried the parent because there are other children. Er, what? I don't see what you're

Re: [HACKERS] pg_basebackup and pg_stat_tmp directory

2014-01-31 Thread Mitsumasa KONDO
2014-01-31 Fujii Masao masao.fu...@gmail.com: On Fri, Jan 31, 2014 at 10:18 PM, Mitsumasa KONDO kondo.mitsum...@gmail.com wrote: 2014-01-31 Fujii Masao masao.fu...@gmail.com On Tue, Jan 28, 2014 at 5:51 PM, Magnus Hagander mag...@hagander.net wrote: On Tue, Jan 28, 2014 at 6:11 AM,

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Greg Stark
1261982.53 is entirely nuls. I think that's true for most if not all of the intervening files, still investigating. The 54th segment is nul up to offset 1f0c after which it has valid looking blocks: # hexdump 1261982.54 | head -100 000 * 1f0c

Re: [HACKERS] Exposing currentTransactionWALVolume

2014-01-31 Thread Simon Riggs
On 31 January 2014 13:56, Fujii Masao masao.fu...@gmail.com wrote: On Wed, Jan 15, 2014 at 2:12 AM, Simon Riggs si...@2ndquadrant.com wrote: Short patch to expose a function GetCurrentTransactionWALVolume() that gives the total number of bytes written to WAL by current transaction. Could you

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Andres Freund
On 2014-01-31 14:39:47 +, Greg Stark wrote: 1261982.53 is entirely nuls. I think that's true for most if not all of the intervening files, still investigating. The 54th segment is nul up to offset 1f0c after which it has valid looking blocks: It'd be interesting to dump the page

Re: [HACKERS] jsonb and nested hstore

2014-01-31 Thread Andrew Dunstan
On 01/31/2014 08:57 AM, Merlin Moncure wrote: On Fri, Jan 31, 2014 at 4:03 AM, Oleg Bartunov obartu...@gmail.com wrote: Hmm, neither me, nor Teodor have experience and knowledge with populate_record() and moreover hstore here is virgin and we don't know the right behaviour, so I think we

Re: [HACKERS] [bug fix] pg_ctl always uses the same event source

2014-01-31 Thread MauMau
Hi, Amit san, I'm replying to your previous email. I wanted to reply to your latest mail below, but I removed it from my mailer by mistake. http://www.postgresql.org/message-id/CAA4eK1LAg6ndZdWLb5e=Ep5DzcE8KZU=JbmO+tFwySYHm2ja=q...@mail.gmail.com Do you know how I can reply to an email

Re: [HACKERS] jsonb and nested hstore

2014-01-31 Thread Merlin Moncure
On Fri, Jan 31, 2014 at 8:45 AM, Andrew Dunstan and...@dunslane.net wrote: On 01/31/2014 08:57 AM, Merlin Moncure wrote: On Fri, Jan 31, 2014 at 4:03 AM, Oleg Bartunov obartu...@gmail.com wrote: Hmm, neither me, nor Teodor have experience and knowledge with populate_record() and moreover

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Greg Stark
On Fri, Jan 31, 2014 at 2:39 PM, Greg Stark st...@mit.edu wrote: [cur:EA1/637140, xid:1418089147, rmid:11(Btree), len/tot_len:18/6194, info:8, prev:EA1/635290] bkpblock[1]: s/d/r:1663/16385/1261982 blk:3634978 hole_off/len:1240/2072 [cur:EA1/638988, xid:1418089147, rmid:11(Btree),

Re: [HACKERS] Prohibit row-security + inheritance in 9.4?

2014-01-31 Thread Stephen Frost
* Yeb Havinga (y.t.havi...@mgrid.net) wrote: IMHO, there is another way to implement this, other than the procedure to override the child-rel-quals with the ones from the parent. At DDL time, synchronize quals on the parent with rls quals of the childs. Isn't this also what happens with

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Andres Freund
On 2014-01-31 14:59:21 +, Greg Stark wrote: On Fri, Jan 31, 2014 at 2:39 PM, Greg Stark st...@mit.edu wrote: [cur:EA1/637140, xid:1418089147, rmid:11(Btree), len/tot_len:18/6194, info:8, prev:EA1/635290] bkpblock[1]: s/d/r:1663/16385/1261982 blk:3634978 hole_off/len:1240/2072

Re: [HACKERS] [bug fix] psql \copy doesn't end if backend is killed

2014-01-31 Thread MauMau
From: Dilip kumar dilip.ku...@huawei.com Is there any direct scenario by which it can be reproduce ? Thank you for reviewing and testing the patch. There is no other direct scenario. I reproduced the failure exactly like you suggested, because it was very difficult to reproduce the problem

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Greg Stark
On Fri, Jan 31, 2014 at 3:08 PM, Andres Freund and...@2ndquadrant.com wrote: It points to the end of the record (i.e. the beginning of the next). It needs to, because otherwise XLogFlush()es on the pd_lsn wouldn't flush enough. Ah, in which case the relevant record is: [cur:EA1/637140,

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Andres Freund
On 2014-01-31 15:15:24 +, Greg Stark wrote: On Fri, Jan 31, 2014 at 3:08 PM, Andres Freund and...@2ndquadrant.com wrote: It points to the end of the record (i.e. the beginning of the next). It needs to, because otherwise XLogFlush()es on the pd_lsn wouldn't flush enough. Ah, in

Re: [HACKERS] inherit support for foreign tables

2014-01-31 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: On Thu, Jan 30, 2014 at 5:05 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Thu, Jan 30, 2014 at 11:04 AM, Tom Lane t...@sss.pgh.pa.us wrote: I think this is totally misguided. Who's to say that some weird

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Greg Stark
On Fri, Jan 31, 2014 at 3:19 PM, Andres Freund and...@2ndquadrant.com wrote: =# select get_raw_page('data_pkey', 'main', 11073632) ; ERROR: block number 11073632 is out of range for relation data_pkey Isn't the page 3634978? The page in the record is. But the page on disk is in the 54th

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Andres Freund
On 2014-01-31 15:21:35 +, Greg Stark wrote: On Fri, Jan 31, 2014 at 3:19 PM, Andres Freund and...@2ndquadrant.com wrote: =# select get_raw_page('data_pkey', 'main', 11073632) ; ERROR: block number 11073632 is out of range for relation data_pkey Isn't the page 3634978? The page in

Re: [HACKERS] jsonb and nested hstore

2014-01-31 Thread Andrew Dunstan
On 01/31/2014 09:53 AM, Merlin Moncure wrote: On Fri, Jan 31, 2014 at 8:45 AM, Andrew Dunstan and...@dunslane.net wrote: On 01/31/2014 08:57 AM, Merlin Moncure wrote: On Fri, Jan 31, 2014 at 4:03 AM, Oleg Bartunov obartu...@gmail.com wrote: Hmm, neither me, nor Teodor have experience and

Re: [HACKERS] Prohibit row-security + inheritance in 9.4?

2014-01-31 Thread Yeb Havinga
On 2014-01-31 16:05, Stephen Frost wrote: * Yeb Havinga (y.t.havi...@mgrid.net) wrote: IMHO, there is another way to implement this, other than the procedure to override the child-rel-quals with the ones from the parent. At DDL time, synchronize quals on the parent with rls quals of the childs.

Re: [HACKERS] inherit support for foreign tables

2014-01-31 Thread Tom Lane
Stephen Frost sfr...@snowman.net writes: I agree that using the FDW-specific options is the right approach and disallowing those to be set on foreign tables makes sense. I don't particularly like the idea of applying changes during inheiritance which we wouldn't allow the user to do directly.

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: It's interesting that the smgr gets this wrong then (as also evidenced by the fact that relation_size does as well). Could you please do a ls -l path/to/relfilenode*? IIRC, smgrnblocks will stop as soon as it finds a segment that is not 1GB in size.

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Andres Freund
On 2014-01-31 10:33:16 -0500, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: It's interesting that the smgr gets this wrong then (as also evidenced by the fact that relation_size does as well). Could you please do a ls -l path/to/relfilenode*? IIRC, smgrnblocks will stop as

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Tom Lane
Greg Stark st...@mit.edu writes: On Fri, Jan 31, 2014 at 3:19 PM, Andres Freund and...@2ndquadrant.com wrote: Isn't the page 3634978? The page in the record is. But the page on disk is in the 54th segment at offset 1F0C So unless my arithmetic is wrong: bc -l ibase=16 400 * 400 *

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Greg Stark
Sorry guys. I transposed two numbers when looking up the relation. data_pk wasn't the right index. =# select (page_header(get_raw_page('index_data_id', 'main', 3020854))).* ; lsn | tli | flags | lower | upper | special | pagesize | version | prune_xid

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Tom Lane
Greg Stark st...@mit.edu writes: Sorry guys. I transposed two numbers when looking up the relation. data_pk wasn't the right index. =# select (page_header(get_raw_page('index_data_id', 'main', 3020854))).* ; lsn | tli | flags | lower | upper | special | pagesize | version |

Re: [HACKERS] Add force option to dropdb

2014-01-31 Thread Robert Haas
On Fri, Jan 31, 2014 at 9:09 AM, salah jubeh s_ju...@yahoo.com wrote: $ createdb -U postgres hoge $ psql -d hoge -U postgres hoge=# create table test (col text); hoge=# insert into test select repeat(chr(code),1) from generate_series(1,10) code; Execute dropdb -k while the client is

Re: [HACKERS] Regression tests failing if not launched on db regression

2014-01-31 Thread Robert Haas
On Fri, Jan 31, 2014 at 2:28 AM, Michael Paquier michael.paqu...@gmail.com wrote: I took a look at this with a view to committing it but on examination I'm not sure this is the best way to proceed. The proposed text documents that the tests should be run in a database called regression, but

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Greg Stark
On Fri, Jan 31, 2014 at 3:41 PM, Tom Lane t...@sss.pgh.pa.us wrote: 400 * 400 * 400 / 2000 * 54 + 1F0C / 2000 11073632 Ooops, it's reading 54 in hex there. # select ((2^30) * 54.0 + 'x1F0C'::bit(32)::int) / 8192; ?column? -- 7141472 ibase=16 400 * 400 * 400 / 2000 * 36 +

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Andres Freund
On 2014-01-31 10:33:16 -0500, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: It's interesting that the smgr gets this wrong then (as also evidenced by the fact that relation_size does as well). Could you please do a ls -l path/to/relfilenode*? IIRC, smgrnblocks will stop as

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Greg Stark
So just to summarize, this xlog record: [cur:EA1/637140, xid:1418089147, rmid:11(Btree), len/tot_len:18/6194, info:8, prev:EA1/635290] insert_leaf: s/d/r:1663/16385/1261982 tid 3634978/282 [cur:EA1/637140, xid:1418089147, rmid:11(Btree), len/tot_len:18/6194, info:8, prev:EA1/635290] bkpblock[1]:

Re: [HACKERS] updated emacs configuration

2014-01-31 Thread Bruce Momjian
On Fri, Jan 31, 2014 at 08:58:21AM -0500, Robert Haas wrote: OK, eight hours later, I have the results for only removing tabs after periods in comments: http://momjian.us/expire/entab_comment.v2.cdiff http://momjian.us/expire/entab_comment.v2.pdiff

Re: [HACKERS] pgindent behavior we could do without

2014-01-31 Thread Bruce Momjian
On Thu, Jan 30, 2014 at 11:44:31PM -0500, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: OK, seven hours later, I have fixed pg_bsd_indent to no longer insert blank lines above #elif/#else/#endif, and therefore removed the special case code from pgindent. You will need to

Re: Fwd: [HACKERS] Proposal: variant of regclass

2014-01-31 Thread Robert Haas
On Fri, Jan 31, 2014 at 6:31 AM, Yugo Nagata nag...@sraoss.co.jp wrote: Hi Amit, Thanks for your reviewing. I updated the patch. I fixed the oids and removed the witespace. This patch contains several whitespace-only hunks. Please revert them. I don't like the changes to

Re: [HACKERS] pgindent behavior we could do without

2014-01-31 Thread Bruce Momjian
On Fri, Jan 31, 2014 at 11:18:17AM -0500, Bruce Momjian wrote: Yes, it is a shame pgindent has removed many proper empty lines in the past and there is no way to re-add them without causing backpatching problems. FYI, the original BSD indent code that added the blank lines kind of made sense.

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

2014-01-31 Thread Robert Haas
On Fri, Jan 31, 2014 at 4:40 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-01-30 12:27:43 -0500, Robert Haas wrote: Nope, but I think this patch is broken. It looks to me like it's conflating the process offset in the BackendStatus array with its backendId, which does not seem like

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

2014-01-31 Thread Robert Haas
On Fri, Jan 31, 2014 at 8:02 AM, Christian Kruse christ...@2ndquadrant.com wrote: what do you think about the approach the attached patch implements? I'm not really sure if this is what you had in mind, especially if this is the right lock. The attached patch seems not to be attached, but the

Re: [HACKERS] small typo in src/backend/access/transam/xlog.c

2014-01-31 Thread Bruce Momjian
On Mon, Jul 22, 2013 at 07:32:20PM -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2013-07-22 15:55:46 -0400, Robert Haas wrote: And why is that? The comment above tells: while the lower half is the XOR of tv_sec and tv_usec. Yeah, the code doesn't match the

Re: [HACKERS] ALTER TABLESPACE ... MOVE ALL TO ...

2014-01-31 Thread Fujii Masao
On Thu, Jan 30, 2014 at 8:47 PM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jan 21, 2014 at 1:33 AM, Simon Riggs si...@2ndquadrant.com wrote: On 20 January 2014 17:00, Stephen Frost sfr...@snowman.net wrote: * Tom Lane (t...@sss.pgh.pa.us) wrote: What if you're a superuser and you want

Re: [HACKERS] Add force option to dropdb

2014-01-31 Thread salah jubeh
Hello Robert, but the scripts are intended to be thin wrappers around the underlying database functionality, and I think this is straying too far from that core mission. I think, you have a  good point here. Regards On Friday, January 31, 2014 4:47 PM, Robert Haas robertmh...@gmail.com wrote:

Re: [HACKERS] [bug fix] PITR corrupts the database cluster

2014-01-31 Thread Bruce Momjian
On Wed, Jul 24, 2013 at 10:57:14AM -0400, Tom Lane wrote: I wrote: The only thing here that really bothers me is that a crash during DROP DATABASE/TABLESPACE could leave us with a partially populated db/ts that's still accessible through the system catalogs. ... I guess one thing we

Re: [HACKERS] updated emacs configuration

2014-01-31 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: OK. I have updated entab.c to support this new ability as -m. When should it be run this against HEAD and supported back branches? Probably when we run pgindent for 9.4. Yeah. The whole point is to keep the branches in sync for patching, so we need to

Re: [HACKERS] pg_basebackup and pg_stat_tmp directory

2014-01-31 Thread Robert Haas
On Fri, Jan 31, 2014 at 8:40 AM, Fujii Masao masao.fu...@gmail.com wrote: Yeah, I was thinking that, too. I'm not sure whether including log files in backup really increases the security risk, though. There are already very important data, i.e., database, in backups. Anyway, since the amount

Re: [HACKERS] Failure while inserting parent tuple to B-tree is not fun

2014-01-31 Thread Heikki Linnakangas
On 01/30/2014 12:46 AM, Peter Geoghegan wrote: On Mon, Jan 27, 2014 at 10:54 AM, Peter Geoghegan p...@heroku.com wrote: On Mon, Jan 27, 2014 at 10:27 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: I think I see some bugs in _bt_moveright(). If you examine _bt_finish_split() in detail,

Re: [HACKERS] CREATE FOREIGN TABLE ( ... LIKE ... )

2014-01-31 Thread Vik Fearing
On 01/25/2014 06:25 AM, David Fetter wrote: I like this patch, but I don't like its implementation at all. First of all, the documentation doesn't compile: openjade:ref/create_foreign_table.sgml:124:17:E: end tag for LISTITEM omitted, but OMITTAG NO was specified

Re: [HACKERS] [GENERAL] Insert result does not match record count

2014-01-31 Thread Bruce Momjian
On Wed, Jul 24, 2013 at 08:08:32PM +0200, Andres Freund wrote: On 2013-07-24 13:48:23 -0400, Tom Lane wrote: Vik Fearing vik.fear...@dalibo.com writes: Also worth mentioning is bug #7766. http://www.postgresql.org/message-id/e1tlli5-0007tr...@wrigleys.postgresql.org Yeah, did you

Re: [HACKERS] updated emacs configuration

2014-01-31 Thread Bruce Momjian
On Fri, Jan 31, 2014 at 11:57:28AM -0500, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: OK. I have updated entab.c to support this new ability as -m. When should it be run this against HEAD and supported back branches? Probably when we run pgindent for 9.4. Yeah. The whole

Re: [HACKERS] install libpq.dll in bin directory on Windows / Cygwin

2014-01-31 Thread Bruce Momjian
On Thu, Jul 25, 2013 at 04:53:45PM -0400, Andrew Dunstan wrote: Jeff Janes asked me about this, and Bruce just tripped up on it. Usually on Windows it's necessary to have libpq.dll/cygpq.dll either in the PATH or in the same directory as client .exe files. The buildfarm client has for many

[HACKERS] pgindent wishlist item

2014-01-31 Thread Andrew Dunstan
While Bruce is working on pgindent, let me register a small wishlist item. It would be quite useful to be able to supply extra typedefs on the command line to supplement a typedefs file downloaded from the buildfarm or constructed however. A concrete example: in the code I have been recently

Re: [HACKERS] [GENERAL] Insert result does not match record count

2014-01-31 Thread Vik Fearing
On 01/31/2014 06:19 PM, Bruce Momjian wrote: On Wed, Jul 24, 2013 at 08:08:32PM +0200, Andres Freund wrote: On 2013-07-24 13:48:23 -0400, Tom Lane wrote: Vik Fearing vik.fear...@dalibo.com writes: Also worth mentioning is bug #7766.

Re: [HACKERS] Prohibit row-security + inheritance in 9.4?

2014-01-31 Thread Stephen Frost
* Yeb Havinga (yebhavi...@gmail.com) wrote: This reasoning could go either way. GRANT is on a complete set of rows. This is a restriction on the level of individual rows, and in that sense, it is more like a row-level CHECK constraint. Well, we certainly don't force CHECK constraints on

Re: [HACKERS] pgindent wishlist item

2014-01-31 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: While Bruce is working on pgindent, let me register a small wishlist item. It would be quite useful to be able to supply extra typedefs on the command line to supplement a typedefs file downloaded from the buildfarm or constructed however. A

Re: [HACKERS] install libpq.dll in bin directory on Windows / Cygwin

2014-01-31 Thread Andrew Dunstan
On 01/31/2014 12:25 PM, Bruce Momjian wrote: On Thu, Jul 25, 2013 at 04:53:45PM -0400, Andrew Dunstan wrote: Jeff Janes asked me about this, and Bruce just tripped up on it. Usually on Windows it's necessary to have libpq.dll/cygpq.dll either in the PATH or in the same directory as client .exe

Re: [HACKERS] ALTER TABLESPACE ... MOVE ALL TO ...

2014-01-31 Thread Stephen Frost
* Fujii Masao (masao.fu...@gmail.com) wrote: We should add the tab-completion for ALTER TABLESPACE MOVE? Attached does that. Committed. Thanks! I had planned to get to it, but appreciate your handling of it. Stephen signature.asc Description: Digital signature

[HACKERS] bgworker crashed or not?

2014-01-31 Thread Antonin Houska
In 9.3 I noticed that postmaster considers bgworker crashed (and therefore tries to restart it) even if it has exited with zero status code. I first thought about a patch like the one below, but then noticed that postmaster.c:bgworker_quickdie() signal handler exits with 0 too (when there's no

Re: [HACKERS] Patch: Show process IDs of processes holding a lock; show relation and tuple infos of a lock to acquire

2014-01-31 Thread Fujii Masao
On Tue, Jan 28, 2014 at 6:39 PM, Rajeev rastogi rajeev.rast...@huawei.com wrote: On 28/01/14, Christian Kruse wrote: I have checked the revised patch. It looks fine to me except one minor code formatting issue. In elog.c, two tabs are missing in the definition of function

Re: [HACKERS] inherit support for foreign tables

2014-01-31 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Stephen Frost sfr...@snowman.net writes: I agree that using the FDW-specific options is the right approach and disallowing those to be set on foreign tables makes sense. I don't particularly like the idea of applying changes during inheiritance

Re: [HACKERS] pgindent wishlist item

2014-01-31 Thread Andres Freund
On 2014-01-31 12:29:52 -0500, Andrew Dunstan wrote: While Bruce is working on pgindent If it's christmas, let me wish for a not completly broken formatting of function typedefs. E.g. typedef ForeignScan *(*GetForeignPlan_function) (PlannerInfo *root,

Re: [HACKERS] Regarding google summer of code

2014-01-31 Thread Josh Berkus
On 01/30/2014 07:23 PM, Anirudh wrote: Hello everyone, My name is Anirudh Subramanian and I am a graduate student in Computer Science. I would like to participate in Google Summer of Code and would like to contribute to postgresql. I am not familiar with the postgresql codebase yet but will

Re: [HACKERS] [COMMITTERS] pgsql: libpq: Support TLS versions beyond TLSv1.

2014-01-31 Thread Marko Kreen
On Sat, Jan 25, 2014 at 12:25:30PM -0500, Tom Lane wrote: Alternatively, given that TLS has been around for a dozen years and openssl versions that old have not gotten security updates for a long time, why don't we just reject SSLv3 on the backend side too? I guess it's barely possible that

Re: [HACKERS] Prohibit row-security + inheritance in 9.4?

2014-01-31 Thread Yeb Havinga
On 2014-01-31 15:10, Stephen Frost wrote: * Craig Ringer (cr...@2ndquadrant.com) wrote: On 01/31/2014 09:01 AM, Stephen Frost wrote: The only case prevented is one where access to the child via the parent shows rows that the parent's row-security qual would hide, because the child's qual

Re: [HACKERS] pgindent wishlist item

2014-01-31 Thread Bruce Momjian
On Fri, Jan 31, 2014 at 12:44:22PM -0500, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: While Bruce is working on pgindent, let me register a small wishlist item. It would be quite useful to be able to supply extra typedefs on the command line to supplement a typedefs file

Re: [HACKERS] pgindent wishlist item

2014-01-31 Thread Bruce Momjian
On Fri, Jan 31, 2014 at 07:15:05PM +0100, Andres Freund wrote: On 2014-01-31 12:29:52 -0500, Andrew Dunstan wrote: While Bruce is working on pgindent If it's christmas, let me wish for a not completly broken formatting of function typedefs. E.g. typedef ForeignScan

Re: [HACKERS] Prefix compression of B-Tree keys

2014-01-31 Thread Claudio Freire
On Fri, Jan 31, 2014 at 3:51 AM, Peter Geoghegan p...@heroku.com wrote: Now, I haven't checked if it's already done. Sorry if it is. I did mock around btree code a lot and don't remember any of this, but I do remember stuff that could be used to achieve it (specifically, all the

Re: [HACKERS] [GENERAL] Insert result does not match record count

2014-01-31 Thread Bruce Momjian
On Fri, Jan 31, 2014 at 06:34:27PM +0100, Vik Fearing wrote: Application code that relies on the values already has problems though since the returned values are pretty bogus now. Including the fact that it can return 0 as the number of modified rows which is checked for more frequently

Re: [HACKERS] Add min and max execute statement time in pg_stat_statement

2014-01-31 Thread Peter Geoghegan
On Fri, Jan 31, 2014 at 5:07 AM, Mitsumasa KONDO kondo.mitsum...@gmail.com wrote: And past result shows that your patch's most weak point is that deleting most old statement and inserting new old statement cost is very high, as you know. No, there is no reason to imagine that entry_dealloc()

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Tom Lane
Greg Stark st...@mit.edu writes: So just to summarize, this xlog record: [cur:EA1/637140, xid:1418089147, rmid:11(Btree), len/tot_len:18/6194, info:8, prev:EA1/635290] insert_leaf: s/d/r:1663/16385/1261982 tid 3634978/282 [cur:EA1/637140, xid:1418089147, rmid:11(Btree), len/tot_len:18/6194,

[HACKERS] Re: [GENERAL] postgres FDW cost estimation options unrecognized in 9.3-beta1

2014-01-31 Thread Bruce Momjian
On Fri, Jul 26, 2013 at 06:28:05PM -0400, Tom Lane wrote: Our documentation appears not to disclose this fine point, but a look at the SQL-MED standard says it's operating per spec. The standard also says that ADD is an error if the option is already defined, which is a bit more defensible,

Re: [HACKERS] jsonb and nested hstore

2014-01-31 Thread Merlin Moncure
On Fri, Jan 31, 2014 at 9:26 AM, Andrew Dunstan and...@dunslane.net wrote: On 01/31/2014 09:53 AM, Merlin Moncure wrote: On Fri, Jan 31, 2014 at 8:45 AM, Andrew Dunstan and...@dunslane.net wrote: On 01/31/2014 08:57 AM, Merlin Moncure wrote: On Fri, Jan 31, 2014 at 4:03 AM, Oleg Bartunov

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-31 Thread Greg Stark
One thing I keep coming back to is a bad ran chip setting a bit in the block number. But I just can't seem to get it to add up. The difference is not a power of two, it had happened on two different machines, and we don't see other weirdness on the machine. It seems like a strange coincidence it

Re: [HACKERS] Regarding google summer of code

2014-01-31 Thread Anirudh
Thank you for your replies. I will get started. Cheers, Anirudh On Fri, Jan 31, 2014 at 1:17 PM, Josh Berkus j...@agliodbs.com wrote: On 01/30/2014 07:23 PM, Anirudh wrote: Hello everyone, My name is Anirudh Subramanian and I am a graduate student in Computer Science. I would like to

Re: [HACKERS] Add min and max execute statement time in pg_stat_statement

2014-01-31 Thread Tom Lane
Peter Geoghegan p...@heroku.com writes: On Fri, Jan 31, 2014 at 5:07 AM, Mitsumasa KONDO kondo.mitsum...@gmail.com wrote: It accelerate to affect update(delete and insert) cost in pg_stat_statements table. So you proposed new setting 10k in default max value. But it is not essential

Re: [HACKERS] [COMMITTERS] pgsql: libpq: Support TLS versions beyond TLSv1.

2014-01-31 Thread Tom Lane
Marko Kreen mark...@gmail.com writes: On Sat, Jan 25, 2014 at 12:25:30PM -0500, Tom Lane wrote: Alternatively, given that TLS has been around for a dozen years and openssl versions that old have not gotten security updates for a long time, why don't we just reject SSLv3 on the backend side

  1   2   >