Re: [HACKERS] Support for N synchronous standby servers - take 2

2015-06-28 Thread Michael Paquier
On Sun, Jun 28, 2015 at 5:52 PM, Sawada Masahiko sawada.m...@gmail.com wrote: On Fri, Jun 26, 2015 at 2:46 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Jun 25, 2015 at 8:32 PM, Simon Riggs wrote: Let's start with a complex, fully described use case then work out how to

Re: [HACKERS] proposal: condition blocks in psql

2015-06-28 Thread Tomas Vondra
Hi, On 06/28/2015 09:04 AM, Fabien COELHO wrote: 2. The general difficulty of getting psql var values into a DO block (currently I use temp tables). Maybe this means that DO should be extended in some way to allow for parameters, at least when PL/pgSQL is used? I agree with this

Re: [HACKERS] proposal: condition blocks in psql

2015-06-28 Thread Tomas Vondra
Hi, On 06/28/2015 02:21 PM, Pavel Stehule wrote: 2015-06-28 14:12 GMT+02:00 Tomas Vondra tomas.von...@2ndquadrant.com mailto:tomas.von...@2ndquadrant.com: This proposal is not against to DO parametrization. It is same like conditional block in C (#ifdef). There is similarity with C statements

Re: [HACKERS] proposal: condition blocks in psql

2015-06-28 Thread Pavel Stehule
2015-06-28 14:12 GMT+02:00 Tomas Vondra tomas.von...@2ndquadrant.com: Hi, On 06/28/2015 09:04 AM, Fabien COELHO wrote: 2. The general difficulty of getting psql var values into a DO block (currently I use temp tables). Maybe this means that DO should be extended in some way to allow

Re: [HACKERS] proposal: condition blocks in psql

2015-06-28 Thread Tomas Vondra
Hi, On 06/28/2015 08:47 AM, Corey Huinker wrote: 5. I'm actually using psql to connect to redshift, which doesn't have DO blocks at all. I don't see this as a reason to add features to psql, unless there are other compelling reasons for the addition. -- Tomas Vondra

Re: [HACKERS] proposal: condition blocks in psql

2015-06-28 Thread Pavel Stehule
2015-06-28 14:26 GMT+02:00 Tomas Vondra tomas.von...@2ndquadrant.com: Hi, On 06/28/2015 08:01 AM, Pavel Stehule wrote: you can use PL/pgSQL - but there are some limits * maintenance large plpgsql functions * the plpgsql functions or anonymous functions create a transaction borders -

Re: [HACKERS] drop/truncate table sucks for large values of shared buffers

2015-06-28 Thread Robert Haas
On Sat, Jun 27, 2015 at 11:38 AM, Andres Freund and...@anarazel.de wrote: On 2015-06-27 10:10:04 -0400, Tom Lane wrote: In the past we've speculated about fixing the performance of these things by complicating the buffer lookup mechanism enough so that it could do find any page for this

Re: [HACKERS] proposal: condition blocks in psql

2015-06-28 Thread Tomas Vondra
Hi, On 06/28/2015 08:01 AM, Pavel Stehule wrote: you can use PL/pgSQL - but there are some limits * maintenance large plpgsql functions * the plpgsql functions or anonymous functions create a transaction borders - what should not be wanted But why is that a problem? Generally

Re: [HACKERS] Refactoring pgbench.c

2015-06-28 Thread Tomas Vondra
Hi, On 06/28/2015 08:10 AM, Fabien COELHO wrote: Hello Tatsuo, Main pgbench logic consists of single file pgbench.c which is 4036 lines of code as of today. This is not a small number and I think it would be nice if it is divided into smaller files because it will make it easier to maintain,

Re: [HACKERS] proposal: condition blocks in psql

2015-06-28 Thread Fabien COELHO
\if_ver_eq 9.2 What do you thinking about it? Couldn't this kind of thing be done directly with PL/pgSQL? you can use PL/pgSQL - but there are some limits * maintenance large plpgsql functions I agree with large but that would not necessarily mean complex. Also, some functions could

Re: [HACKERS] proposal: condition blocks in psql

2015-06-28 Thread Pavel Stehule
2015-06-28 8:59 GMT+02:00 Fabien COELHO coe...@cri.ensmp.fr: \if_ver_eq 9.2 What do you thinking about it? Couldn't this kind of thing be done directly with PL/pgSQL? you can use PL/pgSQL - but there are some limits * maintenance large plpgsql functions I agree with large but

Re: [HACKERS] Refactoring pgbench.c

2015-06-28 Thread Fabien COELHO
Hello Tatsuo, Main pgbench logic consists of single file pgbench.c which is 4036 lines of code as of today. This is not a small number and I think it would be nice if it is divided into smaller files because it will make it easier to maintain, add or change features of pgbench. I do not

Re: [HACKERS] Semantics of pg_file_settings view

2015-06-28 Thread Sawada Masahiko
On Sun, Jun 28, 2015 at 12:47 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Fri, Jun 26, 2015 at 4:02 PM, Tom Lane t...@sss.pgh.pa.us wrote: Combining this with my idea about preserving the ConfigVariable list, I'm thinking that it would be a good idea for

Re: [HACKERS] proposal: condition blocks in psql

2015-06-28 Thread Corey Huinker
I was just musing about this today, and was afraid that no one else would want it! This would be useful to me in the following use cases which I have right now: 1. I have a SQL script that invokes \COPY into a temporary table or some similar thing, preventing most of my logic from being pushed

Re: [HACKERS] proposal: condition blocks in psql

2015-06-28 Thread Fabien COELHO
2. The general difficulty of getting psql var values into a DO block (currently I use temp tables). Maybe this means that DO should be extended in some way to allow for parameters, at least when PL/pgSQL is used? -- Fabien. -- Sent via pgsql-hackers mailing list

Re: [HACKERS] proposal: condition blocks in psql

2015-06-28 Thread Pavel Stehule
2015-06-28 7:49 GMT+02:00 Fabien COELHO coe...@cri.ensmp.fr: The proposed syntax of new psql commands \if_ver_eq 9.2 ... \else \endif What do you thinking about it? Couldn't this kind of thing be done directly with PL/pgSQL? you can use PL/pgSQL - but there are some limits *

Re: [HACKERS] proposal: condition blocks in psql

2015-06-28 Thread Fabien COELHO
Hello again Pavel, Note that I'm not against cpp-like features on principle, I did macros for apache configurations a very long time ago, and that I only give my 0.02€ on this, for what's the € is worth these days:-) you can use parameters for functions, but you cannot it for DO statement

Re: [HACKERS] Support for N synchronous standby servers - take 2

2015-06-28 Thread Sawada Masahiko
On Fri, Jun 26, 2015 at 2:46 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Jun 25, 2015 at 8:32 PM, Simon Riggs wrote: Let's start with a complex, fully described use case then work out how to specify what we want. Well, one of the most simple cases where quorum commit and

Re: [HACKERS] proposal: condition blocks in psql

2015-06-28 Thread Pavel Stehule
2015-06-28 8:47 GMT+02:00 Corey Huinker corey.huin...@gmail.com: I was just musing about this today, and was afraid that no one else would want it! This would be useful to me in the following use cases which I have right now: 1. I have a SQL script that invokes \COPY into a temporary table

Re: [HACKERS] proposal: condition blocks in psql

2015-06-28 Thread Tomas Vondra
Hi, On 06/28/2015 02:50 PM, Pavel Stehule wrote: bI don't propose psql scripting./b I propose simple statement for conditional statement execution. The core of my proposal are commands That's a matter of opinion, I guess ... While you may propose only two simple conditional statements at

Re: [HACKERS] Semantics of pg_file_settings view

2015-06-28 Thread Tom Lane
Sawada Masahiko sawada.m...@gmail.com writes: On Sun, Jun 28, 2015 at 12:47 AM, Tom Lane t...@sss.pgh.pa.us wrote: However there's a further tweak to the view that I'd like to think about making. Once this is in and we make the originally-discussed change to suppress application of duplicated

Re: [HACKERS] pg_file_settings view vs. Windows

2015-06-28 Thread Tom Lane
I wrote: I noticed that in EXEC_BACKEND builds (ie, Windows) the pg_file_settings view doesn't act as its author presumably intended. Specifically, it reads as empty until/unless the current session processes a SIGHUP event. ... More or less bad alternative answers include: ... 3. Force a

Re: [HACKERS] Solaris testers wanted for strxfrm() behavior

2015-06-28 Thread Tom Lane
Peter Geoghegan p...@heroku.com writes: On Sat, Jun 27, 2015 at 7:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: I think the point of Noah's query is to find out whether ancient is an accurate description. You said it yourself at the time -- why trust the strxfrm() implementation when a NULL

Re: [HACKERS] Semantics of pg_file_settings view

2015-06-28 Thread Sawada Masahiko
On Mon, Jun 29, 2015 at 12:01 AM, Tom Lane t...@sss.pgh.pa.us wrote: Sawada Masahiko sawada.m...@gmail.com writes: On Sun, Jun 28, 2015 at 12:47 AM, Tom Lane t...@sss.pgh.pa.us wrote: However there's a further tweak to the view that I'd like to think about making. Once this is in and we make

Re: [HACKERS] drop/truncate table sucks for large values of shared buffers

2015-06-28 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On 27 June 2015 at 15:10, Tom Lane t...@sss.pgh.pa.us wrote: I don't like this too much because it will fail badly if the caller is wrong about the maximum possible page number for the table, which seems not exactly far-fetched. (For instance,

Re: [HACKERS] proposal: condition blocks in psql

2015-06-28 Thread David G. Johnston
On Sunday, June 28, 2015, Pavel Stehule pavel.steh...@gmail.com wrote: 2015-06-28 14:26 GMT+02:00 Tomas Vondra tomas.von...@2ndquadrant.com javascript:_e(%7B%7D,'cvml','tomas.von...@2ndquadrant.com');: Hi, On 06/28/2015 08:01 AM, Pavel Stehule wrote: you can use PL/pgSQL - but there

Re: [HACKERS] drop/truncate table sucks for large values of shared buffers

2015-06-28 Thread Andrew Dunstan
On 06/27/2015 10:10 AM, Tom Lane wrote: It also offers no hope of a fix for the other operations that scan the whole buffer pool, such as DROP TABLESPACE and DROP DATABASE. Improving DROP TABLE / TRUNCATE would still be a significant advance. These cases cause far more real world pain than

Re: [HACKERS] drop/truncate table sucks for large values of shared buffers

2015-06-28 Thread Tom Lane
Amit Kapila amit.kapil...@gmail.com writes: On Sat, Jun 27, 2015 at 7:40 PM, Tom Lane t...@sss.pgh.pa.us wrote: I don't like this too much because it will fail badly if the caller is wrong about the maximum possible page number for the table, which seems not exactly far-fetched. (For

Re: [HACKERS] drop/truncate table sucks for large values of shared buffers

2015-06-28 Thread Andres Freund
On 2015-06-28 09:11:29 -0400, Robert Haas wrote: On Sat, Jun 27, 2015 at 11:38 AM, Andres Freund and...@anarazel.de wrote: I've started to play around with doing that a year or three back. My approach was to use a linux style radix tree for the buffer mapping table. Besides lack of time

Re: [HACKERS] Semantics of pg_file_settings view

2015-06-28 Thread Tom Lane
Sawada Masahiko sawada.m...@gmail.com writes: On Mon, Jun 29, 2015 at 12:01 AM, Tom Lane t...@sss.pgh.pa.us wrote: er ... what? Sorry for confusing you. Anyway I meant that I got SEGV after applied WIP patch, and the cause is the above changes. The case is following. 1. Add port = 6543 to

Re: [HACKERS] drop/truncate table sucks for large values of shared buffers

2015-06-28 Thread Simon Riggs
On 27 June 2015 at 15:10, Tom Lane t...@sss.pgh.pa.us wrote: Amit Kapila amit.kapil...@gmail.com writes: I have looked into it and found that the main reason for such a behaviour is that for those operations it traverses whole shared_buffers and it seems to me that we don't need that

Re: [HACKERS] proposal: condition blocks in psql

2015-06-28 Thread Pavel Stehule
2015-06-28 10:46 GMT+02:00 Fabien COELHO coe...@cri.ensmp.fr: Hello again Pavel, Note that I'm not against cpp-like features on principle, I did macros for apache configurations a very long time ago, and that I only give my 0.02€ on this, for what's the € is worth these days:-) you can

Re: [HACKERS] pg_rewind failure by file deletion in source server

2015-06-28 Thread Heikki Linnakangas
On 06/26/2015 10:10 PM, Andres Freund wrote: On 2015-06-26 15:07:59 -0400, Robert Haas wrote: I realize that the recent fsync fiasco demonstrated that people keep files not readable by PG in the data directory It wasn't unreadable files that were the primary problem, it was files with read

Re: [HACKERS] Solaris testers wanted for strxfrm() behavior

2015-06-28 Thread Josh Berkus
On 06/28/2015 12:29 PM, Peter Geoghegan wrote: It might have been the right decision at the time to paper over the problem, but only for a year or two. I'd only favor adding defenses if it could be expected to take longer for the Solaris stdlib people to ship a fix for their egregious bug than

Re: [HACKERS] proposal: condition blocks in psql

2015-06-28 Thread Corey Huinker
I implemented \foreach five years ago, and this is not simple to implement statement - so don't propose it. I wouldn't to inject full scripting language to psql. Then it is better to use bash, perl, python. But well designed conditional statements needs only few lines for implementation,

Re: [HACKERS] Redesigning checkpoint_segments

2015-06-28 Thread Heikki Linnakangas
On 06/26/2015 02:08 PM, Heikki Linnakangas wrote: I'm not sure what to do about this. With the attached patch, you get the same leisurely pacing with restartpoints as you get with checkpoints, but you exceed max_wal_size during recovery, by the amount determined by checkpoint_completion_target.

Re: [HACKERS] Refactoring pgbench.c

2015-06-28 Thread Tatsuo Ishii
I do not think that this large file is a so big a problem (good editors help navigation in the code), and I'm not sure that splitting it would achieve much: there are not that many functions, some of them are maybe long (main, threadRun, doCustom) but mostly for good reasons. My thoughts,

Re: [HACKERS] Refactoring pgbench.c

2015-06-28 Thread Tomas Vondra
On 06/28/15 18:56, Tatsuo Ishii wrote: I do not think that this large file is a so big a problem (good editors help navigation in the code), and I'm not sure that splitting it would achieve much: there are not that many functions, some of them are maybe long (main, threadRun, doCustom) but

Re: [HACKERS] Refactoring pgbench.c

2015-06-28 Thread Fabien COELHO
This is kind of surprising to me that two people are against refactoring proposal (I understand that Fabien has pending patches for pgbench and that could be a motivation for this though). I think that's a misunderstanding. I'm not against refactoring - not at all, and neither is Fabien I

Re: [HACKERS] pg_rewind failure by file deletion in source server

2015-06-28 Thread Heikki Linnakangas
On 06/24/2015 09:43 AM, Michael Paquier wrote: Attached is a new set of patches. Except for the last ones that addresses one issue of pg_rewind (symlink management when streaming PGDATA), all the others introduce if_not_exists options for the functions of genfile.c. The pg_rewind stuff could be

Re: [HACKERS] Support for N synchronous standby servers - take 2

2015-06-28 Thread Josh Berkus
On 06/28/2015 04:36 AM, Sawada Masahiko wrote: On Sat, Jun 27, 2015 at 3:53 AM, Josh Berkus j...@agliodbs.com wrote: On 06/26/2015 11:32 AM, Robert Haas wrote: I think your proposal is worth considering, but you would need to fill in a lot more details and explain how it works in detail,

Re: [HACKERS] PANIC in GIN code

2015-06-28 Thread Heikki Linnakangas
On 06/26/2015 10:53 PM, Jeff Janes wrote: On Fri, Jun 26, 2015 at 11:40 AM, Heikki Linnakangas hlinn...@iki.fi wrote: The page is being split (that's evident from info=48 above). ginPlaceToPage calls GinNewBuffer, which calls GetFreeIndexPage(). That finds a page that can be recycled, and

Re: [HACKERS] Solaris testers wanted for strxfrm() behavior

2015-06-28 Thread Peter Geoghegan
On Sun, Jun 28, 2015 at 8:31 AM, Tom Lane t...@sss.pgh.pa.us wrote: The point here is to *find out*, rather than assuming. I agree that Sun should have been embarrassed that such a bug ever made it into a released libc, but it did. The question is how long did it take them to notice and fix

Re: [HACKERS] Solaris testers wanted for strxfrm() behavior

2015-06-28 Thread Tom Lane
Thomas Munro thomas.mu...@enterprisedb.com writes: Just by the way, I wonder if this was that bug: https://illumos.org/issues/1594 Oooh. Might or might not be *same* bug, but it sure looks like it could have the right symptom. If this is indeed inherited from old Solaris, I'm afraid we are

Re: [HACKERS] Solaris testers wanted for strxfrm() behavior

2015-06-28 Thread Tom Lane
Peter Geoghegan p...@heroku.com writes: It might have been the right decision at the time to paper over the problem, but only for a year or two. I'd only favor adding defenses if it could be expected to take longer for the Solaris stdlib people to ship a fix for their egregious bug than it

Re: [HACKERS] Solaris testers wanted for strxfrm() behavior

2015-06-28 Thread Peter Geoghegan
On Sun, Jun 28, 2015 at 4:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: The reason that bug is special is that it looks like a crash in Postgres, one that people have complained of because they didn't see it in other programs, which is not totally surprising because it requires a somewhat unusual

Re: [HACKERS] Solaris testers wanted for strxfrm() behavior

2015-06-28 Thread Robert Haas
On Sun, Jun 28, 2015 at 7:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Geoghegan p...@heroku.com writes: It might have been the right decision at the time to paper over the problem, but only for a year or two. I'd only favor adding defenses if it could be expected to take longer for the

Re: [HACKERS] Solaris testers wanted for strxfrm() behavior

2015-06-28 Thread Peter Geoghegan
On Sun, Jun 28, 2015 at 4:35 PM, Robert Haas robertmh...@gmail.com wrote: I completely agree. Noah is quite right to try to find out whether this is still an issue, and I'm glad he's doing it, and I think it's very unfortunate that Peter is trying to discourage that research. Far from it. I

Re: [HACKERS] anole: assorted stability problems

2015-06-28 Thread Robert Haas
On Sun, Jun 28, 2015 at 7:27 PM, Tom Lane t...@sss.pgh.pa.us wrote: I'd hoped that commit 1b468a131bd260c9041484f78b8580c7f232d580 would resolve this, but nope, anole is still getting occasional stuck spinlocks:

Re: [HACKERS] anole: assorted stability problems

2015-06-28 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: That sucks. It was easy to see that the old fallback barrier implementation wasn't re-entrant, but this one should be. And now that I look at it again, doesn't the failure message indicate that's not the problem anyway? ! PANIC: stuck spinlock

Re: [HACKERS] Solaris testers wanted for strxfrm() behavior

2015-06-28 Thread Thomas Munro
On Mon, Jun 29, 2015 at 7:58 AM, Josh Berkus j...@agliodbs.com wrote: My perspective is that if both SmartOS and OmniOS pass, it's not our responsibility to support OldSolaris if they won't update libraries. Just by the way, I wonder if this was that bug: https://illumos.org/issues/1594 --

Re: [HACKERS] PANIC in GIN code

2015-06-28 Thread Jeff Janes
On Sun, Jun 28, 2015 at 12:31 PM, Heikki Linnakangas hlinn...@iki.fi wrote: On 06/26/2015 10:53 PM, Jeff Janes wrote: On Fri, Jun 26, 2015 at 11:40 AM, Heikki Linnakangas hlinn...@iki.fi wrote: The page is being split (that's evident from info=48 above). ginPlaceToPage calls GinNewBuffer,

Re: [HACKERS] Solaris testers wanted for strxfrm() behavior

2015-06-28 Thread Peter Geoghegan
On Sun, Jun 28, 2015 at 12:58 PM, Josh Berkus j...@agliodbs.com wrote: My perspective is that if both SmartOS and OmniOS pass, it's not our responsibility to support OldSolaris if they won't update libraries. Obviously I especially don't want to double the number of strxfrm() calls made during

Re: [HACKERS] Solaris testers wanted for strxfrm() behavior

2015-06-28 Thread Tom Lane
Peter Geoghegan p...@heroku.com writes: On Sun, Jun 28, 2015 at 12:58 PM, Josh Berkus j...@agliodbs.com wrote: My perspective is that if both SmartOS and OmniOS pass, it's not our responsibility to support OldSolaris if they won't update libraries. Obviously I especially don't want to double

Re: [HACKERS] anole: assorted stability problems

2015-06-28 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Alvaro Herrera wrote: Tom Lane wrote: Andres Freund and...@anarazel.de writes: Uh. I'm pretty sure there were some back when that patch went in. And there definitely used to be a couple earlier. I guess itanium really is dying (mixed bad: It's

Re: [HACKERS] Solaris testers wanted for strxfrm() behavior

2015-06-28 Thread Thomas Munro
On Mon, Jun 29, 2015 at 10:57 AM, Tom Lane t...@sss.pgh.pa.us wrote: Thomas Munro thomas.mu...@enterprisedb.com writes: Just by the way, I wonder if this was that bug: https://illumos.org/issues/1594 Oooh. Might or might not be *same* bug, but it sure looks like it could have the right

Re: [HACKERS] drop/truncate table sucks for large values of shared buffers

2015-06-28 Thread Amit Kapila
On Sun, Jun 28, 2015 at 9:05 PM, Tom Lane t...@sss.pgh.pa.us wrote: Amit Kapila amit.kapil...@gmail.com writes: On Sat, Jun 27, 2015 at 7:40 PM, Tom Lane t...@sss.pgh.pa.us wrote: I don't like this too much because it will fail badly if the caller is wrong about the maximum possible page

Re: [HACKERS] Refactoring pgbench.c

2015-06-28 Thread Jeff Janes
On Sat, Jun 27, 2015 at 5:10 PM, Tatsuo Ishii is...@postgresql.org wrote: Main pgbench logic consists of single file pgbench.c which is 4036 lines of code as of today. This is not a small number and I think it would be nice if it is divided into smaller files because it will make it easier to

Re: [HACKERS] drop/truncate table sucks for large values of shared buffers

2015-06-28 Thread Amit Kapila
On Sun, Jun 28, 2015 at 9:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: On 27 June 2015 at 15:10, Tom Lane t...@sss.pgh.pa.us wrote: I don't like this too much because it will fail badly if the caller is wrong about the maximum possible page number for

Re: [HACKERS] Solaris testers wanted for strxfrm() behavior

2015-06-28 Thread Peter Geoghegan
On Sun, Jun 28, 2015 at 4:35 PM, Peter Geoghegan p...@heroku.com wrote: It hardly matters much, but I don't think that it is. I think the issue is entirely explained by sloppy code in the Solaris 8 stdlib. I don't imagine that it will come as a surprise to anybody, but the manpage [1] for

Re: [HACKERS] drop/truncate table sucks for large values of shared buffers

2015-06-28 Thread Robert Haas
On Sun, Jun 28, 2015 at 12:17 PM, Tom Lane t...@sss.pgh.pa.us wrote: I'm not sure what you consider dire, but missing a dirty buffer belonging to the to-be-destroyed table would result in the system being permanently unable to checkpoint, because attempts to write out the buffer to the

Re: [HACKERS] anole: assorted stability problems

2015-06-28 Thread Robert Haas
On Sun, Jun 28, 2015 at 9:17 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: That sucks. It was easy to see that the old fallback barrier implementation wasn't re-entrant, but this one should be. And now that I look at it again, doesn't the failure message

[HACKERS] Adjust errorcode in background worker code

2015-06-28 Thread Amit Langote
Hi, How about the attached that adjusts errorcode for the error related to checking the flag bgw_flags in BackgroundWorkerInitializeConnection*() functions so that it matches the treatment in SanityCheckBackgroundWorker()? s/ERRCODE_PROGRAM_LIMIT_EXCEEDED/ERRCODE_INVALID_PARAMETER_VALUE/g There

Re: [HACKERS] Adjust errorcode in background worker code

2015-06-28 Thread Amit Langote
On 2015-06-29 AM 11:36, Amit Langote wrote: Hi, How about the attached that adjusts errorcode for the error related to checking the flag bgw_flags in BackgroundWorkerInitializeConnection*() functions so that it matches the treatment in SanityCheckBackgroundWorker()?

Re: [HACKERS] proposal: condition blocks in psql

2015-06-28 Thread Pavel Stehule
2015-06-28 22:43 GMT+02:00 Corey Huinker corey.huin...@gmail.com: I implemented \foreach five years ago, and this is not simple to implement statement - so don't propose it. I wouldn't to inject full scripting language to psql. Then it is better to use bash, perl, python. But well designed

Re: [HACKERS] pg_file_settings view vs. Windows

2015-06-28 Thread Sawada Masahiko
On Mon, Jun 29, 2015 at 12:20 AM, Tom Lane t...@sss.pgh.pa.us wrote: I wrote: I noticed that in EXEC_BACKEND builds (ie, Windows) the pg_file_settings view doesn't act as its author presumably intended. Specifically, it reads as empty until/unless the current session processes a SIGHUP event.

Re: [HACKERS] anole: assorted stability problems

2015-06-28 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: What we did do that touched s_lock.h was attempt to ensure that SpinLockAcquire() and SpinLockRelease() function as compiler barriers, so that it should no longer be necessary to litter the code with volatile in every function that uses those. It is