Whaty could be the cause of postgres functions losing or swapping values from a CTE?

I have a number of functions which are generally in this shape:

RETURN QUERY with cte1 as (    select a, b, c, d, e    from [some_table]    where [some_condition] ), cte2 as (     select x, y, z     from [big_table]     where [bunch_of_conditions] ) select foo.x, foo.y, bar.a, bar.b, bar.c, bar.d from cte2 foo join cte1 bar on foo.z = bar.a 

I have seen occasions where the values of bar.b and bar.d are swapped, and on others no values are returned – upon investigation, because bar.a contains only nulls.

In all cases, when I take the code out of the functions, it always runs correctly. In each case where it goes wrong, there is nothing I can point to which causes the glitch, and usually it goes away for no obvious reason. This is all running in pgAdmin under Windows 10, and the behaviour persists through stopping pgAdmin, and/or rebooting the PC.

The db where this happens is running on AWS, and I don’t have access to stop/restart that server.

It suggests to me that the problem is happening at the AWS and/or postgres server end, but that may or may not be correct.

Possibly also relevant, we have also seen cases where queries run exceptionally slowly (45 minutes instead of less that one second, being one example today).

In each case of the swap or the slowdown, it eventually returns to normal behaviour without any obvious intervention from me. I’m still experiencing the null value which should be populated.

Has anyone seen behaviour like this? Any ideas what could be causing it, or how to remedy it?

Could a slow website cause visitors from a Facebook ads campaign to bounce?

I have a website with traffic problems. The web site sells a product in Spanish.

I recently created a Facebook ads campaign, and it got 96 visits. But Google Analytics only registered 9 visits. I think my website could be slow and people are bouncing. Could this be the case?

I am using WordPress and the Profitbuiler plugin to create the page.

GraphicsGrid $\to$ Beep “The shared stylesheet “Stylesheet-review-topics.nb” could not be \ found. The default stylesheet will be used instead.”

12.0.0 for Microsoft Windows (64-bit) (April 6, 2019)

I have a notebook in which using GraphicsGrid causes a beep "The shared stylesheet "Stylesheet-review-topics.nb" could not be found. The default stylesheet will be used instead."

I copied the entire content of the notebook to a new one, set the style sheet to the one shown, and saved over the original notebook. Same thing happens. I created a new notebook and set the style sheet to the one shown, and it does not beep. My notebooks are fairly large, and I really don’t want to spend a lot of time untangling what amounts to a nuisance. I also doing like being annoyed.

This kind of think happens from time to time, and I’m never sure why. Any ideas?

could I use something like a magic amulet while it’s not on my neck? [duplicate]

What is defined as ‘worn’? Does an amulet or ring have to be on my neck or finger specifically or do I just have to be carrying it somewhere on my body or even in my backpack? For instance, if I had a Clockwork Amulet on my belt, does that constitute as me ‘wearing’ it so I could use it?

Are there any 3rd level spells a Lore Bard could pick at 6th character level to provide food and water to the party?

Just as the title says. I play a Bard, College of Lore. At 6th character level I will be able to pick up two spells, of up to 3rd spell level, from any class. I know we will be on the long-term adventure with no easy way to get food and drinks. Goodberries could make it much easier for us, but I do not want to "waste" a 3rd level spell known for a 1st level spell if there is something of more power available to me.

Preference is for material from Player’s Handbook and Xanathar’s Guide To Everything as it is automatically allowed. If there are multiple spells that meet the requirement, the one with the widest utility wins. If there are none, the highest level and biggest utility are the factor.

how could you maximize food production with magic items and spells over a long period of time?

Over the course of years, how would you appropriately maximize food production for a town or city? If you assume the small city/large town and its very large (100-mile radius) surrounding area can be created with this goal in mind, what spells and magic items could be useful? This should be ruling out spells that are very small individual buffs(Haste, Enlarge/Reduce etc). These options should be more efficient than Plant Growth unless they are lower level/repeatable. Creative options like the Decanter of Endless Water and similar would also be helpful!

I am asking this as a player: the premise is creating a city. Any spells are acceptable, lower magic is preferred(1-5), but higher-level options are also good to know. This question has a broader application than this related question that is only about the plant growth spell’s applicability.

Could you negate a Beholder’s antimagic cone by covering up its eye?

e.g. throw a heavy blanket over it, or force it to close its eye somehow.

https://www.dndbeyond.com/monsters/beholder

The beholder’s central eye creates an area of antimagic, as in the antimagic field spell, in a 150-foot-cone.

…and the antimagic field spell only describes it as creating an "invisible sphere", with no suggestion that it would be blocked by walls etc

However there is no language in the spell to suggest it would be exempt from the normal rules for "area of effect" spells: https://www.dndbeyond.com/sources/basic-rules/spellcasting#AreasofEffect

A spell’s effect expands in straight lines from the point of origin. If no unblocked straight line extends from the point of origin to a location within the area of effect, that location isn’t included in the spell’s area. To block one of these imaginary lines, an obstruction must provide total cover.

If we consider the eye itself to be the "point of origin" of the spell then maybe covering up the eye would block the effect?

There is an answer here that comes to the same conclusion, that antimagic field/cone is blocked by total cover ("lead shield") https://rpg.stackexchange.com/a/116809/56593

OTOH it feels like covering up the eye is rather stretching the definition of cover.

Weirdly the rules for "total cover" seem to contradict those for "area of effect" above though: https://www.dndbeyond.com/sources/basic-rules/combat#TotalCover

A target with total cover can’t be targeted directly by an attack or a spell, although some spells can reach such a target by including it in an area of effect. A target has total cover if it is completely concealed by an obstacle.

I guess maybe "some spells" means only certain spells which mention a specific exemption to being blocked by total cover.

Does the eye have to be exposed for it to work? Or does the cone project through mundane barriers?

Wanting to run a groundhog day/day after tomorrow campaign. Are there any known examples of campaigns that are similar I could use for inspiration?

I am thinking through a DnD 5E campaign based on the movies groundhog day and Edge of Tomorrow. The idea is that the players will exist in a loop of time, always waking up in the same moment and regardless of if they are alive or dead always resetting at the same time.

I have the narrative set out, and I am working on populating my region. I figure that with this kind of adventure I can fill my sandbox with a host of NPC’s who’s behaviour and actions every day can be stated unless/until the players do something to disrupt it. But I need to determine the game rules for this unique type of game. Things like Spell learning, gaining experience, repeating the same actions and the impact on DC. In my mind the players will reset every day with the same equipment so things like spell components etc an dhow I manage this.

In order to avoid this becoming a discussion I am looking for, either published examples of campaigns or adventures that have this kind of a story thread. DnD (any version) or another high fantasy system would be great, but if its a sci fi or other thematic system I can still look at how the rules are adapted to take account of the cyclical rather the linear nature of the story.

Alternatively I will also accept any first hand experience of running such an adventure and the rules you home brewed to deal with the issues you faced.