Re: [HACKERS] Poorly-thought-out handling of double variables in pgbench

2016-05-06 Thread Fabien COELHO
While testing the patch I found a minor preexisting (mine...) bug: when string-scanning doubles, whether the whole string is consumed or not is not checked. This means that -D x=0one is interpreted as double 0. I came up with the attached check, but maybe there is a cleaner way to do that.

Re: [HACKERS] Poorly-thought-out handling of double variables in pgbench

2016-05-06 Thread Tom Lane
Fabien COELHO writes: >> Neither way allows for trailing whitespace, though. I don't see that >> that's important here. > No, this is not an issue here for variables specified from the command > line. Consider pushing this fix? Done already.

Re: [HACKERS] \crosstabview fixes

2016-05-06 Thread Tom Lane
"Daniel Verite" writes: > Checking http://www.postgresql.org/docs/devel/static/app-psql.html , > I notice that the last example is still using the syntax for arguments > that has been deprecated by commit 6f0d6a507, as discussed in this > thread. Ooops. > A fix to

Re: [HACKERS] Stopping logical replication protocol

2016-05-06 Thread Oleksandr Shulgin
On Fri, May 6, 2016 at 5:23 PM, Vladimir Gordiychuk wrote: > Hi all, > > During implementing logical replication protocol for pgjdbc > https://github.com/pgjdbc/pgjdbc/pull/550 I faced with strange behavior > of the *walcender.c*: > >1. When WAL consumer catchup master and

Re: [HACKERS] Segmentation fault when max_parallel degree is very High

2016-05-06 Thread Robert Haas
On Wed, May 4, 2016 at 11:01 AM, Tom Lane wrote: > Dilip Kumar writes: >> When parallel degree is set to very high say 7, there is a segmentation >> fault in parallel code, >> and that is because type casting is missing in the code.. > > I'd say the

Re: [HACKERS] atomic pin/unpin causing errors

2016-05-06 Thread Jeff Janes
On Thu, May 5, 2016 at 11:52 AM, Andres Freund wrote: > Hi Jeff, > > On 2016-04-29 10:38:55 -0700, Jeff Janes wrote: >> I don't see the problem with an cassert-enabled, probably because it >> is just too slow to ever reach the point where the problem occurs. > > Running the

Re: [HACKERS] Stopping logical replication protocol

2016-05-06 Thread Vladimir Gordiychuk
Replication work via Copy API, so for stop replication walcender.c wait CopyDone. My communication seems like this FE=> StartReplication(query: START_REPLICATION SLOT pgjdbc_logical_replication_slot LOGICAL 0/18FCFD0 ("include-xids" 'false', "skip-empty-xacts" 'true')) FE=> Query(CopyStart) <=BE

Re: [HACKERS] SET ROLE and reserved roles

2016-05-06 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Thu, May 5, 2016 at 10:41 AM, Stephen Frost wrote: > > Barring objections or concerns, I'll push this sometime tomorrow > > (probably after I get back to DC). > > It really would have been good to get this stuff done sooner.

Re: [HACKERS] \crosstabview fixes

2016-05-06 Thread Daniel Verite
Tom Lane wrote: > Pushed, thanks. > BTW, I see we've been spelling your name with an insufficient number > of accents in the commit logs and release notes. Can't do much about > the logs, but will fix the release notes. I use myself the nonaccented version of my name in "From" headers,

Re: [HACKERS] Poorly-thought-out handling of double variables in pgbench

2016-05-06 Thread Tom Lane
Fabien COELHO writes: > This is a definite improvement. > I like the lazyness between string & numeric forms, and for sorting, that > is what was needed doing to have something clean. > Applied on head, it works for me. OK, pushed. > While testing the patch I found a

[HACKERS] Perf Benchmarking and regression.

2016-05-06 Thread Mithun Cy
I tried to do some benchmarking on postgres master head commit 72a98a639574d2e25ed94652848555900c81a799 Author: Andres Freund Date: Tue Apr 26 20:32:51 2016 -0700 CASE : Read-Write Tests when data exceeds shared buffers. Non Default settings and test ./postgres -c

[HACKERS] Stopping logical replication protocol

2016-05-06 Thread Vladimir Gordiychuk
Hi all, During implementing logical replication protocol for pgjdbc https://github.com/pgjdbc/pgjdbc/pull/550 I faced with strange behavior of the *walcender.c*: 1. When WAL consumer catchup master and change his state to streaming, not available normally complete replication by send

Re: [HACKERS] Perf Benchmarking and regression.

2016-05-06 Thread Andres Freund
Hi, Thanks for benchmarking! On 2016-05-06 19:43:52 +0530, Mithun Cy wrote: > 1. # first bad commit: [ac1d7945f866b1928c2554c0f80fd52d7f92] Make idle > backends exit if the postmaster dies. > this made performance to drop from > > 15947.21546 (15K +) to 13409.758510 (arround 13K+). Let's

Re: [HACKERS] textlike under the LIKE operator for char(n)

2016-05-06 Thread Kevin Grittner
On Fri, May 6, 2016 at 8:58 AM, Kohei KaiGai wrote: > postgres=# select 'abcd'::char(20) LIKE 'ab%cd'; > ?column? > -- > f > (1 row) > > postgres=# select 'abcd'::char(4) LIKE 'ab%cd'; > ?column? > -- > t > (1 row) > > LIKE operator (that is eventually

Re: [HACKERS] Perf Benchmarking and regression.

2016-05-06 Thread Mithun Cy
On Fri, May 6, 2016 at 8:35 PM, Andres Freund wrote: > Also, do you see read-only workloads to be affected too? Thanks, I have not tested with above specific commitid which reported performance issue but At HEAD commit 72a98a639574d2e25ed94652848555900c81a799 Author: Andres

Re: [HACKERS] Default Roles

2016-05-06 Thread Robert Haas
On Sun, Apr 17, 2016 at 11:05 PM, Noah Misch wrote: > On Sun, Apr 17, 2016 at 08:04:03PM -0400, Noah Misch wrote: >> On Thu, Apr 07, 2016 at 03:50:47PM -0400, Stephen Frost wrote: >> > I'm planning to continue going over the patch tomorrow morning with >> > plans to push this

Re: [HACKERS] Default Roles

2016-05-06 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Sun, Apr 17, 2016 at 11:05 PM, Noah Misch wrote: > > On Sun, Apr 17, 2016 at 08:04:03PM -0400, Noah Misch wrote: > >> On Thu, Apr 07, 2016 at 03:50:47PM -0400, Stephen Frost wrote: > >> > I'm planning to continue going over the

Re: [HACKERS] Feature request: make cluster_name GUC useful for psql prompts

2016-05-06 Thread Alvaro Herrera
Jerry Sievers wrote: > Steve Crawford writes: > > > That is almost identical to the solution I suggested a week or two ago to > > someone tackling the issue and the hack works on initial connection. > > > > Connect to a different cluster with "\c", however, and

Re: [HACKERS] [COMMITTERS] pgsql: Add TAP tests for pg_dump

2016-05-06 Thread Robert Haas
On Fri, May 6, 2016 at 4:07 PM, Stephen Frost wrote: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> Stephen Frost writes: >> > * Stephen Frost (sfr...@snowman.net) wrote: >> >> Looks like the test_pg_dump extension made the Windows builds upset. >> >> I'm

Re: [HACKERS] Initial release notes created for 9.6

2016-05-06 Thread Alvaro Herrera
Tom Lane wrote: > Alvaro Herrera writes: > > Is it really sensible to group f1f5ec1ef together with the others? I > > think that one should be its own entry. > > Peter seemed happy with the idea, cf >

Re: [HACKERS] NOT EXIST for PREPARE

2016-05-06 Thread Merlin Moncure
On Fri, Mar 25, 2016 at 8:36 AM, Merlin Moncure wrote: > On Wed, Mar 23, 2016 at 3:10 PM, Stephen Frost wrote: >> Just a thought. I do still like the general idea of INE support for >> PREPARE, but perhaps there's a better option. > > Admittedly, you make

Re: [HACKERS] Feature request: make cluster_name GUC useful for psql prompts

2016-05-06 Thread Jerry Sievers
Peter Eisentraut writes: > On 5/5/16 9:21 PM, Steve Crawford wrote: > >> Adding an escape sequence that references cluster_name would enable >> prompts to identify the cluster in a manner that is both consistent and >> distinct regardless of access path. > > I

Re: [HACKERS] Rename max_parallel_degree?

2016-05-06 Thread Robert Haas
On Tue, May 3, 2016 at 11:42 PM, David Rowley wrote: >>> Magnus seems OK with the way things are. >>> Peter wants to change either the fact that it is 0-based or the fact >>> that it is called degree, but is OK with either. >>> Tom doesn't like "degree" and also

Re: [HACKERS] Feature request: make cluster_name GUC useful for psql prompts

2016-05-06 Thread Jerry Sievers
Steve Crawford writes: > That is almost identical to the solution I suggested a week or two ago to > someone tackling the issue and the hack works on initial connection. > > Connect to a different cluster with "\c", however, and it will leave the > prompt

Re: [HACKERS] Initial release notes created for 9.6

2016-05-06 Thread Tom Lane
Christian Ullrich writes: > * Tom Lane wrote: > + > +Add new SSPI authentication parameters compat_realm > +and upn_usename, to make it possible to make SSPI > +work more like GSSAPI (Christian Ullrich) > + > It is upn_username, not

Re: [HACKERS] [COMMITTERS] pgsql: Add TAP tests for pg_dump

2016-05-06 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Robert Haas writes: > > On Fri, May 6, 2016 at 4:07 PM, Stephen Frost wrote: > >> * Tom Lane (t...@sss.pgh.pa.us) wrote: > >>> But at this point I think Peter's complaint has some force to it, and that > >>> what

Re: [HACKERS] Initial release notes created for 9.6

2016-05-06 Thread Alvaro Herrera
Speed up sorting of uuid, bytea, and char(n) fields by using abbreviated keys (Peter Geoghegan) Support for abbreviated keys has also been added to the non-default operator classes text_pattern_ops,

Re: [HACKERS] [COMMITTERS] pgsql: Add TAP tests for pg_dump

2016-05-06 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Fri, May 6, 2016 at 4:07 PM, Stephen Frost wrote: > > * Tom Lane (t...@sss.pgh.pa.us) wrote: > >> Stephen Frost writes: > >> > * Stephen Frost (sfr...@snowman.net) wrote: > >> >> Looks like the test_pg_dump

Re: [HACKERS] atomic pin/unpin causing errors

2016-05-06 Thread Andres Freund
On 2016-05-06 11:15:03 -0700, Jeff Janes wrote: > > Running the test with cassert enabled I actually get assertion failures, > > due to the FATAL you added. > > > > #1 0x00958dde in ExceptionalCondition (conditionName=0xb36c2a > > "!(RefCountErrors == 0)", errorType=0xb361af

Re: [HACKERS] NOT EXIST for PREPARE

2016-05-06 Thread Robert Haas
On Fri, May 6, 2016 at 2:38 PM, Merlin Moncure wrote: > On Fri, Mar 25, 2016 at 8:36 AM, Merlin Moncure wrote: >> On Wed, Mar 23, 2016 at 3:10 PM, Stephen Frost wrote: >>> Just a thought. I do still like the general idea of INE

Re: [HACKERS] Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold

2016-05-06 Thread Kevin Grittner
On Wed, Apr 20, 2016 at 8:08 PM, Ants Aasma wrote: > I had an idea I wanted to test out. The gist of it is to effectively > have the last slot of timestamp to xid map stored in the latest_xmin > field and only update the mapping when slot boundaries are crossed. > See

Re: [HACKERS] [COMMITTERS] pgsql: Add TAP tests for pg_dump

2016-05-06 Thread Robert Haas
On Fri, May 6, 2016 at 3:14 PM, Andres Freund wrote: > On 2016-05-06 15:11:53 -0400, Stephen Frost wrote: >> * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: >> > On 5/6/16 2:06 PM, Stephen Frost wrote: >> > >Add TAP tests for pg_dump >> > >> > I'd be the first to

Re: [HACKERS] pg9.6 segfault using simple query (related to use fk for join estimates)

2016-05-06 Thread Robert Haas
On Thu, May 5, 2016 at 10:48 AM, David Rowley wrote: > On 5 May 2016 at 16:04, David Rowley wrote: >> I've started making some improvements to this, but need to talk to >> Tomas. It's currently in the middle of his night, but will try

Re: [HACKERS] [COMMITTERS] pgsql: Add TAP tests for pg_dump

2016-05-06 Thread Tom Lane
Robert Haas writes: > On Fri, May 6, 2016 at 4:07 PM, Stephen Frost wrote: >> * Tom Lane (t...@sss.pgh.pa.us) wrote: >>> But at this point I think Peter's complaint has some force to it, and that >>> what you ought to do is revert the testing patch.

Re: [HACKERS] Initial release notes created for 9.6

2016-05-06 Thread Christian Ullrich
* Tom Lane wrote: Christian Ullrich writes: I suggest writing "use the Kerberos realm name for authentication instead of the NetBIOS name" either in place of the existing description or together with it. OK, how about this: Add new SSPI

Re: [HACKERS] Initial release notes created for 9.6

2016-05-06 Thread Tom Lane
Christian Ullrich writes: > * Tom Lane wrote: >> To my mind, an option that's set to 1 is "enabled". Should the second >> para read "Do not disable ..."? Or maybe we should reverse the sense >> of the flag, so that the default state can be 0 == disabled? > Well spotted,

Re: [HACKERS] textlike under the LIKE operator for char(n)

2016-05-06 Thread Kohei KaiGai
2016-05-06 23:17 GMT+09:00 Kevin Grittner : > On Fri, May 6, 2016 at 8:58 AM, Kohei KaiGai wrote: > >> postgres=# select 'abcd'::char(20) LIKE 'ab%cd'; >> ?column? >> -- >> f >> (1 row) >> >> postgres=# select 'abcd'::char(4) LIKE 'ab%cd'; >>

Re: [HACKERS] SET ROLE and reserved roles

2016-05-06 Thread Robert Haas
On Thu, May 5, 2016 at 10:41 AM, Stephen Frost wrote: > Barring objections or concerns, I'll push this sometime tomorrow > (probably after I get back to DC). It really would have been good to get this stuff done sooner. By the time you push this, there will barely be enough

Re: [HACKERS] SET ROLE and reserved roles

2016-05-06 Thread Stephen Frost
Robert, On Friday, May 6, 2016, Robert Haas wrote: > On Thu, May 5, 2016 at 10:41 AM, Stephen Frost > wrote: > > Barring objections or concerns, I'll push this sometime tomorrow > > (probably after I get back to DC). > > It really would

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Robert Haas
On Mon, May 2, 2016 at 8:25 PM, Andres Freund wrote: > + * heap_tuple_needs_eventual_freeze > + * > + * Check to see whether any of the XID fields of a tuple (xmin, xmax, xvac) > + * will eventually require freezing. Similar to heap_tuple_needs_freeze, > + * but there's no

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Robert Haas
On Wed, May 4, 2016 at 8:08 PM, Andres Freund wrote: > On 2016-05-02 14:48:18 -0700, Andres Freund wrote: >> 77a1d1e Department of second thoughts: remove PD_ALL_FROZEN. > > Nothing to say here. > >> fd31cd2 Don't vacuum all-frozen pages. > > Hm. I do wonder if it's going to

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Joshua D. Drake
On 05/06/2016 01:50 PM, Andres Freund wrote: Let's add VACUUM (FORCE) or something like that. Yes, that makes sense. This is actually inverted. Vacuum by default should vacuum the entire relation What? Why on earth would that be a good idea? Not to speak of hte fact that that's not been

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Joshua D. Drake
On 05/06/2016 01:58 PM, Stephen Frost wrote: * Joshua D. Drake (j...@commandprompt.com) wrote: Yeah I thought about that, it is the word "FORCE" that bothers me. When you use FORCE there is an assumption that no matter what, it plows through (think rm -f). So if we don't use FROZEN, that's cool

Re: [HACKERS] atomic pin/unpin causing errors

2016-05-06 Thread Jeff Janes
On Fri, May 6, 2016 at 11:24 AM, Andres Freund wrote: > >> I have been trying (and failing) to reproduce the problem in more >> recent releases, with and without cassert. Here is pg_config output >> of one of my current attempts: > > If you say "recent releases" you mean that

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Josh berkus
On 05/06/2016 02:08 PM, Andres Freund wrote: > It bothers me more than it probably should: Nobdy tests, reviews, > whatever a complex patch with significant data-loss potential. But as > soon somebody dares to mention an option name... Definitely more than it should, because it's gonna happen

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Andres Freund
On 2016-05-06 14:15:47 -0700, Josh berkus wrote: > For the serious testing, does anyone have a good technique for creating > loads which would stress-test vacuum freezing? It's hard for me to come > up with anything which wouldn't be very time-and-resource intensive > (like running at 10,000 TPS

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Andres Freund
Hi, On 2016-05-06 14:17:13 -0700, Joshua D. Drake wrote: > How do I test? > > Is there a script I can run? Unfortunately there's few interesting things to test with pre-made scripts. There's no relevant OS dependency here, so each already existing test doesn't really lead to significantly

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Alvaro Herrera
Andres Freund wrote: > On 2016-05-06 14:17:13 -0700, Joshua D. Drake wrote: > > How do I test? > > > > Is there a script I can run? > > Unfortunately there's few interesting things to test with pre-made > scripts. There's no relevant OS dependency here, so each already > existing test doesn't

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Joshua D. Drake
On 05/06/2016 02:29 PM, Andres Freund wrote: Hi, On 2016-05-06 14:17:13 -0700, Joshua D. Drake wrote: How do I test? Is there a script I can run? Unfortunately there's few interesting things to test with pre-made scripts. There's no relevant OS dependency here, so each already existing

Re: [HACKERS] ALTER TABLE lock downgrades have broken pg_upgrade

2016-05-06 Thread Tom Lane
I wrote: > I haven't tried to construct a pre-9.1 database that would trigger > this, but you can make it happen by applying the attached patch > to create a toast-table-less table in the regression tests, > and then doing "make check" in src/bin/pg_upgrade. You get this: > ... > Restoring

Re: [HACKERS] SET ROLE and reserved roles

2016-05-06 Thread Robert Haas
On Fri, May 6, 2016 at 12:12 PM, Stephen Frost wrote: > I've been thinking the same, my flight just arrived into DC and I'll be > pushing it all shortly after I get home. To be clear, I wasn't simply saying that you should commit these patches today instead of tomorrow,

Re: [HACKERS] Feature request: make cluster_name GUC useful for psql prompts

2016-05-06 Thread Steve Crawford
That is almost identical to the solution I suggested a week or two ago to someone tackling the issue and the hack works on initial connection. Connect to a different cluster with "\c", however, and it will leave the prompt showing you connected to the original database which is not good. Cheers,

Re: [HACKERS] Initial release notes created for 9.6

2016-05-06 Thread Tom Lane
Jeff Janes writes: > This item: > "Avoid some spurious waits for AccessExclusiveLocks in hot-standby queries" > Should be something like > Avoid some unnecessary cancellations of hot-standy queries due to > AccessExclusiveLocks replay. > It was the cancellations, not the

Re: [HACKERS] Initial release notes created for 9.6

2016-05-06 Thread Tom Lane
Alvaro Herrera writes: > Is it really sensible to group f1f5ec1ef together with the others? I > think that one should be its own entry. Peter seemed happy with the idea, cf

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Andres Freund
On 2016-05-06 14:39:57 -0700, Joshua D. Drake wrote: > > > What are we looking for exactly? > > > > Data corruption, efficiency problems. > > > > I am really not trying to be difficult here but Data Corruption is an easy > one... what is the metric we accept as an efficiency problem? That's

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Andres Freund
On 2016-05-06 18:36:52 -0300, Alvaro Herrera wrote: > Andres Freund wrote: > > > On 2016-05-06 14:17:13 -0700, Joshua D. Drake wrote: > > > How do I test? > > > > > > Is there a script I can run? > > > > Unfortunately there's few interesting things to test with pre-made > > scripts. There's no

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Robert Haas
On Thu, May 5, 2016 at 2:20 PM, Andres Freund wrote: > On 2016-05-02 14:48:18 -0700, Andres Freund wrote: >> 7087166 pg_upgrade: Convert old visibility map format to new format. > > +const char * > +rewriteVisibilityMap(const char *fromfile, const char *tofile, bool force) >

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Joshua D. Drake
On 05/06/2016 01:40 PM, Robert Haas wrote: On Wed, May 4, 2016 at 8:08 PM, Andres Freund wrote: On 2016-05-02 14:48:18 -0700, Andres Freund wrote: 77a1d1e Department of second thoughts: remove PD_ALL_FROZEN. Nothing to say here. fd31cd2 Don't vacuum all-frozen pages.

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Andres Freund
On 2016-05-06 13:48:09 -0700, Joshua D. Drake wrote: > On 05/06/2016 01:40 PM, Robert Haas wrote: > > On Wed, May 4, 2016 at 8:08 PM, Andres Freund wrote: > > > On 2016-05-02 14:48:18 -0700, Andres Freund wrote: > > > > 77a1d1e Department of second thoughts: remove

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Stephen Frost
* Joshua D. Drake (j...@commandprompt.com) wrote: > Yeah I thought about that, it is the word "FORCE" that bothers me. > When you use FORCE there is an assumption that no matter what, it > plows through (think rm -f). So if we don't use FROZEN, that's cool > but FORCE doesn't work either. Isn't

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Andres Freund
On 2016-05-06 13:54:09 -0700, Joshua D. Drake wrote: > On 05/06/2016 01:50 PM, Andres Freund wrote: > > > > > Let's add VACUUM (FORCE) or something like that. > > > > Yes, that makes sense. > > > > > > > This is actually inverted. Vacuum by default should vacuum the entire > > > relation > >

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Joshua D. Drake
On 05/06/2016 02:01 PM, Josh berkus wrote: On 05/06/2016 01:58 PM, Andres Freund wrote: On 2016-05-06 13:54:09 -0700, Joshua D. Drake wrote: On 05/06/2016 01:50 PM, Andres Freund wrote: There already is FREEZE - meaning something different - so I doubt it. Yeah I thought about that, it is

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Josh berkus
On 05/06/2016 01:58 PM, Andres Freund wrote: > On 2016-05-06 13:54:09 -0700, Joshua D. Drake wrote: >> On 05/06/2016 01:50 PM, Andres Freund wrote: >>> There already is FREEZE - meaning something different - so I doubt it. >> >> Yeah I thought about that, it is the word "FORCE" that bothers me.

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Stephen Frost
* Josh berkus (j...@agliodbs.com) wrote: > On 05/06/2016 01:58 PM, Andres Freund wrote: > > On 2016-05-06 13:54:09 -0700, Joshua D. Drake wrote: > >> On 05/06/2016 01:50 PM, Andres Freund wrote: > > >>> There already is FREEZE - meaning something different - so I doubt it. > >> > >> Yeah I

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Andres Freund
On 2016-05-06 14:10:04 -0700, Josh berkus wrote: > On 05/06/2016 02:08 PM, Andres Freund wrote: > > > It bothers me more than it probably should: Nobdy tests, reviews, > > whatever a complex patch with significant data-loss potential. But as > > soon somebody dares to mention an option name... >

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Josh berkus
On 05/06/2016 02:12 PM, Andres Freund wrote: > On 2016-05-06 14:10:04 -0700, Josh berkus wrote: >> On 05/06/2016 02:08 PM, Andres Freund wrote: >> >>> It bothers me more than it probably should: Nobdy tests, reviews, >>> whatever a complex patch with significant data-loss potential. But as >>>

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Joshua D. Drake
On 05/06/2016 02:08 PM, Andres Freund wrote: VACUUM THEWHOLEDAMNTHING I know that would never fly but damn if that wouldn't be an awesome keyword for VACUUM. It bothers me more than it probably should: Nobdy tests, reviews, whatever a complex patch with significant data-loss potential. But

Re: [HACKERS] Feature request: make cluster_name GUC useful for psql prompts

2016-05-06 Thread Steve Crawford
Although this is getting slightly off the original topic, rereading .psqlrc is a potential can of worms. What triggers a reread? What portions of .psqlrc are re-read? For example, say I have just set tuples-only, extended-display, or output file. Would they all get reset just because I changed

Re: [HACKERS] [COMMITTERS] pgsql: Add TAP tests for pg_dump

2016-05-06 Thread Stephen Frost
Tom, all, * Tom Lane (t...@sss.pgh.pa.us) wrote: > If you like, you can try the @contrib_excludes addition that was mentioned > before and see if that fixes it. But if it doesn't, it's time to cut our > losses. Alright, it certainly *appears* to be working. All of the Windows buildfarm animals

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Andres Freund
On 2016-05-06 14:03:11 -0700, Joshua D. Drake wrote: > On 05/06/2016 02:01 PM, Josh berkus wrote: > > On 05/06/2016 01:58 PM, Andres Freund wrote: > > > On 2016-05-06 13:54:09 -0700, Joshua D. Drake wrote: > > > > On 05/06/2016 01:50 PM, Andres Freund wrote: > > > > > > > There already is FREEZE

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Joshua D. Drake
On 05/06/2016 02:03 PM, Stephen Frost wrote: VACUUM THEWHOLEDAMNTHING +100 (hahahaha) You know what? Why not? Seriously? We aren't product. This is supposed to be a bit fun. Let's have some fun with it? It would be so easy to turn that into a positive advocacy opportunity. JD --

Re: [HACKERS] ALTER TABLE lock downgrades have broken pg_upgrade

2016-05-06 Thread Tom Lane
I wrote: > I have no more time to work on this, but I think it needs to be fixed, and > I definitely think we had better put in test coverage when we do fix it. Actually, there is a really easy fix we could put in, which is to decide that optionally_create_toast_tables() is useless and get rid of

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Alvaro Herrera
Joshua D. Drake wrote: > On 05/06/2016 01:40 PM, Robert Haas wrote: > >On Wed, May 4, 2016 at 8:08 PM, Andres Freund wrote: > >>On 2016-05-02 14:48:18 -0700, Andres Freund wrote: > >>>77a1d1e Department of second thoughts: remove PD_ALL_FROZEN. > >> > >>Nothing to say here. >

[HACKERS] First-draft release notes for next week's back-branch releases

2016-05-06 Thread Tom Lane
If you're not tired of reviewing release notes (I'm sure getting a bit tired of writing them), see http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=eb7de00ac2d282263541ece849ec71e2809e9467 guaibasaurus should have 'em up on the web in an hour or so, too, at

[HACKERS] "Allow usage of huge maintenance_work_mem for GIN build" patch

2016-05-06 Thread Peter Geoghegan
I noticed that commit 30bb26b5 ("Allow usage of huge maintenance_work_mem for GIN build") made the following modification: --- a/src/include/access/gin_private.h +++ b/src/include/access/gin_private.h @@ -903,7 +903,7 @@ typedef struct GinEntryAccumulator typedef struct { GinState

Re: [HACKERS] \crosstabview fixes

2016-05-06 Thread Daniel Verite
Tom Lane wrote: > > "Daniel Verite" writes: > >> To avoid the confusion between "2:4" and "2":"4" or 2:4, > >> and the ambiguity with a possibly existing "2:4" column, > >> maybe we should abandon this syntax and require the optional > >> scolH to be on its own

[HACKERS] textlike under the LIKE operator for char(n)

2016-05-06 Thread Kohei KaiGai
Hi, I found a mysterious behavior when we use LIKE operator on char(n) data type. postgres=# select 'abcd'::char(20) LIKE 'ab%cd'; ?column? -- f (1 row) postgres=# select 'abcd'::char(4) LIKE 'ab%cd'; ?column? -- t (1 row) LIKE operator (that is eventually processed by

Re: [HACKERS] Fix for OpenSSL error queue bug

2016-05-06 Thread Peter Eisentraut
On 4/25/16 8:37 PM, Peter Geoghegan wrote: Attached is a series of patches for each supported release branch. As discussed, I would like to target every released version of Postgres with this bugfix. This is causing users real pain at the moment. All committed. -- Peter Eisentraut

Re: [HACKERS] A population of population counts

2016-05-06 Thread Tom Lane
David Rowley writes: > I'd like to see us using those functions, when they're available and > falling back on the array when they're not. Sounds like that would > just be a new configure test. Perhaps a good home for some shared code > would be numutils.c. Meh ---

Re: [HACKERS] Fix for OpenSSL error queue bug

2016-05-06 Thread Peter Geoghegan
On Fri, May 6, 2016 at 9:12 PM, Peter Eisentraut wrote: > All committed. Thanks! This should no longer be referenced in the 9.6 release notes. It should just appear in the next batch of point releases. Tom has an sgml comment in the draft 9.6 release notes to

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Andres Freund
On 2016-05-06 18:31:03 -0300, Alvaro Herrera wrote: > I don't know what happens when the freeze_table_age threshold is > reached. We scan all non-frozen pages, whereas we earlier had to scan all pages. That's really both the significant benefit, and the danger. Because if we screw up the

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Joshua D. Drake
On 05/06/2016 02:48 PM, Andres Freund wrote: On 2016-05-06 14:39:57 -0700, Joshua D. Drake wrote: Yes, this is true but with a proper testing framework, I don't need a 15 minute break. I need 1 hour to configure, the rest just "happens" and reports back. That only works if somebody writes

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Andres Freund
On 2016-05-07 10:00:27 +1200, Thomas Munro wrote: > On Sat, May 7, 2016 at 8:34 AM, Robert Haas wrote: > >> Did somebody verify the new contents are correct? > > > > I admit that I didn't. It seemed like an unlikely place for a goof, > > but I guess we should verify. > >

Re: [HACKERS] Reviewing freeze map code

2016-05-06 Thread Alvaro Herrera
Alvaro Herrera wrote: > We touched this question in connection with multixact freezing and > wraparound. Testers seem to want to be given a script that they can > install and run, then go for a beer and get back to a bunch of errors to > report. Here I spent some time trying to explain what to

Re: [HACKERS] Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold

2016-05-06 Thread Andres Freund
Hi, On 2016-05-06 14:18:22 -0500, Kevin Grittner wrote: > I rebased the patch Ants posted (attached), and am running > benchmarks on a cthulhu (a big NUMA machine with 8 memory nodes). > Normally I wouldn't post results without a lot more data points > with multiple samples at each, but the

Re: [HACKERS] Initial release notes created for 9.6

2016-05-06 Thread Jeff Janes
On Thu, May 5, 2016 at 10:32 AM, Tom Lane wrote: > I've pushed a first cut at release notes for 9.6. There's a good deal > of work to do yet: Thanks for assembling the notes. This item: "Avoid some spurious waits for AccessExclusiveLocks in hot-standby queries" Should be

Re: [HACKERS] Poorly-thought-out handling of double variables in pgbench

2016-05-06 Thread Fabien COELHO
Hello Tom, That's probably a bigger change than we want to be putting in right now, though I'm a bit tempted to go try it. I definitely agree that the text variable solution is pretty ugly, but it was the minimum change solution, and I do not have much time available. Well, I felt like

Re: [HACKERS] Initial release notes created for 9.6

2016-05-06 Thread Christian Ullrich
* Tom Lane wrote: I've pushed a first cut at release notes for 9.6. There's a good deal of work to do yet: + + +Add new SSPI authentication parameters compat_realm +and upn_usename, to make it possible to make SSPI +work more like GSSAPI (Christian Ullrich) +

Re: [HACKERS] Is pg_control file crashsafe?

2016-05-06 Thread Alex Ignatov
On 06.05.2016 0:42, Greg Stark wrote: On 5 May 2016 12:32 am, "Tom Lane" > wrote: > > To repeat, I'm pretty hesitant to change this logic. While this is not > the first report we've ever heard of loss of pg_control, I believe I could > count

[HACKERS] Comment typo in _readExtensibleNode()

2016-05-06 Thread Amit Langote
Attached fixes a minor typo comment in _readExtensibleNode(). s/skip: extnodename/skip :extnodename/g I was confused at first as to why there is a skip extnodename on one line and get extnodename right on the next line as the comments say, :) Thanks, Amit diff --git

Re: [HACKERS] Is pg_control file crashsafe?

2016-05-06 Thread Alex Ignatov
On 05.05.2016 7:16, Amit Kapila wrote: On Wed, May 4, 2016 at 8:03 PM, Tom Lane > wrote: > > Amit Kapila > writes: > > On Wed, May 4, 2016 at 4:02 PM, Alex Ignatov

Re: [HACKERS] old_snapshot_threshold's interaction with hash index

2016-05-06 Thread Kevin Grittner
On Fri, May 6, 2016 at 12:45 AM, Amit Kapila wrote: > On Wed, May 4, 2016 at 7:48 PM, Kevin Grittner wrote: >> On Tue, May 3, 2016 at 11:48 AM, Robert Haas wrote: >> >>> OK, I see now: the basic idea here is that we can't prune

Re: [HACKERS] psql :: support for \ev viewname and \sv viewname

2016-05-06 Thread Dean Rasheed
On 4 May 2016 at 13:23, Peter Eisentraut wrote: > On 5/4/16 3:21 AM, Dean Rasheed wrote: >> Well, appendStringLiteralAH() takes both, so that sets a precedent. > Works for me. Could you supply an updated patch with a static function > instead of a macro? Then I

Re: [HACKERS] Feature request: make cluster_name GUC useful for psql prompts

2016-05-06 Thread Peter Eisentraut
On 5/5/16 9:21 PM, Steve Crawford wrote: Adding an escape sequence that references cluster_name would enable prompts to identify the cluster in a manner that is both consistent and distinct regardless of access path. I think that would be a good idea. You could probably design it so that any

[HACKERS] A population of population counts

2016-05-06 Thread Thomas Munro
Hi I noticed that we have three "number_of_ones" tables under contrib and two under src, and some new specially masked variants for visibility maps. Would it be an improvement if we just defined one table with external linkage, and accessed it via a macros/functions popcount_uint8, and wider

Re: [HACKERS] Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold

2016-05-06 Thread Kevin Grittner
On Fri, May 6, 2016 at 5:07 PM, Andres Freund wrote: > On 2016-05-06 14:18:22 -0500, Kevin Grittner wrote: >> I rebased the patch Ants posted (attached), and am running >> benchmarks on a cthulhu (a big NUMA machine with 8 memory nodes). >> Normally I wouldn't post results

Re: [HACKERS] what to revert

2016-05-06 Thread Tomas Vondra
Hi, On 05/04/2016 12:42 AM, Andres Freund wrote: On 2016-05-03 20:57:13 +0200, Tomas Vondra wrote: On 05/03/2016 07:41 PM, Andres Freund wrote: ... I'm pretty sure that I said that somewhere else at least once: But to be absolutely clear, I'm *not* really concerned with the performance with

Re: [HACKERS] Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold

2016-05-06 Thread Kevin Grittner
On Fri, May 6, 2016 at 7:48 PM, Andres Freund wrote: > On 2016-05-06 19:43:24 -0500, Kevin Grittner wrote: >> It's disappointing that I am not getting more consistent numbers, >> but NUMA can be hard to manage that way. > > FWIW, in my experience, unless you disable autovacuum

Re: [HACKERS] Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold

2016-05-06 Thread Andres Freund
On 2016-05-06 19:43:24 -0500, Kevin Grittner wrote: > It's disappointing that I am not getting more consistent numbers, > but NUMA can be hard to manage that way. FWIW, in my experience, unless you disable autovacuum (or rather auto-analyze), the effects from non-predicable analyze runs with

Re: [HACKERS] A population of population counts

2016-05-06 Thread David Rowley
On 7 May 2016 at 12:41, Thomas Munro wrote: > Hi > > I noticed that we have three "number_of_ones" tables under contrib and > two under src, and some new specially masked variants for visibility > maps. > > Would it be an improvement if we just defined one table

  1   2   >