Re: genomic locus

2017-12-21 Thread Teodor Sigaev
Hmm, would you try to implement separate type for querying? Similar to tsquery, lquery (for ltree), jsquery etc. Gene Selkov wrote: On Dec 17, 2017, at 7:57 PM, Robert Haas > wrote: On Fri, Dec 15, 2017 at 2:49 PM, Gene Selkov > wrote:

Re: genomic locus

2017-12-21 Thread Teodor Sigaev
Hi! Problem 1. What is a union of ‘1:6000-7000’ and ‘X:1-2’? Intuitively, it should be NULL, however, I am not sure the method allows for that; it was developed for objects living in the same metric space. I have mechanistically reproduce the indexing methods of seg, but the resulting

Re: [HACKERS] [PATCH] Lockable views

2017-12-21 Thread Yugo Nagata
On Wed, 29 Nov 2017 11:29:36 +0900 Michael Paquier wrote: > On Fri, Oct 27, 2017 at 2:11 PM, Robert Haas wrote: > > On Wed, Oct 11, 2017 at 11:36 AM, Yugo Nagata wrote: > >> In the attached patch, only automatically-updatable views that do not have > >> INSTEAD OF rules or INSTEAD OF triggers a

Re: [HACKERS] [PATCH] Lockable views

2017-12-21 Thread Yugo Nagata
On Fri, 27 Oct 2017 07:11:14 +0200 Robert Haas wrote: > On Wed, Oct 11, 2017 at 11:36 AM, Yugo Nagata wrote: > > In the attached patch, only automatically-updatable views that do not have > > INSTEAD OF rules or INSTEAD OF triggers are lockable. It is assumed that > > those views definition have

Re: Add hint about replication slots when nearing wraparound

2017-12-21 Thread Feike Steenbergen
On 21 December 2017 at 05:32, Michael Paquier wrote: > Don't you want to put that in its own block? That's rather > important not to miss for administrators. I didn't want to add yet another block on that documentation page, as it already has 2, however it may be good to upgrade the note to a c

Re: Fix permissions check on pg_stat_get_wal_senders

2017-12-21 Thread Feike Steenbergen
On 21 December 2017 at 14:11, Michael Paquier wrote: > You mean a WAL receiver here, not a WAL sender. Fixed, thanks 0002-Fix-permissions-check-on-pg_stat_get_wal_senders.patch Description: Binary data

Re: reassure me that it's good to copy pg_control last in a base backup

2017-12-21 Thread Michael Paquier
On Fri, Dec 22, 2017 at 12:46:01AM -0500, Chapman Flack wrote: > I was noticing that terminology in the long backup-from-standby thread > I was reading, but it wasn't clear to me how the terms originated. > What's exclusive about pg_start_backup/copy/pg_stop_backup? And what's > nonexclusive about

Re: [HACKERS] Restricting maximum keep segments by repslots

2017-12-21 Thread Kyotaro HORIGUCHI
At Thu, 30 Nov 2017 12:44:16 +0900, Michael Paquier wrote in > On Thu, Nov 9, 2017 at 5:31 PM, Kyotaro HORIGUCHI > wrote: > > # I had been forgetting to count the version for latestst several > > # patches. I give the version '4' - as the next of the last > > # numbered patch. > > With all the

Re: Enhance pg_stat_wal_receiver view to display connected host

2017-12-21 Thread Michael Paquier
On Fri, Dec 22, 2017 at 03:11:07PM +1100, Haribabu Kommi wrote: > Updated patch attached with tests and doc changes. + + primary_hostname + text + Host name of the primary connected by this WAL receiver + + + primary_hostaddr + text + Host address of the primary

Re: reassure me that it's good to copy pg_control last in a base backup

2017-12-21 Thread Chapman Flack
On 12/22/17 00:29, Michael Paquier wrote: > exclusive backup API can lead to problems? Imagine the case where > you take a exclusive backup and the instance from which a backup is > taken crashes, *with* a backup_label file on disk. Oops. That's one > reason behind non-exclusive backups, which is w

Fix a typo in autoprewarm.c

2017-12-21 Thread Masahiko Sawada
Hi, Attached a patch for fixing a typo in autoprewarm.c. I'm sorry if I'm mistaken. s/withs/with/ Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center fix_typo_in_autoprewarm_c.patch Description: Binary data

Re: reassure me that it's good to copy pg_control last in a base backup

2017-12-21 Thread Michael Paquier
On Thu, Dec 21, 2017 at 10:48:49PM -0500, Chapman Flack wrote: > From that description alone, I'd imagine a danger in redoing from a > base backup in which pg_control was copied last. What if another > checkpoint was made (after the one done by pg_start_backup) during > the course of the backup, an

Re: autoprewarm is fogetting to register a tranche.

2017-12-21 Thread Kyotaro HORIGUCHI
Hello, At Mon, 18 Dec 2017 12:46:02 -0500, Robert Haas wrote in > On Fri, Dec 15, 2017 at 3:32 AM, Kyotaro HORIGUCHI > wrote: > > Hello, I noticed while an investigation that pg_prewarm is > > forgetting to register a tranche. > > Oops. > > > In passing, I found it hard to register a tranche

Re: BUG #14941: Vacuum crashes

2017-12-21 Thread Masahiko Sawada
On Tue, Dec 19, 2017 at 7:18 AM, Bossart, Nathan wrote: > On 12/18/17, 3:30 PM, "Masahiko Sawada" wrote: >> According to the following old comment, there might be reason why we >> didn't pass the information to vacuum_rel(). But your patch fetches >> the relation >> name even if the "relation" is

Re: Using ProcSignal to get memory context stats from a running backend

2017-12-21 Thread Craig Ringer
On 22 December 2017 at 13:05, Craig Ringer wrote: > On 21 December 2017 at 15:55, Craig Ringer wrote: > >> On 21 December 2017 at 15:24, Andres Freund wrote: >> >>> Hi, >>> >>> On 2017-12-21 15:13:13 +0800, Craig Ringer wrote: >>> > There tons of callers to enlargeStringInfo, so a 'noerror' pa

Re: Using ProcSignal to get memory context stats from a running backend

2017-12-21 Thread Craig Ringer
On 21 December 2017 at 15:55, Craig Ringer wrote: > On 21 December 2017 at 15:24, Andres Freund wrote: > >> Hi, >> >> On 2017-12-21 15:13:13 +0800, Craig Ringer wrote: >> > There tons of callers to enlargeStringInfo, so a 'noerror' parameter >> would >> > be viable. >> >> Not sure what you mean

Re: Protect syscache from bloating with negative cache entries

2017-12-21 Thread Kyotaro HORIGUCHI
At Tue, 19 Dec 2017 13:14:09 -0500, Tom Lane wrote in <748.1513707...@sss.pgh.pa.us> > Robert Haas writes: > > On Tue, Dec 19, 2017 at 3:31 AM, Kyotaro HORIGUCHI > > wrote: > >> I see three kinds of syscache entries. > >> > >> A. An entry for an actually existing object. > >> B. An entry for a

archive restore command failure status [was Re: patch proposal]

2017-12-21 Thread Chapman Flack
>On 16 August 2016 at 09:06, Stephen Frost wrote: >> From PG's perspective, >> your restore command has said that all of the WAL has been replayed. >> >> If that's not what you want then change your restore command to >> return an exit code > 125, which tells PG that it's unable to restore >> that

Re: WIP: a way forward on bootstrap data

2017-12-21 Thread John Naylor
On 12/22/17, Alvaro Herrera wrote: > Hmm, patch 0008 removes data lines from the .h but leaves the dependent > OID define lines around: > > #define BTREE_AM_OID 403 > > This is not good, because then the define depends on data that appears > in a distant file. I see what you mean. > Another cons

Re: Enhance pg_stat_wal_receiver view to display connected host

2017-12-21 Thread Haribabu Kommi
On Thu, Dec 21, 2017 at 11:12 PM, Michael Paquier wrote: > On Thu, Dec 21, 2017 at 8:16 PM, Haribabu Kommi > wrote: > > The current connected host details are already available in the PGconn > > structure, > > Exposing those details in the view will suffice this requirement. > Currently > > thes

reassure me that it's good to copy pg_control last in a base backup

2017-12-21 Thread Chapman Flack
I've been using a base backup script that takes special care to have pg_control be the last file it grabs. And I see that basebackup.c takes similar care: https://git.postgresql.org/gitweb/?p=postgresql.git;a=blobdiff;f=src/backend/replication/basebackup.c;h=81203c9f5ac9dbf38da09e1ff55b29846c83f51

Condition variable live lock

2017-12-21 Thread Thomas Munro
Hi hackers, While debugging a build farm assertion failure after commit 18042840, and with the assumption that the problem is timing/scheduling sensitive, I tried hammering the problem workload on a few different machines and noticed that my slow 2-core test machine fairly regularly got into a liv

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-12-21 Thread Michael Paquier
On Wed, Dec 20, 2017 at 09:35:55AM +0900, Michael Paquier wrote: > However, it is possible to simply optimize the frontend code as in > pg_SASL_init() we already know the channel binding type selected when > calling pgtls_get_finished() and pgtls_get_peer_certificate_hash(). So > while I agree with

Re: genomic locus

2017-12-21 Thread Gene Selkov
Hi Oleg, Great to hear from you. I wondered how many of the old-timers were still around. > Why not use composite type ? For simple interval approach it's worked for us > (see attached hdate.sql). I have just begun looking at your hdate example; I see potentially useful stuff in it, but the fir

Re: Finalizing logical replication limitations as well as potential features

2017-12-21 Thread Craig Ringer
On 22 December 2017 at 05:24, Joshua D. Drake wrote: > -Hackers, > > > As I continue to test Logical Replication and its native capabilities I > have found the following: > > > It appears it is not possible to do this: > > publisher->public.foo replicates to subscriber->private.foo > > This one s

Re: [HACKERS] path toward faster partition pruning

2017-12-21 Thread Amit Langote
On 2017/12/22 1:06, Alvaro Herrera wrote: > Just trying to understand the code here; some very minor comments as I > go along. > > partition_op_strategy returning int32 looks pretty ugly, and the calling > code is not super-intelligible either. How about returning a value from > a new enum? OK,

Re: genomic locus

2017-12-21 Thread Gene Selkov
> On Dec 18, 2017, at 6:59 AM, Craig Ringer wrote: > > If you think it'd make logical sense to extend seg with a string descriptor > of some sort and could come up with a name/use case that's not quite so > narrowly focused as genetics alone, then I could see adding it as a secondary > type i

Re: [HACKERS] Runtime Partition Pruning

2017-12-21 Thread David Rowley
On 22 December 2017 at 14:29, Robert Haas wrote: > On Thu, Dec 21, 2017 at 6:53 PM, David Rowley > wrote: >> Are you considering some sort of clauselist_selectivity() estimate on >> the given parameters and comparing that to the same selectivities that >> were determined for the previous custom p

Re: [HACKERS] path toward faster partition pruning

2017-12-21 Thread David Rowley
On 22 December 2017 at 13:57, Amit Langote wrote: > Will post the fixed version shortly, thanks. I've made another partial pass on the patch and have a few more things. #3 and #4 are just comments rather than requests to change something. I think we should change those before PG11 though. 1. If

Re: Basebackups reported as idle

2017-12-21 Thread Michael Paquier
On Thu, Dec 21, 2017 at 02:46:15PM +0100, Magnus Hagander wrote: > On Thu, Dec 21, 2017 at 1:38 AM, Michael Paquier > wrote: >> I think that the call to pgstat_report_activity in WalSndLoop() should >> be kept as well. There is a small gap between the moment the process >> is started and the first

Re: WIP: a way forward on bootstrap data

2017-12-21 Thread Robert Haas
On Thu, Dec 21, 2017 at 5:32 PM, Alvaro Herrera wrote: > Hmm, patch 0008 removes data lines from the .h but leaves the dependent > OID define lines around: Just a question here -- do we actually have consensus on doing the stuff that these patches do? Because I'm not sure we do. -- Robert Haas

Re: [HACKERS] Runtime Partition Pruning

2017-12-21 Thread Robert Haas
On Thu, Dec 21, 2017 at 6:53 PM, David Rowley wrote: > On 22 December 2017 at 12:45, Robert Haas wrote: >> PREPARE q3 (int, int) AS SELECT * FROM unpartitioned_table WHERE >> partkey BETWEEN $1 AND $2; >> >> ...that has to decide whether to use an index. And to do that it has >> to estimate what

Re: [HACKERS] path toward faster partition pruning

2017-12-21 Thread Amit Langote
David On 2017/12/21 21:04, David Rowley wrote: > On 21 December 2017 at 23:38, Amit Langote > wrote: >> Attached updated set of patches. > > Looks like the new not equals code does not properly take into account > a missing NULL partition. > > create table ta (a int not null) partition by list

Re: force parallel mode vs CTAS

2017-12-21 Thread Haribabu Kommi
On Fri, Dec 22, 2017 at 2:34 AM, Tom Lane wrote: > Robert Haas writes: > > Great subject line! > > fixed ... > Thanks for the fix Robert. This could have been caught, if I have test that creates toast table using CTAS during development of the patch. Regards, Hari Babu Fujitsu Australia

Re: The pg_indent on on ftp is outdated

2017-12-21 Thread Craig Ringer
On 21 Dec. 2017 22:42, "Tom Lane" wrote: Magnus Hagander writes: > On Thu, Dec 21, 2017 at 12:42 PM, Craig Ringer > wrote: >>> The pg_indent on www is outdated, and doesn't understand --version . >>> https://www.postgresql.org/ftp/dev/ > Is there a reason to keep it at all if its obsolete, or

Re: genomic locus

2017-12-21 Thread Gene Selkov
> On Dec 18, 2017, at 5:00 AM, PostgreSQL - Hans-Jürgen Schönig > wrote: > > maybe this one is also helpful: > https://wiki.postgresql.org/images/1/1b/Postbis_pgcon_eu_2012.pdf > > it seems they have put a lot of work into th

Re: genomic locus

2017-12-21 Thread Gene Selkov
> On Dec 17, 2017, at 7:57 PM, Robert Haas wrote: > > On Fri, Dec 15, 2017 at 2:49 PM, Gene Selkov wrote: >> I need a data type to represent genomic positions, which will consist of a >> string and a pair of integers with interval logic and access methods. Sort >> of like my seg type, but more

Re: [HACKERS] Runtime Partition Pruning

2017-12-21 Thread David Rowley
On 22 December 2017 at 12:45, Robert Haas wrote: > PREPARE q3 (int, int) AS SELECT * FROM unpartitioned_table WHERE > partkey BETWEEN $1 AND $2; > > ...that has to decide whether to use an index. And to do that it has > to estimate what fraction of the table will match the BETWEEN clause. > That

Re: [HACKERS] Runtime Partition Pruning

2017-12-21 Thread David Rowley
On 22 December 2017 at 03:02, Beena Emerson wrote: > This seems like having two different patches for the same feature. I > will post my version of the patch which uses the struct > PartitionPruneInfo from your patch and I will add the other additional > features you added like optimizing the prun

Re: [HACKERS] Runtime Partition Pruning

2017-12-21 Thread Robert Haas
On Thu, Dec 21, 2017 at 4:01 AM, David Rowley wrote: > The problem is down to the logic in choose_custom_plan() only choosing > a generic plan if the average cost of the generic plan is less than > the average custom plan cost. The problem is that the generic plan can > have many extra Append subn

Re: genomic locus

2017-12-21 Thread Gene Selkov
Nice work, Andrew! I wish I knew about it earlier. > On Dec 16, 2017, at 8:53 AM, Andrew Dunstan > wrote: > > I keep most of the out-of-tree extensions I maintain green by building > and testing them in a buildfarm member. That way I become aware pretty > quickly if any API change has broken t

Re: genomic locus

2017-12-21 Thread Gene Selkov
> On Dec 15, 2017, at 4:50 PM, Michael Paquier > wrote: > If you wish to fix seg in some way, you could always > patch them. But I am not sure what you are trying to fix, so more > details would be welcome. I was contemplating how much functionality I could borrow from seg to build another int

Re: WIP: a way forward on bootstrap data

2017-12-21 Thread Alvaro Herrera
Hmm, patch 0008 removes data lines from the .h but leaves the dependent OID define lines around: #define BTREE_AM_OID 403 This is not good, because then the define depends on data that appears in a distant file. Another consideration is that the current system has the property that these OIDs ar

Re: WIP: a way forward on bootstrap data

2017-12-21 Thread Alvaro Herrera
Pushed 0001 and 0002. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: [HACKERS] pow support for pgbench

2017-12-21 Thread Fabien COELHO
Hello Raúl, v7 needs a rebase. Also, you might try to produce a version which is compatible with Robert's constraints. My 0.02€ on this new version: Applies cleanly, compiles and works. I cannot say that I like it more than the previous version. If a double is always returned, I'm wonderin

Re: pgsql: Get rid of copy_partition_key

2017-12-21 Thread Alvaro Herrera
Robert Haas wrote: > On Thu, Dec 21, 2017 at 12:43 PM, Alvaro Herrera > wrote: > > Get rid of copy_partition_key > > > > That function currently exists to avoid leaking memory in > > CacheMemoryContext in case of trouble while the partition key is being > > built, but there's a better way: allocat

Finalizing logical replication limitations as well as potential features

2017-12-21 Thread Joshua D. Drake
-Hackers, As I continue to test Logical Replication and its native capabilities I have found the following: It appears it is not possible to do this: publisher->public.foo replicates to subscriber->private.foo This one seems like a relatively simple fix (theoretically) and I think should

Re: pgsql: Get rid of copy_partition_key

2017-12-21 Thread Robert Haas
On Thu, Dec 21, 2017 at 12:43 PM, Alvaro Herrera wrote: > Get rid of copy_partition_key > > That function currently exists to avoid leaking memory in > CacheMemoryContext in case of trouble while the partition key is being > built, but there's a better way: allocate everything in a memcxt that > g

Re: [HACKERS] pow support for pgbench

2017-12-21 Thread Raúl Marín Rodríguez
Hi, Rebased the patch on top of current master/HEAD and changed to always return double. On Thu, Dec 14, 2017 at 12:48 PM, Fabien COELHO wrote: > > Fixed in the attached patch. >> > > v7 needs a rebase. > > Also, you might try to produce a version which is compatible with Robert's > constraints

Re: ddd

2017-12-21 Thread Robert Haas
On Thu, Dec 21, 2017 at 12:55 PM, Andres Freund wrote: > Had started written the email before finishing testing, forgot to fill > in the blank. mutt annoyingly aborts with an empty subject, hence > smashing one key a couple times. Yeah, I figured that was what happened. It probably came across a

Re: Bitmap table scan cost per page formula

2017-12-21 Thread Tels
Moin, On Wed, December 20, 2017 11:51 pm, Jeff Janes wrote: > On Wed, Dec 20, 2017 at 2:18 PM, Robert Haas > wrote: > >> On Wed, Dec 20, 2017 at 4:20 PM, Jeff Janes >> wrote: >>> >>> It is not obvious to me that the parabola is wrong. I've certainly >>> seen >>> cases where reading every 2nd or

Re: Letting plpgsql in on the fun with the new expression eval stuff

2017-12-21 Thread Tom Lane
Robert Haas writes: > On Wed, Dec 20, 2017 at 6:06 PM, Tom Lane wrote: >> Anyway, I left it as-is, but I'm willing to make the change if >> people feel the other way is better. > I feel the other way -- let's not add more pointer indirections if it > isn't really necessary. OK --- with any luck

Re: ddd

2017-12-21 Thread Andres Freund
Hi, On 2017-12-21 10:35:06 -0500, Robert Haas wrote: > Great subject line! Had started written the email before finishing testing, forgot to fill in the blank. mutt annoyingly aborts with an empty subject, hence smashing one key a couple times. > On Thu, Dec 21, 2017 at 10:18 AM, Robert Haas w

Re: AS OF queries

2017-12-21 Thread David Fetter
On Thu, Dec 21, 2017 at 05:00:35PM +0300, Konstantin Knizhnik wrote: > On 20.12.2017 19:26, Tom Lane wrote: > >Peter Eisentraut writes: > >>On 12/20/17 10:29, Tom Lane wrote: > >>>Please say that's just an Oracle-ism and not SQL standard, because it's > >>>formally ambiguous. > >>The SQL standard

Re: domain cast in parameterized vs. non-parameterized query

2017-12-21 Thread Tom Lane
David Kamholz writes: > In the view case that makes sense, but I don't see how ALTER DOMAIN is > relevant to my original example. You can't alter a domain between the time > the query is parsed and executed, can you? Yes, you can. Especially so for prepared statements. r

Re: domain cast in parameterized vs. non-parameterized query

2017-12-21 Thread David Kamholz
> > > Why the rewrite doesn't reduce it? Or why parser does it? > > Because ALTER DOMAIN can change what would be a valid value. In the view case that makes sense, but I don't see how ALTER DOMAIN is relevant to my original example. You can't alter a domain between the time the query is parsed an

Re: force parallel mode vs CTAS

2017-12-21 Thread Tom Lane
Robert Haas writes: > Ack, sorry, I replied on the original thread, not realizing there was > a second one. Basically, I think the assertion is wrong-headed and > can be adjusted so it doesn't fail, and I attached a patch over there. Yeah, I saw. Looks plausible to me, but I haven't studied the

Re: [HACKERS] path toward faster partition pruning

2017-12-21 Thread Alvaro Herrera
Just trying to understand the code here; some very minor comments as I go along. partition_op_strategy returning int32 looks pretty ugly, and the calling code is not super-intelligible either. How about returning a value from a new enum? typedef PartClause is missing a struct name, as is our tra

Re: force parallel mode vs CTAS

2017-12-21 Thread Robert Haas
On Thu, Dec 21, 2017 at 10:34 AM, Tom Lane wrote: > Robert Haas writes: >> Great subject line! > > fixed ... Ack, sorry, I replied on the original thread, not realizing there was a second one. Basically, I think the assertion is wrong-headed and can be adjusted so it doesn't fail, and I attache

Re: != should give error?

2017-12-21 Thread Alvaro Herrera
Dagfinn Ilmari Mannsåker wrote: > Alvaro Herrera writes: > > Yes, <> is the operator mandated by the SQL standard. I don't think != > > appears anywhere -- it's our extension only and thus if you use it you > > should not expect your applications to work on other DBMSs. > So while it might not

Re: ddd

2017-12-21 Thread Robert Haas
On Thu, Dec 21, 2017 at 10:18 AM, Robert Haas wrote: > If I run the regression tests with force_parallel_mode=on prior to the > parallel hash join patch, they pass. If I run them now, they fail > inside the parallel hash join tests here: > > create table wide as select generate_series(1, 2) as id

Re: != should give error?

2017-12-21 Thread Dagfinn Ilmari Mannsåker
Alvaro Herrera writes: > Mikael Kjellström wrote: > >> BTW isn't the "preferred" way of writing different from / not equal in SQL >> to use the <> operator? > > Yes, <> is the operator mandated by the SQL standard. I don't think != > appears anywhere -- it's our extension only and thus if you us

Re: force parallel mode vs CTAS

2017-12-21 Thread Tom Lane
Robert Haas writes: > Great subject line! fixed ... > If I run the regression tests with force_parallel_mode=on prior to the > parallel hash join patch, they pass. If I run them now, they fail > inside the parallel hash join tests here: > create table wide as select generate_series(1, 2) as id,

Re: General purpose hashing func in pgbench

2017-12-21 Thread Fabien COELHO
I think it is not commitfest ready yet -- I need to add some documentation and tests first. Yes, doc & test are missing. From your figures, the murmur2 algorithm output looks way better. I'm wondering whether it makes sense to provide a bad hash function if a good/better one is available, u

Re: ddd

2017-12-21 Thread Robert Haas
Great subject line! On Thu, Dec 21, 2017 at 9:31 AM, Andres Freund wrote: > I think both I and commit e9baa5e9fa147e are confused. > > By my reading this is the fault of e9baa5e9fa147e [3]. Robert, Haribabu > any idea? If I run the regression tests with force_parallel_mode=on prior to the parall

Re: force parallel mode vs CTAS

2017-12-21 Thread Todd A. Cook
On 12/21/17 09:32, Andres Freund wrote: Why mantid's earlier builds don't show the problem, even though I can locally reproduce the issue escapes me. Todd, did you recently change anything on Mantid? Not within the buildfarm set-up. Otherwise, the most recent change was on Dec. 14 when I ap

Re: != should give error?

2017-12-21 Thread Alvaro Herrera
Mikael Kjellström wrote: > BTW isn't the "preferred" way of writing different from / not equal in SQL > to use the <> operator? Yes, <> is the operator mandated by the SQL standard. I don't think != appears anywhere -- it's our extension only and thus if you use it you should not expect your app

Re: [HACKERS] Flexible configuration for full-text search

2017-12-21 Thread Arthur Zakirov
Hello, On Tue, Dec 19, 2017 at 05:31:09PM +0300, Aleksandr Parfenov wrote: > > The new version of the patch is in attachment as well as a > little README file with a description of changes in each file. Any > feedback is welcome. > I looked the patch a little bit. The patch is applied and tests

Re: The pg_indent on on ftp is outdated

2017-12-21 Thread Tom Lane
Magnus Hagander writes: > On Thu, Dec 21, 2017 at 12:42 PM, Craig Ringer > wrote: >>> The pg_indent on www is outdated, and doesn't understand --version . >>> https://www.postgresql.org/ftp/dev/ > Is there a reason to keep it at all if its obsolete, or should we just > delete it? The only reaso

force parallel mode vs CTAS

2017-12-21 Thread Andres Freund
Hi, Err, the subject ought to have been "force parallel mode vs CTAS" or such. On 2017-12-21 06:31:06 -0800, Andres Freund wrote: > Hi Robert, Todd, All, > > I think both I and commit e9baa5e9fa147e are confused. > > Mantid started to fail with the parallel hash join commit, with the following

ddd

2017-12-21 Thread Andres Freund
Hi Robert, Todd, All, I think both I and commit e9baa5e9fa147e are confused. Mantid started to fail with the parallel hash join commit, with the following assert failure [1]: #2 0x008698e7 in ExceptionalCondition (conditionName=conditionName@entry=0x8efee8 "!(CurrentTransactionState->p

Re: [HACKERS] Runtime Partition Pruning

2017-12-21 Thread David Rowley
On 22 December 2017 at 03:02, Beena Emerson wrote: > postgres=# create table ta (a int not null) partition by list (a); > CREATE TABLE > postgres=# create table ta1 partition of ta for values in(1,2); > CREATE TABLE > postgres=# create table ta2 partition of ta for values in(3,4); > CREATE TABLE >

Re: vacuum vs heap_update_tuple() and multixactids

2017-12-21 Thread Amit Kapila
On Wed, Dec 20, 2017 at 12:12 AM, Andres Freund wrote: > On 2017-12-19 15:35:12 -0300, Alvaro Herrera wrote: >> Andres Freund wrote: >> >> > I think the bugfix is going to have to essentially be something similar >> > to FreezeMultiXactId(). I.e. when reusing an old tuple's xmax for a new >> > tup

Re: domain cast in parameterized vs. non-parameterized query

2017-12-21 Thread Pavel Stehule
2017-12-21 15:19 GMT+01:00 Tom Lane : > Pavel Stehule writes: > > 2017-12-20 23:41 GMT+01:00 Tom Lane : > >> Hm, scratch that --- experimentation shows that the parser still > produces > >> a CoerceToDomain node in that case, not a literal of the domain type. > > > Why the rewrite doesn't reduce

Re: condition variable cleanup and subtransactions

2017-12-21 Thread Robert Haas
On Thu, Dec 21, 2017 at 6:46 AM, Thomas Munro wrote: > On Fri, Dec 22, 2017 at 12:00 AM, Andres Freund wrote: >> Oh. This seems to be a condition variable bug independent of PHJ. The >> problem is that the DSM segment etc all get cleaned up in >> *subtransaction* abort. >> >> Afaict it's a bug th

Re: Reproducible builds: genbki.pl and Gen_fmgrtab.pl

2017-12-21 Thread Tom Lane
Andrew Dunstan writes: > Looks reasonable. Regarding the change to TestLib.pm, we should make > sure that the tests have unique names. There is a small amount of > duplication currently: > ./src/bin/pg_dump/t/001_basic.pl > ./src/bin/pg_rewind/t/001_basic.pl > ./src/test/modules/commi

Re: domain cast in parameterized vs. non-parameterized query

2017-12-21 Thread Tom Lane
Pavel Stehule writes: > 2017-12-20 23:41 GMT+01:00 Tom Lane : >> Hm, scratch that --- experimentation shows that the parser still produces >> a CoerceToDomain node in that case, not a literal of the domain type. > Why the rewrite doesn't reduce it? Or why parser does it? Because ALTER DOMAIN can

Re: Reproducible builds: genbki.pl and Gen_fmgrtab.pl

2017-12-21 Thread Alvaro Herrera
Christoph Berg wrote: > Re: Andrew Dunstan 2017-12-21 > > > I've found it annoying in the past. Probably now that the buildfarm > > reports each test series separately it matters less. Previously we > > reported many of the TAP tests together. > > Rename them to the directory name: > > ./s

Re: [HACKERS] parallel.c oblivion of worker-startup failures

2017-12-21 Thread Amit Kapila
On Thu, Dec 21, 2017 at 6:26 PM, Robert Haas wrote: > On Thu, Dec 21, 2017 at 6:46 AM, Amit Kapila wrote: >> What if we don't allow to reuse such slots till the backend/session >> that has registered it performs unregister? Currently, we don't seem >> to have an API corresponding to Register*Bac

Re: [HACKERS] Runtime Partition Pruning

2017-12-21 Thread Beena Emerson
Hello, On Thu, Dec 21, 2017 at 6:26 PM, David Rowley wrote: > On 21 December 2017 at 22:01, David Rowley > wrote: >> I've attached the latest version of the patch. This is based >> on Amit's v15 of faster-partition-pruning [1] which I found to cleanly >> apply to f94eec490 > > Well, that went o

PGLister gitlab repo

2017-12-21 Thread Stephen Frost
Greetings all, Since a few different people asked about it (and replies have been posted to those threads), we figured it made sense to also post here about it. PGLister's (finally) been reviewed by a couple of people and hopefully we didn't miss anything vital, but we've opened up the repo to th

Re: AS OF queries

2017-12-21 Thread Konstantin Knizhnik
On 20.12.2017 19:26, Tom Lane wrote: Peter Eisentraut writes: On 12/20/17 10:29, Tom Lane wrote: Please say that's just an Oracle-ism and not SQL standard, because it's formally ambiguous. The SQL standard syntax appears to be something like "tablename" [ AS OF SYSTEM TIME 'something' ] [ [

Re: Reproducible builds: genbki.pl and Gen_fmgrtab.pl

2017-12-21 Thread Christoph Berg
Re: Andrew Dunstan 2017-12-21 > >> ./src/bin/pg_dump/t/001_basic.pl > >> ./src/bin/pg_rewind/t/001_basic.pl > >> ./src/test/modules/commit_ts/t/001_base.pl > >> ./src/test/modules/test_pg_dump/t/001_base.pl > > Why does the uniqueness of application_name set in the TAP test suite

Re: The pg_indent on on ftp is outdated

2017-12-21 Thread Magnus Hagander
On Thu, Dec 21, 2017 at 12:42 PM, Craig Ringer wrote: > On 21 December 2017 at 18:22, Magnus Hagander wrote: > >> >> >> On Thu, Dec 21, 2017 at 8:20 AM, Craig Ringer >> wrote: >> >>> Hi all >>> >>> The pg_indent on www is outdated, and doesn't understand --version . >>> >>> https://www.postgres

Re: Postgres with pthread

2017-12-21 Thread Pavel Stehule
2017-12-21 14:25 GMT+01:00 Konstantin Knizhnik : > I continue experiments with my pthread prototype. > Latest results are the following: > > 1. I have eliminated all (I hope) calls of non-reentrant functions > (getopt, setlocale, setitimer, localtime, ...). So now parallel tests are > passed. > >

Re: Basebackups reported as idle

2017-12-21 Thread Magnus Hagander
On Thu, Dec 21, 2017 at 1:38 AM, Michael Paquier wrote: > On Wed, Dec 20, 2017 at 9:02 PM, Magnus Hagander > wrote: > > On Wed, Dec 20, 2017 at 12:50 PM, Michael Paquier > > wrote: > > Yes. Of course. I can't read. That's the same as the notice below about > it > > not returning false -- I mana

Re: Reproducible builds: genbki.pl and Gen_fmgrtab.pl

2017-12-21 Thread Andrew Dunstan
On 12/21/2017 08:27 AM, Michael Paquier wrote: > On Thu, Dec 21, 2017 at 10:13 PM, Andrew Dunstan > wrote: >> Looks reasonable. Regarding the change to TestLib.pm, we should make >> sure that the tests have unique names. There is a small amount of >> duplication currently: >> >> ./src/bin/pg

Re: [HACKERS] Runtime Partition Pruning

2017-12-21 Thread David Rowley
On 22 December 2017 at 02:06, Beena Emerson wrote: >> Thanks for sending. Will the tests still pass if you remove the hack >> from choose_custom_plan()? >> > > The hack has been removed in the v7 patch sent and yes the tests work > without any additional adjustments. Oh nice. I see you've includ

Re: Reproducible builds: genbki.pl and Gen_fmgrtab.pl

2017-12-21 Thread Michael Paquier
On Thu, Dec 21, 2017 at 10:13 PM, Andrew Dunstan wrote: > Looks reasonable. Regarding the change to TestLib.pm, we should make > sure that the tests have unique names. There is a small amount of > duplication currently: > > ./src/bin/pg_dump/t/001_basic.pl > ./src/bin/pg_rewind/t/001_basic

Re: Postgres with pthread

2017-12-21 Thread Konstantin Knizhnik
I continue experiments with my pthread prototype. Latest results are the following: 1. I have eliminated all (I hope) calls of non-reentrant functions (getopt, setlocale, setitimer, localtime, ...). So now parallel tests are passed. 2. I have implemented deallocation of top memory context (at

Re: Reproducible builds: genbki.pl and Gen_fmgrtab.pl

2017-12-21 Thread Andrew Dunstan
On 12/20/2017 09:50 PM, Tom Lane wrote: > Christoph Berg writes: >> Re: Tom Lane 2017-12-16 <417.1513438...@sss.pgh.pa.us> >>> I think we're talking at cross-purposes. I'm not saying we should not fix >>> this problem. I'm saying that the proposed fix appears incomplete ... >> Grepping through

Re: Fix permissions check on pg_stat_get_wal_senders

2017-12-21 Thread Michael Paquier
On Thu, Dec 21, 2017 at 7:30 PM, Feike Steenbergen wrote: > Fix permissions check on pg_stat_get_wal_senders > > Commit 25fff40798fc4ac11a241bfd9ab0c45c085e2212 introduced the > possibility for the pg_read_all_stats to have access to all pg_stat_* > views. > In the discussion, the pg_stat_replicat

Re: [HACKERS] Runtime Partition Pruning

2017-12-21 Thread Beena Emerson
Hello, On Thu, Dec 21, 2017 at 6:30 PM, David Rowley wrote: > On 22 December 2017 at 01:43, Beena Emerson wrote: >>> I wonder if Robert understands the extent of the problem. The patch >>> will be useful to prune away partitions when the partitioned table is >>> on the inside of a parameterised

Re: General purpose hashing func in pgbench

2017-12-21 Thread Ildar Musin
21/12/2017 15:44, Fabien COELHO пишет: > >>> Add the submission to the next CF? >> I think it is not commitfest ready yet -- I need to add some >> documentation and tests first. > > It just helps to that the thread is referenced, and the review process > has started anyway. > You are right, I've su

Re: [HACKERS] Runtime Partition Pruning

2017-12-21 Thread David Rowley
On 22 December 2017 at 01:43, Beena Emerson wrote: >> I wonder if Robert understands the extent of the problem. The patch >> will be useful to prune away partitions when the partitioned table is >> on the inside of a parameterised nested loop join, but I think we'll >> likely get some complaints a

Re: [HACKERS] parallel.c oblivion of worker-startup failures

2017-12-21 Thread Robert Haas
On Thu, Dec 21, 2017 at 6:46 AM, Amit Kapila wrote: > What if we don't allow to reuse such slots till the backend/session > that has registered it performs unregister? Currently, we don't seem > to have an API corresponding to Register*BackgroundWorker() which can > be used to unregister, but may

Re: [HACKERS] Runtime Partition Pruning

2017-12-21 Thread David Rowley
On 21 December 2017 at 22:01, David Rowley wrote: > I've attached the latest version of the patch. This is based > on Amit's v15 of faster-partition-pruning [1] which I found to cleanly > apply to f94eec490 Well, that went out of date pretty quickly. Amit has now posted v16 of the faster partitio

Re: General purpose hashing func in pgbench

2017-12-21 Thread Fabien COELHO
Add the submission to the next CF? I think it is not commitfest ready yet -- I need to add some documentation and tests first. It just helps to that the thread is referenced, and the review process has started anyway. -- Fabien.

Re: [HACKERS] Runtime Partition Pruning

2017-12-21 Thread Beena Emerson
Hello, On Thu, Dec 21, 2017 at 6:01 PM, David Rowley wrote: > On 21 December 2017 at 23:51, Beena Emerson wrote: >> On Thu, Dec 21, 2017 at 2:31 PM, David Rowley >> wrote: >>> On 19 December 2017 at 21:54, Beena Emerson wrote: >> >>> The problem is down to the logic in choose_custom_plan() onl

Re: [HACKERS] Runtime Partition Pruning

2017-12-21 Thread David Rowley
On 21 December 2017 at 23:51, Beena Emerson wrote: > On Thu, Dec 21, 2017 at 2:31 PM, David Rowley > wrote: >> On 19 December 2017 at 21:54, Beena Emerson wrote: > >> The problem is down to the logic in choose_custom_plan() only choosing >> a generic plan if the average cost of the generic plan

  1   2   >