Re: [HACKERS] Compression of full-page-writes

2015-01-08 Thread Michael Paquier
On Thu, Jan 8, 2015 at 11:59 PM, Rahila Syed wrote: > Below are performance numbers in case of synchronous replication with and > without fpw compression using latest version of patch(version 14). The patch > helps improve performance considerably. > Both master and standby are on the same machine

Re: [HACKERS] List of table names of a DB

2015-01-08 Thread Lukas Fittl
On Fri, Jan 9, 2015 at 7:14 AM, Deepak S wrote: > Sorry, it's not about querying. I am implementing an invalidation > mechanism for Postgres Query Cache as part of my masters project. In order > to this, I need to store details(like name) of each table the query uses. > In essence, I need to stor

Re: [HACKERS] pg_rewind in contrib

2015-01-08 Thread Michael Paquier
On Fri, Jan 9, 2015 at 1:02 AM, Heikki Linnakangas wrote: > Fixed all the errors I got on MSVC. The biggest change was rewriting the > code that determines if a file is a relation file, based on its filename. It > used a regular expression, which I replaced with a bunch of sscanf calls, > and a cr

Re: [HACKERS] List of table names of a DB

2015-01-08 Thread Mark Kirkwood
Actually, code has moved to: https://github.com/snaga/pqc On 09/01/15 19:53, Mark Kirkwood wrote: Also see: https://code.google.com/p/pqc/ A project to implement a query cache using pgpool code, probably lots of good ideas there. Cheers Mark On 09/01/15 19:38, Tatsuo Ishii wrote: Hi, pgp

Re: [HACKERS] List of table names of a DB

2015-01-08 Thread Mark Kirkwood
Also see: https://code.google.com/p/pqc/ A project to implement a query cache using pgpool code, probably lots of good ideas there. Cheers Mark On 09/01/15 19:38, Tatsuo Ishii wrote: Hi, pgpool-II (pgpool.net) does exactly the same thing. It receive SELECT query from clients, 1) parse it

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2015-01-08 Thread Ashutosh Bapat
On Thu, Jan 8, 2015 at 8:24 PM, Robert Haas wrote: > On Wed, Jan 7, 2015 at 11:20 AM, Kevin Grittner wrote: > > If we are going to include a distributed transaction manager with > > PostgreSQL, it *must* persist enough information about the > > transaction ID and where it is used in a way that w

Re: [HACKERS] List of table names of a DB

2015-01-08 Thread Tatsuo Ishii
Hi, pgpool-II (pgpool.net) does exactly the same thing. It receive SELECT query from clients, 1) parse it to find table names, and 2) gets the oids (unique identifier in the PostgreSQL system catalog) to recognize them. when the SELECT succeeds , it store the query result (cache) on either shared

Re: [HACKERS] orangutan seizes up during isolation-check

2015-01-08 Thread Noah Misch
On Wed, Dec 31, 2014 at 01:52:49PM -0500, Noah Misch wrote: > On Sun, Dec 28, 2014 at 07:20:04PM -0500, Andrew Dunstan wrote: > > On 12/28/2014 04:58 PM, Noah Misch wrote: > > >The gettext maintainer was open to implementing the > > >setlocale_native_forked() > > >technique in gettext, though the

[HACKERS] [PATCH] server_version_num should be GUC_REPORT

2015-01-08 Thread Craig Ringer
Hi all While looking into client code that relies on parsing server_version instead of checking server_version_num, I was surprised to discover that server_version_num isn't sent to the client by the server as part of the standard set of parameters reported post-auth. The docs reflect this: http

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2015-01-08 Thread Ashutosh Bapat
On Thu, Jan 8, 2015 at 7:02 PM, Kevin Grittner wrote: > Ashutosh Bapat wrote: > > On Wed, Jan 7, 2015 at 9:50 PM, Kevin Grittner > wrote: > > >> Also, as previously mentioned, it must behave in some reasonable > >> way if a database is not configured to support 2PC, especially > >> since 2PC is

Re: [HACKERS] List of table names of a DB

2015-01-08 Thread Deepak S
Sorry, it's not about querying. I am implementing an invalidation mechanism for Postgres Query Cache as part of my masters project. In order to this, I need to store details(like name) of each table the query uses. In essence, I need to store the table names of the cached queries. Initially, I

[HACKERS] Comment typo in src/backend/executor/execMain.c

2015-01-08 Thread Etsuro Fujita
Hi, I ran into a comment type. Please find attached a patch. Best regards, Etsuro Fujita diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index 8c799d3..28abfa4 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -2024,7 +2024,7 @@

Re: [HACKERS] POLA violation with \c service=

2015-01-08 Thread David Fetter
On Mon, Jan 05, 2015 at 02:26:59PM -0800, David Fetter wrote: > On Tue, Dec 30, 2014 at 04:48:11PM -0800, David Fetter wrote: > > On Wed, Dec 17, 2014 at 08:14:04AM -0500, Andrew Dunstan wrote: > > > > > > Yeah, that's the correct solution. It should not be terribly difficult to > > > create a tes

Fwd: Re: [HACKERS] make check-world regress failed

2015-01-08 Thread Vladimir Koković
Hi, Thanks Andres, i686 check-world passed with your atomic-uint64-alignment.patch. Vladimir Kokovic Belgrade Serbia, 9.Jan 2015 --- Forwarded message --- From: "Andres Freund" To: "Heikki Linnakangas" Cc: "Vladimir Koković" , "pgsql-hackers@postgresql.org" Subject: Re: [HACKER

Re: [HACKERS] INSERT ... ON CONFLICT UPDATE and RLS

2015-01-08 Thread Stephen Frost
Peter, * Peter Geoghegan (p...@heroku.com) wrote: > For column level privileges, you wouldn't expect to only get an error > about not having the relevant update permissions at runtime, when the > update path happens to be taken. And so it is for RLS. Right, that's the precedent we should be consi

Re: [HACKERS] Turning recovery.conf into GUCs

2015-01-08 Thread Josh Berkus
On 01/08/2015 12:57 PM, Peter Eisentraut wrote: >> > c) Infrastructure for changing settings effective during recovery. Right >> >now we'd have to rebuild a lot of guc infrasturcture to allow >> >that. It'd not be that hard to allow changing parameters like >> >restore_command, primary_

Re: [HACKERS] PATCH: decreasing memory needlessly consumed by array_agg

2015-01-08 Thread Tomas Vondra
Hi, On 8.1.2015 08:53, Ali Akbar wrote: > In the CF, the status becomes "Needs Review". Let's continue our > discussion of makeArrayResult* behavior if subcontext=false and > release=true (more below): > 2014-12-22 8:08 GMT+07:00 Ali Akbar >: > > > With this API,

Re: [HACKERS] Turning recovery.conf into GUCs

2015-01-08 Thread Peter Eisentraut
On 1/6/15 4:40 PM, Josh Berkus wrote: >> Btw., I'm not sure that everyone will be happy to have primary_conninfo >> > visible, since it might contain passwords. > Didn't we discuss this? I forgot what the conclusion was ... probably > not to put passwords in primary_conninfo. One can always say,

Re: [HACKERS] Turning recovery.conf into GUCs

2015-01-08 Thread Peter Eisentraut
On 1/6/15 8:08 PM, Andres Freund wrote: > On 2015-01-05 20:43:12 -0500, Peter Eisentraut wrote: >> For example, putting recovery target parameters into postgresql.conf >> might not make sense to some people. Once you have reached the recovery >> end point, the information is obsolete. Keeping it

Re: [HACKERS] make check-world regress failed

2015-01-08 Thread Andres Freund
On 2014-12-04 16:38:45 +0200, Heikki Linnakangas wrote: > On 11/23/2014 08:37 PM, Vladimir Koković wrote: > >PostgreSQL check-world regress failed with current GIT HEAD on my Kubuntu > >14.10. > > > >uname -a > >Linux vlD-kuci 3.16.0-24-generic #32-Ubuntu SMP Tue Oct 28 13:13:18 UTC > >2014 i686 at

Re: [HACKERS] Patch: [BUGS] BUG #12320: json parsing with embedded double quotes

2015-01-08 Thread Andrew Dunstan
On 01/08/2015 03:05 PM, Aaron Botsis wrote: It's also unnecessary. CSV format, while not designed for this, is nevertheless sufficiently flexible to allow successful import of json data meeting certain criteria (essentially no newlines), like this: copy the_table(jsonfield) from '/path

Re: [HACKERS] pg_rewind in contrib

2015-01-08 Thread Peter Eisentraut
On 1/6/15 7:17 PM, Andres Freund wrote: >> One problem is that it doesn't use the replication protocol, >> > so the setup is going to be inconsistent with pg_basebackup. Maybe the >> > replication protocol could be extended to provide the required data. > I'm not particularly bothered by the requi

Re: [HACKERS] Parallel Seq Scan

2015-01-08 Thread Stephen Frost
* Jim Nasby (jim.na...@bluetreble.com) wrote: > On 1/5/15, 9:21 AM, Stephen Frost wrote: > >* Robert Haas (robertmh...@gmail.com) wrote: > >>I think it's right to view this in the same way we view work_mem. We > >>plan on the assumption that an amount of memory equal to work_mem will > >>be availa

Re: [HACKERS] Parallel Seq Scan

2015-01-08 Thread Jim Nasby
On 1/5/15, 9:21 AM, Stephen Frost wrote: * Robert Haas (robertmh...@gmail.com) wrote: I think it's right to view this in the same way we view work_mem. We plan on the assumption that an amount of memory equal to work_mem will be available at execution time, without actually reserving it. Agre

Re: [HACKERS] VODKA?

2015-01-08 Thread Jim Nasby
On 1/7/15, 3:26 PM, Arthur Silva wrote: On Jan 6, 2015 7:14 PM, "Josh Berkus" mailto:j...@agliodbs.com>> wrote: > > Oleg, Teodor: > > I take it VODKA is sliding to version 9.6? This is kinda off, but I was wondering if anyone ever considered running a crowd-funding campaign for this sort o

Re: [HACKERS] [RFC] LSN Map

2015-01-08 Thread Jim Nasby
On 1/7/15, 3:50 AM, Marco Nenciarini wrote: The current implementation tracks only heap LSN. It currently does not track any kind of indexes, but this can be easily added later. Would it make sense to do this at a buffer level, instead of at the heap level? That means it would handle both heap

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-08 Thread Stephen Frost
Dean, * Dean Rasheed (dean.a.rash...@gmail.com) wrote: > [There's also a typo further down -- "filter out the records which are > visible", should be "not visible"] > > What do you think of the attached rewording? Rewording it this way is a great idea. Hopefully that will help address the confu

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2015-01-08 Thread Kevin Grittner
Robert Haas wrote: > On Thu, Jan 8, 2015 at 10:19 AM, Kevin Grittner wrote: >> Robert Haas wrote: >>> Andres is talking in my other ear suggesting that we ought to >>> reuse the 2PC infrastructure to do all this. >> >> If you mean that the primary transaction and all FDWs in the >> transaction m

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2015-01-08 Thread Robert Haas
On Thu, Jan 8, 2015 at 10:19 AM, Kevin Grittner wrote: > Robert Haas wrote: >> Andres is talking in my other ear suggesting that we ought to >> reuse the 2PC infrastructure to do all this. > > If you mean that the primary transaction and all FDWs in the > transaction must use 2PC, that is what I

Re: [HACKERS] pg_rewind in contrib

2015-01-08 Thread Heikki Linnakangas
On 01/06/2015 09:13 AM, Michael Paquier wrote: Some more comments: - Nitpicking: the header formats of filemap.c, datapagemap.c, datapagemap.h and util.h are incorrect (I pushed a fix about that in pg_rewind itself, feel free to pick it up). Ah, fixed. - parsexlog.c has a copyright mention to

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2015-01-08 Thread Kevin Grittner
Robert Haas wrote: > Andres is talking in my other ear suggesting that we ought to > reuse the 2PC infrastructure to do all this. If you mean that the primary transaction and all FDWs in the transaction must use 2PC, that is what I was saying, although apparently not clearly enough. All nodes *

Re: [HACKERS] Compression of full-page-writes

2015-01-08 Thread Rahila Syed
Hello, Below are performance numbers in case of synchronous replication with and without fpw compression using latest version of patch(version 14). The patch helps improve performance considerably. Both master and standby are on the same machine in order to get numbers independent of network ove

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2015-01-08 Thread Robert Haas
On Wed, Jan 7, 2015 at 11:20 AM, Kevin Grittner wrote: > If we are going to include a distributed transaction manager with > PostgreSQL, it *must* persist enough information about the > transaction ID and where it is used in a way that will survive a > subsequent crash before beginning the PREPARE

[HACKERS] More Norwegian trouble

2015-01-08 Thread Heikki Linnakangas
There was a long thread on the trouble that the Windows "Norwegian (Bokmål)" locale name causes, because the locale name is not pure ASCII. That was fixed by mapping "Norwegian (Bokmål)" to a pure-ASCII alias of it, "norwegian-bokmal". (http://www.postgresql.org/message-id/20140915230427.2486.2

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2015-01-08 Thread Kevin Grittner
Ashutosh Bapat wrote: > On Wed, Jan 7, 2015 at 9:50 PM, Kevin Grittner wrote: >> Also, as previously mentioned, it must behave in some reasonable >> way if a database is not configured to support 2PC, especially >> since 2PC is off by default in PostgreSQL. > We can have a per foreign server op

[HACKERS] List of table names of a DB

2015-01-08 Thread Deepak S
Hello, I am unable to find the function which retrieves the 'list of names of the tables' used in a DB. Reason: I need a mechanism by which I can extract the names of the tables used in a query which has been parsed. My plan is to check for a match of each word in the query with a list of names

Re: [HACKERS] Escaping from blocked send() reprised.

2015-01-08 Thread Andres Freund
On 2014-10-03 16:26:35 +0200, Andres Freund wrote: > On 2014-10-03 17:12:18 +0300, Heikki Linnakangas wrote: > > >0002 now makes sense on its own and doesn't change anything around the > > > interrupt handling. Oh, and it compiles without 0003. > > > > WaitLatchOrSocket() can throw an error,

Re: [HACKERS] The return value of allocate_recordbuf()

2015-01-08 Thread Andres Freund
Hi, On 2015-01-05 14:18:35 +0900, Michael Paquier wrote: > Note that for 9.4, I think that we should complain about an OOM in > logical.c where malloc is used as now process would simply crash if > NULL is returned by XLogReaderAllocate. That's the object of the > second patch. Yes, that's clearl

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-08 Thread Dean Rasheed
On 8 January 2015 at 08:30, Dean Rasheed wrote: > I have a wider concern about the wording on this page - both the > rewritten paragraph and elsewhere talk about policies in terms of > limiting access to or filtering out rows. > > However, since policy expressions are OR'ed together and there is a

Re: [HACKERS] Proposal: Log inability to lock pages during vacuum

2015-01-08 Thread Andres Freund
On 2015-01-04 01:53:24 +0100, Andres Freund wrote: > > >Ah, interesting, I didn't remember we had that. I guess one possible > > >tweak is to discount the pages we skip from pinned_pages; or we could > > >keep a separate count of pages waited for. Jim, up for a patch? > > This is still wrong. I t

Re: [HACKERS] parallel mode and parallel contexts

2015-01-08 Thread Amit Kapila
On Wed, Jan 7, 2015 at 11:03 PM, Robert Haas wrote: > > I have little doubt that this version is still afflicted with various > bugs, and the heavyweight locking issue remains to be dealt with, but > on the whole I think this is headed in the right direction. > +ParallelMain(Datum main_arg) { ..

Re: [HACKERS] Parallel Seq Scan

2015-01-08 Thread Amit Kapila
On Thu, Jan 8, 2015 at 5:12 PM, Amit Kapila wrote: > > On Mon, Jan 5, 2015 at 8:31 PM, Robert Haas wrote: > > Sorry for incomplete mail sent prior to this, I just hit the send button by mistake. 4. Sending ReadyForQuery() after completely sending the tuples, as that is required to know that all

Re: [HACKERS] List of table names of a DB

2015-01-08 Thread David Rowley
On 8 January 2015 at 22:41, Deepak S wrote: > Hello, I am unable to find the function which retrieves the 'list of > names of the tables' used in a DB. > > You may find what you want in: select table_name from information_schema.tables; http://www.postgresql.org/docs/9.4/static/infoschema-tables

Re: [HACKERS] Parallel Seq Scan

2015-01-08 Thread Amit Kapila
On Mon, Jan 5, 2015 at 8:31 PM, Robert Haas wrote: > > On Fri, Jan 2, 2015 at 5:36 AM, Amit Kapila wrote: > > On Thu, Jan 1, 2015 at 11:29 PM, Robert Haas wrote: > >> On Thu, Jan 1, 2015 at 12:00 PM, Fabrízio de Royes Mello > >> wrote: > >> > Can we check the number of free bgworkers slots to s

[HACKERS] List of table names of a DB

2015-01-08 Thread Deepak S
Hello, I am unable to find the function which retrieves the 'list of names of the tables' used in a DB. Reason: I need a mechanism by which I can extract the names of the tables used in a query which has been parsed. My plan is to check for a match of each word in the query with a list of names

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-08 Thread Dean Rasheed
On 6 January 2015 at 19:25, Stephen Frost wrote: > Robert, Amit, > > * Robert Haas (robertmh...@gmail.com) wrote: >> I don't think that's a typo, although it's not particularly >> well-worded IMHO. I might rewrite the whole paragraph like this: >> >> A policy limits the ability to SELECT, INSERT,

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2015-01-08 Thread Ashutosh Bapat
On Wed, Jan 7, 2015 at 9:50 PM, Kevin Grittner wrote: > Ashutosh Bapat wrote: > > > I don't see why would my patch cause inconsistencies. It can > > cause dangling PREPAREd transactions and I have already > > acknowledged that fact. > > > > Am I missing something? > > To me that is the big probl