Re: [HACKERS] [PATCH] Generic type subscripting

2018-10-11 Thread Pavel Stehule
čt 11. 10. 2018 v 22:48 odesílatel Dmitry Dolgov <9erthali...@gmail.com> napsal: > > On Wed, 10 Oct 2018 at 14:26, Pavel Stehule > wrote: > > > > I am playing with this feature little bit > > Thanks a lot! > > > I have one idea - can be possible to use integer subscript for record > fields? It

Re: Performance improvements for src/port/snprintf.c

2018-10-11 Thread Andres Freund
Hi, On 2018-10-07 12:59:18 +0100, Andrew Gierth wrote: > > "Tom" == Tom Lane writes: > > Tom> Now, "shortest value that converts back exactly" is technically > Tom> cool, but I am not sure that it solves any real-world problem that > Tom> we have. > > Well, it seems to me that it is

Re: [HACKERS] removing abstime, reltime, tinterval.c, spi/timetravel

2018-10-11 Thread Andrew Dunstan
On 10/11/2018 05:11 PM, Tom Lane wrote: Andres Freund writes: On 2018-10-11 16:57:02 -0400, Tom Lane wrote: Another idea would be to put table drops into the back branch regression tests, so that their ending states don't include any such tables. That would cripple pg_dump testing of

Re: pgsql: Add TAP tests for pg_verify_checksums

2018-10-11 Thread Michael Paquier
On Thu, Oct 11, 2018 at 07:41:18PM -0700, Andres Freund wrote: > We only remove temp dirs on startup, and I'm pretty sure there at least > not too long ago were a few error cases where we can leak temp files in > individual sessions. And there's talk about allowing > pg_verify_checksums when

Re: out-of-order XID insertion in KnownAssignedXids

2018-10-11 Thread Michael Paquier
On Thu, Oct 11, 2018 at 08:04:11PM +0300, Konstantin Knizhnik wrote: > Proposed patch is attached. The problem I have with this patch doing the duplication removal and qsort work in LogCurrentRunningXacts is that it would still lock ProcArrayLock until the WAL record has been written with

Re: pgsql: Add TAP tests for pg_verify_checksums

2018-10-11 Thread Andres Freund
Hi, On 2018-10-12 11:07:58 +0900, Michael Paquier wrote: > On Thu, Oct 11, 2018 at 06:53:19PM -0700, Andres Freund wrote: > > Hm. Maybe I'm confused, but how is it correct to use a blacklisting > > approach here? It's far from absurd to have files inside a tablespacs > > when using

Re: pgsql: Add TAP tests for pg_verify_checksums

2018-10-11 Thread Michael Paquier
On Thu, Oct 11, 2018 at 06:53:19PM -0700, Andres Freund wrote: > On 2018-10-12 10:39:18 +0900, Michael Paquier wrote: >> I have been able to reproduce the problem, and that's a bug within >> pg_verify_checksums as it fails to consider that config_exec_params is >> not a file it should scan when

Re: pgsql: Add TAP tests for pg_verify_checksums

2018-10-11 Thread Andres Freund
Hi, On 2018-10-12 10:39:18 +0900, Michael Paquier wrote: > On Thu, Oct 11, 2018 at 06:04:11PM -0700, Andres Freund wrote: > > culicidae tests EXEC_BACKEND, so there's an explanation as to why it > > sometimes behaves differently. But here I don't immediately see how > > that'd matter. Probably

Re: pgsql: Add TAP tests for pg_verify_checksums

2018-10-11 Thread Michael Paquier
On Thu, Oct 11, 2018 at 06:04:11PM -0700, Andres Freund wrote: > culicidae tests EXEC_BACKEND, so there's an explanation as to why it > sometimes behaves differently. But here I don't immediately see how > that'd matter. Probably still worth verifying that it's not somehow > caused by that.

Re: pgsql: Add TAP tests for pg_verify_checksums

2018-10-11 Thread Andres Freund
Hi, On 2018-10-12 09:56:14 +0900, Michael Paquier wrote: > On Fri, Oct 12, 2018 at 12:17:57AM +, Michael Paquier wrote: > > Add TAP tests for pg_verify_checksums > > > > All options available in the utility get coverage: > > - Tests with disabled page checksums. > > - Tests with enabled test

Re: pgsql: Add TAP tests for pg_verify_checksums

2018-10-11 Thread Michael Paquier
On Fri, Oct 12, 2018 at 12:17:57AM +, Michael Paquier wrote: > Add TAP tests for pg_verify_checksums > > All options available in the utility get coverage: > - Tests with disabled page checksums. > - Tests with enabled test checksums. > - Emulation of corruption and broken checksums with a

Re: Debian mips: Failed test 'Check expected t_009_tbl data on standby'

2018-10-11 Thread Michael Paquier
On Thu, Oct 11, 2018 at 09:49:27PM +0200, Christoph Berg wrote: > Looking at src/test/recovery/t/009_twophase.pl, this is testing 2PC, > and the missing row is from: > > $cur_master->psql( > 'postgres', " > BEGIN; > INSERT INTO t_009_tbl VALUES (13, 'issued to ${cur_master_name}'); >

Re: TAP tests for pg_verify_checksums

2018-10-11 Thread Michael Paquier
On Wed, Oct 10, 2018 at 10:50:02AM +0900, Michael Paquier wrote: > The resulting patch is attached. Does that look good? And committed. Thanks all for taking the time to review. -- Michael signature.asc Description: PGP signature

Re: Code of Conduct plan

2018-10-11 Thread Bruce Momjian
On Thu, Sep 20, 2018 at 07:12:22AM +0200, Chris Travers wrote: > If we have a committer who loudly and proudly goes to neo-nazi rallies or > pickup artist / pro-rape meetups, then actually yes, I have a problem with > that. That impacts my ability to work in the community, impacts

Re: BUG #15425: DETACH/ATTACH PARTITION bug

2018-10-11 Thread Alvaro Herrera
Another version. I realized that attaching a partitioned partition had further trouble, because the recursion at each step would consider all FKs instead of only the FKs that had been cloned. So I had to split out the recursive step of the cloning. Now that works fine. In order to make this

Re: [HACKERS] removing abstime, reltime, tinterval.c, spi/timetravel

2018-10-11 Thread Andres Freund
Hi, On 2018-10-11 17:11:47 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2018-10-11 16:57:02 -0400, Tom Lane wrote: > >> Another idea would be to put table drops into the back branch regression > >> tests, so that their ending states don't include any such tables. That > >> would

Re: [HACKERS] removing abstime, reltime, tinterval.c, spi/timetravel

2018-10-11 Thread Tom Lane
Andres Freund writes: > On 2018-10-11 16:57:02 -0400, Tom Lane wrote: >> Another idea would be to put table drops into the back branch regression >> tests, so that their ending states don't include any such tables. That >> would cripple pg_dump testing of these types in the back branches, but >>

Re: [HACKERS] removing abstime, reltime, tinterval.c, spi/timetravel

2018-10-11 Thread Andres Freund
Hi, On 2018-10-11 16:57:02 -0400, Tom Lane wrote: > Andres Freund writes: > > I've done that now, together with two commits for removal of timetravel > > and abstime, reltime, tinterval. > > Unsurprisingly-in-retrospect, buildfarm member crake is now bitching > that cross-version pg_upgrade

Re: [HACKERS] removing abstime, reltime, tinterval.c, spi/timetravel

2018-10-11 Thread Tom Lane
Andres Freund writes: > I've done that now, together with two commits for removal of timetravel > and abstime, reltime, tinterval. Unsurprisingly-in-retrospect, buildfarm member crake is now bitching that cross-version pg_upgrade fails, since it's trying to test importing back-branch regression

Re: [HACKERS] [PATCH] Generic type subscripting

2018-10-11 Thread Dmitry Dolgov
> On Wed, 10 Oct 2018 at 14:26, Pavel Stehule wrote: > > I am playing with this feature little bit Thanks a lot! > I have one idea - can be possible to use integer subscript for record fields? > It can helps with iteration over record. > > example: > > select

Re: Soon-to-be-broken regression test case

2018-10-11 Thread Tom Lane
David Rowley writes: > I guess if we ever did something to break that then we'd need to not > do anything when there are volatile functions present. Yeah, nothing I'm doing here changes the rule that we don't flatten sub-selects containing volatiles in their tlist. > If people are > writing

Re: Debian mips: Failed test 'Check expected t_009_tbl data on standby'

2018-10-11 Thread Christoph Berg
Re: Tom Lane 2018-10-11 <28384.1539266...@sss.pgh.pa.us> > Christoph Berg writes: > > The 11rc1 build was failing on Debian mips: > > ... > > The diff is that "14|issued to london" was expected, but "|" was > > received. > > The build succeeded when I retried it manually on a different box. > >

Re: Soon-to-be-broken regression test case

2018-10-11 Thread David Rowley
On 12 October 2018 at 05:52, Alvaro Herrera wrote: > On 2018-Oct-11, Tom Lane wrote: > >> Hm, I'm not seeing any regression test result changes there. However, >> if you're just executing queries and not EXPLAIN'ing them, it's possible >> something unwanted is happening under the hood. > > Hmm,

Re: [HACKERS] removing abstime, reltime, tinterval.c, spi/timetravel

2018-10-11 Thread Andres Freund
Hi, On 2018-10-09 17:39:09 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2018-10-09 17:27:17 -0400, Tom Lane wrote: > >> I complained about this already on the other thread, I think, but: > >> I do not think we should remove timeofday(). It's unrelated to these > >> datatypes and it

Re: TupleTableSlot abstraction

2018-10-11 Thread Andres Freund
Hi, On 2018-10-01 22:21:58 -0400, Tom Lane wrote: > Kyotaro HORIGUCHI writes: > > At Tue, 25 Sep 2018 16:45:09 -0700, Andres Freund > > wrote in <20180925234509.3hrrf6tmvy5tf...@alap3.anarazel.de> > >> On 2018-09-04 18:35:34 +0530, Amit Khandekar wrote: > >>> Pack the boolean members in

Speedup to our barrier code

2018-10-11 Thread Andres Freund
Hi, This is more a note for the future, than something I'm planning to pursue right now. Turns out our x86 full memory barrier could be sped up noticably on larger systems with a trivial change. Just changing __asm__ __volatile__ ("lock; addl $0,0(%%rsp)" : : : "memory", "cc") into something

Re: Soon-to-be-broken regression test case

2018-10-11 Thread Tom Lane
Alvaro Herrera writes: > On 2018-Oct-11, Tom Lane wrote: >> Hm, I'm not seeing any regression test result changes there. However, >> if you're just executing queries and not EXPLAIN'ing them, it's possible >> something unwanted is happening under the hood. > Hmm, no, the explains are there.

Re: out-of-order XID insertion in KnownAssignedXids

2018-10-11 Thread Konstantin Knizhnik
On 11.10.2018 12:06, Michael Paquier wrote: On Wed, Oct 10, 2018 at 11:22:45AM +0900, Michael Paquier wrote: I am not sure if the performance argument is actually this much sensible, it could be as you say, but another thing that we could argue about is that the presence of duplicate entries

Re: Soon-to-be-broken regression test case

2018-10-11 Thread Alvaro Herrera
On 2018-Oct-11, Tom Lane wrote: > Hm, I'm not seeing any regression test result changes there. However, > if you're just executing queries and not EXPLAIN'ing them, it's possible > something unwanted is happening under the hood. Hmm, no, the explains are there. Here's one example -- maybe your

Re: Soon-to-be-broken regression test case

2018-10-11 Thread Alvaro Herrera
On 2018-Oct-11, Tom Lane wrote: > I have been fooling around with a patch to allow pull-up of sub-selects > that lack any FROM, along the lines discussed in > https://www.postgresql.org/message-id/15944.1521127...@sss.pgh.pa.us > I find that it is smart enough to reduce that EXISTS to a plain >

Soon-to-be-broken regression test case

2018-10-11 Thread Tom Lane
The last test case in select_parallel.sql, added in commit dc1057fc, currently generates a plan like this: CREATE VIEW tenk1_vw_sec WITH (security_barrier) AS SELECT * FROM tenk1; EXPLAIN (COSTS OFF) SELECT 1 FROM tenk1_vw_sec WHERE EXISTS (SELECT 1 WHERE unique1 = 0);

Re: COPY FROM WHEN condition

2018-10-11 Thread David Fetter
On Thu, Oct 11, 2018 at 05:12:48AM -0400, Corey Huinker wrote: > On Thu, Oct 11, 2018 at 5:04 AM Surafel Temesgen > wrote: > > > > > > > On Thu, Oct 11, 2018 at 12:00 PM Christoph Moench-Tegeder < > > c...@burggraben.net> wrote: > > > >> You can: > >> COPY ( query ) TO 'filename'; > >> > > it

Re: file cloning in pg_upgrade and CREATE DATABASE

2018-10-11 Thread Peter Eisentraut
On 10/10/2018 21:50, Bruce Momjian wrote: >> I see. Peter is proposing to have a fourth mode, essentially >> --transfer-mode=clone-or-copy. > > Uh, if you use --link, and the two data directories are on different > file systems, it fails. No one has ever asked for link-or-copy, so why > are we

Re: Debian mips: Failed test 'Check expected t_009_tbl data on standby'

2018-10-11 Thread Tom Lane
Christoph Berg writes: > The 11rc1 build was failing on Debian mips: > ... > The diff is that "14|issued to london" was expected, but "|" was > received. > The build succeeded when I retried it manually on a different box. Was it repeatable on the original box? My gut feeling is that this is

Few remarks on JIT , parallel query execution and columnar store...

2018-10-11 Thread Konstantin Knizhnik
Recently I have to estimate performance of performing select with multiple search conditions with bad selectivity. Definitely it is some kind of OLAP query and it will be interesting for me to understand the role of different PostgreSQL optimization options. So the table is the following:

Re: COPY FROM WHEN condition

2018-10-11 Thread Corey Huinker
On Thu, Oct 11, 2018 at 5:04 AM Surafel Temesgen wrote: > > > On Thu, Oct 11, 2018 at 12:00 PM Christoph Moench-Tegeder < > c...@burggraben.net> wrote: > >> You can: >> COPY ( query ) TO 'filename'; >> > it is for COPY FROM > > regards > Surafel > It didn't get far, but you may want to take a

Re: out-of-order XID insertion in KnownAssignedXids

2018-10-11 Thread Michael Paquier
On Wed, Oct 10, 2018 at 11:22:45AM +0900, Michael Paquier wrote: > I am not sure if the performance argument is actually this much > sensible, it could be as you say, but another thing that we could argue > about is that the presence of duplicate entries in > GetRunningTransactionData() can be

Re: COPY FROM WHEN condition

2018-10-11 Thread Surafel Temesgen
On Thu, Oct 11, 2018 at 12:00 PM Christoph Moench-Tegeder < c...@burggraben.net> wrote: > You can: > COPY ( query ) TO 'filename'; > it is for COPY FROM regards Surafel

Re: COPY FROM WHEN condition

2018-10-11 Thread Christoph Moench-Tegeder
## Surafel Temesgen (surafel3...@gmail.com): > Currently we can not moves data from a file to a table based on some > condition on a certain column You can: COPY ( query ) TO 'filename'; There's even an example in the documentation: https://www.postgresql.org/docs/10/static/sql-copy.html "To

COPY FROM WHEN condition

2018-10-11 Thread Surafel Temesgen
Hello, Currently we can not moves data from a file to a table based on some condition on a certain column but I think there are many use case for it that worth supporting. Attache is a patch for escaping a row that does not satisfy WHEN condition from inserting into a table and its work on the

Re: [HACKERS] WAL logging problem in 9.4.3?

2018-10-11 Thread Kyotaro HORIGUCHI
At Thu, 11 Oct 2018 13:42:35 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20181011.134235.218062184.horiguchi.kyot...@lab.ntt.co.jp> > Hello. > > At Fri, 27 Jul 2018 15:26:24 -0400, Andrew Dunstan > wrote in > > > > > > > On 07/18/2018 10:58 AM, Heikki Linnakangas wrote: > >

Debian mips: Failed test 'Check expected t_009_tbl data on standby'

2018-10-11 Thread Christoph Berg
The 11rc1 build was failing on Debian mips: cd /<>/build/../src/test/recovery && TESTDIR='/<>/build/src/test/recovery' PATH="/<>/build/tmp_install/usr/lib/postgresql/11/bin:$PATH" LD_LIBRARY_PATH="/<>/build/tmp_install/usr/lib/mips-linux-gnu" PGPORT='65432'

Mentorship

2018-10-11 Thread aviral1701
Hello, I am Aviral Verma, a senior computer science student at IIT Roorkee. I have been using PostgreSQL a lot now and the GCI mentorship seems like a good way to give back. I am quite familiar with the technologies that PostgreSQL uses and also pretty efficient with oss contribution workflow and