postgresql – At the same time, kill the PID to update the materialized view

That is not true.

       pg_sleep(1) IS NULL AS no
FROM generate_series(1, 10) AS i;



This statement does it Not Complete immediately, but hangs until the materialized view is updated.

Then, while the statement is being executed, in another session:

SELECT pid, state, query FROM pg_stat_activity ;

  pid  | state  |                      query                       
 12618 |        | 
 12620 |        | 
 13032 | active | SELECT pid, state, query FROM pg_stat_activity ;
 12616 |        | 
 12615 |        | 
 12617 |        | 
(7 rows)

SELECT pg_cancel_backend(13049);


Billing will be canceled. In the first session I see:

ERROR:  canceling statement due to user request

Maybe you are confused that the query Column in pg_stat_activity does Not only display the current query, however The last query that was run in this session. So if that state is idleThen the instruction is ready and the materialized view is already updated. Then of course canceling the query has no effect.

bash – How can a USB device be redeployed via VID: PID?

Sometimes I find that my SanDisk USB stick could not be mounted. I want to remount only this device that does NOT mount /etc/fstab. How can I identify the sticks and then reassemble them without knowing anything? UUID or fdisk identifier ahead of time?

I would like:

sudo remount --all

only my devices with VID 0781, for example:

$ lsusb | grep 0781
Bus 001 Device 047: ID 0781:5583 SanDisk Corp. 

ubuntu – The Squid Proxy .pid file disappears after a few seconds at startup

I have two Ubuntu virtual servers that are the same and both have Squid Proxy.
The problem is that Squid creates a PID file when the server starts, but it disappears after 10 to 20 seconds and I have to enter the following manually:


Then it works as it should and the PID file doesn't go away.
I want my Squid to start when the server starts and this PID file does not disappear.
I tried to create the init.d file /etc/init.d/run_squid

#! /bin/sh


update-rc.d run_squid defaults
update-rc.d run_squid enable 

And I get:

error: run_squid Default-Start contains no runlevels, aborting

I tried it too

crontab -e
@reboot /scripts/

and nothing happens when I run it, even if I give permissions.

I need .pid to run properly for my cluster to work properly (my cluster is made up of Corosync and pacemaker) because the problem now is that if one of the .pid nodes disappears, that node just keeps working (it works just not as a proxy). but it believes that it works), but it does not change to the healthy one.

Conclusion: I want my octopus to start properly so that it doesn't lose its PID and switch nodes if one of them loses the PID file.

homological algebra – finally generated module via PID with tensor with itself is zero

Hello, I have the next doubt about this problem:

Show that if $ A $ is a module finally created via a PID and $ A otimes _ { Lambda} A = 0 $, then $ A = 0 $.

I've done the next one, I'm looking at the next exact order

$ 0 rightarrow Tor (A) rightarrow A rightarrow A / Tor (A) rightarrow 0 $

We have that $ A / Goal (A) $ is therefore a finally created torsion-free module via a PID $ A / Goal (A) $ is a free module and that implies that the short exact sequence is split up.

That's why I have a morphism $ A / goal (A) right arrow A $ so that $ A / goal (A) right arrow A right arrow A / goal (A) $ is identity.

Now when I'm using tensor $ A $ I have the next composition

$ (A / Tor (A)) otimes A rightarrow 0 rightarrow (A / Tor (A)) otimes A $ is also identity

It follows $ (A / Tor (A)) otimes A = 0 $.

Since $ A / Tor (A) cong Lambda ^ {k} $ I have this $ A ^ {k} = 0 $

However, I don't know how to proceed and I got stuck with it, so any hint?

centos7 – PID file cannot be opened for Apache status under Cent OS 7

Found in the following systemctl status httpd.service under Cent OS 7.
Apache 2.4.41 is compiled and installed. There is no such message under Cent OS 6.

systemd (1): PID file /var/run/ cannot (yet?) be opened after starting:
File or directory does not exist

Even if this display works perfectly in the start and stop of the status server.
Any idea?

microservices – Difference between PID and HTTP based health checks

I read the Cloud Foundary documents on pushing apps with sidecar processes.

Under limitationsthere was a point that health checks said:

  • Sidecars only support PID-based health checks, HTTP health checks for sidecars are currently not supported.

I cannot understand the difference PID is based and HTTP is based Health checks. As I understand it, HTTP-based health checks require HTTP calls from services to check their status. I have no idea what (or how) PGD-based health checks would be done.

Google Chrome extensions – is there software to support PID management?

Are there software utilities that support PID management? In particular, do you allow me to see resource-eating websites more easily? I find that despite 16 GB of RAM, I am exceeding the limits of RAM and CPU because many browser tabs are open at the same time. I know that I can check memory and CPU usage in Win Task Mngr and then link the PID to Google Chrome Task Manager and then determine which URLs are slowing my performance, but that's a bit tedious. What I envision is a background app that monitors this for me and allows me to set triggers for notification when a particular tab occupies more than one CPU or memory threshold. Is there such a thing already?

Postgresql: Get pg_stat_statments.calls but via PID

I'm trying to gather information about a particular request, namely select 1 (or more globally, everyone select ?), and I need to know which application she most often spends. I know that I can get the total number of calls from pg_stat_statementsThis is the total number, and I can also determine what process the output is going through pg_stat_activityHowever, I am not sure how to combine this information to determine which process is the most frequently used. Any ideas?

I do not see any possibility of joining, because the pg_stat_statments seems to merge all this data across all processes. If I can not use these tables, what others can I use before I can do another form of profiling?

linux – Missing PID file for Tomcat

I want to run tomcat on OpenSUSE Linux Leap 15.1. This Linux version ships with Tomcat version 9.0.21. I will run Tomcat under the control of Pacemaker / Corosync cluster management, which uses the ocf_tomcat interface to treat Tomcat as a resource (start | stop | monitor, etc.).

The OCF script code uses the Tomcat PID file to determine if Tomcat is alive or not. It does not work in the constellation listed above because Pacemaker can not find Tomcat's PID file.

Is there a location I do not know (the previous one was /var/run/ or is there a way to configure Tomcat 9.0.21 to generate the file as before?

Thank you for any help.

erlang – problem with simple elixir / plug processes – PID does not hang

I just started with Elixir and wanted to create a very simple API with Plug. I used this tutorial to get a very simple API up and running.

Basically, I put the problem, that the process, as which I registered myself :qs does not seem to be found (and errors out) whenever I use it send/2 Function in queue_service.ex, What I am trying to accomplish is a process that will allow me to maintain the status across all requirements.

In my router.ex File I have:

defmodule SecondQueue.Router do
  use Plug.Router

  alias SecondQueue.Plug.VerifyParams
  alias SecondQueue.QueueService

  plug Plug.Parsers, parsers: (:urlencoded, :multipart)
  plug :match
  plug :dispatch

  get "/receive-message" do
    # gather query parameters from connection
    queue = Map.get(conn.params, "queue")
    message = Map.get(conn.params, "message")

    # handle the params
    QueueService.handle_incoming(queue, message)

    send_resp(conn, 201, "Created")

Then inside queue_service.exI start the queuing process and register it for an atom of :qsand then later want to be able to access this process through a function that invokes a request. I have:

defmodule SecondQueue.QueueService do
  alias SecondQueue.QueueStore
  use Agent

  {:ok, agent_pid} = QueueStore.start_queues_link()
  Process.register(agent_pid, :qs)

  def handle_incoming(queue, message) do
    queue_atom = String.to_atom(queue)
    send(:qs, {:put, queue_atom, "success"})

And then finally in queue_store.exI actually define the process in which to save the state and loop to keep it alive and ready to receive messages. I have:

defmodule SecondQueue.QueueStore do
  def start_queues_link() do
    Task.start_link(fn -> queues_loop(%{}) end)

  defp queues_loop(map) do
    receive do
      {:get, key, caller} ->
        send caller, Map.get(map, key)
      {:put, key, value} ->
        IO.puts("i am here")
        queues_loop(Map.put(map, key, value))