Re: [HACKERS] should we add a XLogRecPtr/LSN SQL type?

2014-02-03 Thread Michael Paquier
On Sun, Feb 2, 2014 at 12:07 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-02-02 00:04:41 +0900, Michael Paquier wrote: On Fri, Dec 13, 2013 at 2:47 AM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@2ndquadrant.com writes: On 2013-12-12 11:55:51 -0500, Tom Lane wrote

Re: [HACKERS] should we add a XLogRecPtr/LSN SQL type?

2014-02-03 Thread Michael Paquier
On Tue, Feb 4, 2014 at 10:10 AM, Tom Lane t...@sss.pgh.pa.us wrote: Michael Paquier michael.paqu...@gmail.com writes: Please find attached a patch implementing lsn as a datatype, based on the one Robert wrote a couple of years ago. Patch contains regression tests as well as a bit

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

2014-02-03 Thread Michael Paquier
On Tue, Feb 4, 2014 at 12:49 AM, Robert Haas robertmh...@gmail.com wrote: On Fri, Jan 31, 2014 at 5:48 PM, Michael Paquier michael.paqu...@gmail.com wrote: The part about the planning parameter looks good, thanks. The places used to mention the databases used also makes more sense. Thanks

Re: [HACKERS] should we add a XLogRecPtr/LSN SQL type?

2014-02-04 Thread Michael Paquier
On Tue, Feb 4, 2014 at 6:15 PM, Andres Freund and...@2ndquadrant.com wrote: + /*-- + * Relational operators for LSNs + *-*/ Isn't it just operators? They aren't really

Re: [HACKERS] should we add a XLogRecPtr/LSN SQL type?

2014-02-04 Thread Michael Paquier
On Tue, Feb 4, 2014 at 7:22 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-02-04 19:17:51 +0900, Michael Paquier wrote: @@ -180,7 +175,7 @@ pg_get_replication_slots(PG_FUNCTION_ARGS) else nulls[i++] = true; if (restart_lsn

Re: [HACKERS] should we add a XLogRecPtr/LSN SQL type?

2014-02-04 Thread Michael Paquier
On Wed, Feb 5, 2014 at 5:26 AM, Peter Eisentraut pete...@gmx.net wrote: Perhaps this type should be called pglsn, since it's an implementation-specific detail and not a universal concept like int, point, or uuid. It makes sense. I'll update the patches according to that. -- Michael -- Sent

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

2014-02-04 Thread Michael Paquier
On Wed, Feb 5, 2014 at 7:22 AM, Jeremy Harris j...@wizmail.org wrote: The attached patch replaces the existing siftup method for heapify with a siftdown method. Tested with random integers it does 18% fewer compares and takes 10% less time for the heapify, over the work_mem range 1024 to

Re: [HACKERS] should we add a XLogRecPtr/LSN SQL type?

2014-02-04 Thread Michael Paquier
On Wed, Feb 5, 2014 at 9:38 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Wed, Feb 5, 2014 at 8:59 AM, Michael Paquier michael.paqu...@gmail.com wrote: I'll update the patches according to that. Here are the updated patches with the following changes (according to previous comments

Re: [HACKERS] PoC: Duplicate Tuple Elidation during External Sort for DISTINCT

2014-02-04 Thread Michael Paquier
On Wed, Feb 5, 2014 at 10:33 AM, Jon Nelson jnelson+pg...@jamponi.net wrote: What - if anything - do I need to do to get this on the commitfest list for the next commitfest? The list of instructions is here: http://wiki.postgresql.org/wiki/Submitting_a_Patch#Patch_submission Then the next commit

Re: [HACKERS] PostgreSQL Failback without rebuild

2014-02-04 Thread Michael Paquier
On Wed, Feb 5, 2014 at 3:14 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Wed, Feb 5, 2014 at 10:30 AM, James Sewell james.sew...@lisasoft.com I've seen some proposals and a tool (pg_rewind), but all seem to have draw backs. As far as I remember, one of the main drawbacks for pg_rewind

Re: adt Makefile, was Re: [HACKERS] jsonb and nested hstore

2014-02-06 Thread Michael Paquier
On Fri, Feb 7, 2014 at 1:18 AM, Andrew Dunstan and...@dunslane.net wrote: On 02/01/2014 05:20 PM, Andres Freund wrote: diff --git a/src/backend/utils/adt/Makefile b/src/backend/utils/adt/Makefile index 1ae9fa0..fd93d9b 100644 --- a/src/backend/utils/adt/Makefile +++

Re: [HACKERS] PostgreSQL Failback without rebuild

2014-02-06 Thread Michael Paquier
On Fri, Feb 7, 2014 at 1:57 PM, James Sewell james.sew...@lisasoft.comwrote: I've just noticed that on PostgreSQL 9.3 I can do the following with a master node A and a slave node B (as long as I have set recovery_target_timeline = 'latest'): 1. Stop Node A 2. Promote Node B 3.

Re: [HACKERS] PostgreSQL Failback without rebuild

2014-02-06 Thread Michael Paquier
On Fri, Feb 7, 2014 at 3:02 PM, James Sewell james.sew...@lisasoft.comwrote: Node A could get ahead even if it has been shut down cleanly BEFORE the promotion? I'd always assumed if I shut down the master the slave would be at the same point after shutdown - is this incorrect? Yes and no. A

Re: [HACKERS] should we add a XLogRecPtr/LSN SQL type?

2014-02-14 Thread Michael Paquier
On Thu, Feb 6, 2014 at 11:26 AM, Michael Paquier michael.paqu...@gmail.com wrote: Here are updated patches to use pg_lsn instead of pglsn... Should I register this patch somewhere to avoid having it lost in the void? Regards, -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers

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

2014-02-17 Thread Michael Paquier
On Mon, Feb 17, 2014 at 6:28 PM, Andres Freund and...@2ndquadrant.com wrote: I don't think this really has gone above Needs Review yet. I am not sure that this remark makes the review of this patch much progressing :( By the way, I spent some time looking at it and here are some comments: -

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

2014-02-17 Thread Michael Paquier
On Tue, Feb 18, 2014 at 7:22 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-02-17 23:07:45 +0900, Michael Paquier wrote: On Mon, Feb 17, 2014 at 6:28 PM, Andres Freund and...@2ndquadrant.com wrote: I don't think this really has gone above Needs Review yet. I am not sure

Re: [HACKERS] Description for pg_replslot in docs

2014-02-17 Thread Michael Paquier
On Tue, Feb 18, 2014 at 12:43 PM, Amit Kapila amit.kapil...@gmail.com wrote: Description for contents of PGDATA is mentioned at following page in docs: http://www.postgresql.org/docs/devel/static/storage-file-layout.html Isn't it better to have description of pg_replslot in the same place?

Re: [HACKERS] [bug fix] pg_ctl stop times out when it should respond quickly

2014-02-17 Thread Michael Paquier
On Tue, Feb 18, 2014 at 1:29 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: MauMau escribió: The pg_regress part is ugly. However, pg_regress is doing something unusual when starting postmaster itself, so the ugly coding to stop it seems to match. If we wanted to avoid the ugliness here,

Re: [HACKERS] Turning recovery.conf into GUCs

2014-02-18 Thread Michael Paquier
This patch is in Waiting for Author for a couple of weeks and has received a review at least from Andres during this commit fest. As the situation is not much progressing, I am going to mark it as Returned with feedback. If there are any problems with that please let me know. Thanks, -- Michael

Re: [HACKERS] should we add a XLogRecPtr/LSN SQL type?

2014-02-19 Thread Michael Paquier
On Thu, Feb 20, 2014 at 2:47 AM, Robert Haas robertmh...@gmail.com wrote: On Wed, Feb 5, 2014 at 9:26 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Feb 6, 2014 at 3:48 AM, Peter Eisentraut pete...@gmx.net wrote: On 2/5/14, 1:31 PM, Robert Haas wrote: On Tue, Feb 4, 2014 at 3:26

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

2014-02-19 Thread Michael Paquier
On Thu, Feb 20, 2014 at 1:01 AM, David Fetter da...@fetter.org wrote: On Tue, Feb 18, 2014 at 04:39:27PM -0300, Alvaro Herrera wrote: Heikki Linnakangas wrote: Add a GUC to report whether data page checksums are enabled. Is there are reason this wasn't back-patched to 9.3? I think it should

Re: [HACKERS] should we add a XLogRecPtr/LSN SQL type?

2014-02-19 Thread Michael Paquier
On Thu, Feb 20, 2014 at 9:43 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Feb 20, 2014 at 2:47 AM, Robert Haas robertmh...@gmail.com wrote: On Wed, Feb 5, 2014 at 9:26 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Feb 6, 2014 at 3:48 AM, Peter Eisentraut pete

Re: [HACKERS] should we add a XLogRecPtr/LSN SQL type?

2014-02-19 Thread Michael Paquier
On Thu, Feb 20, 2014 at 8:55 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-02-19 12:47:40 -0500, Robert Haas wrote: On Wed, Feb 5, 2014 at 9:26 PM, Michael Paquier michael.paqu...@gmail.com wrote: Yes, that's a good precedent in multiple ways. Here are updated patches to use

[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 =

[HACKERS] Dump pageinspect to 1.2: page_header with pg_lsn datatype

2014-02-22 Thread Michael Paquier
Hi all, Please find attached a patch to dump pageinspect to 1.2. This simply changes page_header to use the new internal datatype pg_lsn instead of text. Regards, -- Michael diff --git a/contrib/pageinspect/Makefile b/contrib/pageinspect/Makefile index 0e267eb..ee78cb2 100644 ---

Re: [HACKERS] Dump pageinspect to 1.2: page_header with pg_lsn datatype

2014-02-24 Thread Michael Paquier
On Sun, Feb 23, 2014 at 6:09 AM, Alvaro Herrera alvhe...@2ndquadrant.comwrote: Michael Paquier escribió: Hi all, Please find attached a patch to dump pageinspect to 1.2. This simply changes page_header to use the new internal datatype pg_lsn instead of text. Uhm. Does this crash

Re: [HACKERS] should we add a XLogRecPtr/LSN SQL type?

2014-02-24 Thread Michael Paquier
On Tue, Feb 25, 2014 at 12:41 AM, Robert Haas robertmh...@gmail.com wrote: On Wed, Feb 19, 2014 at 8:27 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Feb 20, 2014 at 8:55 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-02-19 12:47:40 -0500, Robert Haas wrote

Re: [HACKERS] Dump pageinspect to 1.2: page_header with pg_lsn datatype

2014-02-24 Thread Michael Paquier
On Mon, Feb 24, 2014 at 11:34 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Andres Freund escribió: On 2014-02-24 17:53:31 +0900, Michael Paquier wrote: On Sun, Feb 23, 2014 at 6:09 AM, Alvaro Herrera alvhe...@2ndquadrant.comwrote: Michael Paquier escribió: Hi all

Re: [HACKERS] Dump pageinspect to 1.2: page_header with pg_lsn datatype

2014-02-24 Thread Michael Paquier
On Tue, Feb 25, 2014 at 10:02 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: While we're messing with this, I wonder if there's any way to have infomask and infomask2 displayed in hex format rather than plain int without having to specify that in every query. I'm not well known for being

Re: [HACKERS] Dump pageinspect to 1.2: page_header with pg_lsn datatype

2014-02-27 Thread Michael Paquier
On Wed, Feb 26, 2014 at 5:45 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Robert Haas escribió: On Mon, Feb 24, 2014 at 9:34 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Yeah, erroring out seems good enough. Particularly if you add a hint saying please upgrade the extension.

[HACKERS] Defining macro LSNOID for pg_lsn in pg_type.h

2014-02-27 Thread Michael Paquier
Hi all, When working on the datatype pg_lsn, we actually did not create a define macro for its oid in pg_type.h and this could be useful for extension developers. The simple patch attached corrects that by naming this macro LSNOID. Regards, -- Michael diff --git a/src/include/catalog/pg_type.h

Re: [HACKERS] Request improve pg_stat_statements module

2014-02-28 Thread Michael Paquier
Thanks for your patch! On Fri, Feb 28, 2014 at 4:18 PM, pgsql...@postgresql.kr wrote: I patched to add one column in pg_stat_statements module. and sent to author but I need a last time of query, because I want to analyse order by recent time. Hm... I am not sure that this brings much to

Re: [HACKERS] commit fest status and release timeline

2014-03-01 Thread Michael Paquier
On Sun, Mar 2, 2014 at 7:43 AM, Vik Fearing vik.fear...@dalibo.com wrote: On 03/01/2014 07:50 PM, Josh Berkus wrote: On 03/01/2014 09:01 AM, Peter Eisentraut wrote: Status Summary. Needs Review: 36, Waiting on Author: 7, Ready for Committer: 16, Committed: 43, Returned with Feedback: 8,

Re: [HACKERS] Review: Patch FORCE_NULL option for copy COPY in CSV mode

2014-03-03 Thread Michael Paquier
On Mon, Mar 3, 2014 at 1:13 PM, Andrew Dunstan and...@dunslane.net wrote: That difference actually made the file_fdw regression results plain wrong, in my view, in that they expected a quoted empty string to be turned to null even when the null string was something else. I've adjusted this

Re: [HACKERS] Defining macro LSNOID for pg_lsn in pg_type.h

2014-03-03 Thread Michael Paquier
On Mon, Mar 3, 2014 at 9:06 PM, Robert Haas robertmh...@gmail.com wrote: On Thu, Feb 27, 2014 at 8:12 AM, Michael Paquier michael.paqu...@gmail.com wrote: When working on the datatype pg_lsn, we actually did not create a define macro for its oid in pg_type.h and this could be useful

Re: [HACKERS] Review: Patch FORCE_NULL option for copy COPY in CSV mode

2014-03-05 Thread Michael Paquier
On Wed, Mar 5, 2014 at 7:44 AM, Andrew Dunstan and...@dunslane.net wrote: I have picked this up and committed the patch. Thanks to all. Sorry for coming after the battle, but while looking at what has been committed I noticed that copy2.sql is actually doing twice in a row the same test: COPY

Re: [HACKERS] Review: Patch FORCE_NULL option for copy COPY in CSV mode

2014-03-05 Thread Michael Paquier
After testing this feature, I noticed that FORCE_NULL and FORCE_NOT_NULL can both be specified with COPY on the same column. This does not seem correct. The attached patch adds some more error handling, and a regression test case for that. Regards, -- Michael diff --git

Re: [HACKERS] Review: Patch FORCE_NULL option for copy COPY in CSV mode

2014-03-05 Thread Michael Paquier
On Wed, Mar 5, 2014 at 11:37 PM, Ian Lawrence Barwick barw...@gmail.com wrote: 2014-03-05 23:27 GMT+09:00 Andrew Dunstan and...@dunslane.net: On 03/05/2014 09:11 AM, Michael Paquier wrote: After testing this feature, I noticed that FORCE_NULL and FORCE_NOT_NULL can both be specified

Re: [HACKERS] Review: Patch FORCE_NULL option for copy COPY in CSV mode

2014-03-05 Thread Michael Paquier
On Wed, Mar 5, 2014 at 11:58 PM, Michael Paquier michael.paqu...@gmail.com wrote: So if we specify both this produces the exact opposite of the default, default being an empty string inserted for a quoted empty string and NULL inserted for a non-quoted empty string. So yes I'm fine with a note

[HACKERS] syslog_ident mentioned as syslog_identify in the docs

2014-03-06 Thread Michael Paquier
Hi all, In the documentation, particularly the doc index, syslog_ident is incorrectly mentioned as syslog_identify. The attached patch fixes that. This error is in the docs since 8.0. Regards, -- Michael *** a/doc/src/sgml/config.sgml --- b/doc/src/sgml/config.sgml *** *** 3743,3749

Re: [HACKERS] Review: Patch FORCE_NULL option for copy COPY in CSV mode

2014-03-07 Thread Michael Paquier
On Thu, Mar 6, 2014 at 12:09 AM, Tom Lane t...@sss.pgh.pa.us wrote: Andrew Dunstan and...@dunslane.net writes: On 03/05/2014 09:11 AM, Michael Paquier wrote: After testing this feature, I noticed that FORCE_NULL and FORCE_NOT_NULL can both be specified with COPY on the same column. Strictly

Re: [HACKERS] calculating an aspect of shared buffer state from a background worker

2014-03-10 Thread Michael Paquier
On Mon, Mar 10, 2014 at 2:09 PM, Robert Berry berrydigi...@gmail.com wrote: Is there a way to get access to the StrategyControl pointer in the context of a background worker? StrategyControl is inherent to freelist.c and has no external declaration so you could not have it even if you the

[HACKERS] Standby node using replication slot not visible in pg_stat_replication while catching up

2014-03-10 Thread Michael Paquier
Hi all, I have been playing a bit with the replication slots, and I noticed a weird behavior in such a scenario: 1) Create a master/slave cluster, and have slave use a replication slot 2) Stop the master 3) Create a certain amount of WAL, during my tests I played with 4~5GB of WAL 4) Restart the

Re: [HACKERS] Standby node using replication slot not visible in pg_stat_replication while catching up

2014-03-10 Thread Michael Paquier
On Mon, Mar 10, 2014 at 9:24 PM, Andres Freund and...@2ndquadrant.com wrote: Hi, On 2014-03-10 21:06:53 +0900, Michael Paquier wrote: I have been playing a bit with the replication slots, and I noticed a weird behavior in such a scenario: 1) Create a master/slave cluster, and have slave use

Re: [HACKERS] Replication slots and footguns

2014-03-12 Thread Michael Paquier
On Thu, Mar 13, 2014 at 5:45 AM, Thom Brown t...@linux.com wrote: On 12 March 2014 19:00, Josh Berkus j...@agliodbs.com wrote: All: I was just reading Michael's explanation of replication slots (http://michael.otacoo.com/postgresql-2/postgres-9-4-feature-highlight-replication-slots/) and

Re: [HACKERS] Rowtype column and domain subfield with DEFAULT and NOT NULL constraint

2014-03-12 Thread Michael Paquier
On Wed, Mar 12, 2014 at 11:16 PM, Tom Lane t...@sss.pgh.pa.us wrote: Julien Tachoires julien.tachoi...@dalibo.com writes: A customer has reported us a strange behaviour regarding a rowtype column with a domain subfield: Rowtypes in general do not support defaults for component fields. And

[HACKERS] Fix typo in nbtree.h introduced by efada2b

2014-03-16 Thread Michael Paquier
Hi, I found a small typo in nbtree.h, introduced by commit efada2b. Patch is attached. Regards, -- Michael diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h index 7b26f98..779a422 100644 --- a/src/include/access/nbtree.h +++ b/src/include/access/nbtree.h @@ -395,7 +395,7 @@

Re: [HACKERS] Is this a bug?

2014-03-17 Thread Michael Paquier
On Tue, Mar 18, 2014 at 10:24 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Thu, Mar 13, 2014 at 10:22 AM, Robert Haas robertmh...@gmail.com wrote: Well, it's fairly harmless, but it might not be a bad idea to tighten that up. The attached patch tighten that up. Hm... It might

Re: [HACKERS] [RFC] What should we do for reliable WAL archiving?

2014-03-21 Thread Michael Paquier
On Fri, Mar 21, 2014 at 8:54 PM, MauMau maumau...@gmail.com wrote: * Create pg_copy in C so that it can be used on Windows as well as on UNIX/Linux. It just copies one file. Its source code is located in src/bin/pg_copy/. Please recommend a better name if you have one in mind. I'd rather see

Re: [HACKERS] Patch for CREATE RULE sgml -- Was in: [DOCS]

2014-03-21 Thread Michael Paquier
On Sat, Mar 22, 2014 at 12:56 AM, Emanuel Calvo emanuel.ca...@2ndquadrant.com wrote: I realized that the output of the CREATE RULE has not a detailed output for the events parameter. But the question here is that I'm not sure which format follow: { INSERT | UPDATE | DELETE | SELECT} or

Re: [HACKERS] Patch for CREATE RULE sgml -- Was in: [DOCS]

2014-03-22 Thread Michael Paquier
On Sat, Mar 22, 2014 at 11:18 AM, Jaime Casanova ja...@2ndquadrant.com wrote: On Fri, Mar 21, 2014 at 8:15 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Sat, Mar 22, 2014 at 12:56 AM, Emanuel Calvo emanuel.ca...@2ndquadrant.com wrote: I realized that the output of the CREATE RULE

Re: [HACKERS] Dynamic background workers docs question

2014-03-24 Thread Michael Paquier
On Mon, Mar 24, 2014 at 5:54 PM, Magnus Hagander mag...@hagander.net wrote: I was looking at http://www.postgresql.org/docs/devel/static/bgworker.html with a client today. It says: Unlike RegisterBackgroundWorker, which can only be called from within the

Re: [HACKERS] About adding an attribute to pg_attibute

2014-03-24 Thread Michael Paquier
On Tue, Mar 25, 2014 at 2:44 AM, Tanmay Deshpande tp.deshpand...@gmail.com wrote: We are trying add columnar support to postgreSQL and for that we need identify each column in each relation by an oid. So my doubt is how do we add an attribute/ a column to catalog pg_attribute ? You can identify

Re: [HACKERS] Dynamic background workers docs question

2014-03-24 Thread Michael Paquier
On Mon, Mar 24, 2014 at 11:03 PM, Magnus Hagander mag...@hagander.net wrote: That's what I thought. Can a dynamic background worker start *another* dynamic background worker, or can they only be started from first level background workers? I have never really tried by myself, but I don't see

[HACKERS] New parameter RollbackError to control rollback behavior on error

2014-03-26 Thread Michael Paquier
Hi all, The behavior of rollback when an error occurs on an handle is controlled by extending Protocol with $PROTNUM-[0|1|2] where: - 0 = let the application handle rollbacks - 1 = rollback whole transaction when an error occurs - 2 = rollback only statement that failed Using such an extension is

Re: [HACKERS] New parameter RollbackError to control rollback behavior on error

2014-03-26 Thread Michael Paquier
On Wed, Mar 26, 2014 at 3:39 PM, Michael Paquier michael.paqu...@gmail.com wrote: Hi all, The behavior of rollback when an error occurs on an handle is controlled by extending Protocol with $PROTNUM-[0|1|2]... My apologies. This message was sent to the wrong mailing list and was dedicated

Re: [HACKERS] Doing better at HINTing an appropriate column within errorMissingColumn()

2014-03-28 Thread Michael Paquier
On Fri, Mar 28, 2014 at 4:10 AM, Peter Geoghegan p...@heroku.com wrote: With the addition of LATERAL subqueries, Tom fixed up the mechanism for keeping track of which relations are visible for column references while the FROM clause is being scanned. That allowed errorMissingColumn() to give a

Re: [HACKERS] GSoC project suggestion: PIVOT ?

2014-03-30 Thread Michael Paquier
On Mon, Mar 31, 2014 at 1:36 PM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: It's a nice idea, but the deadline to students send a proposal was 21th April. 21st of March. All the details are here: http://www.postgresql.org/developer/summerofcode/ -- Michael -- Sent via

Re: [HACKERS] New parameter RollbackError to control rollback behavior on error

2014-03-31 Thread Michael Paquier
On Wed, Mar 26, 2014 at 5:53 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: * I'm not too fond of the RollbackError name. It sounds like an error while rolling back. I googled around and found out that DataDirect's proprietary driver has the same option, and they call it

Re: [HACKERS] New parameter RollbackError to control rollback behavior on error

2014-03-31 Thread Michael Paquier
On Mon, Mar 31, 2014 at 9:40 PM, Michael Paquier michael.paqu...@gmail.com wrote: OK, I have been working more on that, giving the attached patch... Sorry, wrong mailing list... My apologies. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes

Re: [HACKERS] Patch to add support of IF NOT EXISTS to others CREATE statements

2014-03-31 Thread Michael Paquier
On Tue, Apr 1, 2014 at 7:28 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: Think about the statements below: CREATE ROLE test NOLOGIN; CREATE OR REPLACE ROLE test; If we execute the statements above the result should be the role 'test' can login. Correct? Except if I am missing

Re: [HACKERS] PQputCopyData dont signal error

2014-03-31 Thread Michael Paquier
On Tue, Apr 1, 2014 at 1:33 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: steve k wrote: I am examining other ways to do mass inserts/writes that allow for notification if some of the data contained within for some reason fails to copy/insert so that the cause of the bad data can be

Re: [HACKERS] Patch to add support of IF NOT EXISTS to others CREATE statements

2014-03-31 Thread Michael Paquier
On Tue, Apr 1, 2014 at 1:34 PM, Stephen Frost sfr...@snowman.net wrote: * Michael Paquier (michael.paqu...@gmail.com) wrote: On Tue, Apr 1, 2014 at 7:28 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: Think about the statements below: CREATE ROLE test NOLOGIN; CREATE

[HACKERS] Including replication slot data in base backups

2014-04-01 Thread Michael Paquier
Hi all, As of now, pg_basebackup creates an empty repository for pg_replslot/ in a base backup, forcing the user to recreate slots on other nodes of the cluster with pg_create_*_replication_slot, or copy pg_replslot from another node. This is not really user-friendly especially after a failover

Re: [HACKERS] Including replication slot data in base backups

2014-04-01 Thread Michael Paquier
On Tue, Apr 1, 2014 at 11:59 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-04-01 16:45:46 +0200, Magnus Hagander wrote: On Tue, Apr 1, 2014 at 2:24 PM, Michael Paquier michael.paqu...@gmail.comwrote: As of now, pg_basebackup creates an empty repository for pg_replslot/ in a base

Re: [HACKERS] Including replication slot data in base backups

2014-04-02 Thread Michael Paquier
On Wed, Apr 2, 2014 at 6:58 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-04-02 09:59:28 +0900, Michael Paquier wrote: On Tue, Apr 1, 2014 at 11:59 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-04-01 16:45:46 +0200, Magnus Hagander wrote: On Tue, Apr 1, 2014 at 2:24 PM

Re: [HACKERS] Including replication slot data in base backups

2014-04-04 Thread Michael Paquier
On Wed, Apr 2, 2014 at 10:27 PM, Andres Freund and...@2ndquadrant.com wrote: The new master won't necessarily have all the neccessary WAL available, no? No, they won't have it, and things begin to get bad once a base backup includes a slot that has a non-null value of restart_lsn. I imagine that

Re: [HACKERS] Including replication slot data in base backups

2014-04-04 Thread Michael Paquier
On Fri, Apr 4, 2014 at 9:44 PM, Andres Freund and...@2ndquadrant.com wrote: I imagine that if we want to guarantee the correctness of a replication slot we would need to fetch from archives the necessary WAL files needed for it when a node is in recovery, which is not something that this patch

Re: [HACKERS] Including replication slot data in base backups

2014-04-07 Thread Michael Paquier
On Fri, Apr 4, 2014 at 9:57 PM, Michael Paquier michael.paqu...@gmail.com wrote: For 9.4, clearly yes, this would change the semantic of recovery and this is not something wise to do at the end of a development cycle. For 9.5 though, this is a different story. It clearly depends

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

2014-04-07 Thread Michael Paquier
On Tue, Apr 8, 2014 at 5:24 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-04-05 11:46:16 -0400, Tom Lane wrote: ISTM this is because the proposed feature is wrongheaded. The basic concept of CREATE TABLE LIKE is that you're copying properties from another object of the same type.

[HACKERS] Default gin operator class of jsonb failing with index row size maximum reached

2014-04-07 Thread Michael Paquier
Hi all, While doing some tests with jsonb, I found a failure as told in $subject: =# create table data_jsonb (data jsonb); CREATE TABLE =# insert into data_jsonb ... tuple in the script attached INSERT 1 =# create index data_index on data_jsonb using gin(data); ERROR: 54000: index row size 1808

Re: [HACKERS] WAL replay bugs

2014-04-07 Thread Michael Paquier
On Tue, Apr 8, 2014 at 3:16 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: I've been playing with a little hack that records a before and after image of every page modification that is WAL-logged, and writes the images to a file along with the LSN of the corresponding WAL record. I set

Re: [HACKERS] Including replication slot data in base backups

2014-04-08 Thread Michael Paquier
On Tue, Apr 8, 2014 at 1:18 AM, Robert Haas robertmh...@gmail.com wrote: Not sure if this is exactly the right way to do it, but I agree that something along those lines is a good idea. I also think, maybe even importantly, that we should probably document that people using file-copy based

Re: [HACKERS] Default gin operator class of jsonb failing with index row size maximum reached

2014-04-08 Thread Michael Paquier
On Wed, Apr 9, 2014 at 6:48 AM, Tom Lane t...@sss.pgh.pa.us wrote: Oleg Bartunov obartu...@gmail.com writes: We are working to avoid this limitation. What do you mean by that ... do you see it as something that could be fixed quickly, or is this a long-term improvement project? If this is a

Re: [HACKERS] [feature] cached index to speed up specific queries on extremely large data sets

2014-04-11 Thread Michael Paquier
On Fri, Apr 11, 2014 at 9:53 PM, lkcl . luke.leigh...@gmail.com wrote: On Fri, Apr 11, 2014 at 1:26 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 04/11/2014 03:20 PM, lkcl . wrote: so i had an idea. there already exists the concept of indexes. there already exists the concept of

Re: [HACKERS] Including replication slot data in base backups

2014-04-13 Thread Michael Paquier
On Thu, Apr 10, 2014 at 12:36 AM, Robert Haas robertmh...@gmail.com wrote: On Tue, Apr 8, 2014 at 3:08 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Tue, Apr 8, 2014 at 1:18 AM, Robert Haas robertmh...@gmail.com wrote: Not sure if this is exactly the right way to do it, but I agree

Re: [HACKERS] Patch: add psql tab completion for event triggers

2014-04-14 Thread Michael Paquier
On Mon, Apr 14, 2014 at 9:46 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Apr 9, 2014 at 8:58 PM, Ian Barwick i...@2ndquadrant.com wrote: Apologies again, that was ill-thought out. Revised patch attached with only the additions related to event triggers, and the small fix for ALTER

Re: [HACKERS] Including replication slot data in base backups

2014-04-14 Thread Michael Paquier
On Tue, Apr 15, 2014 at 1:55 AM, Robert Haas robertmh...@gmail.com wrote: On Mon, Apr 14, 2014 at 9:26 AM, Fujii Masao masao.fu...@gmail.com wrote: This makes me think that it's safer to just remove replication slot files at the beginning of the recovery when both backup_label and recovery.conf

Re: [HACKERS] JSONB in-place updates?

2014-04-14 Thread Michael Paquier
On Tue, Apr 15, 2014 at 5:16 AM, Josh Berkus j...@agliodbs.com wrote: On 04/14/2014 09:27 AM, kelas wrote: Are there any plans to add in-place at-depth update operator for JSONB type, e.g.: UPDATE test SET attrs-'anwser' = 42 where attrs-'answer' = 41 Plans, yes. But not until 9.5, or

Re: [HACKERS] [doc] EXPLAIN CREATE MATERIALIZED VIEW AS?

2014-04-15 Thread Michael Paquier
On Wed, Apr 16, 2014 at 12:35 PM, Amit Langote amitlangot...@gmail.com wrote: Hi, Attached adds CREATE MATERIALIZED VIEW AS to the list of statements that can be EXPLAINed. Now that you mention that, REFRESH MATERIALIZED VIEW can be EXPLAIN'ed as well, except that it returns that and does not

Re: [HACKERS] Patch: iff - if

2014-04-16 Thread Michael Paquier
On Wed, Apr 16, 2014 at 6:12 PM, Andreas 'ads' Scherbaum adsm...@wars-nicht.de wrote: On 04/16/2014 12:19 AM, Andreas 'ads' Scherbaum wrote: stumbled over a number of iff in the source where if is meant - not sure what the real story behind this is, but attached is a patch to fix the about

Re: [HACKERS] Verbose output of pg_dump not show schema name

2014-04-16 Thread Michael Paquier
On Thu, Apr 17, 2014 at 11:41 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: Hi all, There are some reason to verbose output of pg_dump don't show schema name? A output example of using pg_dump -Fd -j8 -v Specifying a target directory with -f is better here... This database have

Re: [HACKERS] New functions for sslinfo extension

2014-04-16 Thread Michael Paquier
Hi, On Thu, Apr 17, 2014 at 3:30 AM, Воронин Дмитрий carriingfat...@yandex.ru wrote: I want to present some functions to sslinfo extension module: 1) ssl_get_count_of_extensions() --- get count of X509v3 extensions from client certificate; 2) ssl_get_extension_names() --- get short names of

Re: [HACKERS] Verbose output of pg_dump not show schema name

2014-04-17 Thread Michael Paquier
On Fri, Apr 18, 2014 at 4:29 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Thu, Apr 17, 2014 at 12:46 PM, Bruce Momjian br...@momjian.us wrote: On Thu, Apr 17, 2014 at 11:44:37AM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: The idea is that we only need

[HACKERS] Removing dependency to wsock32.lib when compiling code on WIndows

2014-04-20 Thread Michael Paquier
? Regards, -- Michael commit 805e63f0c06c55c7133e9b42a2b57597d1f45494 Author: Michael Paquier mich...@otacoo.com Date: Mon Apr 21 12:48:30 2014 +0900 Replace wsock32.lib by ws2_32.lib in mkvc spec for Windows build wsock32.lib is the Windows socket library, an older and obsolete version

Re: [HACKERS] New functions in sslinfo module

2014-04-20 Thread Michael Paquier
On Mon, Apr 21, 2014 at 1:48 PM, Воронин Дмитрий carriingfat...@yandex.ru wrote: Hello, I make an a patch, which adds 4 functions to sslinfo extension module: 1) ssl_get_count_of_extensions() --- get count of X509v3 extensions from client certificate; 2) ssl_get_extension_names() --- get

Re: [HACKERS] New functions in sslinfo module

2014-04-21 Thread Michael Paquier
On Mon, Apr 21, 2014 at 2:51 PM, Воронин Дмитрий carriingfat...@yandex.ruwrote: I put patch generated on git diffs to this letter. I make an a thread in postgresql commit fest: https://commitfest.postgresql.org/action/patch_view?id=1438 Thanks! -- Michael

Re: [HACKERS] Removing dependency to wsock32.lib when compiling code on WIndows

2014-04-21 Thread Michael Paquier
On Mon, Apr 21, 2014 at 12:54 PM, Michael Paquier michael.paqu...@gmail.com wrote: When doing some work on Windows, I noticed that the mkvc specs in src/tools/msvc use wsock32.lib, which is as far as I understand an old, obsolete version of the Windows socket library. Wouldn't it make sense

Re: [HACKERS] Perfomance degradation 9.3 (vs 9.2) for FreeBSD

2014-04-22 Thread Michael Paquier
On Tue, Apr 22, 2014 at 9:58 AM, Tatsuo Ishii is...@postgresql.org wrote: * Tatsuo Ishii (is...@postgresql.org) wrote: I observe performance degradation with PostgreSQL 9.3 vs 9.2 on Linux as well. The hardware is HP DL980G7, 80 cores, 2TB mem, RHEL 6, pgbench is used (read only query),

Re: [HACKERS] Review: Patch FORCE_NULL option for copy COPY in CSV mode

2014-04-22 Thread Michael Paquier
On Wed, Apr 23, 2014 at 5:07 AM, Bruce Momjian br...@momjian.us wrote: On Fri, Mar 7, 2014 at 05:08:54PM +0900, Michael Paquier wrote: On Thu, Mar 6, 2014 at 12:09 AM, Tom Lane t...@sss.pgh.pa.us wrote: Andrew Dunstan and...@dunslane.net writes: On 03/05/2014 09:11 AM, Michael Paquier

Re: [HACKERS] Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)

2014-04-23 Thread Michael Paquier
On Wed, Apr 23, 2014 at 7:56 PM, Bruce Momjian br...@momjian.us wrote: On Wed, Apr 23, 2014 at 10:20:42AM +0200, Petr Jelinek wrote: I vote for changing it, even though neither option is ideal I think that given the nature of datatype the current default will break inserts for common usage

[HACKERS] Compilation of pg_recvlogical on Windows

2014-04-24 Thread Michael Paquier
Hi all, I noticed that pg_recvlogical is not currently compiled on Windows when using the msvc scripts. The patch attached corrects that. Regards, -- Michael commit b552fbe5bc5ef705ee5a320f1afae66b40dcaedd Author: Michael Paquier mich...@otacoo.com Date: Thu Apr 24 15:46:26 2014 +0900

Re: [HACKERS] 9.4 Proposal: Initdb creates a single table

2014-04-24 Thread Michael Paquier
On Thu, Apr 24, 2014 at 3:59 PM, Simon Riggs si...@2ndquadrant.com wrote: On 24 April 2014 05:32, David Fetter da...@fetter.org wrote: Since contrib/pgcrypto is a module that might well not be installed, people can't just build software for PostgreSQL and have UUIDs available, certainly not in

Re: [HACKERS] Problem with displaying wide tables in psql

2014-04-28 Thread Michael Paquier
On Tue, Apr 29, 2014 at 12:37 PM, Sergey Muraviov sergey.k.murav...@gmail.com wrote: 2014-04-29 5:52 GMT+04:00 Peter Eisentraut pete...@gmx.net: Please fix this compiler warning. I think it came from this patch. print.c: In function 'print_aligned_vertical': print.c:1354:10: error: pointer

Re: [HACKERS] pg_dump --pretty-print-views

2014-04-29 Thread Michael Paquier
On Wed, Apr 30, 2014 at 6:33 AM, Stephen Frost sfr...@snowman.net wrote: * Tom Lane (t...@sss.pgh.pa.us) wrote: Here's a draft patch tackling point 1. This gets rid of a whole lot of parenthesization, as well as indentation, for simple UNION lists. You can see the results in the changed

Re: [HACKERS] hooks not working in postgresql 9.3 (building from source)

2014-04-30 Thread Michael Paquier
On Thu, May 1, 2014 at 12:33 AM, Rajmohan C csrajmo...@gmail.com wrote: I need to use the hook feature of planner in postgresql 9.3 to perform a task. I am building postgresql from source. This hook is called planner_hook_type and is present in planner.c. To start with, I wanted to know how

Re: [HACKERS] is there a hook by which we can modify input query before postgresql builds raw parse tree

2014-05-01 Thread Michael Paquier
On Fri, May 2, 2014 at 1:37 PM, Rajmohan C csrajmo...@gmail.com wrote: Hi, I want to know is there a way to use a hook to modify the input query before Postgresql parses and builds the parse tree for the query. Not that I know of. I am not sure that enforcing query rewrite on the server

Re: [HACKERS] is there a hook by which we can modify input query before postgresql builds raw parse tree

2014-05-01 Thread Michael Paquier
On Fri, May 2, 2014 at 2:06 PM, Michael Paquier michael.paqu...@gmail.com wrote: Not that I know of. I am not sure that enforcing query rewrite on the server side is a good idea at this may trap your applications and have them face unexpected behaviors. Note as well that there is a hook *before

Re: [HACKERS] Sending out a request for more buildfarm animals?

2014-05-05 Thread Michael Paquier
On Mon, May 5, 2014 at 3:40 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 05/04/2014 11:13 PM, Magnus Hagander wrote: On Sun, May 4, 2014 at 9:35 PM, Josh Berkus j...@agliodbs.com wrote: Architecture wise there's no coverage for: * some ARM architecture varians I could run a

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-06 Thread Michael Paquier
is over is another story... I wouldn't mind adding it to the next commit fest either. Regards, -- Michael commit 604177ac2af4bfd26a392b8669dd2fc3550f2a3d Author: Michael Paquier mich...@otacoo.com Date: Tue May 6 22:42:09 2014 +0900 Support for hash and btree operators for pg_lsn datatype

<    1   2   3   4   5   6   7   8   9   10   >