postgresql – `pg_restore` with the` jobs` flag results in `pg_restore: error: a work process died unexpectedly`

I have a script that runs the following:

pg_restore tmp/latest.backup --verbose --clean --no-acl --no-owner --dbname hub_development --jobs=12

This frequently fails with the following error:

error: could not find block ID 4584 in archive -- possibly due to out-of-order restore request, which cannot be handled due to lack of data offsets in archive

pg_restore: error: a worker process died unexpectedly

This error, in turn, means that tables that must have indexes, primary keys, etc. They end up without them. For example, when running without multiple cores, our users The table looks like this, as expected:

                                           Table "public.users"
       Column       |            Type             | Collation | Nullable |              Default              
 id                 | integer                     |           | not null | nextval('users_id_seq'::regclass)
 created_at         | timestamp without time zone |           | not null | 
 updated_at         | timestamp without time zone |           | not null | 
 email              | character varying           |           | not null | 
 confirmation_token | character varying(128)      |           |          | 
 name               | character varying           |           | not null | ''::character varying
 user_type          | character varying           |           |          | 
 encrypted_password | character varying(128)      |           |          | 
 remember_token     | character varying(128)      |           |          | 
    "users_pkey" PRIMARY KEY, btree (id)
    "index_users_on_email" btree (email)
    "index_users_on_remember_token" btree (remember_token)
Referenced by:
    TABLE "project_feedback_users" CONSTRAINT "fk_rails_08af49ba47" FOREIGN KEY (user_id) REFERENCES users(id)
    TABLE "client_reviews" CONSTRAINT "fk_rails_8fc606dbea" FOREIGN KEY (user_id) REFERENCES users(id)

When you run with Multiple cores, the table looks like this:

hub_development=# d users
                                            Table "public.users"
       Column       |            Type             | Collation | Nullable |              Default              
 id                 | integer                     |           | not null | nextval('users_id_seq'::regclass)
 created_at         | timestamp without time zone |           | not null | 
 updated_at         | timestamp without time zone |           | not null | 
 email              | character varying           |           | not null | 
 confirmation_token | character varying(128)      |           |          | 
 name               | character varying           |           | not null | ''::character varying
 user_type          | character varying           |           |          | 
 encrypted_password | character varying(128)      |           |          | 
 remember_token     | character varying(128)      |           |          | 

The script works fine when I delete the --jobs=12 flag, and the worst solution is that I simply do that.

However, for my own education, I would love to know if there is a solution that retains our ability to use multiple cores to parallelize DB restoration while avoiding out-of-order restoration requests.

The error mentions that out-of-order restore requests cannot be handled due to the lack of data compensation in the file. Would adding these data shifts solve the problem in the way I described? If so, how would you do it, and are there any disadvantages in doing so?

I am not a DB administrator and my knowledge here is limited, so let me know if I have not provided enough information to answer the question.

My local version of Postgres is 12.1, and the data comes from a Rails application hosted on Heroku. Here is the result of heroku pg:info:

Plan:                  Standard 0
Status:                Available
Data Size:             3.38 GB
Tables:                44
PG Version:            11.5
Connections:           22/120
Connection Pooling:    Available
Credentials:           1
Fork/Follow:           Available
Rollback:              earliest from 2020-01-10 18:17 UTC
Created:               2019-10-29 18:20 UTC
Region:                us
Data Encryption:       In Use
Continuous Protection: On
Maintenance:           not required
Maintenance window:    Wednesdays 18:00 to 22:00 UTC
Add-on:                postgresql-metric-02684

icloud – Photos for Mac loading reference files unexpectedly

I want to use iCloud Photo Library with my Apple ecosystem The problem is that I have hundreds of thousands of photos on my Mac that will take hundreds of GB of iCloud storage if I had to upload everything to iCloud Photo Library.

Then I found the following guides:

  1. Macworld
  2. Macmost

This is what I did. I created a new fotolibrary file and made it as the system's photo library. This will enable the iCloud Photo Library with this fotolibrary file.

Using a Referenced File configuration described in the Macworld guide, I imported all my files. I proceed to choose and Consolidate the photos that I want to be uploaded iCloud Photo Library (See Macmost's guide at 3:43), the Photos for Mac He then copied the original photos to his library and his state is no longer referred to -> this behavior is expected.

However, what happened next is that all my photos (referenced or consolidated) are loaded in iCloud Photo Library.

The only way to delete those photos that I don't want in the iCloud Photo Library is to delete it on your other devices.

Maybe the following example will improve my explanation.

  1. Set Photo preferences to follow Macworld (enable Referenced
  2. Import 5 photos with names: a.jpg; b.jpg; c.jpg; d.jpg; e.jpg
  3. Choose files to upload iCloud Photo Libraryfor example file a.jpg Y b.jpg doing consolidation

I should expect to have 2 photos on me iCloud Photo Library which a.jpg Y b.jpg. However, what happened is that even with the Reference File adjustment, Photos for Mac uploaded the 5 photos to the iCloud Photo Library. If I delete the 5 files from or iOS devices, the 5 photos will be moved to Recently Deleted album on my iOS devices.

But in Photos for Mac, only file a.jpg Y b.jpg moved to Recently Deleted folder that is expected since they are already consolidated. If I recover the file a.jpg Y b.jpg from the Recently Deleted folder in Photos for Mac, those 2 files also disappear from the Recently Deleted folder on my iOS devices. Only the 3 referenced photos, which are c.jpg, d.jpgY e.jpg, left on iOS Recently Deleted binder.

This means that the file a.jpg Y b.jpg they behave as expected since they are already consolidated in the iCloud Photo Library. However, the rest of the 3 files are "rouge" files that should not be loaded into iCloud Photo Library but it went up anyway.

Then I can proceed to delete the rest of the file from my iOS devices, and everything will be back in order.

The most frustrating thing is that this unexpected behavior will be repeated again the next time I import a new folder and I need to redo all the previous steps, but with an increasing number of files that must be deleted from iOS devices, restored from Mac, and delete it forever of iOS devices.

I can't imagine if I already hit tens of thousands of photo files …

Can anyone explain what really happened? Have you ever found something like this before and how can I solve this problem once and for all?

Thank you.

mojave – Macbook unexpectedly closes programs when I close the lid

OSX 10.14.6, end of 2013 13 "macbook pro.

I keep many tabs open on my laptop, and lately I've started to notice that I can't find tabs that I thought were open. It turns out that when I close the macbook cover, it will be sometimes Close any tab or window that is currently active (equivalent to cmd + w, I think). If, for example, it is an unsaved Word document, when I open the laptop again, I will see the "Do you want to save your work?" Dialog; If you have Chrome or Safari open in the foreground, it will close any tab that is open.

This does not always seem to happen, so it is frustratingly difficult to debug.

Any idea what could cause this behavior?

ios – UIControl subclass – Unexpectedly found null while implicitly unwrapping an Optional value

I am trying to subclass UIControl to create a custom designed UIButton:

class CustomButton: UIControl {

    @IBOutlet var containerView: UIView!

    required init?(coder: NSCoder) {
        super.init(coder: coder)

In an .xib file (for example, CatInfoView), I added a UIView and gave it the custom class name of CustomButton. However, when I run the application I get

Thread 1: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value

about him self.containerView.roundCorners() CustomButton line. What am I doing wrong here? In the CustomButton .xib file, the IBOutlet is connected correctly.

Windows 10: Bluetooth stops working unexpectedly

My laptop is an HP envy 15 Notebook 15-q002la

Bluetooth sometimes stops working unexpectedly, all the things I have with Bluetooth simply disconnect.

To give it some context: I thought this was happening for a new Bluetooth keyboard that I just installed, but in reality, this was happening before with my headphones. I look on the Internet and say that this could be due to the Windows update, but if that is the reason, I really don't know how to solve it, since the solutions listed by Microsoft and other forums are simply useless or too basic.

While trying to do something, I just opened the hp help wizard and I checked that there was an update of the Bluetooth driver, I installed but the problem still persists.

Another thing I tried is to deactivate the Bluetooth device from the device manager. This temporarily resolves the problem (sometimes) because I can enable Bluetooth again and connect the keyboard, but after a few hours: it stops working again.

The events recorded by the event viewer are listed below in the same order:

  1. The Bluetooth HID device is out of range or not responding.
    Origin: HidBth, Event ID: two

  2. Windows cannot store Bluetooth authentication codes (link keys) on the local adapter. Bluetooth keyboards may not work in the system BIOS during startup. Origin: BTHUSB Event ID: 18 years

  3. The local adapter does not support an important state of the low power controller to support peripheral mode. The minimum compatible status mask required is 0x2491f7fffff and 0x1fffffff was obtained. The functionality of the low consumption peripheral function will not be available. Origin: BTHUSB Event ID: 3. 4

Let me know if there are any suggestions on how to handle this problem.
thanks in advance

sql server – Database log file size growth so hugely unexpectedly

The full backup does not delete the records, I suppose your database is not in simple recovery mode as the records increase and fill up quickly. Do you take backup copies of transnational records at any time of a day or a week?

Ideally, a full backup should be performed every day, a differential backup a few times in a day and a log backup a few times in an hour, however, it also depends on RPO and RTO.

One thing to keep in mind here is that the transaction log backup helps you store the active part of the transaction as illustrated below:

A transaction log backup allows you to back up the active part of the transaction.
transaction log Then, after issuing a "Full" or "Differential" backup
the transaction log backup will have any transaction that has been
created after completing those other backups. After the transaction
a registry backup is issued, the space within the transaction log can be
Reused for other processes. If a transaction log backup is not taken,
The transaction log will continue to grow.

Read Microsoft's recommendation on support and frequency:

A database administrator generally creates a complete backup of the database
occasionally, as a weekly and, optionally, create a series of
differential database backup in a shorter interval, such as daily.
Regardless of database backups, the database administrator supports
up the transaction log at frequent intervals. For a given type of
backup, the optimal interval depends on factors such as importance
of data, database size and server workload.
For more information on the implementation of a good strategy, see
Recommendations on this topic.

You can read more about RPO and RTO on this link, as explained by Mr. Paul Randal.

You can also consult the best practices for the automatic growth of the transaction log and other details:

SQL Server Transaction Log Administration Best Practices

machine setting error (virtual machine & # 39; vm & # 39; has ended unexpectedly during startup with exit code 1 (0x1))

When starting the virtual image of sandbox in virtual box in Windows 10 I get this error. (machine setting error (The virtual machine & # 39; vm & # 39; ended unexpectedly during startup with exit code 1 (0x1)))

virtual box version 5.1.22.

authentication – SharePoint 2016: users forced to authenticate again unexpectedly

Users are forced to authenticate again. We have tried to set some configurations through PowerShell that we read online, but nothing seems to change this problem.

Any tips would be greatly appreciated. If someone has their settings for people to stay connected for 8 hours or even more, it would be great to see what they have configured.

Here is a script that we run:

if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $ null)
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
$ mysts = Get-SPSecurityTokenServiceConfig

cache – Swift – Unexpectedly found null when configuring UIImage of data

I am trying to cache an image with the following code:

func cachePhoto () {
  let url = Auth.auth().currentUser!.photoURL!
  getData(from: url) { data, response, error in
    guard let data = data, error == nil else { return }
    print(response?.suggestedFilename ?? url.lastPathComponent)
    print("Download Finished")
    DispatchQueue.main.async() {
      let defaults = UserDefaults.standard
      defaults.set(url, forKey: "foto")
      print("Cached successfully")

func getData(from url: URL, completion: @escaping (Data?, URLResponse?, Error?) -> ()) {
  URLSession.shared.dataTask(with: url, completionHandler: completion).resume()

When I verify if the image has been cached or not, I use the following code:

let imageData = defaults.object(forKey: "foto")
if imageData != nil {
  print("Cached image (data): (imageData!)")
  let image = UIImage(data: imageData! as! Data)    /*  Error here  */
  print("Cached image: (image!)")

Then the output prints:

Download finished
Cache successfully
Cached Image (data): <62706c69 73743030 d4010203 04050616...(etc)>
Fatal error: unexpectedly found null when unwrapping an optional value

The image is not null, so I don't know where the problem is here.
Thanks in advance!

Google Chrome: The site unexpectedly closed the connection when it was on HTTPS

I have no qualms about it. I am a newbie on websites.
Saying that I tend to investigate questions before asking for help.

Today I was working with Hostgator to get SSL on my site. They got it there and after resolving a conflict, I had a problem.
Not all site images and HTML scripts would be displayed. The images did not return any errors, but the HTML returned unexpectedly closed the connection.

I repeated the error by changing some of the URLs to HTTPS manually

Hostgator said this was a problem with Google Chrome. Anyone know how to solve it?

Thanks in advance
[Insert here an incredibly amazing inspirational quote]