Does PostgreSQL have a built-in "recover deleted / updated data" feature?

I often face an annoying problem: I would like to restore a record that has been deleted or see how it looked before the last update. There are of course many ways to implement it manually and thoroughly by creating additional tables to keep deleted records and all changes, but frankly, just thinking taking care of it tires me out and I forget about it.

I have heard of people who have never DELETE records, instead of defining a deleted_at timestamp or whatever, then always take that into account in the app. However, I find this kind of "hack" at once messy and fragile. I am not comfortable with such a mechanism, no matter how often. Just the idea of ​​not really using the DELETE The SQL keyword to delete a message seems wrong to me.

Is there a way to tell PostgreSQL?

Hello, PostgreSQL. Do you see this table called "important stuff"? Well, I would like you to keep an eye on any DELETED or UPDATED record in this table, and only delete these "event records" for one year after they happened. This will give me a year window to go back to the changed / deleted data, without storing it forever and without having to code my own system. I would like to be able to access this data in a meaningful way.

I hope it exists, because it would be nice to just be able to mark a table as "important" and then have PG keep an eye on it for me. Let's be frank: if I have to do it myself, it probably won't happen, and I'll be 100% "blind" to everything that has changed in my tables.

Please do not make me install additional software or strange extensions. I hate that.

seo – What does "no data" mean in the search appearance of the Google webmaster / search console?

The search console does not display any detailed information on pages and keywords when it was created and instantiated too recently.
If this is not your case, it seems that google does not have enough individual data to display. 116 impressions is not significant enough.

In addition, in the search appearance tab, google will only count custom views such as AMP, FAQ, etc., not the standard SERP functionality.
So if you haven't implemented any rich display functions, you won't be able to see anything here.

javascript – React Fetch "Error: JSON.parse: unexpected end of data in line 1, column 1 of JSON data"

I have an API node running on my machine and React running on the front end, however when requesting the React API returns "Error: JSON.parse: unexpected end of data in row 1 column 1 of JSON data"

import './App.css';

class App extends Component {

  constructor(props) {
    super(props);
    this.state = {
      error: null,
      isLoaded: false,
      items: (),
    };
  }

  componentDidMount() {
    const request = ('http://localhost:3003/servicos');
    fetch(request, {
      mode: 'no-cors',
      header: {
        'Access-Control-Allow-Origin': '*',
      }  
    })
      .then(res => res.json())  
      .then(
        (res) => {
          this.setState({
            isLoaded: true,
            items: res  
          })         
        },

        (error) => {
          this.setState({
            isLoaded: true,
            error
          });
          console.log(error);
        }
      )
  }

  render() {
    const { error, isLoaded, items } = this.state;
    if (error) {
      return 
Error: {error.message}
; } else if (!isLoaded) { return
Loading...
; } else { return (
    {items.map(item => (
  • {item.id} {item.clienteId} {item.produtoId}
  • ))};
) } } } export default App;
16:33:02.796 XHRGEThttp://localhost:3003/servicos
(HTTP/1.1 304 Not Modified 32ms)

({"id":1,"createdAt":"2020-03-20","updatedAt":"2020-03-20T06:05:57.000Z","clienteId":1,"produtoId":1,"cliente":{"nome":"Joao Vitor","telefone":12345,"endereco":"Rua X, 123"},"produto":{"nome":"Coca-cola","valor":4}},{"id":2,"createdAt":"2020-03-20","updatedAt":"2020-03-20T06:09:30.000Z","clienteId":1,"produtoId":1,"cliente":{"nome":"Joao Vitor","telefone":12345,"endereco":"Rua X, 123"},"produto":{"nome":"Coca-cola","valor":4}},{"id":4,"createdAt":"2020-03-20","updatedAt":"2020-03-20T06:09:58.000Z","clienteId":3,"produtoId":1,"cliente":{"nome":"Rafael","telefone":12345,"endereco":"Rua X, 123"},"produto":{"nome":"Coca-cola","valor":4}})

How to limit the size of the "user data" of Firefox Android?

Android Firefox user data is increasing every day.
To reduce it, I must erase the storage data and customize all settings again after a few days.

I set it to clear the cache and while closing the browser window, user data continue to increase by a few hundred MB.

The desktop version allows the user to reduce the size of the cache, but Android FF does not seem to have any direct option.
Is there any way to limit it via about: config or by any other means?

I do not use a lot of add-ons; only 2 add-ons, AdBlockPlus and HTTPSEerywhere.

I use Firefox 68.3.0

How to decrypt Chrome's registered password from the "Login Data" file

Is it possible to decrypt password of chrome Login Data file ?

Using python script or any other language. My main goal is learning the backend process of this decryption. So, I do not want to use pre-built GUI applications on Windows.

file sharing – Mac Log out of SMB sharing. Servers say "closed connection to service data"

I have Ubuntu servers running Samba with Windbind. Everything is fine, but Macs will randomly disconnect overnight or at any time.

On the servers, Samba records these events as follows:

../source3/smbd/service.c:1050(close_cnum)
closed connection to service data

I asked questions about the Samba list server about it and it was said that the Macs just closed the connections.

Other types of clients will keep the connections open forever, so it seems that only Macs do it. The operating system versions vary from OS X 10.12 to macOS Catalina, using different versions of SMB2 to SMB3.

An idea of ​​how I can begin to understand why Macs do it, or tips to keep them connected?

Mac clients are performing jobs that rely on a persistent connection.

What is "delta data" on Facebook?

I have received a copy of a person's Facebook file in response to a subpoena. Multiple entries indicate an action called "Deleted Delta Data".

Can any one tell me what delta data is, what does it mean to purge them and how does it go?

enter the description of the image here

metrics – "Error recovering data" in the Windows overview view instead of CPU, network and disk usage

I move my virtual machines from the Northern Europe region to the North UAE region. All machines are created using the Powershell script, so they are supposed to be exactly the same.

BUT in the Northern UAE region, the overview of the virtual machine indicates "Error recovering data", while in Northern Europe, usage statistics are drawn.

Do the settings for creating a virtual machine vary from region to region or is there a problem with UAE North (I noticed that some services are not available in this region), but can not find no open list – xyz services (eg update management) does not work in UAE, without creating a virtual machine.

An idea of ​​such a list?

metrics – "Error recovering data" in the Windows overview view instead of CPU, network and disk usage

I move my virtual machines from the Northern Europe region to the North UAE region. All machines are created using the Powershell script, so they are supposed to be exactly the same.

BUT in the Northern UAE region, the overview of the virtual machine indicates "Error recovering data", while in Northern Europe, usage statistics are drawn.

Do the settings for creating a virtual machine vary from region to region or is there a problem with UAE North (I noticed that some services are not available in this region), but can not find no open list – xyz services (eg update management) does not work in UAE, without creating a virtual machine.

An idea of ​​such a list?

Median / Centiles for "histogram data"

I have data in the following format:

shares | users
0 | 929000
1 | 321000
2 | 104520

The first line represents 929,000 users performing 0 actions and the next line represents 321,000 users performing 1 action.

How can I calculate the median and percentiles for this data? Better yet, if there is a way to convert this data into something for which I can easily use all the normal functions to calculate the average, the cdf, and so on.