Re: [HACKERS] How to change the pgsql source code and build it??

2014-06-23 Thread Kyotaro HORIGUCHI
Hello, I don't know you environment so I don't see how many additional changes are needed, but still I think the message should not be seen there. > @Fabrizio de Royes Mello, Even upon making changes as per your suggestion, > I could see that initdb is failing for the same reason: > **

Re: [Fwd: Re: [HACKERS] proposal: new long psql parameter --on-error-stop]

2014-06-23 Thread Fujii Masao
On Mon, Jun 23, 2014 at 12:04 AM, Pavel Stehule wrote: > Hello > > third version with Erik's update Here are some my comments: The document of psql needs to be updated. At least the description of new option this patch adds needs to be added into the document. +printf(_(" --help-variables

Re: [HACKERS] pg_resetxlog to clear backup start/end locations.

2014-06-23 Thread Fujii Masao
On Mon, Jun 23, 2014 at 3:49 PM, Kyotaro HORIGUCHI wrote: > Hello, thank you for the comments. > >> On Sun, Jun 22, 2014 at 8:54 PM, Simon Riggs wrote: >> > On 13 June 2014 12:27, Fujii Masao wrote: >> > >> >> I think that pg_resetxlog should reset backup locations by default >> >> since they ar

Re: [Fwd: Re: [HACKERS] proposal: new long psql parameter --on-error-stop]

2014-06-23 Thread Pavel Stehule
Hello 2014-06-23 10:02 GMT+02:00 Fujii Masao : > On Mon, Jun 23, 2014 at 12:04 AM, Pavel Stehule > wrote: > > Hello > > > > third version with Erik's update > > Here are some my comments: > > The document of psql needs to be updated. At least the description of new > option > this patch adds ne

Re: [HACKERS] Audit of logout

2014-06-23 Thread Fujii Masao
On Sat, Jun 21, 2014 at 12:59 PM, Joe Conway wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 06/13/2014 07:29 AM, Tom Lane wrote: >> Fujii Masao writes: >>> On Thu, Jun 12, 2014 at 8:51 PM, Fujii Masao >>> wrote: Some users enable log_disconnections in postgresql.conf to >>>

Re: [Fwd: Re: [HACKERS] proposal: new long psql parameter --on-error-stop]

2014-06-23 Thread Fujii Masao
On Mon, Jun 23, 2014 at 5:10 PM, Pavel Stehule wrote: > Hello > > > 2014-06-23 10:02 GMT+02:00 Fujii Masao : > >> On Mon, Jun 23, 2014 at 12:04 AM, Pavel Stehule >> wrote: >> > Hello >> > >> > third version with Erik's update >> >> Here are some my comments: >> >> The document of psql needs to be

Re: [Fwd: Re: [HACKERS] proposal: new long psql parameter --on-error-stop]

2014-06-23 Thread Pavel Stehule
2014-06-23 10:57 GMT+02:00 Fujii Masao : > On Mon, Jun 23, 2014 at 5:10 PM, Pavel Stehule > wrote: > > Hello > > > > > > 2014-06-23 10:02 GMT+02:00 Fujii Masao : > > > >> On Mon, Jun 23, 2014 at 12:04 AM, Pavel Stehule < > pavel.steh...@gmail.com> > >> wrote: > >> > Hello > >> > > >> > third vers

Re: [HACKERS] pg_resetxlog to clear backup start/end locations.

2014-06-23 Thread Kyotaro HORIGUCHI
Hi, At Mon, 23 Jun 2014 17:10:05 +0900, Fujii Masao wrote in > > I assume the primary usage of this patch to be, as described > > before, Dissolving a recovery freezing caused by wrongly placed > > backup label. Crash recovery has been already done at that time > > so resetxlog's current behavi

Re: [HACKERS] inherit support for foreign tables

2014-06-23 Thread Ashutosh Bapat
Hi, Selecting tableoid on parent causes an error, "ERROR: cannot extract system attribute from virtual tuple". The foreign table has an OID which can be reported as tableoid for the rows coming from that foreign table. Do we want to do that? On Fri, Jun 20, 2014 at 1:34 PM, Kyotaro HORIGUCHI < h

Re: [HACKERS] Add the number of pinning backends to pg_buffercache's output

2014-06-23 Thread Fujii Masao
On Sat, Apr 12, 2014 at 9:25 PM, Andres Freund wrote: > Hi, > > The last week I twice had the need to see how many backends had some > buffers pinned. Once during development and once while analyzing a stuck > vacuum (waiting for a cleanup lock). > I'd like to add a column to pg_buffercache exposi

Re: [HACKERS] Add the number of pinning backends to pg_buffercache's output

2014-06-23 Thread Andres Freund
On 2014-06-23 18:44:24 +0900, Fujii Masao wrote: > On Sat, Apr 12, 2014 at 9:25 PM, Andres Freund wrote: > > Hi, > > > > The last week I twice had the need to see how many backends had some > > buffers pinned. Once during development and once while analyzing a stuck > > vacuum (waiting for a clean

Re: [Fwd: Re: [HACKERS] proposal: new long psql parameter --on-error-stop]

2014-06-23 Thread Fujii Masao
On Mon, Jun 23, 2014 at 6:06 PM, Pavel Stehule wrote: > > > > 2014-06-23 10:57 GMT+02:00 Fujii Masao : > >> On Mon, Jun 23, 2014 at 5:10 PM, Pavel Stehule >> wrote: >> > Hello >> > >> > >> > 2014-06-23 10:02 GMT+02:00 Fujii Masao : >> > >> >> On Mon, Jun 23, 2014 at 12:04 AM, Pavel Stehule >> >>

Re: [HACKERS] Add the number of pinning backends to pg_buffercache's output

2014-06-23 Thread Fujii Masao
On Mon, Jun 23, 2014 at 6:51 PM, Andres Freund wrote: > On 2014-06-23 18:44:24 +0900, Fujii Masao wrote: >> On Sat, Apr 12, 2014 at 9:25 PM, Andres Freund >> wrote: >> > Hi, >> > >> > The last week I twice had the need to see how many backends had some >> > buffers pinned. Once during developmen

Re: [HACKERS] crash with assertions and WAL_DEBUG

2014-06-23 Thread Heikki Linnakangas
On 06/21/2014 01:58 PM, Heikki Linnakangas wrote: It's a bit difficult to attach the mark to the palloc calls, as neither the WAL_DEBUG or LWLOCK_STATS code is calling palloc directly, but marking specific MemoryContexts as sanctioned ought to work. I'll take a stab at that. I came up with the

Re: [HACKERS] crash with assertions and WAL_DEBUG

2014-06-23 Thread Andres Freund
On 2014-06-23 12:58:19 +0300, Heikki Linnakangas wrote: > On 06/21/2014 01:58 PM, Heikki Linnakangas wrote: > >It's a bit difficult to attach the mark to the palloc calls, as neither > >the WAL_DEBUG or LWLOCK_STATS code is calling palloc directly, but > >marking specific MemoryContexts as sanction

[HACKERS] Use a signal to trigger a memory context dump?

2014-06-23 Thread Andres Freund
Hi, I wonder if it'd make sense to allow a signal to trigger a memory context dump? I and others more than once had the need to examine memory usage on production systems and using gdb isn't always realistic. I wonder if we could install a signal handler for some unused signal (e.g. SIGPWR) to dum

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-06-23 Thread Fujii Masao
On Fri, May 2, 2014 at 3:19 PM, Ian Barwick wrote: > Hi > > Here is an initial version of an auditing extension for Postgres to > generate log output suitable for compiling a comprehensive audit trail > of database operations. You added this into CF, but its patch has not been posted yet. Are you

Re: [HACKERS] idle_in_transaction_timeout

2014-06-23 Thread Andres Freund
On 2014-06-22 19:03:32 -0700, Kevin Grittner wrote: > Andres Freund wrote: > > > I think we'll want a version of this that just fails the > > transaction once we have the infrastructure. So we should choose > > a name that allows for a complimentary GUC. > > If we stick with the rule that what i

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-06-23 Thread Abhijit Menon-Sen
(I'm replying as co-author of pgaudit.) At 2014-06-23 19:15:39 +0900, masao.fu...@gmail.com wrote: > > You added this into CF, but its patch has not been posted yet. Are you > planning to make a patch? It's a self-contained contrib module. I thought Ian had posted a tarball, but it looks like he

Re: [Fwd: Re: [HACKERS] proposal: new long psql parameter --on-error-stop]

2014-06-23 Thread Pavel Stehule
2014-06-23 11:53 GMT+02:00 Fujii Masao : > On Mon, Jun 23, 2014 at 6:06 PM, Pavel Stehule > wrote: > > > > > > > > 2014-06-23 10:57 GMT+02:00 Fujii Masao : > > > >> On Mon, Jun 23, 2014 at 5:10 PM, Pavel Stehule > > >> wrote: > >> > Hello > >> > > >> > > >> > 2014-06-23 10:02 GMT+02:00 Fujii Mas

Re: [HACKERS] tab completion for setting search_path

2014-06-23 Thread Andres Freund
On 2014-06-22 20:02:57 -0700, Tom Lane wrote: > Ian Barwick writes: > > On 23/06/14 00:58, Andres Freund wrote: > >> I thought about committing this but couldn't get over this bit. If you > >> type "SELECT * FROM pg_cat" it'll get autocompleted to > >> pg_catalog.pg_ and "pg_temp" will list all th

Re: [HACKERS] idle_in_transaction_timeout

2014-06-23 Thread Fujii Masao
On Mon, Jun 23, 2014 at 7:48 PM, Andres Freund wrote: > On 2014-06-22 19:03:32 -0700, Kevin Grittner wrote: >> Andres Freund wrote: >> >> > I think we'll want a version of this that just fails the >> > transaction once we have the infrastructure. So we should choose >> > a name that allows for a

Re: [HACKERS] idle_in_transaction_timeout

2014-06-23 Thread Andres Freund
On 2014-06-23 20:29:17 +0900, Fujii Masao wrote: > On Mon, Jun 23, 2014 at 7:48 PM, Andres Freund wrote: > > On 2014-06-22 19:03:32 -0700, Kevin Grittner wrote: > >> Andres Freund wrote: > >> > >> > I think we'll want a version of this that just fails the > >> > transaction once we have the infra

Re: [HACKERS] idle_in_transaction_timeout

2014-06-23 Thread Vik Fearing
On 06/22/2014 07:47 PM, Andres Freund wrote: > On 2014-06-22 09:27:24 -0700, Kevin Grittner wrote: >> Andres Freund wrote: >> >>> The idea with the GUC name is that if we ever get support for >>> cancelling transactions we can name that >>> idle_in_transaction_transaction_timeout? >>> That seems a

Re: [HACKERS] idle_in_transaction_timeout

2014-06-23 Thread Andres Freund
On 2014-06-23 13:33:46 +0200, Vik Fearing wrote: > On 06/22/2014 07:47 PM, Andres Freund wrote: > > On 2014-06-22 09:27:24 -0700, Kevin Grittner wrote: > >> Andres Freund wrote: > > but I don't like that much. Not sure what'd be good, the best I > > currently can come up with is: > > idle_in_trans

Re: [HACKERS] review: Non-recursive processing of AND/OR lists

2014-06-23 Thread Gurjeet Singh
Thanks! On Mon, Jun 16, 2014 at 3:58 PM, Tom Lane wrote: > I wrote: >> Gurjeet Singh writes: >>> I tried to eliminate the 'pending' list, but I don't see a way around it. >>> We need temporary storage somewhere to store the branches encountered on >>> the right; in recursion case the call stack

Re: [HACKERS] /proc/self/oom_adj is deprecated in newer Linux kernels

2014-06-23 Thread Gurjeet Singh
On Wed, Jun 18, 2014 at 8:15 PM, Tom Lane wrote: > Gurjeet Singh writes: > >> Please find attached the patch. It includes the doc changes as well. > > Applied with some editorialization. Thanks! would it be possible to include this in 9.4 as well? Best regards, -- Gurjeet Singh http://gurjeet

[HACKERS] Re: Request for Patch Feedback: Lag & Lead Window Functions Can Ignore Nulls

2014-06-23 Thread Nicholas White
Hi Abhijit - > What's the status of this patch? The latest version of the patch needs a review, and I'd like to get it committed in this CF if possible. Thanks - Nick -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgre

Re: [HACKERS] Use a signal to trigger a memory context dump?

2014-06-23 Thread Stephen Frost
Andres, * Andres Freund (and...@2ndquadrant.com) wrote: > I wonder if it'd make sense to allow a signal to trigger a memory > context dump? I and others more than once had the need to examine memory > usage on production systems and using gdb isn't always realistic. +100 I keep thinking we have

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-06-23 Thread Fujii Masao
On Mon, Jun 23, 2014 at 7:51 PM, Abhijit Menon-Sen wrote: > (I'm replying as co-author of pgaudit.) > > At 2014-06-23 19:15:39 +0900, masao.fu...@gmail.com wrote: >> >> You added this into CF, but its patch has not been posted yet. Are you >> planning to make a patch? > > It's a self-contained con

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-06-23 Thread Stephen Frost
* Fujii Masao (masao.fu...@gmail.com) wrote: > On Mon, Jun 23, 2014 at 7:51 PM, Abhijit Menon-Sen > wrote: > > At 2014-06-23 19:15:39 +0900, masao.fu...@gmail.com wrote: > >> You added this into CF, but its patch has not been posted yet. Are you > >> planning to make a patch? > > > > It's a self-

[HACKERS] How to use the 'char() ' as data type and a function name in the same time.

2014-06-23 Thread rohtodeveloper
Dear Hackers When I use the pg_catalog.char(integer) function in the postgres, I can only use it like these:select pg_catalog.char(65); select "char"(65); But I want to use the function by the following way.select char(1);Of coures, There would be a gram error. I know the error is caused by t

Re: [HACKERS] Use a signal to trigger a memory context dump?

2014-06-23 Thread Andres Freund
On 2014-06-23 08:36:02 -0400, Stephen Frost wrote: > Andres, > > * Andres Freund (and...@2ndquadrant.com) wrote: > > I wonder if it'd make sense to allow a signal to trigger a memory > > context dump? I and others more than once had the need to examine memory > > usage on production systems and us

Re: [HACKERS] test failure on latest source

2014-06-23 Thread Marco Atzeri
On 16/04/2014 18:55, Marco Atzeri wrote: On 16/04/2014 17:40, Tom Lane wrote: The bigger picture though is that this code isn't failing on the buildfarm. So what we need to ask is what's different about Marco's machine. good question. I checked again and I found that the fault is only on the

Re: [HACKERS] tab completion for setting search_path

2014-06-23 Thread Kevin Grittner
Andres Freund wrote: > On 2014-06-22 20:02:57 -0700, Tom Lane wrote: >> Ian Barwick writes: >>> On 23/06/14 00:58, Andres Freund wrote: I thought about committing this but couldn't get over this bit. If you type "SELECT * FROM pg_cat" it'll get autocompleted to pg_catalog.pg_ and "

Re: [HACKERS] Use a signal to trigger a memory context dump?

2014-06-23 Thread Stephen Frost
Andres, * Andres Freund (and...@2ndquadrant.com) wrote: > On 2014-06-23 08:36:02 -0400, Stephen Frost wrote: > > I'd tend to think this would be sufficient. You're suggesting a case > > where you need to debug prior to SQL access (not specifically sure what > > you mean by that) or processes whic

[HACKERS] Re: [bug fix] multibyte messages are displayed incorrectly on the client

2014-06-23 Thread Heikki Linnakangas
On 04/05/2014 07:56 AM, Tom Lane wrote: "MauMau" writes: Then, as a happy medium, how about disabling message localization only if the client encoding differs from the server one? That is, compare the client_encoding value in the startup packet with the result of GetPlatformEncoding(). If the

Re: [HACKERS] replication identifier format

2014-06-23 Thread Robert Haas
On Wed, Jun 18, 2014 at 12:46 PM, Andres Freund wrote: > On 2014-06-18 12:36:13 -0400, Robert Haas wrote: >> > I actually don't think any of the discussions I was involved in had the >> > externally visible version of replication identifiers limited to 16bits? >> > If you are referring to my patch

Re: [HACKERS] replication identifier format

2014-06-23 Thread Andres Freund
On 2014-06-23 10:09:49 -0400, Robert Haas wrote: > On Wed, Jun 18, 2014 at 12:46 PM, Andres Freund > wrote: > > On 2014-06-18 12:36:13 -0400, Robert Haas wrote: > >> > I actually don't think any of the discussions I was involved in had the > >> > externally visible version of replication identifi

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

2014-06-23 Thread Amit Kapila
On Tue, Jun 17, 2014 at 8:56 PM, Andres Freund wrote: > On 2014-06-17 20:47:51 +0530, Amit Kapila wrote: > > On Tue, Jun 17, 2014 at 6:35 PM, Andres Freund > > wrote: > > > > You have followed it pretty well as far as I can understand from your > > replies, as there is no reproducible test (which

Re: [HACKERS] Atomics hardware support table & supported architectures

2014-06-23 Thread Robert Haas
On Thu, Jun 19, 2014 at 10:43 AM, Merlin Moncure wrote: > On Thu, Jun 19, 2014 at 7:07 AM, Abhijit Menon-Sen > wrote: >> Let's not pretend to support platforms we have no practical way of >> verifying. > > This is key. The buildfarm defines the set of platforms we support. This criterion has b

Re: [HACKERS] releaseOk and LWLockWaitForVar

2014-06-23 Thread Amit Kapila
On Tue, Jun 17, 2014 at 5:47 PM, Andres Freund wrote: > > Hi Heikki, All, > > Amit just pointed me to a case where the lwlock scalability patch > apparently causes problems and I went on to review it and came across > the following problem in 9.4/master: > LWLockWaitForVar() doesn't set releaseOk

Re: [HACKERS] replication identifier format

2014-06-23 Thread Robert Haas
On Mon, Jun 23, 2014 at 10:11 AM, Andres Freund wrote: >> > Why? Users and other systems only ever see the external ID. Everything >> > leaving the system is converted to the external form. The short id >> > basically is only used in shared memory and in wal records. For both >> > using longer str

Re: [HACKERS] WIP patch for multiple column assignment in UPDATE

2014-06-23 Thread Robert Haas
On Thu, Jun 19, 2014 at 9:37 AM, Tom Lane wrote: > Pavel Stehule writes: >> I did some tests and It looks so it allows only some form of nested loop. > > [ shrug... ] It's a subplan. One evaluation per outer row is what > people are expecting. Is it theoretically possible to convert a construc

Re: [HACKERS] replication commands and log_statements

2014-06-23 Thread Robert Haas
On Fri, Jun 20, 2014 at 9:48 AM, Tom Lane wrote: > Fujii Masao writes: >> OK, I've just implemented the patch (attached) which does this, i.e., >> redefines >> log_statement as a list. Thanks to the patch, log_statement can be set >> to "none", >> "ddl", "mod", "dml", "all", and any combinations

Re: [HACKERS] How to use the 'char() ' as data type and a function name in the same time.

2014-06-23 Thread Kevin Grittner
rohtodeveloper wrote: > When I use the  pg_catalog.char(integer) function  in the > postgres, I can only use it like these: > select pg_catalog.char(65);  select "char"(65); > > But I want to use the function by the following  way. > select char(1); Try using the chr() function. What you are ru

Re: [HACKERS] JSON and Postgres Variable Queries

2014-06-23 Thread Robert Haas
On Fri, Jun 20, 2014 at 11:26 AM, Joey Caughey wrote: > I’m having an issue with JSON requests in Postgres and was wondering if > anyone had an answer. > > I have an orders table with a field called “json_data”. > > In the json data there is a plan’s array with an id value in them. > { "plan”: { “

Re: [HACKERS] replication commands and log_statements

2014-06-23 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > Similarly, > building a logging facility that meets the needs of real users is > going to require a configuration method more flexible than a total > order with four choices. I happen to think a list of comma-separated > tokens is a pretty good choice

Re: [HACKERS] Atomics hardware support table & supported architectures

2014-06-23 Thread Andres Freund
On 2014-06-23 10:29:54 -0400, Robert Haas wrote: > On Thu, Jun 19, 2014 at 10:43 AM, Merlin Moncure wrote: > > On Thu, Jun 19, 2014 at 7:07 AM, Abhijit Menon-Sen > > wrote: > >> Let's not pretend to support platforms we have no practical way of > >> verifying. > > > > This is key. The buildfarm

Re: [HACKERS] replication commands and log_statements

2014-06-23 Thread Robert Haas
On Mon, Jun 23, 2014 at 11:15 AM, Stephen Frost wrote: > * Robert Haas (robertmh...@gmail.com) wrote: >> Similarly, >> building a logging facility that meets the needs of real users is >> going to require a configuration method more flexible than a total >> order with four choices. I happen to th

Re: [HACKERS] please review source(SQLServer compatible)‏

2014-06-23 Thread Andrew Dunstan
On 06/23/2014 10:51 AM, rohtodeveloper wrote: Dear all, Our application will be switched from SQL Server to PostgreSQL. However, a few functions are not supported yet. So we decided to extend it. The functions are as following: 1.SQL statement support INSERT statement without INTO keyword

Re: [HACKERS] Minmax indexes

2014-06-23 Thread Heikki Linnakangas
Some comments, aside from the design wrt. bounding boxes etc. : On 06/15/2014 05:34 AM, Alvaro Herrera wrote: Robert Haas wrote: On Wed, Sep 25, 2013 at 4:34 PM, Alvaro Herrera wrote: Here's an updated version of this patch, with fixes to all the bugs reported so far. Thanks to Thom Brown, J

Re: [HACKERS] replication identifier format

2014-06-23 Thread Andres Freund
On 2014-06-23 10:45:51 -0400, Robert Haas wrote: > On Mon, Jun 23, 2014 at 10:11 AM, Andres Freund > wrote: > >> > Why? Users and other systems only ever see the external ID. Everything > >> > leaving the system is converted to the external form. The short id > >> > basically is only used in shar

Re: [HACKERS] JSON and Postgres Variable Queries

2014-06-23 Thread Andrew Dunstan
On 06/23/2014 11:06 AM, Robert Haas wrote: On Fri, Jun 20, 2014 at 11:26 AM, Joey Caughey wrote: I’m having an issue with JSON requests in Postgres and was wondering if anyone had an answer. I have an orders table with a field called “json_data”. In the json data there is a plan’s array with

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

2014-06-23 Thread Andres Freund
On 2014-06-23 19:59:10 +0530, Amit Kapila wrote: > On Tue, Jun 17, 2014 at 8:56 PM, Andres Freund > wrote: > > On 2014-06-17 20:47:51 +0530, Amit Kapila wrote: > > > On Tue, Jun 17, 2014 at 6:35 PM, Andres Freund > > > wrote: > > > > > > You have followed it pretty well as far as I can understand

Re: [HACKERS] [BUGS] BUG #10728: json_to_recordset with nested json objects NULLs columns

2014-06-23 Thread Tom Lane
Michael Paquier writes: > Digging more into that, I have found the issue and a fix for it. It happens > that populate_recordset_object_start, which is used to initialize the > process for the population of the record, is taken *each* time a json > object is found, re-creating every time the hash t

Re: [HACKERS] /proc/self/oom_adj is deprecated in newer Linux kernels

2014-06-23 Thread Tom Lane
Gurjeet Singh writes: > would it be possible to include this in 9.4 as well? While this is clearly an improvement over what we had before, it's impossible to argue that it's a bug fix, and we are way past the 9.4 feature freeze deadline. In particular, packagers who've already done their 9.4 dev

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-06-23 Thread Tom Lane
Stephen Frost writes: > I'd expect a catalog table or perhaps changes to pg_class (maybe other > things also..) to define what gets logged. How exactly will that work for log messages generated in contexts where we do not have working catalog access? (postmaster, crash recovery, or pretty much a

[HACKERS] Re: [HACKERS] please review source(SQLServer compatible)‏

2014-06-23 Thread Kevin Grittner
Andrew Dunstan wrote: > On 06/23/2014 10:51 AM, rohtodeveloper wrote: >> Our application will be switched from SQL Server to PostgreSQL. >> However, a few functions are not supported yet. So we decided to >> extend it. >> >> The functions are as following: >> >> 1.SQL statement support >>   INSER

[HACKERS] Re: [HACKERS] Re: [HACKERS] please review source(SQLServer compatible)‏

2014-06-23 Thread Pavel Stehule
2014-06-23 18:00 GMT+02:00 Kevin Grittner : > Andrew Dunstan wrote: > > On 06/23/2014 10:51 AM, rohtodeveloper wrote: > > >> Our application will be switched from SQL Server to PostgreSQL. > >> However, a few functions are not supported yet. So we decided to > >> extend it. > >> > >> The function

Re: [HACKERS] Atomics hardware support table & supported architectures

2014-06-23 Thread Robert Haas
On Mon, Jun 23, 2014 at 11:16 AM, Andres Freund wrote: >> This criterion has been proposed before, but I'm not sure I really >> agree with it. If having code around that targets obscure platforms >> is hindering the development of new features, then that's a reason to >> get rid of it. > > I thin

Re: [HACKERS] Re: [bug fix] multibyte messages are displayed incorrectly on the client

2014-06-23 Thread Tom Lane
Heikki Linnakangas writes: > Earlier in this thread, MauMau pointed out that we can't do encoding > conversions until we have connected to the database because you need to > read pg_conversion for that. That's because we support creating custom > conversions with CREATE CONVERSION. Frankly, I d

Re: [HACKERS] JSON and Postgres Variable Queries

2014-06-23 Thread Tom Lane
Robert Haas writes: > You might find a sub-SELECT helpful: > SELECT * FROM (SELECT json_data->>’plan'->>’id' as plan_id FROM > orders) x WHERE plan_id = 1 > It might be a generally useful thing for WHERE-clause items to be able > to reference items from the target list by alias, or maybe it'

Re: [HACKERS] How about a proper TEMPORARY TABLESPACE?

2014-06-23 Thread Robert Haas
On Wed, Jun 18, 2014 at 9:39 PM, Matheus de Oliveira wrote: >> Then, to summarize Matheus must do: >> * use an option instead of change the syntax and catalog to indicate that >> a tablespace is used to store temp objects > > Yes. I myself wasn't sure TEMPORARY syntax would be good, but I would ju

Re: [HACKERS] Use a signal to trigger a memory context dump?

2014-06-23 Thread MauMau
From: "Andres Freund" I wonder if it'd make sense to allow a signal to trigger a memory context dump? I and others more than once had the need to examine memory usage on production systems and using gdb isn't always realistic. +1 It would be nice if there's a generic infrastructure on which t

[HACKERS] Re: [BUGS] BUG #10728: json_to_recordset with nested json objects NULLs columns

2014-06-23 Thread Merlin Moncure
On Mon, Jun 23, 2014 at 10:43 AM, Tom Lane wrote: > Michael Paquier writes: >> Digging more into that, I have found the issue and a fix for it. It happens >> that populate_recordset_object_start, which is used to initialize the >> process for the population of the record, is taken *each* time a j

Re: [HACKERS] please review source(SQLServer compatible)‏

2014-06-23 Thread Vik Fearing
On 06/23/2014 04:51 PM, rohtodeveloper wrote: > 1.SQL statement support > INSERT statement without INTO keyword > DELETE statement without FROM keywork Why would we want this? -- Vik -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: h

Re: [HACKERS] replication identifier format

2014-06-23 Thread Robert Haas
On Mon, Jun 23, 2014 at 11:28 AM, Andres Freund wrote: >> Oh, great. Somehow I missed the fact that that had been addressed. I >> had assumed that we still needed global identifiers in which case I >> think they'd need to be 64+ bits (preferably more like 128). If they >> only need to be locall

Re: [HACKERS] SQL access to database attributes

2014-06-23 Thread Robert Haas
On Sun, Jun 22, 2014 at 2:59 PM, Pavel Stehule wrote: > I found only one problem - first patch introduce a new property > CONNECTION_LIMIT and replace previously used "CONNECTION LIMIT" in > documentation. But "CONNECTION LIMIT" is still supported, but it is not > documented. So for some readers i

Re: [HACKERS] Atomics hardware support table & supported architectures

2014-06-23 Thread Tom Lane
Robert Haas writes: > On Mon, Jun 23, 2014 at 11:16 AM, Andres Freund > wrote: >> Since fetch-and-add is trivially implemented using CAS, there's not much >> need to distinguish between CAS and CAS + fetch_and_add. From my POV the >> restriction to just CAS/fetch_and_add isn't actually buying mu

Re: [HACKERS] Atomics hardware support table & supported architectures

2014-06-23 Thread Andres Freund
On 2014-06-23 12:08:08 -0400, Robert Haas wrote: > > That we still have !PG_USE_INLINE support although all buildfarm animals > > support it since 4c8aa8b (fixing acc) causes absurd constructs > > (STATIC_IF_INLINE) and fugly macro usage making it harder to read > > and modify code. I spend a good

Re: [HACKERS] /proc/self/oom_adj is deprecated in newer Linux kernels

2014-06-23 Thread Gurjeet Singh
On Mon, Jun 23, 2014 at 11:52 AM, Tom Lane wrote: > Gurjeet Singh writes: >> would it be possible to include this in 9.4 as well? > > While this is clearly an improvement over what we had before, it's > impossible to argue that it's a bug fix, and we are way past the 9.4 > feature freeze deadline

Re: [HACKERS] API change advice: Passing plan invalidation info from the rewriter into the planner?

2014-06-23 Thread Robert Haas
On Wed, Jun 18, 2014 at 2:18 PM, Stephen Frost wrote: > I'm also of the opinion that this isn't strictly necessary for the > initial RLS offering in PG- there's a clear way we could migrate > existing users to a multi-policy system from a single-policy system. > Sure, to get the performance and op

Re: [HACKERS] releaseOk and LWLockWaitForVar

2014-06-23 Thread Heikki Linnakangas
On 06/17/2014 03:17 PM, Andres Freund wrote: LWLockWaitForVar() doesn't set releaseOk to true when waiting again. Isn't that a bug? LWLockWaitForVar() waits in LW_WAIT_UNTIL_FREE mode, because it's not interested in acquiring the lock, it just wants to be woken up when it's released (or the "

Re: [HACKERS] Atomics hardware support table & supported architectures

2014-06-23 Thread Andres Freund
On 2014-06-23 09:28:19 -0700, Tom Lane wrote: > Robert Haas writes: > > On Mon, Jun 23, 2014 at 11:16 AM, Andres Freund > > wrote: > >> Since fetch-and-add is trivially implemented using CAS, there's not much > >> need to distinguish between CAS and CAS + fetch_and_add. From my POV the > >> rest

Re: [HACKERS] releaseOk and LWLockWaitForVar

2014-06-23 Thread Heikki Linnakangas
On 06/23/2014 05:38 PM, Amit Kapila wrote: While looking at function LWLockWaitForVar(), espacially below code: TRACE_POSTGRESQL_LWLOCK_ACQUIRE(T_NAME(l), T_ID(l), LW_EXCLUSIVE); I think in this function tracing is done considering the Exclusive lock is acquired, however it might have granted a

Re: [HACKERS] SQL access to database attributes

2014-06-23 Thread Vik Fearing
On 06/23/2014 06:21 PM, Robert Haas wrote: > On Sun, Jun 22, 2014 at 2:59 PM, Pavel Stehule > wrote: >> I found only one problem - first patch introduce a new property >> CONNECTION_LIMIT and replace previously used "CONNECTION LIMIT" in >> documentation. But "CONNECTION LIMIT" is still supported

Re: [HACKERS] SQL access to database attributes

2014-06-23 Thread Pavel Stehule
2014-06-23 18:39 GMT+02:00 Vik Fearing : > On 06/23/2014 06:21 PM, Robert Haas wrote: > > On Sun, Jun 22, 2014 at 2:59 PM, Pavel Stehule > wrote: > >> I found only one problem - first patch introduce a new property > >> CONNECTION_LIMIT and replace previously used "CONNECTION LIMIT" in > >> docum

Re: [HACKERS] Atomics hardware support table & supported architectures

2014-06-23 Thread Robert Haas
On Mon, Jun 23, 2014 at 12:29 PM, Andres Freund wrote: >> > That we have support for platforms that we haven't even documented as >> > working (e.g. SuperH) or platforms that don't work in the realword >> > (m32r) means that that one has to think about and research so many more >> > edge cases tha

Re: [HACKERS] SQL access to database attributes

2014-06-23 Thread Robert Haas
On Mon, Jun 23, 2014 at 12:39 PM, Vik Fearing wrote: > On 06/23/2014 06:21 PM, Robert Haas wrote: >> On Sun, Jun 22, 2014 at 2:59 PM, Pavel Stehule >> wrote: >>> I found only one problem - first patch introduce a new property >>> CONNECTION_LIMIT and replace previously used "CONNECTION LIMIT" in

Re: [HACKERS] /proc/self/oom_adj is deprecated in newer Linux kernels

2014-06-23 Thread Tom Lane
Gurjeet Singh writes: > On Mon, Jun 23, 2014 at 11:52 AM, Tom Lane wrote: >> While this is clearly an improvement over what we had before, it's >> impossible to argue that it's a bug fix, and we are way past the 9.4 >> feature freeze deadline. In particular, packagers who've already done >> thei

[HACKERS] checking for interrupts during heap insertion

2014-06-23 Thread Robert Haas
Hi, While talking to Amit Kapila this morning, he mentioned to me that there seem to be no CHECK_FOR_INTERRUPTS() calls anywhere in heap_multi_insert() or the functions it calls. Should there be? By way of contrast, heapgetpage() has this: /* * Be sure to check for interrupts at least o

Re: [HACKERS] Use a signal to trigger a memory context dump?

2014-06-23 Thread Tom Lane
Andres Freund writes: > I wonder if it'd make sense to allow a signal to trigger a memory > context dump? I and others more than once had the need to examine memory > usage on production systems and using gdb isn't always realistic. > I wonder if we could install a signal handler for some unused s

Re: [HACKERS] Minmax indexes

2014-06-23 Thread Alvaro Herrera
Heikki Linnakangas wrote: > Some comments, aside from the design wrt. bounding boxes etc. : Thanks. I haven't commented on that sub-thread because I think it's possible to come up with a reasonable design that solves the issue by adding a couple of amprocs. I need to do some more thinking to ens

Re: [HACKERS] Atomics hardware support table & supported architectures

2014-06-23 Thread Andres Freund
On 2014-06-23 12:46:11 -0400, Robert Haas wrote: > On Mon, Jun 23, 2014 at 12:29 PM, Andres Freund > wrote: > >> > That we have support for platforms that we haven't even documented as > >> > working (e.g. SuperH) or platforms that don't work in the realword > >> > (m32r) means that that one has

Re: [HACKERS] tab completion for setting search_path

2014-06-23 Thread Robert Haas
On Mon, Jun 23, 2014 at 9:10 AM, Kevin Grittner wrote: > Andres Freund wrote: >> On 2014-06-22 20:02:57 -0700, Tom Lane wrote: >>> Ian Barwick writes: On 23/06/14 00:58, Andres Freund wrote: > I thought about committing this but couldn't get over this bit. If you > type "SELECT * FR

Re: [HACKERS] Use a signal to trigger a memory context dump?

2014-06-23 Thread Andres Freund
On 2014-06-23 10:07:36 -0700, Tom Lane wrote: > Andres Freund writes: > > I wonder if it'd make sense to allow a signal to trigger a memory > > context dump? I and others more than once had the need to examine memory > > usage on production systems and using gdb isn't always realistic. > > I wonde

[HACKERS] Re: [HACKERS] please review source(SQLServer compatible)‏

2014-06-23 Thread Kevin Grittner
Vik Fearing wrote: > On 06/23/2014 04:51 PM, rohtodeveloper wrote: >> 1.SQL statement support >>   INSERT statement without INTO keyword >>   DELETE statement without FROM keywork > > Why would we want this? I'm pretty sure that the only argument for it is to ease migration of software from other

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-06-23 Thread Stephen Frost
Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > I'd expect a catalog table or perhaps changes to pg_class (maybe other > > things also..) to define what gets logged. > > How exactly will that work for log messages generated in contexts where > we do not have working catal

Re: [Fwd: Re: [HACKERS] proposal: new long psql parameter --on-error-stop]

2014-06-23 Thread Pavel Stehule
Hello I am sending little bit modified patch by Fujii' comments - but I am not able to fix it more - it is task for someone with better English skill then I have Regards Pavel 2014-06-23 10:02 GMT+02:00 Fujii Masao : > On Mon, Jun 23, 2014 at 12:04 AM, Pavel Stehule > wrote: > > Hello > > >

[HACKERS] Re: [HACKERS] Re: [HACKERS] please review source(SQLServer compatible)‏

2014-06-23 Thread Pavel Stehule
2014-06-23 19:22 GMT+02:00 Kevin Grittner : > Vik Fearing wrote: > > On 06/23/2014 04:51 PM, rohtodeveloper wrote: > >> 1.SQL statement support > >> INSERT statement without INTO keyword > >> DELETE statement without FROM keywork > > > > Why would we want this? > > I'm pretty sure that the on

Re: [HACKERS] idle_in_transaction_timeout

2014-06-23 Thread Josh Berkus
On 06/22/2014 09:02 PM, Abhijit Menon-Sen wrote: > I (somewhat reluctantly) agree with Kevin that > "idle_in_transaction_session_timeout" (for FATAL) and > "idle_transaction_timeout" (for ERROR) would work. Given that an IIT timeout has been a TODO for at least 6 years before being addressed, I'm

Re: [HACKERS] /proc/self/oom_adj is deprecated in newer Linux kernels

2014-06-23 Thread Gurjeet Singh
On Mon, Jun 23, 2014 at 12:49 PM, Tom Lane wrote: > Gurjeet Singh writes: >> While I'd love to reduce the number of future installations without >> this fix in place, I respect the decision to honor project policy. At >> the same time, this change does not break anything. It introduces new >> env

Re: [HACKERS] API change advice: Passing plan invalidation info from the rewriter into the planner?

2014-06-23 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Wed, Jun 18, 2014 at 2:18 PM, Stephen Frost wrote: > > I'm also of the opinion that this isn't strictly necessary for the > > initial RLS offering in PG- there's a clear way we could migrate > > existing users to a multi-policy system from a single

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2014-06-23 Thread Abhijit Menon-Sen
At 2014-06-23 08:50:33 -0400, sfr...@snowman.net wrote: > > I'm not a huge fan of adding this as a contrib module I added it to the CF because we're interested in auditing functionality for 9.5, and as far as I can tell, there's nothing better available. At the moment, the contrib module has the

Re: [HACKERS] Minmax indexes

2014-06-23 Thread Heikki Linnakangas
On 06/23/2014 08:07 PM, Alvaro Herrera wrote: Heikki Linnakangas wrote: With 8k block size, that's just enough to cover the full range of 2^32-1 blocks that you'll need if you set mm_pages_per_range=1. Each regular revmap page can store about 8192/6 = 1365 item pointers, each array revmap page c

Re: [HACKERS] checking for interrupts during heap insertion

2014-06-23 Thread Heikki Linnakangas
On 06/23/2014 08:07 PM, Robert Haas wrote: While talking to Amit Kapila this morning, he mentioned to me that there seem to be no CHECK_FOR_INTERRUPTS() calls anywhere in heap_multi_insert() or the functions it calls. Should there be? Haven't heard any complaints, but I guess.. By way of cont

Re: [HACKERS] Minmax indexes

2014-06-23 Thread Robert Haas
On Thu, Jun 19, 2014 at 12:32 PM, Greg Stark wrote: > On Wed, Jun 18, 2014 at 4:51 AM, Heikki Linnakangas > wrote: >> Implementing something is a good way to demonstrate how it would look like. >> But no, I don't insist on implementing every possible design whenever a new >> feature is proposed.

[HACKERS] Re: [COMMITTERS] pgsql: Do all-visible handling in lazy_vacuum_page() outside its critic

2014-06-23 Thread Jeff Davis
On Fri, 2014-06-20 at 09:10 +, Andres Freund wrote: > To fix, simply move all the all-visible handling outside the critical > section. Doing so means that the PD_ALL_VISIBLE on the page won't be > included in the full page image of the HEAP2_CLEAN record anymore. But > that's fine, the flag wil

Re: [HACKERS] [BUGS] BUG #10728: json_to_recordset with nested json objects NULLs columns

2014-06-23 Thread Andrew Dunstan
On 06/23/2014 11:43 AM, Tom Lane wrote: Michael Paquier writes: Digging more into that, I have found the issue and a fix for it. It happens that populate_recordset_object_start, which is used to initialize the process for the population of the record, is taken *each* time a json object is foun

  1   2   >