Re: [HACKERS] delta relations in AFTER triggers

2014-08-12 Thread Amit Khandekar
On 7 August 2014 19:49, Kevin Grittner kgri...@ymail.com wrote: Amit Khandekar amit.khande...@enterprisedb.com wrote: On 21 June 2014 23:36, Kevin Grittner kgri...@ymail.com wrote: Kevin Grittner kgri...@ymail.com wrote: I didn't change the tuplestores to TID because it seemed to me that it

[HACKERS] Incorrect log message and checks in pgrecvlogical

2014-08-12 Thread Michael Paquier
Hi, While looking at pg_recvlogical code, I noticed that a couple of error messages are incorrect when invoking some combinations of --create, --start or --drop. For example, here --init should be --create, --stop should be --drop: $ pg_recvlogical --create --drop --slot foo pg_recvlogical:

Re: [HACKERS] pg_receivexlog add synchronous mode

2014-08-12 Thread Michael Paquier
On Fri, Aug 8, 2014 at 5:10 PM, Fujii Masao masao.fu...@gmail.com wrote: Thanks for the review! Applied the patch. I noticed that the tab padding for the new option -F in the getops switch is incorrect. Attached patch corrects that. pgindent would have caught that anyway, but it doesn't hurt to

[HACKERS] Inconsistent use of --slot/-S in pg_receivexlog and pg_recvlogical

2014-08-12 Thread Michael Paquier
Hi, I noticed that pg_receivexlog is able to use --slot but not -S, even if the code is written this way. Attached is a patch correcting that. This makes pg_receivexlog consistent with pg_recvlogical regarding the slot option. IMHO, this should be backpatched to REL9_4_STABLE. Regards, --

Re: [HACKERS] postgresql.auto.conf and reload

2014-08-12 Thread Fujii Masao
On Tue, Aug 12, 2014 at 1:23 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Mon, Aug 11, 2014 at 11:08 PM, Fujii Masao masao.fu...@gmail.com wrote: While updating the patch, I found that the ConfigVariable which is removed from list has the fields that the memory has been already

[HACKERS] minor pgbench doc fix

2014-08-12 Thread Fabien COELHO
Attached patch removes spurious brackets from pgbench documentation. -- Fabien.diff --git a/doc/src/sgml/pgbench.sgml b/doc/src/sgml/pgbench.sgml index b7d88f3..1551686 100644 --- a/doc/src/sgml/pgbench.sgml +++ b/doc/src/sgml/pgbench.sgml @@ -748,7 +748,7 @@ pgbench optional

Re: [HACKERS] Enhancing pgbench parameter checking

2014-08-12 Thread Tatsuo Ishii
Fabien, Find attached a patch which adds these changes to your current version. Thank you for the review and patch. Looks good. I changed the status to Ready for Committer. I will wait for a fewd days and if there's no objection, I will commit the patch. I have committed the patch.

Re: [HACKERS] 9.4 logical replication - walsender keepalive replies

2014-08-12 Thread Andres Freund
On 2014-08-11 23:52:32 +0200, Andres Freund wrote: On 2014-08-11 17:22:27 -0400, Steve Singer wrote: On 07/14/2014 01:19 PM, Steve Singer wrote: On 07/06/2014 10:11 AM, Andres Freund wrote: Hi Steve, Right. I thought about this for a while, and I think we should change two things.

Re: [HACKERS] minor pgbench doc fix

2014-08-12 Thread Fujii Masao
On Tue, Aug 12, 2014 at 5:12 PM, Fabien COELHO coe...@cri.ensmp.fr wrote: Attached patch removes spurious brackets from pgbench documentation. Applied. Thanks! Regards, -- Fujii Masao -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

[HACKERS] pg_receivexlog --status-interval add fsync feedback

2014-08-12 Thread furuyao
Hi all, This patch is to add setting to send status packets after fsync to --status-interval of pg_receivexlog. If -1 is specified to --status-interval, status packets is sent as soon as after fsync. Others are the same as when 0 is specified to --status-interval. When requested by the

Re: [HACKERS] pg_receivexlog add synchronous mode

2014-08-12 Thread Fujii Masao
On Tue, Aug 12, 2014 at 4:34 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Fri, Aug 8, 2014 at 5:10 PM, Fujii Masao masao.fu...@gmail.com wrote: Thanks for the review! Applied the patch. I noticed that the tab padding for the new option -F in the getops switch is incorrect. Attached

Re: [HACKERS] Optimization for updating foreign tables in Postgres FDW

2014-08-12 Thread Shigeru Hanada
Hi Fujita-san, Issues addressed by Eitoku-san were fixed properly, but he found a bug and a possible enhancement in the v2 patch. * push-down check misses delete triggers update_is_pushdown_safe() seems to have a bug that it misses the existence of row-level delete trigger. DELETE statement

Re: [HACKERS] Proposal: Incremental Backup

2014-08-12 Thread Marco Nenciarini
As I already stated, timestamps will be only used to early detect changed files. To declared two files identical they must have same size, same mtime and same *checksum*. Regards, Marco -- Marco Nenciarini - 2ndQuadrant Italy PostgreSQL Training, Services and Support

Re: [HACKERS] WAL format and API changes (9.5)

2014-08-12 Thread Heikki Linnakangas
On 08/05/2014 03:50 PM, Michael Paquier wrote: - When testing pg_xlogdump I found an assertion failure for record XLOG_GIN_INSERT: Assertion failed: (((bool) (((const void*)(insertData-newitem.key) != ((void*)0)) ((insertData-newitem.key)-ip_posid != 0, function gin_desc, file gindesc.c,

Re: [HACKERS] [BUGS] BUG #9652: inet types don't support min/max

2014-08-12 Thread Haribabu Kommi
On Mon, Aug 4, 2014 at 3:22 PM, Asif Naeem anaeem...@gmail.com wrote: Sorry for not being clear, above mentioned test is related to following doc (sgml) changes that seems not working as described i.e. Table 9-35. cidr and inet Functions FunctionReturn TypeDescriptionExampleResult

Re: [HACKERS] pg_receivexlog --status-interval add fsync feedback

2014-08-12 Thread Fujii Masao
On Tue, Aug 12, 2014 at 6:19 PM, furu...@pm.nttdata.co.jp wrote: Hi all, This patch is to add setting to send status packets after fsync to --status-interval of pg_receivexlog. If -1 is specified to --status-interval, status packets is sent as soon as after fsync. I don't think that

Re: [HACKERS] Inconsistent use of --slot/-S in pg_receivexlog and pg_recvlogical

2014-08-12 Thread Fujii Masao
On Tue, Aug 12, 2014 at 4:50 PM, Michael Paquier michael.paqu...@gmail.com wrote: Hi, I noticed that pg_receivexlog is able to use --slot but not -S, even if the code is written this way. Attached is a patch correcting that. This makes pg_receivexlog consistent with pg_recvlogical regarding

Re: [HACKERS] SSL regression test suite

2014-08-12 Thread Heikki Linnakangas
On 08/05/2014 10:46 PM, Robert Haas wrote: On Mon, Aug 4, 2014 at 10:38 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: Now that we use TAP for testing client tools, I think we can use that to test various SSL options too. I came up with the attached. Comments? It currently assumes that

Re: [HACKERS] Incorrect log message and checks in pgrecvlogical

2014-08-12 Thread Andres Freund
On 2014-08-12 16:28:56 +0900, Michael Paquier wrote: Hi, While looking at pg_recvlogical code, I noticed that a couple of error messages are incorrect when invoking some combinations of --create, --start or --drop. For example, here --init should be --create, --stop should be --drop: $

Re: [HACKERS] PL/PgSQL: RAISE and the number of parameters

2014-08-12 Thread Fabien COELHO
Hello Marko, Here's a patch for making PL/PgSQL throw an error during compilation (instead of runtime) if the number of parameters passed to RAISE don't match the number of placeholders in error message. I'm sure people can see the pros of doing it this way. Patch scanned, applied tested

Re: [HACKERS] PL/PgSQL: RAISE and the number of parameters

2014-08-12 Thread Marko Tiikkaja
Hi Fabien, On 8/12/14 1:09 PM, Fabien COELHO wrote: Here's a patch for making PL/PgSQL throw an error during compilation (instead of runtime) if the number of parameters passed to RAISE don't match the number of placeholders in error message. I'm sure people can see the pros of doing it this

Re: [HACKERS] SSL regression test suite

2014-08-12 Thread Andres Freund
On 2014-08-12 14:01:18 +0300, Heikki Linnakangas wrote: On 08/05/2014 10:46 PM, Robert Haas wrote: Why can't you make it work over 127.0.0.1? I wanted it to be easy to run the client and the server on different hosts. As soon as we have more than one SSL implementation, it would be really

Re: [HACKERS] jsonb format is pessimal for toast compression

2014-08-12 Thread Marti Raudsepp
On Fri, Aug 8, 2014 at 10:50 PM, Hannu Krosing ha...@2ndquadrant.com wrote: How hard and how expensive would it be to teach pg_lzcompress to apply a delta filter on suitable data ? So that instead of integers their deltas will be fed to the real compressor Has anyone given this more thought?

Re: [HACKERS] SSL regression test suite

2014-08-12 Thread Heikki Linnakangas
On 08/12/2014 02:28 PM, Andres Freund wrote: On 2014-08-12 14:01:18 +0300, Heikki Linnakangas wrote: Also, to test sslmode=verify-full, where the client checks that the server certificate's hostname matches the hostname that it connected to, you need to have two aliases for the same server, one

Re: [HACKERS] 9.5: Memory-bounded HashAgg

2014-08-12 Thread Tomas Vondra
On 12 Srpen 2014, 7:06, Jeff Davis wrote: On Mon, 2014-08-11 at 01:29 +0200, Tomas Vondra wrote: On 10.8.2014 23:26, Jeff Davis wrote: This patch is requires the Memory Accounting patch, or something similar to track memory usage. I think the patch you sent actually includes the accounting

Re: [HACKERS] pg_receivexlog and replication slots

2014-08-12 Thread Michael Paquier
On Fri, Jul 11, 2014 at 6:23 PM, Andres Freund and...@2ndquadrant.com wrote: Ok. Do you plan to take care of it? If, I'd be fine with backpatching it. I'm not likely to get to it right now :( Actually I came up with the same need as Magnus, but a bit later, so... Attached is a patch to support

Re: [HACKERS] PL/PgSQL: RAISE and the number of parameters

2014-08-12 Thread Fabien COELHO
Hello, - I would suggest to avoid continue within a loop so that the code is simpler to understand, at least for me. I personally find the code easier to read with the continue. Hmmm. I had to read the code to check it, and I did it twice. The point is that there is 3 exit points instead

Re: [HACKERS] Proposal: Incremental Backup

2014-08-12 Thread Claudio Freire
On Tue, Aug 12, 2014 at 6:41 AM, Marco Nenciarini marco.nenciar...@2ndquadrant.it wrote: To declared two files identical they must have same size, same mtime and same *checksum*. Still not safe. Checksum collisions do happen, especially in big data sets. -- Sent via pgsql-hackers mailing

Re: [HACKERS] PL/PgSQL: RAISE and the number of parameters

2014-08-12 Thread Pavel Stehule
2014-08-12 15:09 GMT+02:00 Fabien COELHO coe...@cri.ensmp.fr: Hello, - I would suggest to avoid continue within a loop so that the code is simpler to understand, at least for me. I personally find the code easier to read with the continue. Hmmm. I had to read the code to check it,

Re: [HACKERS] Proposal: Incremental Backup

2014-08-12 Thread Gabriele Bartolini
Hi Claudio, 2014-08-12 15:25 GMT+02:00 Claudio Freire klaussfre...@gmail.com: Still not safe. Checksum collisions do happen, especially in big data sets. Can I ask you what you are currently using for backing up large data sets with Postgres? Thanks, Gabriele -- Sent via pgsql-hackers

Re: [HACKERS] Proposal: Incremental Backup

2014-08-12 Thread Marco Nenciarini
Il 12/08/14 15:25, Claudio Freire ha scritto: On Tue, Aug 12, 2014 at 6:41 AM, Marco Nenciarini marco.nenciar...@2ndquadrant.it wrote: To declared two files identical they must have same size, same mtime and same *checksum*. Still not safe. Checksum collisions do happen, especially in big

Re: [HACKERS] [RFC] Should smgrtruncate() avoid sending sinval message for temp relations

2014-08-12 Thread MauMau
Robert Haas robertmh...@gmail.com writes: I'd support back-porting that commit to 9.1 and 9.2 as a fix for this problem. As the commit message says, it's dead simple. From: Tom Lane t...@sss.pgh.pa.us While I have no great objection to back-porting Heikki's patch, it seems like a very large

Re: [HACKERS] Proposal: Incremental Backup

2014-08-12 Thread Andres Freund
On 2014-08-12 10:25:21 -0300, Claudio Freire wrote: On Tue, Aug 12, 2014 at 6:41 AM, Marco Nenciarini marco.nenciar...@2ndquadrant.it wrote: To declared two files identical they must have same size, same mtime and same *checksum*. Still not safe. Checksum collisions do happen, especially

Re: [HACKERS] delta relations in AFTER triggers

2014-08-12 Thread Kevin Grittner
Amit Khandekar amit.khande...@enterprisedb.com wrote: On 7 August 2014 19:49, Kevin Grittner kgri...@ymail.com wrote: Amit Khandekar amit.khande...@enterprisedb.com wrote: I tried to google some SQLs that use REFERENCING clause with triggers. It looks like in some database systems, even the

Re: [HACKERS] Proposal: Incremental Backup

2014-08-12 Thread Claudio Freire
On Tue, Aug 12, 2014 at 11:17 AM, Gabriele Bartolini gabriele.bartol...@2ndquadrant.it wrote: 2014-08-12 15:25 GMT+02:00 Claudio Freire klaussfre...@gmail.com: Still not safe. Checksum collisions do happen, especially in big data sets. Can I ask you what you are currently using for backing up

Re: [HACKERS] Improvement of versioning on Windows, take two

2014-08-12 Thread MauMau
From: Michael Paquier michael.paqu...@gmail.com Oh yes, right. I don't really know how I missed this error when testing v1. Adding an explicit call to RemoveFile('src\timezone\win32ver.rc') for project postgres calms down the build. Is the attached working for you? Yes, the build succeeded. I

Re: [HACKERS] WAL format and API changes (9.5)

2014-08-12 Thread Alvaro Herrera
Heikki Linnakangas wrote: On 08/05/2014 03:50 PM, Michael Paquier wrote: - All the functions in xlogconstruct.c could be defined in a separate header xlogconstruct.h. What they do is rather independent from xlog.h. The same applies to all the structures and functions of xlogconstruct.c in

Re: [HACKERS] WAL format and API changes (9.5)

2014-08-12 Thread Alvaro Herrera
Heikki Linnakangas wrote: On 08/05/2014 03:50 PM, Michael Paquier wrote: - XLogRecGetBlockRefIds needing an already-allocated array for *out is not user-friendly. Cannot we just do all the work inside this function? I agree it's not a nice API. Returning a palloc'd array would be nicer,

Re: [HACKERS] jsonb format is pessimal for toast compression

2014-08-12 Thread Robert Haas
On Mon, Aug 11, 2014 at 3:35 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: ... I think it would be a better idea to arrange some method by which JSONB (and perhaps other data types) can provide compression hints to pglz. I agree with that as a long-term

Re: [HACKERS] [RFC] Should smgrtruncate() avoid sending sinval message for temp relations

2014-08-12 Thread Robert Haas
On Mon, Aug 11, 2014 at 7:40 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Fri, Aug 8, 2014 at 10:30 AM, MauMau maumau...@gmail.com wrote: I've tracked down the real root cause. The fix is very simple. Please check the attached one-liner patch. I'd

Re: [HACKERS] [RFC] Should smgrtruncate() avoid sending sinval message for temp relations

2014-08-12 Thread Andres Freund
On 2014-08-12 11:04:00 -0400, Robert Haas wrote: On Mon, Aug 11, 2014 at 7:40 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Fri, Aug 8, 2014 at 10:30 AM, MauMau maumau...@gmail.com wrote: I've tracked down the real root cause. The fix is very simple.

Re: [HACKERS] Hokey wrong versions of libpq in apt.postgresql.org

2014-08-12 Thread Christoph Berg
Re: Joshua D. Drake 2014-08-11 53e83e9c.6030...@commandprompt.com The issue that I specifically ran into is that by using apt.postgresql.org in its default configuration, I can't add certain extensions (without jumping through hoops). Simple: Assume a running 9.2.9 from apt.postgresql.org

Re: [HACKERS] [RFC] Should smgrtruncate() avoid sending sinval message for temp relations

2014-08-12 Thread Robert Haas
On Tue, Aug 12, 2014 at 11:06 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-08-12 11:04:00 -0400, Robert Haas wrote: On Mon, Aug 11, 2014 at 7:40 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Fri, Aug 8, 2014 at 10:30 AM, MauMau

Re: [HACKERS] Proposal: Incremental Backup

2014-08-12 Thread Robert Haas
On Tue, Aug 12, 2014 at 10:30 AM, Andres Freund and...@2ndquadrant.com wrote: Still not safe. Checksum collisions do happen, especially in big data sets. If you use an appropriate algorithm for appropriate amounts of data that's not a relevant concern. You can easily do different checksums for

Re: [HACKERS] [RFC] Should smgrtruncate() avoid sending sinval message for temp relations

2014-08-12 Thread Andres Freund
On 2014-08-12 11:56:41 -0400, Robert Haas wrote: On Tue, Aug 12, 2014 at 11:06 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-08-12 11:04:00 -0400, Robert Haas wrote: On Mon, Aug 11, 2014 at 7:40 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes:

Re: [HACKERS] Proposal: Incremental Backup

2014-08-12 Thread Fujii Masao
On Wed, Aug 13, 2014 at 12:58 AM, Robert Haas robertmh...@gmail.com wrote: On Tue, Aug 12, 2014 at 10:30 AM, Andres Freund and...@2ndquadrant.com wrote: Still not safe. Checksum collisions do happen, especially in big data sets. If you use an appropriate algorithm for appropriate amounts of

[HACKERS] [PATCH] PostgreSQL 9.4 mmap(2) performance regression on FreeBSD...

2014-08-12 Thread Sean Chittenden
One of the patches that I've been sitting on and am derelict in punting upstream is the attached mmap(2) flags patch for the BSDs. Is there any chance this can be squeezed in to the PostreSQL 9.4 release? The patch is trivial in size and is used to add one flag to mmap(2) calls in dsm_impl.c.

Re: [HACKERS] [PATCH] PostgreSQL 9.4 mmap(2) performance regression on FreeBSD...

2014-08-12 Thread Andres Freund
On 2014-08-12 09:42:30 -0700, Sean Chittenden wrote: One of the patches that I've been sitting on and am derelict in punting upstream is the attached mmap(2) flags patch for the BSDs. Is there any chance this can be squeezed in to the PostreSQL 9.4 release? The patch is trivial in size and

Re: [HACKERS] [RFC] Should smgrtruncate() avoid sending sinval message for temp relations

2014-08-12 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-08-12 11:56:41 -0400, Robert Haas wrote: Yes. Do you have a back-patchable solution for that? The easiest thing I can think of is sprinkling a few SetConfigOption('synchronous_commit', 'off', PGC_INTERNAL, PGC_S_OVERRIDE,

Re: [HACKERS] PL/PgSQL: RAISE and the number of parameters

2014-08-12 Thread Fabien COELHO
one note: this patch can enforce a compatibility issues - a partially broken functions, where some badly written RAISE statements was executed newer. I am not against this patch, but it should be in extra check probably ?? I'm not sure about what you mean by it should be in extra check.

Re: [HACKERS] [RFC] Should smgrtruncate() avoid sending sinval message for temp relations

2014-08-12 Thread Andres Freund
On 2014-08-12 13:11:55 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-08-12 11:56:41 -0400, Robert Haas wrote: Yes. Do you have a back-patchable solution for that? The easiest thing I can think of is sprinkling a few SetConfigOption('synchronous_commit',

Re: [HACKERS] Hokey wrong versions of libpq in apt.postgresql.org

2014-08-12 Thread Steve Crawford
On 08/07/2014 04:30 PM, Joshua D. Drake wrote: Hello, I know this has been brought up before: http://www.postgresql.org/message-id/20140724080902.ga28...@msg.df7cb.de For reference, libpq and packaging issues discussed here as well:

Re: [HACKERS] PL/PgSQL: RAISE and the number of parameters

2014-08-12 Thread Pavel Stehule
2014-08-12 19:14 GMT+02:00 Fabien COELHO coe...@cri.ensmp.fr: one note: this patch can enforce a compatibility issues - a partially broken functions, where some badly written RAISE statements was executed newer. I am not against this patch, but it should be in extra check probably ??

Re: [HACKERS] Supporting Windows SChannel as OpenSSL replacement

2014-08-12 Thread Heikki Linnakangas
On 08/06/2014 08:37 PM, Jeff Janes wrote: But now it looks like 0002 needs a rebase I've committed the refactoring patch, and here's a rebased and improved version of the Windows SChannel implementation over that. Server-side support is now implemented too, but it's all very crude and

[HACKERS] proposal for 9.5: monitoring lock time for slow queries

2014-08-12 Thread Pavel Stehule
Hello I was asked about possibility to show a lock time of slow queries. I proposed a design based on log line prefix, but it was rejected. Any idea how to show a lock time in some practical form together with logged slow query? Regards Pavel

[HACKERS] minor typo in pgbench doc (2)

2014-08-12 Thread Fabien COELHO
Yet another very minor typo in pgbench doc. I'm not sure of the best way to show formula in the doc. -- Fabien.diff --git a/doc/src/sgml/pgbench.sgml b/doc/src/sgml/pgbench.sgml index 1551686..7d09a2d 100644 --- a/doc/src/sgml/pgbench.sgml +++ b/doc/src/sgml/pgbench.sgml @@ -782,7 +782,7 @@

Re: [HACKERS] replication commands and log_statements

2014-08-12 Thread Bruce Momjian
On Tue, Aug 12, 2014 at 10:07:34AM +0530, Amit Kapila wrote: On Tue, Aug 12, 2014 at 9:29 AM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Aug 12, 2014 at 2:34 AM, Robert Haas robertmh...@gmail.com wrote: If you have a user devoted to it, I suppose that's true.  I still think it

Re: [HACKERS] Scaling shared buffer eviction

2014-08-12 Thread Andres Freund
On 2014-08-06 15:42:08 +0530, Amit Kapila wrote: On Tue, Aug 5, 2014 at 9:21 PM, Robert Haas robertmh...@gmail.com wrote: On Thu, Jun 5, 2014 at 4:43 AM, Amit Kapila amit.kapil...@gmail.com wrote: This essentially removes BgWriterDelay, but it's still mentioned in BgBufferSync(). Looking

Re: [HACKERS] WAL format and API changes (9.5)

2014-08-12 Thread Andres Freund
On 2014-08-12 12:44:22 +0300, Heikki Linnakangas wrote: Here's a new patch with those little things fixed. I've so far ignored this thread... I'm now taking a look. Unfortunately I have to admit I'm not unequivocally happy. * XLogRegisterData/XLogRegisterRecData imo don't really form a

Re: [HACKERS] Minmax indexes

2014-08-12 Thread Alvaro Herrera
Heikki Linnakangas wrote: I couldn't resist starting to hack on this, and implemented the scheme I've been having in mind: 1. MMTuple contains the block number of the heap page (range) that the tuple represents. Vacuum is no longer needed to clean up old tuples; when an index tuples is

Re: [HACKERS] replication commands and log_statements

2014-08-12 Thread Stephen Frost
* Bruce Momjian (br...@momjian.us) wrote: On Tue, Aug 12, 2014 at 10:07:34AM +0530, Amit Kapila wrote: On Tue, Aug 12, 2014 at 9:29 AM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Aug 12, 2014 at 2:34 AM, Robert Haas robertmh...@gmail.com wrote: If you have a user devoted to

Re: [HACKERS] jsonb format is pessimal for toast compression

2014-08-12 Thread Bruce Momjian
On Mon, Aug 11, 2014 at 01:44:05PM -0700, Peter Geoghegan wrote: On Mon, Aug 11, 2014 at 1:01 PM, Stephen Frost sfr...@snowman.net wrote: We've got a clear example of someone, quite reasonably, expecting their JSONB object to be compressed using the normal TOAST mechanism, and we're failing

Re: [HACKERS] [PATCH] PostgreSQL 9.4 mmap(2) performance regression on FreeBSD...

2014-08-12 Thread Robert Haas
On Tue, Aug 12, 2014 at 12:59 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-08-12 09:42:30 -0700, Sean Chittenden wrote: One of the patches that I've been sitting on and am derelict in punting upstream is the attached mmap(2) flags patch for the BSDs. Is there any chance this can be

Re: [HACKERS] Proposal: Incremental Backup

2014-08-12 Thread Stephen Frost
Claudio, * Claudio Freire (klaussfre...@gmail.com) wrote: I'm not talking about malicious attacks, with big enough data sets, checksum collisions are much more likely to happen than with smaller ones, and incremental backups are supposed to work for the big sets. This is an issue when you're

Re: [HACKERS] WAL format and API changes (9.5)

2014-08-12 Thread Heikki Linnakangas
On 08/13/2014 01:04 AM, Andres Freund wrote: On 2014-08-12 12:44:22 +0300, Heikki Linnakangas wrote: Here's a new patch with those little things fixed. I've so far ignored this thread... I'm now taking a look. Unfortunately I have to admit I'm not unequivocally happy. *

Re: [HACKERS] Inconsistent use of --slot/-S in pg_receivexlog and pg_recvlogical

2014-08-12 Thread Fujii Masao
On Tue, Aug 12, 2014 at 7:27 PM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Aug 12, 2014 at 4:50 PM, Michael Paquier michael.paqu...@gmail.com wrote: Hi, I noticed that pg_receivexlog is able to use --slot but not -S, even if the code is written this way. Attached is a patch correcting

Re: [HACKERS] strncpy is not a safe version of strcpy

2014-08-12 Thread Noah Misch
On Sat, Nov 16, 2013 at 12:53:10PM +1300, David Rowley wrote: I went on a bit of a strncpy cleanup rampage this morning and ended up finding quite a few places where strncpy is used wrongly. I'm not quite sure if I have got them all in this patch, but I' think I've got the obvious ones at

Re: [HACKERS] Production block comparison facility

2014-08-12 Thread Michael Paquier
On Wed, Jul 23, 2014 at 11:14 PM, Michael Paquier michael.paqu...@gmail.com wrote: Things could be refactored and improved for sure, but this patch is already useful as-is so I am going to add it to the next commit fest. After some more investigation, I am going to mark this patch as Returned

Re: [HACKERS] Optimization for updating foreign tables in Postgres FDW

2014-08-12 Thread Etsuro Fujita
(2014/08/12 18:34), Shigeru Hanada wrote: Issues addressed by Eitoku-san were fixed properly, but he found a bug and a possible enhancement in the v2 patch. Thank you for the review, Hanada-san and Eitoku-san! * push-down check misses delete triggers update_is_pushdown_safe() seems to have

Re: [HACKERS] [REVIEW] pg_last_xact_insert_timestamp

2014-08-12 Thread Fujii Masao
On Mon, Aug 11, 2014 at 8:27 PM, Fujii Masao masao.fu...@gmail.com wrote: On Mon, Aug 11, 2014 at 4:46 PM, Andres Freund and...@2ndquadrant.com wrote: Hi, On 2011-10-04 20:52:59 +0900, Fujii Masao wrote: *** a/src/backend/access/transam/xact.c --- b/src/backend/access/transam/xact.c

Re: [HACKERS] replication commands and log_statements

2014-08-12 Thread Amit Kapila
On Wed, Aug 13, 2014 at 4:24 AM, Stephen Frost sfr...@snowman.net wrote: * Bruce Momjian (br...@momjian.us) wrote: On Tue, Aug 12, 2014 at 10:07:34AM +0530, Amit Kapila wrote: One difference is that replication commands are internally generated commands. Do we anywhere else log such

Re: [HACKERS] failures on barnacle (CLOBBER_CACHE_RECURSIVELY) because of memory leaks

2014-08-12 Thread Tom Lane
I wrote: Tomas Vondra t...@fuzzy.cz writes: So after 83 days, the regression tests on barnacle completed, Hah, that's perseverance! and it smells like another memory leak in CacheMemoryContext, similar to those fixed in 078b2ed on May 18. Ugh, will look. I've been experimenting by

Re: [HACKERS] proposal for 9.5: monitoring lock time for slow queries

2014-08-12 Thread Michael Paquier
On Wed, Aug 13, 2014 at 4:59 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Any idea how to show a lock time in some practical form together with logged slow query? Doing a join on pg_stat_activity and pg_locks is not going to help much as you could only get the moment when query has started

Re: [HACKERS] Scaling shared buffer eviction

2014-08-12 Thread Amit Kapila
On Wed, Aug 13, 2014 at 2:32 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-08-06 15:42:08 +0530, Amit Kapila wrote: On Tue, Aug 5, 2014 at 9:21 PM, Robert Haas robertmh...@gmail.com wrote: This essentially removes BgWriterDelay, but it's still mentioned in BgBufferSync().

Re: [HACKERS] 9.5: Memory-bounded HashAgg

2014-08-12 Thread Jeff Davis
On Tue, 2014-08-12 at 14:58 +0200, Tomas Vondra wrote: CREATE AGGREGATE myaggregate ( ... SERIALIZE_FUNC = 'dump_data', DESERIALIZE_FUNC = 'read_data', ... ); Seems reasonable. I don't see why it should get messy? In the end, you have a chunk of data and a hash for it.

Re: [HACKERS] Support for N synchronous standby servers

2014-08-12 Thread Fujii Masao
On Mon, Aug 11, 2014 at 4:38 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Mon, Aug 11, 2014 at 4:26 PM, Fujii Masao masao.fu...@gmail.com wrote: On Mon, Aug 11, 2014 at 2:10 PM, Michael Paquier michael.paqu...@gmail.com wrote: Oh, that worked in my machine, too, this time... I did

Re: [HACKERS] proposal for 9.5: monitoring lock time for slow queries

2014-08-12 Thread Tom Lane
Michael Paquier michael.paqu...@gmail.com writes: Doing a join on pg_stat_activity and pg_locks is not going to help much as you could only get the moment when query has started or its state has changed. Have you thought about the addition of a new column in pg_locks containing the timestamp

Re: [HACKERS] proposal for 9.5: monitoring lock time for slow queries

2014-08-12 Thread Pavel Stehule
Hi 2014-08-13 6:18 GMT+02:00 Michael Paquier michael.paqu...@gmail.com: On Wed, Aug 13, 2014 at 4:59 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Any idea how to show a lock time in some practical form together with logged slow query? Doing a join on pg_stat_activity and pg_locks

Re: [HACKERS] proposal for 9.5: monitoring lock time for slow queries

2014-08-12 Thread Pavel Stehule
2014-08-13 7:19 GMT+02:00 Tom Lane t...@sss.pgh.pa.us: Michael Paquier michael.paqu...@gmail.com writes: Doing a join on pg_stat_activity and pg_locks is not going to help much as you could only get the moment when query has started or its state has changed. Have you thought about the