Re: parallel vacuum comments

2021-11-04 Thread Peter Geoghegan
is useful. > Regarding tests, I’d like to add tests to check if a vacuum with > multiple index scans (i.g., due to small maintenance_work_mem) works > fine. But a problem is that we need at least about 200,000 garbage > tuples to perform index scan twice even with the minimum > maintenance_work_mem. Which takes a time to load tuples. Maybe that's okay. Do you notice that it takes a lot longer now? I did try to keep the runtime down when I committed the fixup to the parallel VACUUM related bug. -- Peter Geoghegan

Re: Why doesn't GiST VACUUM require a super-exclusive lock, like nbtree VACUUM?

2021-11-04 Thread Peter Geoghegan
e the chances of somebody noticing a more or less once-off, slightly wrong answer? -- Peter Geoghegan

Why doesn't GiST VACUUM require a super-exclusive lock, like nbtree VACUUM?

2021-11-03 Thread Peter Geoghegan
s to read the heap for at least that one dead-to-all TID, discovering that the TID is dead to its snapshot). Why wouldn't GiST need to take the same precautions, though? [1] https://www.postgresql.org/docs/devel/index-locking.html -- Peter Geoghegan

Re: parallel vacuum comments

2021-11-02 Thread Peter Geoghegan
g vacuumcleanup it would not become a serious > consequence. > > I've attached a patch to fix it. I pushed your fix just now. Thanks -- Peter Geoghegan

Re: should we enable log_checkpoints out of the box?

2021-11-02 Thread Peter Geoghegan
e more likely it is that the notable remaining problems will be complicated and kind of weird. That's what I see. -- Peter Geoghegan

Re: should we enable log_checkpoints out of the box?

2021-11-02 Thread Peter Geoghegan
ctable in cases where users actually run into real problems -- cases where it actually matters. -- Peter Geoghegan

Re: should we enable log_checkpoints out of the box?

2021-11-02 Thread Peter Geoghegan
gs would ever > generate if it meant that they could actually find problems when and > if they have them. I fully agree. -- Peter Geoghegan

Re: parallel vacuum comments

2021-11-01 Thread Peter Geoghegan
in nbtdedup.c fails when the tests are run without the fix in place, or something like that. -- Peter Geoghegan

Re: Feature request for adoptive indexes

2021-10-27 Thread Peter Geoghegan
r mechanism to make it safe -- ISTM you must "logically lock" the index structure, using ARIES/KVL style key value locks, or something along those lines. -- Peter Geoghegan

Re: Feature request for adoptive indexes

2021-10-26 Thread Peter Geoghegan
o imagine that it's basically just a matter of coming up with the right index AM data structure, but that's actually just the easy part. -- Peter Geoghegan

MDAM techniques and Index Skip Scan patch

2021-10-21 Thread Peter Geoghegan
[1] http://vldb.org/conf/1995/P710.PDF [2] https://blog.timescale.com/blog/how-we-made-distinct-queries-up-to-8000x-faster-on-postgresql/ [3] https://www.postgresql.org/message-id/flat/7f70bd5a-5d16-e05c-f0b4-2fdfc8873489%40BlueTreble.com [4] https://www.postgresql.org/message-id/flat/14593.1517581614%40sss.pgh.pa.us#caf373b36332f25acb7673bff331c95e -- Peter Geoghegan

Re: Thinking about ANALYZE stats and autovacuum and large non-uniform tables

2021-10-21 Thread Peter Geoghegan
d of execution time smarts about the statistics, and their inherent unreliability. Somehow query execution itself should become less gullible, at least in cases where we really can have high confidence in the statistics being wrong at this exact time, for this exact key space. [1] https://postgr.es/m/CAH2-Wz=9r83wcwzcpuh4fvpedm4znzbzmvp3rt21+xhqwmu...@mail.gmail.com -- Peter Geoghegan

Re: [PATCH] Fix memory corruption in pg_shdepend.c

2021-10-20 Thread Peter Geoghegan
ether or not we need to involve contrib/amcheck itself doesn't seem important to me right now. Offhand I think that we wouldn't, because as you point out pg_catcheck is a frontend program that checks multiple databases. -- Peter Geoghegan

Re: [PATCH] Fix memory corruption in pg_shdepend.c

2021-10-20 Thread Peter Geoghegan
patch, and submitted. That would give us very broad coverage. -- Peter Geoghegan

Re: GIN pending list cleanup during autoanalyze blocks cleanup by VACUUM

2021-10-16 Thread Peter Geoghegan
ckpatching anything here. The problem report from Nikolay was probably an unusually bad case, where the pending list cleanup/insertion was particularly expensive. This *is* really awful behavior, but that alone isn't a good enough reason to backpatch. -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-14 Thread Peter Geoghegan
On Thu, Oct 14, 2021 at 2:31 PM Mark Dilger wrote: > I was just waiting a couple minutes to see if Andrew wanted to jump in. > Having heard nothing, I guess you can revert it. Okay. Pushed a commit removing the test case just now. Thanks -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-14 Thread Peter Geoghegan
an investigation on affected BF animals, or something else? > Or do you have a different way forward for that? I don't know enough about this stuff to be able to comment. -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-14 Thread Peter Geoghegan
I agree. I can go remove the whole file now, and will. Mark: Any objections? -- Peter Geoghegan

Re: Next Steps with Hash Indexes

2021-10-14 Thread Peter Geoghegan
n't be 24 bytes long. That's the same as an nbtree page, which confirms my suspicion. The 20 bytes consists of a 16 byte tuple, plus a 4 byte line pointer. The tuple-level alignment overhead gets you from 12 bytes to 16 bytes with a single int4 column. So the padding is there for the taking. -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-13 Thread Peter Geoghegan
On Wed, Oct 13, 2021 at 9:15 PM Tom Lane wrote: > Looks like a transient/phase of the moon issue to me. Yeah, I noticed that drongo is prone to them, though only after I hit send. Thanks -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-13 Thread Peter Geoghegan
On Wed, Oct 13, 2021 at 2:09 PM Peter Geoghegan wrote: > I just pushed v4, with the additional minor pg_amcheck documentation > updates we talked about. No other changes. Any idea what the problems on drongo are? https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=drongo=2021-10-1

Re: GIN pending list cleanup during autoanalyze blocks cleanup by VACUUM

2021-10-13 Thread Peter Geoghegan
On Sat, Oct 9, 2021 at 5:51 PM Peter Geoghegan wrote: > While I'm no closer to a backpatchable fix than I was on Thursday, I > do have some more ideas about what to do on HEAD. I now lean towards > completely ripping analyze_only calls out, there -- the whole idea of > calling amv

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-13 Thread Peter Geoghegan
gly about it either. I just pushed v4, with the additional minor pg_amcheck documentation updates we talked about. No other changes. Thanks again -- Peter Geoghegan

Re: Next Steps with Hash Indexes

2021-10-13 Thread Peter Geoghegan
On Wed, Oct 13, 2021 at 12:15 PM Peter Geoghegan wrote: > Are you sure? I know that nbtree index tuples for a single-column int8 > index are exactly the same size as those from a single column int4 > index, due to alignment overhead at the tuple level. So my guess is > that hash

Re: Next Steps with Hash Indexes

2021-10-13 Thread Peter Geoghegan
So my guess is that hash index tuples (which use the same basic IndexTuple representation) work in the same way. -- Peter Geoghegan

Re: pg14 psql broke \d datname.nspname.relname

2021-10-12 Thread Peter Geoghegan
sume that it is bug compatibility. Is that intrinsically a bad thing? -- Peter Geoghegan

Re: pg14 psql broke \d datname.nspname.relname

2021-10-11 Thread Peter Geoghegan
lls us that there are bound to be some number of users relying on it. I don't think that it's worth inconveniencing those people without getting a clear benefit in return. Being lenient here just doesn't have much downside in practice, as evidenced by the total lack of complaints about that lenience. --

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-11 Thread Peter Geoghegan
t also seems unlikely to make any appreciable difference to the overall level of coverage in practice. Would it be simpler to do it all together, in compile_relation_list_one_db()? Were you concerned about things changing when parallel workers are run? Or something else? Many thanks -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-11 Thread Peter Geoghegan
secondary point, at best. We don't need to use a warning box because of that. Overall, your approach looks good to me. Will Robert take care of committing this, or should I? -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-11 Thread Peter Geoghegan
On Mon, Oct 11, 2021 at 11:40 AM Peter Geoghegan wrote: > A NOTICE message is supposed to be surfaced to clients (but not stored > in the server log), pretty much by definition. > > It's not unreasonable to argue that I was mistaken to ever think that > about this particular mess

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-11 Thread Peter Geoghegan
ditive thing. Totally changing the general locking requirements seems like a POLA violation. Besides, amcheck proper is now very much the low level tool that most users won't ever bother with. -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-11 Thread Peter Geoghegan
easonably complain about this on a hot standby with > millions of unlogged relations. Actual ERROR messages might get lost in all > the noise. That's a good point. -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-11 Thread Peter Geoghegan
> style. I definitely think that it warrants a warning box. This is a huge practical difference. Note that I'm talking about a standard thing, which there are certainly a dozen or more examples of in the docs already. Just grep for " " tags to see the existing warning boxes. -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-11 Thread Peter Geoghegan
On Mon, Oct 11, 2021 at 11:12 AM Peter Geoghegan wrote: > Sure, the user might not be happy with --parent-check throwing an > error on a replica. But in practice most users won't want to do that > anyway. Even on a primary it's usually not possible as a practical > matter, because

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-11 Thread Peter Geoghegan
On Mon, Oct 11, 2021 at 10:46 AM Mark Dilger wrote: > > On Oct 11, 2021, at 10:10 AM, Peter Geoghegan wrote: > > This mostly looks good to me. Just one thing occurs to me: I suspect > > that we don't need to call pg_is_in_recovery() from SQL at all. What's > >

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-11 Thread Peter Geoghegan
when that's the logical outcome (e.g., when --parent-check is used on a replica). To me this seems rather different than not checking temporary tables, because that's something that inherently won't work. (Also, I consider the index-is-being-built stuff to be very similar to the temp table stuff -- same basic situation.) -- Peter Geoghegan

Re: Corruption with IMMUTABLE functions in index expression.

2021-10-11 Thread Peter Geoghegan
But experience suggests that they don't. -- Peter Geoghegan

Re: GIN pending list cleanup during autoanalyze blocks cleanup by VACUUM

2021-10-09 Thread Peter Geoghegan
On Thu, Oct 7, 2021 at 10:34 PM Peter Geoghegan wrote: > This issue was brought to my attention by Nikolay Samokhvalov. He > reached out privately about it. He mentioned one problematic case > involving an ANALYZE lasting 45 minutes, or longer (per > log_autovacuum_min_dur

Re: Parallel vacuum workers prevent the oldest xmin from advancing

2021-10-08 Thread Peter Geoghegan
c-postgresql.com/en/reasons-why-vacuum-wont-remove-dead-rows/ -- Peter Geoghegan

GIN pending list cleanup during autoanalyze blocks cleanup by VACUUM

2021-10-07 Thread Peter Geoghegan
could be used as a fix for this issue, at least on HEAD. [1] https://postgr.es/m/20210405063117.GA2478@ahch-to -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-06 Thread Peter Geoghegan
r had -- having only one pg_class entry was actually the true underlying problem, all along. Sometimes we have to make a difficult choice between "weird rules but nice behavior" (as with REINDEX CONCURRENTLY), and "nice rules but weird behavior" (as with plain REINDEX). -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-06 Thread Peter Geoghegan
question, and I don't think you need to weigh in > unless you want to. I'll most likely go with whatever is the simplest to > code and/or most similar to what is currently in the tree, because I don't > see any knock-down arguments one way or the other. I agree with you that this is a UI thing, since in any case the temp table is pretty much "not visible to pg_amcheck". I have no particular feelings about it. Thanks -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-06 Thread Peter Geoghegan
downgrade options as necessary, but now it sounds like > that's not so. So what should it do Downgrade is how you refer to it. I just think of it as making sure that pg_amcheck only asks amcheck to verify relations that are basically capable of being verified (e.g., not a temp table). -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-06 Thread Peter Geoghegan
things, in one way or another. > No, that's existing code from btree_index_mainfork_expected. I thought > you were saying that verify_heapam.c should adopt the same approach, > and I was agreeing, not because I think it's necessarily the perfect > approach, but for consistency. Sorry, I somehow read that code as having an ERROR, not a NOTICE. (Even though I wrote the code myself.) -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-06 Thread Peter Geoghegan
gt; can't check an unlogged relation on a standby than get nothing. Sure, what I > did doesn't make sense, but why should the application paper over that > mistake? I think that it shouldn't get an error at all -- this should be treated like an empty relation, per the verify_nbtree.c pr

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-06 Thread Peter Geoghegan
omoted, we'll then also have no on-disk storage for the same unlogged relation, but now suddenly it's okay, just because of that. I find it far more logical to just assume that there is no relfilenode storage to check when in hot standby. This isn't the same as the --parent-check thing at all, because that's about an implementation restriction of Hot Standby. Whereas this is about the physical index structure itself. -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-06 Thread Peter Geoghegan
On Wed, Oct 6, 2021 at 11:55 AM Peter Geoghegan wrote: > I am pretty sure that I agree with you about all these details. We > need to tease them apart some more. I think that what I've said boils down to this: * pg_amcheck shouldn't attempt to verify temp relations, on the g

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-06 Thread Peter Geoghegan
the indexes (actually just show those NOTICE messages), or skip them entirely. I lean towards the former option, on the grounds that I don't think it should be special-cased. But I don't feel very strongly about it. -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-06 Thread Peter Geoghegan
. It is uncomfortable to me that `pg_amcheck > --parent-check` will now silently not perform the parent check that was > explicitly requested. But the whole definition of "check that was explicitly requested" relies on your existing understanding of what pg_amcheck is supposed to do. That's not actually essential. I don't see it that way, for example. -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-06 Thread Peter Geoghegan
inition not corrupt > > I think #1 and #3 are unsurprising enough that they need no documentation > update. #2 is slightly surprising (at least to me) so I updated the docs for > it. To me #2 sounds like a tautology. It could almost be phrased as "pg_amcheck does not check the things that it cannot check". -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-06 Thread Peter Geoghegan
e happens to be even one such index. And yet the return value from pg_amcheck is still 0 (barring problems elsewhere). I think that it'll always be possible to make *some* argument like that, even in a world where pg_amcheck + amcheck are very feature complete. As I said, it seems fundamental.

Re: wrapping CF 2021-09

2021-10-06 Thread Peter Geoghegan
On Tue, Oct 5, 2021 at 10:21 PM Jaime Casanova wrote: > At this time I'm looking to close the CF. Thanks, Jaime. -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-06 Thread Peter Geoghegan
d way, that creates ambiguity. Ordinary DDL certainly doesn't count as unusual here. -- Peter Geoghegan

Re: Polyphase merge is obsolete

2021-10-05 Thread Peter Geoghegan
ses to enforce work_mem limits sometimes allows the implementation to use slightly more memory than theoretically allowable. That's how we get negative values. -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-05 Thread Peter Geoghegan
r working on the issue so promptly. This was a question of fundamental definitions. Those are often very tricky. -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-05 Thread Peter Geoghegan
On Tue, Oct 5, 2021 at 9:41 AM Robert Haas wrote: > On Mon, Oct 4, 2021 at 7:10 PM Peter Geoghegan wrote: > > All of the underlying errors are cases that were clearly intended to > > catch user error -- every single one. But apparently pg_amcheck is > > incapable of error

Re: RfC entries in CF 2021-09

2021-10-05 Thread Peter Geoghegan
On Mon, Oct 4, 2021 at 12:09 PM Jaime Casanova wrote: > - Extending amcheck to check toast size and compression > Last patch from may-2021, also it seems there is no activity since > Jul-2021. Peter Geoghegan, are you planning to look at this one? I didn't plan on it, no.

Re: Triage on old commitfest entries

2021-10-04 Thread Peter Geoghegan
uld be happy to work with you on this. It's clearly an important project. Having you involved with the core planner aspects (as well as general design questions) significantly derisks everything. That's *very* valuable to me. -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-04 Thread Peter Geoghegan
st happen. > So I am changing pg_amcheck to filter out indexes when pg_is_in_recovery() is > true and relpersistence='u'. Does that sound right to you? Yes, that all sounds right to me. Thanks -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-04 Thread Peter Geoghegan
require the SQL caller to do anything like what you are > requiring here in order to prevent deadlocks, and also because the docs for > the functions don't say that a deadlock is possible, merely that the function > may return with an error. I will need to study the deadlock issue separately. -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-04 Thread Peter Geoghegan
ly what they'd expect -- verification of the original index, without any hindrance from the new/failed index. (Thinks for a moment...) Actually, I think that we'd only verify the original index, even before the error with CONCURRENTLY (though I've not checked that point myself). -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-04 Thread Peter Geoghegan
ated as axiomatic truths about how pg_amcheck must work. Should we now "fix" pg_dump so that it matches pg_amcheck? All of the underlying errors are cases that were clearly intended to catch user error -- every single one. But apparently pg_amcheck is incapable of error, by definition. Like HAL 9000. -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-04 Thread Peter Geoghegan
e really don't want to have to throw an "invalid object type" style error just because verification runs during recovery. Plus it just seems logical to assume that unlogged indexes/tables don't have storage when we're in hot standby mode, and so must simply have nothing for us to verify. -- Peter Geoghegan

Re: BUG #17212: pg_amcheck fails on checking temporary relations

2021-10-04 Thread Peter Geoghegan
cess 9555. > HINT: See server log for query details. > ERROR: cannot check index "t_idx" > DETAIL: Index is not valid. I think that the deadlock is just another symptom of the same problem. -- Peter Geoghegan

Re: Triage on old commitfest entries

2021-10-03 Thread Peter Geoghegan
without reaching commit, we should either kill it or > form a specific plan for how to advance it. Also fair. The pandemic has made the kind of coordination I refer to harder in practice. It's the kind of thing that face to face communication really helps with. -- Peter Geoghegan

Re: Triage on old commitfest entries

2021-10-03 Thread Peter Geoghegan
ee stuff here, which is clearly my thing. But I know that I personally am much less likely to work on a patch that requires significant changes to the planner. Maybe this is a coordination problem. -- Peter Geoghegan

Re: Enabling deduplication with system catalog indexes

2021-10-02 Thread Peter Geoghegan
On Fri, Oct 1, 2021 at 2:35 PM Bossart, Nathan wrote: > On 9/30/21, 3:44 PM, "Peter Geoghegan" wrote: > > I will commit this patch in a few days, barring objections. > > +1 Okay, pushed. Thanks -- Peter Geoghegan

Re: Adding CI to our tree

2021-10-01 Thread Peter Geoghegan
wnside, as long as we just use the resources that they make available for development work. Clearly these services could never replace the buildfarm. -- Peter Geoghegan

Re: Enabling deduplication with system catalog indexes

2021-09-30 Thread Peter Geoghegan
On Wed, Sep 29, 2021 at 3:32 PM Peter Geoghegan wrote: > I decided to run a simple experiment, to give us some idea of what > benefits my proposal gives users: I ran "make installcheck" on a newly > initdb'd database (master branch), and then with the attached patch > (which

Re: Enabling deduplication with system catalog indexes

2021-09-29 Thread Peter Geoghegan
On Wed, Sep 29, 2021 at 11:27 AM Peter Geoghegan wrote: > I would like to enable deduplication within system catalog indexes for > Postgres 15. I decided to run a simple experiment, to give us some idea of what benefits my proposal gives users: I ran "make installcheck" on

Enabling deduplication with system catalog indexes

2021-09-29 Thread Peter Geoghegan
o have a fair number of duplicates. -- Peter Geoghegan

Re: decoupling table and index vacuum

2021-09-24 Thread Peter Geoghegan
On Fri, Sep 24, 2021 at 7:44 PM Peter Geoghegan wrote: > The scheduling of autovacuum is itself a big problem for the two big > BenchmarkSQL tables I'm always going on about -- though it did get a > lot better with the introduction of the > autovacuum_vacuum_insert_scale_factor stuff

Re: decoupling table and index vacuum

2021-09-24 Thread Peter Geoghegan
d-f106-8abde596c0e4%40commandprompt.com [2] https://postgr.es/m/CAH2-Wz=sJm3tm+FpXbyBhEhX5tbz1trQrhG6eOhYk4-+5uL=w...@mail.gmail.com -- Peter Geoghegan

Re: decoupling table and index vacuum

2021-09-24 Thread Peter Geoghegan
On Thu, Sep 23, 2021 at 10:42 PM Masahiko Sawada wrote: > On Thu, Sep 16, 2021 at 7:09 AM Peter Geoghegan wrote: > > Enabling index-only scans is a good enough reason to pursue this > > project, even on its own. > > +1 I was hoping that you might be able to work on oppor

Re: Release 14 Schedule

2021-09-22 Thread Peter Geoghegan
discretion to keep the website version of the release notes a bit more consistent then what you'd get from the RC1 tarball. I'm not going to make a fuss about it, but it would have been nice if we'd kept with the usual schedule for the major features list. -- Peter Geoghegan

Re: Release 14 Schedule

2021-09-22 Thread Peter Geoghegan
sed in less than 24 hours. ISTM that we're almost out of time. Is some kind of simple compromise possible? -- Peter Geoghegan

Re: Unintended interaction between bottom-up deletion and deduplication's single value strategy

2021-09-21 Thread Peter Geoghegan
On Sun, Sep 19, 2021 at 7:47 PM Peter Geoghegan wrote: > Attached patch fixes the bug by slightly narrowing the conditions > under which we'll consider if we should apply deduplication's single > value strategy. Pushed this fix a moment ago. -- Peter Geoghegan

Unintended interaction between bottom-up deletion and deduplication's single value strategy

2021-09-19 Thread Peter Geoghegan
ck whether or not we just had a "failed" call to _bt_bottomupdel_pass() -- this is a logical extension of what we do already. Barring objections, I will apply this patch (and backpatch to Postgres 14) in a few days. -- Peter Geoghegan v1-0001-Fix-single-value-strategy-index-deletion

Re: Partial index "microvacuum"

2021-09-16 Thread Peter Geoghegan
ex deletion pass is attempted for the same page, we'll probably find something to delete. Just accepting version-driven page splits was always a permanent solution to a temporary problem. > Thank you so much for your work on this! Thanks Marko! -- Peter Geoghegan

Re: decoupling table and index vacuum

2021-09-15 Thread Peter Geoghegan
now think that it's fairly common. I also like your idea here because it enables a more qualitative approach, based on recent information for recently modified blocks -- not whole-table statistics. Averages are notoriously misleading. [1] https://github.com/pgsql-io/benchmarksql/pull/16 -- Peter

Re: Partial index "microvacuum"

2021-09-15 Thread Peter Geoghegan
entation.html#BTREE-DELETION -- Peter Geoghegan

Re: 64 bit TID?

2021-09-13 Thread Peter Geoghegan
On Mon, Sep 13, 2021 at 5:36 PM Peter Geoghegan wrote: > If somebody wants to make TIDs (or some generalized TID-like thing > that tableam knows about) into logical identifiers, then they must > also answer the question: identifiers of what? > > TIDs from Postgres heapam iden

Re: 64 bit TID?

2021-09-13 Thread Peter Geoghegan
ariable-length TID in the future? Or make it more difficult? > > How much work would it take? If it was just a matter of changing the data structure then I think it would be far easier. -- Peter Geoghegan

Re: The Free Space Map: Problems and Opportunities

2021-09-08 Thread Peter Geoghegan
e said, I think it's true that the system does the right thing in most situations -- even with BenchmarkSQL/TPC-C! I just find it useful to focus on the exceptions, the cases where the system clearly does the wrong thing. -- Peter Geoghegan

Re: The Free Space Map: Problems and Opportunities

2021-09-08 Thread Peter Geoghegan
aturally start to fail, e.g. prune-before-evict > won't work once the operation becomes large enough that pages have to > be evicted while the transaction is still running. Perhaps. As you know I'm generally in favor of letting things fail naturally, and then falling back on an alternative strategy. -- Peter Geoghegan

Re: The Free Space Map: Problems and Opportunities

2021-09-07 Thread Peter Geoghegan
end to do some kind of batching, but only at the level of small groups of related transactions. Writing a page that was quickly opened for new inserts, filled with newly inserted heap tuples, then closed, and finally cleaned up doesn't seem like it needs to take any direct responsibility for writeback. -- Peter Geoghegan

Re: The Free Space Map: Problems and Opportunities

2021-09-07 Thread Peter Geoghegan
t; transaction become so large that it just doesn't make sense to do either? What's the crossover point at which background processing and foreground processing like this should be assumed to be not worth it? That I won't speculate about just yet. I suspect that at some point it really does make sense to leave it all up to a true table-level batch operation, like a conventional VACUUM. -- Peter Geoghegan

Re: The Free Space Map: Problems and Opportunities

2021-09-06 Thread Peter Geoghegan
g work or conflicting requirements. The resource management aspects of my own prototype are the least worked out and shakiest parts overall, so this seems likely. You've probably already solved numerous problems for me. -- Peter Geoghegan

Re: The Free Space Map: Problems and Opportunities

2021-09-06 Thread Peter Geoghegan
e backend (for the same table). The work of setting hint bits and pruning-away aborted heap tuples has to be treated as a logical part of the cost of inserting heap tuples -- backends pay this cost directly. At least with workloads where transactions naturally only insert a handful of rows each in almost all cases -- very much the common case. -- Peter Geoghegan

Re: The Free Space Map: Problems and Opportunities

2021-09-06 Thread Peter Geoghegan
On Mon, Aug 16, 2021 at 5:15 PM Peter Geoghegan wrote: > This is actually quite simple -- the chaos that follows is where it > gets truly complicated (and not necessarily worth getting into just > yet). The update of a given order and its order lines entries takes > place hours l

Re: log_autovacuum in Postgres 14 -- ordering issue

2021-08-31 Thread Peter Geoghegan
sers -- it can be recast as information about index tuples specifically (there may not actually be any matching index tuples, especially in Postgres 14, but that isn't worth getting in to in user docs IMV). -- Peter Geoghegan

Re: log_autovacuum in Postgres 14 -- ordering issue

2021-08-27 Thread Peter Geoghegan
the series, relative to the v2 from > > earlier.) > > Looks alright to me. Pushed both patches -- thanks. -- Peter Geoghegan

Re: log_autovacuum in Postgres 14 -- ordering issue

2021-08-27 Thread Peter Geoghegan
he second patch concerns this separate track_io_timing issue. It's pretty straightforward. (No change to the first patch in the series, relative to the v2 from earlier.) -- Peter Geoghegan v3-0002-Show-zero-values-in-track_io_timing-log-output.patch Description: Binary data v3-0001-Reorder-log_aut

Re: log_autovacuum in Postgres 14 -- ordering issue

2021-08-27 Thread Peter Geoghegan
n vacuumlazy.c and in analyze.c), without making any other changes (i.e., no changes to EXPLAIN output are needed). You seem to be almost sold on that plan anyway. But this text format EXPLAIN rule seems like it decides the question for us. -- Peter Geoghegan

Re: log_autovacuum in Postgres 14 -- ordering issue

2021-08-27 Thread Peter Geoghegan
On Thu, Aug 26, 2021 at 10:28 PM Peter Geoghegan wrote: > I'll commit this in a day or two, backpatching to 14. Barring any objections. Actually, we also need to make the corresponding lines for ANALYZE follow the same convention -- those really should be consistent. As in the attached revis

Re: log_autovacuum in Postgres 14 -- ordering issue

2021-08-27 Thread Peter Geoghegan
th things (both "read:" and "write:"), without regard for whether or not they're non-zero. (We'd do the same thing with ANALYZE's equivalent code too, if we actually did this -- same issue there.) -- Peter Geoghegan

Re: log_autovacuum in Postgres 14 -- ordering issue

2021-08-26 Thread Peter Geoghegan
On Wed, Aug 25, 2021 at 5:02 PM Peter Geoghegan wrote: > > I like it better than the current layout, so +1. > > This seems like a release housekeeping task to me. I'll come up with > a patch targeting 14 and master in a few days. Here is a patch that outputs log_autovacuum's line

Re: amcheck/verify_heapam doesn't check for interrupts

2021-08-26 Thread Peter Geoghegan
Patch committed. Thanks! -- Peter Geoghegan

Re: amcheck/verify_heapam doesn't check for interrupts

2021-08-26 Thread Peter Geoghegan
On Thu, Aug 26, 2021 at 4:24 PM Mark Dilger wrote: > > On Aug 26, 2021, at 2:38 PM, Peter Geoghegan wrote: > > It looks like we neglect to call CHECK_FOR_INTERRUPTS() anywhere > > inside verify_heapam.c. Is there any reason for this? > > Not any good one that I can se

Re: The Free Space Map: Problems and Opportunities

2021-08-26 Thread Peter Geoghegan
e that I can benefit from whatever work Andres has already done on this, particularly when it comes to managing per-relation metadata in shared memory. -- Peter Geoghegan

<    8   9   10   11   12   13   14   15   16   17   >