Re: A strange GiST error message or fillfactor of GiST build

2018-08-29 Thread Kyotaro HORIGUCHI
Hello. At Wed, 29 Aug 2018 10:42:59 -0300, Andrey Borodin wrote in <6fbe12b2-4f59-4db9-bde9-62c880118...@yandex-team.ru> > >> postgres=# create table y as select cube(array(SELECT random() as a FROM > >> generate_series(1,1000))) from generate_series(1,1e3,1); > >> SELECT 1000 > >>

Re: Use C99 designated initializers for some structs

2018-08-29 Thread Andres Freund
Hi, On 2018-08-29 18:51:24 -0400, Tom Lane wrote: > I agree that assuming that they're physically zeroes is OK from a > portability standpoint, because we'd have a whole lot of other issues > if they weren't. But I have a different point to make, which is that > it's fairly standard practice for

Re: Use C99 designated initializers for some structs

2018-08-29 Thread Andres Freund
Hi, On 2018-08-29 20:35:57 -0400, Chapman Flack wrote: > On 08/29/18 18:51, Tom Lane wrote: > > > As against that, of course, explicitly zeroing fields that you know very > > well are already zero eats some cycles. I've occasionally wondered if > > I haven't checked what a smart C99 compiler

Fix comments of IndexInfo

2018-08-29 Thread Yugo Nagata
Hi, Attached is a patch to fix comments of IndexInfo. ii_KeyAttrNumbers was renamed to ii_IndexAttrNumbers and ii_Am was added but these are not reflected to the comment. Regards, -- Yugo Nagata diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index

Re: [PATCH] Fix formatting in pg_upgrade manpage doc

2018-08-29 Thread Bruce Momjian
On Wed, Aug 29, 2018 at 08:02:54PM -0700, Martín Fernández wrote: > * > Stumble upon this formatting issue while reading the pg_upgrade docs. I am confused. What is the value of moving "without" to the next line in the sgml file? -- Bruce Momjian http://momjian.us EnterpriseDB

[PATCH] Fix formatting in pg_upgrade manpage doc

2018-08-29 Thread Martín Fernández
Stumble upon this formatting issue while reading the pg_upgrade docs. Martíndiff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml index d51146d641..4f69425c59 100644 --- a/doc/src/sgml/ref/pgupgrade.sgml +++ b/doc/src/sgml/ref/pgupgrade.sgml @@ -661,7 +661,8 @@ psql

Re: Postgres, fsync, and OSs (specifically linux)

2018-08-29 Thread Craig Ringer
On 15 August 2018 at 07:32, Thomas Munro wrote: > On Wed, Aug 15, 2018 at 11:08 AM, Asim R P wrote: > > I was looking at the commitfest entry for feature > > (https://commitfest.postgresql.org/19/1639/) for the most recent list > > of patches to try out. The list doesn't look correct/complete.

Re: Fix help option of contrib/oid2name

2018-08-29 Thread Tatsuro Yamada
On 2018/08/28 22:36, Michael Paquier wrote: On Mon, Aug 27, 2018 at 07:03:18PM +0900, Michael Paquier wrote: Thanks, I have looked at the patch set. I have been through the set once again, and pushed both things. Thanks a lot Yamada-san. Thank you very much for your time to review and

RE: speeding up planning with partitions

2018-08-29 Thread Tsunakawa, Takayuki
From: Amit Langote [mailto:langote_amit...@lab.ntt.co.jp] > We can definitely try, but I'm not immediately sure if the further > improvements will come from continuing to fix the planner. Maybe, the > overhead of partitioning could be attributed to other parts of the system. > Actually, I wrote

Re: speeding up planning with partitions

2018-08-29 Thread Amit Langote
On 2018/08/30 10:09, Tsunakawa, Takayuki wrote: > From: Amit Langote [mailto:langote_amit...@lab.ntt.co.jp] >> I measured the gain in performance due to each patch on a modest virtual >> machine. Details of the measurement and results follow. > > Amazing! Thanks. > UPDATE >> nparts master

RE: speeding up planning with partitions

2018-08-29 Thread Tsunakawa, Takayuki
From: Amit Langote [mailto:langote_amit...@lab.ntt.co.jp] > I measured the gain in performance due to each patch on a modest virtual > machine. Details of the measurement and results follow. Amazing! UPDATE > nparts master0001 0002 0003 > == == > 0

Re: speeding up planning with partitions

2018-08-29 Thread Amit Langote
On 2018/08/30 7:27, David Rowley wrote: > On 30 August 2018 at 00:06, Amit Langote > wrote: >> nparts master0001 0002 0003 >> == == >> 0 28562893 2862 2816 >> 8 5071115 1447 1872 >> 16 260 765 1173 1892 >>

Re: Use C99 designated initializers for some structs

2018-08-29 Thread Chapman Flack
On 08/29/18 18:51, Tom Lane wrote: > As against that, of course, explicitly zeroing fields that you know very > well are already zero eats some cycles. I've occasionally wondered if I haven't checked what a smart C99 compiler actually emits for a designated initializer giving a field a

Re: Postmaster doesn't send SIGTERM to bgworker during fast shutdown when pmState == PM_STARTUP

2018-08-29 Thread Michael Paquier
On Wed, Aug 29, 2018 at 09:09:08AM +0200, Alexander Kukushkin wrote: > Yeah, good catch, it starts checkpointer, bgwriter and in some cases > even archiver processes (when archive_mode=always) while pmState is > still equaled PM_START. > Please find attached the new version of the fix. Thanks,

Re: Use C99 designated initializers for some structs

2018-08-29 Thread Tom Lane
Andres Freund writes: > On 2018-08-29 15:51:07 -0500, David Steele wrote: >> One thing: I'm not sure that excluding the InvalidOid assignment in the >> TopTransactionStateData initializer is a good idea. That is, it's not clear >> that InvalidOid is 0. >> NULL, false, and 0 seem like

Re: speeding up planning with partitions

2018-08-29 Thread David Rowley
On 30 August 2018 at 00:06, Amit Langote wrote: > nparts master0001 0002 0003 > == == > 0 28562893 2862 2816 > 8 5071115 1447 1872 > 16 260 765 1173 1892 > 32 119 483922 1884 > 64

Re: patch to allow disable of WAL recycling

2018-08-29 Thread Jerry Jelinek
Tomas, This is really interesting data, thanks a lot for collecting all of it and formatting the helpful graphs. Jerry On Sun, Aug 26, 2018 at 4:14 PM, Tomas Vondra wrote: > > > On 08/25/2018 12:11 AM, Jerry Jelinek wrote: > > Alvaro, > > > > I have previously posted ZFS numbers for SmartOS

Re: "Write amplification" is made worse by "getting tired" while inserting into nbtree secondary indexes (Was: Why B-Tree suffix truncation matters)

2018-08-29 Thread Peter Geoghegan
On Tue, Aug 28, 2018 at 11:32 PM, Peter Eisentraut wrote: > Do you plan to submit this patch to the upcoming commit fest perhaps? I > have done some testing on it and it seems worth pursuing further. I should make sure that this makes it into the September 'fest. Thanks for reminding me. I've

Re: buildfarm: could not read block 3 in file "base/16384/2662": read only 0 of 8192 bytes

2018-08-29 Thread Tom Lane
I wrote: > We could perhaps fix this with a less invasive change than what you > suggest here, by attacking the missed-call-due-to-recursion aspect > rather than monkeying with how relcache rebuild itself works. Seeing that rearranging the relcache rebuild logic is looking less than trivial, I

Re: Use C99 designated initializers for some structs

2018-08-29 Thread Thomas Munro
On Thu, Aug 30, 2018 at 8:51 AM David Steele wrote: > On 8/29/18 5:14 AM, Peter Eisentraut wrote: > > On 29/08/2018 12:13, Peter Eisentraut wrote: > >> Here is a patch to change some struct initializations to use C99-style > >> designated initializers. These are just a few particularly egregious

Re: Use C99 designated initializers for some structs

2018-08-29 Thread Andres Freund
Hi, On 2018-08-29 15:51:07 -0500, David Steele wrote: > One thing: I'm not sure that excluding the InvalidOid assignment in the > TopTransactionStateData initializer is a good idea. That is, it's not clear > that InvalidOid is 0. > > NULL, false, and 0 seem like no-brainers, but maybe it would

Re: Use C99 designated initializers for some structs

2018-08-29 Thread David Steele
On 8/29/18 5:14 AM, Peter Eisentraut wrote: On 29/08/2018 12:13, Peter Eisentraut wrote: Here is a patch to change some struct initializations to use C99-style designated initializers. These are just a few particularly egregious cases that were hard to read and write, and error prone because

Re: buildfarm: could not read block 3 in file "base/16384/2662": read only 0 of 8192 bytes

2018-08-29 Thread Tom Lane
Andres Freund writes: > On 2018-08-29 14:00:12 -0400, Tom Lane wrote: >> 2. I think we may need to address the same order-of-operations hazards >> as RelationCacheInvalidate() worries about. Alternatively, maybe we >> could simplify that function by making it use the same >> delayed-revalidation

Re: buildfarm: could not read block 3 in file "base/16384/2662": read only 0 of 8192 bytes

2018-08-29 Thread Tom Lane
Andres Freund writes: > On 2018-08-29 12:56:07 -0400, Tom Lane wrote: >> BTW, I now have a theory for why we suddenly started seeing this problem >> in mid-June: commits a54e1f158 et al added a ScanPgRelation call where >> there had been none before (in RelationReloadNailed, for non-index rels).

Re: buildfarm: could not read block 3 in file "base/16384/2662": read only 0 of 8192 bytes

2018-08-29 Thread Andres Freund
Hi, On 2018-08-29 14:00:12 -0400, Tom Lane wrote: > A couple thoughts after reading and reflecting for awhile: Thanks. This definitely is too complicated for a single brain :( > 1. I don't much like the pending_rebuilds list, mainly because of this > consideration: what happens if we hit an

Re: Removing useless \. at the end of copy in pgbench

2018-08-29 Thread Andres Freund
On 2018-08-29 21:42:42 +0200, Fabien COELHO wrote: > > Hello, > > > What about: > > > > """ > > Pgbench requires a PostgreSQL version 8.2 or above server. > > """ > > > > Some information is provided... > > > > I understood that Tom found that an explicit compatibility note would be > >

Re: buildfarm: could not read block 3 in file "base/16384/2662": read only 0 of 8192 bytes

2018-08-29 Thread Andres Freund
Hi, On 2018-08-29 12:56:07 -0400, Tom Lane wrote: > I wrote: > > * We now recursively enter ScanPgRelation, which (again) needs to do a > > search using pg_class_oid_index, so it (again) opens and locks that. > > BUT: LockRelationOid sees that *this process already has share lock on > >

Re: rare crash - FailedAssertion snapbuild.c Line: 580

2018-08-29 Thread Andres Freund
Hi, On 2018-08-29 17:43:17 +0200, Erik Rijkers wrote: > To test postgres 11, I still regularly run series of short sessions of > pgbench-over-logical-replication (basically the same thing that I used last > year [1] - now in a perl incarnation). Most of the time the replication is > stable and

Re: FailedAssertion on partprune

2018-08-29 Thread Robert Haas
On Fri, Aug 17, 2018 at 2:58 AM, David Rowley wrote: >> I'm baffled as to why looking through Gather to find >> Append/MergeAppend subpaths would ever be a sane thing to do. > > Can you explain why it's less sane than what the current code is > doing? Below a Gather there will be partial paths,

Re: [HACKERS] proposal: schema variables

2018-08-29 Thread Fabien COELHO
Hello Pavel L. I do not understand your point, as usual. I raise a factual issue about security, and you do not answer how this can be solved with your proposal, but appeal to argument of authority and declare your "strong opinion". I do not see any intrinsic opposition between having

Re: buildfarm: could not read block 3 in file "base/16384/2662": read only 0 of 8192 bytes

2018-08-29 Thread Tom Lane
Andres Freund writes: > A bit of food, a coke and a talk later, here's a first draft *prototype* > of how this could be solved. ... > Obviously this is far from clean enough, but what do you think about the > basic approach? It does, in my limited testing, indeed solve the "could > not read

Re: Removing useless \. at the end of copy in pgbench

2018-08-29 Thread Fabien COELHO
The "may" is because I could *not* test: Works for me with 8.2. Thanks for the confirmation. Earlier branches fail immediately: dropping old tables... ERROR: syntax error at or near "exists" LINE 1: drop table if exists pgbench_accounts, pgbench_branches, pgb... ^

Re: FailedAssertion on partprune

2018-08-29 Thread Robert Haas
On Mon, Aug 27, 2018 at 6:05 PM, Jonathan S. Katz wrote: > On behalf of the RMT, I just want to make sure this keeps moving along. > It sounds like the next step is for Robert to verify that [3] is the > expected > behavior and then David can decide what to do from there. Yes, that's the

Re: buildfarm: could not read block 3 in file "base/16384/2662": read only 0 of 8192 bytes

2018-08-29 Thread Tom Lane
I wrote: > * We now recursively enter ScanPgRelation, which (again) needs to do a > search using pg_class_oid_index, so it (again) opens and locks that. > BUT: LockRelationOid sees that *this process already has share lock on > pg_class_oid_index*, so it figures it can skip

Re: Something's busted in plpgsql composite-variable handling

2018-08-29 Thread Jonathan S. Katz
On 8/28/18 12:06 PM, Pavel Stehule wrote: > > > 2018-08-28 17:04 GMT+02:00 Jonathan S. Katz >: > > >> On Aug 28, 2018, at 10:45 AM, Pavel Stehule >> mailto:pavel.steh...@gmail.com>> wrote: >> >> >> >> 2018-08-28 16:38 GMT+02:00 Jonathan S. Katz >

Re: some pg_dump query code simplification

2018-08-29 Thread Tom Lane
Peter Eisentraut writes: > OK, updated patch attached. If the updated style is acceptable, I'll > start running more extensive tests against the older branches. Looks sane to me. regards, tom lane

Re: Removing useless \. at the end of copy in pgbench

2018-08-29 Thread Tom Lane
Fabien COELHO writes: >> Also, I don't find any reason why 8.2 is the cutoff, and saying that it >> may work down to 8.2 (implying that it may not) is content-free. > The "may" is because I could *not* test: Works for me with 8.2. Earlier branches fail immediately: dropping old tables...

Re: Continue work on changes to recovery.conf API

2018-08-29 Thread Sergei Kornilov
Hello Current patch moves recovery.conf settings into GUC system: - if startup process found recovery.conf - it throw error - recovery mode is turned on if new special file recovery.signal found - standby_mode setting was removed. Standby mode can be enabled if startup found new special file

rare crash - FailedAssertion snapbuild.c Line: 580

2018-08-29 Thread Erik Rijkers
Hello, To test postgres 11, I still regularly run series of short sessions of pgbench-over-logical-replication (basically the same thing that I used last year [1] - now in a perl incarnation). Most of the time the replication is stable and finishes correctly but sometimes (rarely) I get:

Re: 10.5 but not 10.4: backend startup during reindex system: could not read block 0 in file "base/16400/..": read only 0 of 8192 bytes

2018-08-29 Thread Tom Lane
Justin Pryzby writes: > I've seen this message now a handful of times recently. It seems to happen > overnight, during a maintenance job which reindex things, including system > catalog indices. > It's easy to reproduce error under 10.5, but not under 10.3 nor 10.4. > while :; do for a in

Re: Is child process of postmaster able to access all the databases?

2018-08-29 Thread Tom Lane
Hubert Zhang writes: > I wonder if there is a way to let a child process of postmaster to access > all the databases one by one? No. For starters, you'd need some way to flush all database-specific information from relcache, catcache, and a boatload of other places; but that logic does not

Re: buildfarm: could not read block 3 in file "base/16384/2662": read only 0 of 8192 bytes

2018-08-29 Thread Tom Lane
Andres Freund writes: > It's not OK to rebuild relcache entries in the middle of > ReceiveSharedInvalidMessages() - a later entry in the invalidation queue > might be relmapper invalidation, and thus immediately processing a > relcache invalidation might attempt to scan a relation that does not >

Re: some pg_dump query code simplification

2018-08-29 Thread Peter Eisentraut
On 28/08/2018 23:43, Tom Lane wrote: > I think I had this discussion already with somebody, but ... I do not > like this style at all: > > tbinfo->attidentity[j] = (i_attidentity >= 0 ? *(PQgetvalue(res, > j, i_attidentity)) : '\0'); OK, updated patch attached. If the updated style

Re: Removing useless \. at the end of copy in pgbench

2018-08-29 Thread Alvaro Herrera
On 2018-Aug-29, Fabien COELHO wrote: > The "may" is because I could *not* test: I could not run a 8.2 on my laptop, > "initdb" fails on: > > creating template1 database in > <...>/src/test/regress/./tmp_check/data/base/1 ... ok > initializing pg_authid ... FATAL: wrong number of index

Re: some more error location support

2018-08-29 Thread Fabien COELHO
The majority rule (34 make & 22 free) suggest that it is more often use than not. I'd suggest to stick to that for consistency & homogeneity. But it's consistently not used in DDL command implementations, only in normal query parsing. I try to avoid complicated (context-sensitive) rules

Re: Removing useless \. at the end of copy in pgbench

2018-08-29 Thread Fabien COELHO
Hello Peter, """ Pgbench is expected to work with all PostgreSQL supported versions at the time it is released. Some options may work only with newer servers. It may work with older version down to 8.2. """ It is generally expected (nowadays) that client programs work independent of the

Re: pg_verify_checksums -d option (was: Re: pg_verify_checksums -r option)

2018-08-29 Thread Yugo Nagata
On Wed, 29 Aug 2018 21:09:03 +0900 Yugo Nagata wrote: > On Wed, 29 Aug 2018 13:46:38 +0200 > Magnus Hagander wrote: > > > On Wed, Aug 29, 2018 at 1:37 PM, Michael Banck > > wrote: > > > > > Hi, > > > > > > On Wed, Aug 29, 2018 at 08:33:43PM +0900, Yugo Nagata wrote: > > > > On Wed, 29 Aug

Is child process of postmaster able to access all the databases?

2018-08-29 Thread Hubert Zhang
Hello all. background worker can use SPI to read a database, but it can call BackgroundWorkerInitializeConnection(dbname) only once. I wonder if there is a way to let a child process of postmaster to access all the databases one by one? -- Thanks Hubert Zhang

10.5 but not 10.4: backend startup during reindex system: could not read block 0 in file "base/16400/..": read only 0 of 8192 bytes

2018-08-29 Thread Justin Pryzby
I've seen this message now a handful of times recently. It seems to happen overnight, during a maintenance job which reindex things, including system catalog indices. It's easy to reproduce error under 10.5, but not under 10.3 nor 10.4. while :; do for a in pg_class_oid_index

Re: A strange GiST error message or fillfactor of GiST build

2018-08-29 Thread Andrey Borodin
Hi! > 29 авг. 2018 г., в 5:32, Kyotaro HORIGUCHI > написал(а): > > Hello. > > In the discussion about cube's dimention limit [1], I found that > the error messages looks strange. > > https://www.postgresql.org/message-id/f0e1a404-a495-4f38-b817-06355b537...@yandex-team.ru > >> postgres=#

Re: Continue work on changes to recovery.conf API

2018-08-29 Thread Peter Eisentraut
On 01/07/2018 13:45, Sergei Kornilov wrote: > Commitfest 2018-09 is now open and, as planned, i create one entry: > https://commitfest.postgresql.org/19/1711/ > Also i attach new version due merge conflict with HEAD. Could you please describe in detail what this current patch does? -- Peter

Re: Removing useless \. at the end of copy in pgbench

2018-08-29 Thread Peter Eisentraut
On 29/07/2018 01:59, Fabien COELHO wrote: > """ > Pgbench is expected to work with all PostgreSQL supported versions at > the time it is released. Some options may work only with newer servers. It > may work with older version down to 8.2. > """ It is generally expected (nowadays) that client

Re: some more error location support

2018-08-29 Thread Peter Eisentraut
On 27/08/2018 11:17, Fabien COELHO wrote: > About patch 3: applies cleanly independently of the 2 others, compiles, > "make check" is okay. > > A few comments: > > There seems to be several somehow unrelated changes: one about copy, > one about trigger and one about constraints? The two later

Re: some more error location support

2018-08-29 Thread Peter Eisentraut
On 28/08/2018 08:58, Fabien COELHO wrote: > >>> Even if there is some under-the-hood garbage collection, I'd suggest to >>> add a free after the call to ComputePartitionAttrs. >> >> Hmm, I didn't know about free_parsestate(). It doesn't seem to be used >> consistently. I suppose you'll want to

Re: some pg_dump query code simplification

2018-08-29 Thread Andrew Dunstan
On 08/28/2018 06:10 PM, Stephen Frost wrote: Andrew has a buildfarm module that does precisely that, although I'm not sure what its test dataset is --- probably the regression database from each branch. I also have a habit of doing such testing manually whenever I touch version-sensitive

Re: some pg_dump query code simplification

2018-08-29 Thread Andrew Dunstan
On 08/28/2018 06:05 PM, Tom Lane wrote: Stephen Frost writes: I wonder- what if we had an option to pg_dump to explicitly tell it what the server's version is and then have TAP tests to run with different versions? Uh ... telling it what the version is doesn't make that true, so I'd have

Re: pg_verify_checksums -d option (was: Re: pg_verify_checksums -r option)

2018-08-29 Thread Yugo Nagata
On Wed, 29 Aug 2018 13:46:38 +0200 Magnus Hagander wrote: > On Wed, Aug 29, 2018 at 1:37 PM, Michael Banck > wrote: > > > Hi, > > > > On Wed, Aug 29, 2018 at 08:33:43PM +0900, Yugo Nagata wrote: > > > On Wed, 29 Aug 2018 10:28:33 +0200 > > > Daniel Gustafsson wrote: > > > > > On 27 Aug 2018,

speeding up planning with partitions

2018-08-29 Thread Amit Langote
It is more or less well known that the planner doesn't perform well with more than a few hundred partitions even when only a handful of partitions are ultimately included in the plan. Situation has improved a bit in PG 11 where we replaced the older method of pruning partitions one-by-one using

Re: pg_verify_checksums vs windows

2018-08-29 Thread Magnus Hagander
On Wed, Aug 29, 2018 at 1:44 PM, Amit Kapila wrote: > On Wed, Aug 29, 2018 at 5:05 PM Magnus Hagander > wrote: > > > > On Wed, Aug 29, 2018 at 1:31 PM, Amit Kapila > wrote: > >> > >> So, I think we need to open the file in binary mode as in other parts > >> of the code. The attached patch

Re: pg_verify_checksums -d option (was: Re: pg_verify_checksums -r option)

2018-08-29 Thread Magnus Hagander
On Wed, Aug 29, 2018 at 1:37 PM, Michael Banck wrote: > Hi, > > On Wed, Aug 29, 2018 at 08:33:43PM +0900, Yugo Nagata wrote: > > On Wed, 29 Aug 2018 10:28:33 +0200 > > Daniel Gustafsson wrote: > > > > On 27 Aug 2018, at 14:05, Yugo Nagata wrote: > > > > On Mon, 27 Aug 2018 13:34:12 +0200 > > >

Re: pg_verify_checksums vs windows

2018-08-29 Thread Amit Kapila
On Wed, Aug 29, 2018 at 5:05 PM Magnus Hagander wrote: > > On Wed, Aug 29, 2018 at 1:31 PM, Amit Kapila wrote: >> >> So, I think we need to open the file in binary mode as in other parts >> of the code. The attached patch fixes the problem for me. >> >> Thoughts? > > > Yikes. Yes, I believe you

Re: pg_verify_checksums -d option (was: Re: pg_verify_checksums -r option)

2018-08-29 Thread Michael Banck
Hi, On Wed, Aug 29, 2018 at 08:33:43PM +0900, Yugo Nagata wrote: > On Wed, 29 Aug 2018 10:28:33 +0200 > Daniel Gustafsson wrote: > > > On 27 Aug 2018, at 14:05, Yugo Nagata wrote: > > > On Mon, 27 Aug 2018 13:34:12 +0200 > > > Michael Banck wrote: > > >> On Mon, Aug 27, 2018 at 07:53:36PM

Re: Two proposed modifications to the PostgreSQL FDW

2018-08-29 Thread Etsuro Fujita
(2018/08/21 16:03), Amit Langote wrote: On 2018/08/20 23:43, Tom Lane wrote: Chris Travers writes: I am looking at trying to make two modifications to the PostgreSQL FDW and would like feedback on this before I do. 1. INSERTMETHOD=[insert|copy] option on foreign table. One significant

Re: pg_verify_checksums vs windows

2018-08-29 Thread Magnus Hagander
On Wed, Aug 29, 2018 at 1:31 PM, Amit Kapila wrote: > While trying to debug a recent bug report on hash indexes [1], I > noticed that pg_verify_checksums don't work on Windows (or at least in > my environment). > > initdb -k ..\..\data > pg_verify_checksums.exe ..\..\Data > pg_verify_checksums:

Re: pg_verify_checksums -d option (was: Re: pg_verify_checksums -r option)

2018-08-29 Thread Yugo Nagata
On Wed, 29 Aug 2018 10:28:33 +0200 Daniel Gustafsson wrote: > > On 27 Aug 2018, at 14:05, Yugo Nagata wrote: > > > > On Mon, 27 Aug 2018 13:34:12 +0200 > > Michael Banck wrote: > > > >> Hi, > >> > >> On Mon, Aug 27, 2018 at 07:53:36PM +0900, Yugo Nagata wrote: > >>> On Fri, 24 Aug 2018

Re: Catalog corruption

2018-08-29 Thread Andrew Gierth
> "Mariel" == Mariel Cherkassky writes: Mariel> Hi, Mariel> I sent already an email about this topic to pgsql-admins but I Mariel> think that it might be more relevant to this mailing list. The -hackers mailing list is about the development of postgresql. Mariel> I'm trying to

Re: pg_verify_checksums failure with hash indexes

2018-08-29 Thread Yugo Nagata
On Wed, 29 Aug 2018 16:01:53 +0530 Amit Kapila wrote: > > By the way, I think we can fix this also by clearing the header information > > of the last > > page instead of setting a checksum to the unused page although I am not > > sure which way > > is better. > > > > I think that can

Re: pg_verify_checksums failure with hash indexes

2018-08-29 Thread Dilip Kumar
On Wed, Aug 29, 2018 at 3:39 PM, Dilip Kumar wrote: > On Tue, Aug 28, 2018 at 8:33 PM, Bernd Helmle wrote: >> Am Dienstag, den 28.08.2018, 11:21 +0200 schrieb Peter Eisentraut: >>> This is reproducible with PG11 and PG12: >>> >>> initdb -k data >>> postgres -D data >>> >>> make installcheck >>>

Re: pg_verify_checksums failure with hash indexes

2018-08-29 Thread Amit Kapila
On Wed, Aug 29, 2018 at 3:30 PM Yugo Nagata wrote: > > On Wed, 29 Aug 2018 14:39:10 +0530 > Amit Kapila wrote: > > > On Tue, Aug 28, 2018 at 2:51 PM Peter Eisentraut > > wrote: > > > > > > This is reproducible with PG11 and PG12: > > > > > > initdb -k data > > > postgres -D data > > > > > >

Re: Stored procedures and out parameters

2018-08-29 Thread Vladimir Sitnikov
David>JDBC driver or similar drivers to use the CALL command always from PG11 on, then the meaning of {call f1(a, b)} will have changed and a Note: technically speaking, JDBC has two flavours of syntax (however standard does not clarify the distinction): S1) {? := call my_proc(?,?) } S2) { call

Re: Use C99 designated initializers for some structs

2018-08-29 Thread Peter Eisentraut
On 29/08/2018 12:13, Peter Eisentraut wrote: > Here is a patch to change some struct initializations to use C99-style > designated initializers. These are just a few particularly egregious > cases that were hard to read and write, and error prone because of many > similar adjacent types. > >

Use C99 designated initializers for some structs

2018-08-29 Thread Peter Eisentraut
Here is a patch to change some struct initializations to use C99-style designated initializers. These are just a few particularly egregious cases that were hard to read and write, and error prone because of many similar adjacent types. (The PL/Python changes currently don't compile with Python 3

Re: pg_verify_checksums failure with hash indexes

2018-08-29 Thread Dilip Kumar
On Tue, Aug 28, 2018 at 8:33 PM, Bernd Helmle wrote: > Am Dienstag, den 28.08.2018, 11:21 +0200 schrieb Peter Eisentraut: >> This is reproducible with PG11 and PG12: >> >> initdb -k data >> postgres -D data >> >> make installcheck >> # shut down postgres with Ctrl-C >> > > I tried to reproduce

Re: pg_verify_checksums failure with hash indexes

2018-08-29 Thread Yugo Nagata
On Wed, 29 Aug 2018 14:39:10 +0530 Amit Kapila wrote: > On Tue, Aug 28, 2018 at 2:51 PM Peter Eisentraut > wrote: > > > > This is reproducible with PG11 and PG12: > > > > initdb -k data > > postgres -D data > > > > make installcheck > > # shut down postgres with Ctrl-C > > > .. > > > > The

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-08-29 Thread Etsuro Fujita
(2018/08/29 0:21), Jonathan S. Katz wrote: On Aug 24, 2018, at 8:38 AM, Etsuro Fujita wrote: (2018/08/24 11:47), Michael Paquier wrote: On Thu, Aug 23, 2018 at 10:00:49PM +0900, Etsuro Fujita wrote: I tried this today, but doing git behind the corporate firewall doesn't work. I don't know

PL/Python: Remove use of simple slicing API

2018-08-29 Thread Peter Eisentraut
I have found some dying code in PL/Python. The simple slicing API (sq_slice, sq_ass_slice) has been deprecated since Python 2.0 and has been removed altogether in Python 3, so we can remove those functions from the PLyResult class. Instead, the non-slice mapping functions mp_subscript and

Re: pg_verify_checksums failure with hash indexes

2018-08-29 Thread Yugo Nagata
On Tue, 28 Aug 2018 15:02:56 +0200 Michael Banck wrote: > Hi, > > On Tue, Aug 28, 2018 at 11:21:34AM +0200, Peter Eisentraut wrote: > > This is reproducible with PG11 and PG12: > > > > initdb -k data > > postgres -D data > > > > make installcheck > > # shut down postgres with Ctrl-C > > > >

Re: pg_verify_checksums failure with hash indexes

2018-08-29 Thread Amit Kapila
On Tue, Aug 28, 2018 at 2:51 PM Peter Eisentraut wrote: > > This is reproducible with PG11 and PG12: > > initdb -k data > postgres -D data > > make installcheck > # shut down postgres with Ctrl-C > .. > > The files in question correspond to > > hash_i4_index > hash_name_index > hash_txt_index >

Re: Reopen logfile on SIGHUP

2018-08-29 Thread Alexander Korotkov
Hi! On Wed, Aug 29, 2018 at 5:05 AM Kyotaro HORIGUCHI wrote: > At Tue, 28 Aug 2018 18:50:31 +0300, Alexander Korotkov > wrote in > > > Also I found that this new pg_ctl isn't covered with tests at all. So > > I've added very simple tap tests, which ensures that when log file was > >

Re: Flexible configuration for full-text search

2018-08-29 Thread Aleksandr Parfenov
On Tue, 28 Aug 2018 12:40:32 +0700 Aleksandr Parfenov wrote: >On Fri, 24 Aug 2018 18:50:38 +0300 >Alexander Korotkov wrote: >>Agreed, backward compatibility is important here. Probably we should >>leave old dictionaries for that. But I just meant that if we >>introduce new (better) way of

Re: buildfarm: could not read block 3 in file "base/16384/2662": read only 0 of 8192 bytes

2018-08-29 Thread Andres Freund
On 2018-08-28 20:29:08 -0700, Andres Freund wrote: > On 2018-08-28 20:27:14 -0700, Andres Freund wrote: > > Locally that triggers the problem within usually a few seconds. > > FWIW, it does so including versions as old as 9.2. > > Now I need to look for power for my laptop and some for me ;) A

Re: pg_verify_checksums -d option (was: Re: pg_verify_checksums -r option)

2018-08-29 Thread Daniel Gustafsson
> On 27 Aug 2018, at 14:05, Yugo Nagata wrote: > > On Mon, 27 Aug 2018 13:34:12 +0200 > Michael Banck wrote: > >> Hi, >> >> On Mon, Aug 27, 2018 at 07:53:36PM +0900, Yugo Nagata wrote: >>> On Fri, 24 Aug 2018 18:01:09 +0200 >>> Peter Eisentraut wrote: I'm curious about this option:

A strange GiST error message or fillfactor of GiST build

2018-08-29 Thread Kyotaro HORIGUCHI
Hello. In the discussion about cube's dimention limit [1], I found that the error messages looks strange. https://www.postgresql.org/message-id/f0e1a404-a495-4f38-b817-06355b537...@yandex-team.ru > postgres=# create table y as select cube(array(SELECT random() as a FROM >

Re: logical decoding: ABI break in 10.5 et al

2018-08-29 Thread Christoph Berg
Re: Alvaro Herrera 2018-08-28 <20180828153806.fgfnul2imeltzmib@alvherre.pgsql> > This commit made modules dependent on structs ReorderBuffer and > ReorderBufferTXN compiled for prior minor releases no longer work with > the new minors, because some new struct members were inserted in the > middle

Re: [HACKERS] advanced partition matching algorithm for partition-wise join

2018-08-29 Thread Ashutosh Bapat
On Thu, Aug 23, 2018 at 4:01 PM, Dmitry Dolgov <9erthali...@gmail.com> wrote: >> On Fri, 27 Jul 2018 at 20:13, Robert Haas wrote: >> >> On Fri, Jul 27, 2018 at 3:17 AM, Ashutosh Bapat >> wrote: >> > Apart from the complexity there's also a possibility that this >> > skipping will reduce the

Re: Catalog corruption

2018-08-29 Thread Mariel Cherkassky
Yes indeed. I took a cold backup - shutdown the database and copy all the data dir. ‫בתאריך יום ג׳, 28 באוג׳ 2018 ב-22:34 מאת ‪Asim R P‬‏ <‪aprav...@pivotal.io ‬‏>:‬ > On Tue, Aug 28, 2018 at 7:36 AM, Mariel Cherkassky > wrote: > > Afterwards I vacuumed all the databases but nothing helped. I

Re: Postmaster doesn't send SIGTERM to bgworker during fast shutdown when pmState == PM_STARTUP

2018-08-29 Thread Alexander Kukushkin
Hi, 2018-08-29 1:24 GMT+02:00 Michael Paquier : > I have been studying your patch, but it seems to me that this is not > complete as other processes could have been started before switching > from PM_STARTUP to PM_RECOVERY. I am talking here about the bgwriter > and the checkpointer as well.

Re: "Write amplification" is made worse by "getting tired" while inserting into nbtree secondary indexes (Was: Why B-Tree suffix truncation matters)

2018-08-29 Thread Peter Eisentraut
Do you plan to submit this patch to the upcoming commit fest perhaps? I have done some testing on it and it seems worth pursuing further. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services