postgresql – Recovery of the value of $ 1, $ 2 etc. of a Postgres query

I am currently trying to update / modify a number of SQL queries on a system that has no internal documentation (developer left short term and on bad terms).

I have enabled query logging in Postgres and I have found the queries in question in about 30 queries. From there, I plan to run them and see what the output is, then figure out which ones need the updates.

The problem is that all in the journal are in this format (simplified)

Select t.Col1, t2.Col2, t3.Col3 from Table t
join table2 t2 on t2.Col1 = t.Col1
join table3 t3 on t3.Col1 = t2.Col3
where t.Col1 = $1
and t2.Col3 = $2
...
and t3.Col20 = $15

etc.

For some parameters, I was able to estimate which are the most likely values ​​(based on the information in the column he is looking for), but there are a few that I do not have. no idea what they might be.

I am not very familiar with Postgres (rather a MSSQL man myself), nor with the parameters / variables in the queries. It seems to me that these values ​​must be generated somewhere or kept somewhere and most of them must be evaluated at some point in order to execute a valid query. As such, recording values ​​or recording entries or something similar should be possible so that I can then complete what is required.

Strongly, someone can advise on how to get the "real" values ​​of the variables $ 1, $ 2, $ 3, etc.

Data Recovery – How to Recover Files from Disk Drill (Force Upgrade)

I am using Disk Drill to recover some files. I believe he has found the file I need. However, when I click recover, it prompts me to purchase the upgraded version of Disk Drill when recovery is to be included in the basic free version. How should I recover my files? Am i doing wrong?

"The installer information on the recovery server is damaged" when installing macOS Sierra

I am trying to reinstall macOs Sierra but get

enter description of image here

In the newspaper, I never get

enter description of image here

Any help appreciated!

java – Error sending password recovery email – User or CPF does not exist!

I have the following problem.
I have the possibility of recovering a password to access the system by informing the user and CPF, then by clicking on send, an email will be sent to the client. but when you click send, the system returns that the cpf cannot be found.

this is my login.js


    /**
     * Regerando a senha do usuário
     */
    $(".resetarlogin").click(function () {

        $.ajax({
            url: BASE_URL+ "envioemail/recuperar-senha",
            method:"POST",     
            data:{cpf:$("#cpf").val(),usuarioIu:$("#intCodUsuario").val()},
            beforeSend: ()=>{
                $(".aguarde").show();
            },
            complete: ()=>{
                $(".aguarde").hide();           
            },
            error: (XMLHttpRequest, textStatus, errorThrown)=>{
                $(".alert-danger").removeClass('hidden');      
                $(".alert-success").addClass('hidden');
                $(".mensagemErro").html("Usuário ou CPF não existe !");
            },
            success: (retorno)=>{
                $(".strMensagem").html(retorno);  
                $(".alert-danger").addClass('hidden');
                $(".alert-success").removeClass('hidden');         
            }
        });

    }); 

and here is my controller

@PostMapping("/recuperar-senha")
   public ResponseEntity recuperarSenha(UsuarioPortaDTO updto) throws Exception, EnvioEmailException{
       try {
           T001UsuarioPortal t001UsuarioPortal = null;
           try {
               String cpf = updto.getCpf();
               t001UsuarioPortal = usuarioLoginService.obterUsuarioPorIdCpf(updto.getUsuarioIu().intValue(), cpf);    
           } catch (Exception e) {
               throw new EnvioEmailException("Usuário ou Cpf não cadastrado!");
           }
           T011ParametrosConfEmail confEmail = confgEmailService.retornarParametrosConfEmail();
           HtmlEmail email = confgEmailService.getEmail();
           email.addTo(t001UsuarioPortal.getEmail());
           email.setFrom(confEmail.getEmail());
           email.setSubject("Recuperar Senha Portal Informata.");
           email.setDebug(true);
           Date d = new Date();
           String token = HashImdlog.md5(updto.getUsuarioIu()+"https://pt.stackoverflow.com/"+d.toString());
           t001UsuarioPortal.setTokenRecuperaSenha(token);
           usuarioLoginService.salvarUsuario(t001UsuarioPortal);
           byte() encodedBytes = Base64.getEncoder().encode(updto.getUsuarioIu().toString().getBytes());
           String emailRecuperarSenha = UtilEmail.emailRecuperarSenha(this.baseUrl+"alterar-senha/"+new String(encodedBytes),token);
           email.setContent(emailRecuperarSenha, "text/html");
           email.send();
       } catch (Exception e) {
           return new ResponseEntity<>(e.getLocalizedMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
       } catch (EnvioEmailException e) {
           return new ResponseEntity<>(e.getMessage(), HttpStatus.BAD_REQUEST);
       }
       return new ResponseEntity<>("E-mail de recuperação enviado com sucesso.", HttpStatus.OK);
   }

}

Can I install TWRP with stock recovery via apply SD card update if I modify the file to update. Zip *: French? I'm on zte trek 2

Can I install TWRP using stock recovery and SD card?

data recovery – Sudden malfunction of SATA SSD – state: {DRDY}, SRST failed (errno = -16)

The SSD has stopped working after connecting the hard drive to the same controller using a different cable. Using Linux USB live-cd, I see this in dmesg:

20.606155) EXT4-fs (sda2): mounting ext3 file system using the ext4 subsystem
(   20.607883) EXT4-fs (sda2): INFO: recovery required on readonly filesystem
(   20.607988) EXT4-fs (sda2): write access will be enabled during recovery
(   80.888083) ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
(   80.888171) ata1.00: failed command: FLUSH CACHE EXT
(   80.888254) ata1.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 0
                        res 40/00:01:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
(   80.888408) ata1.00: status: { DRDY }
(   80.888487) ata1.00: hard resetting link
(   81.203935) ata1.01: hard resetting link
(   82.244056) ata1.01: failed to resume link (SControl 0)
(   87.444057) ata1.00: link is slow to respond, please be patient (ready=0)
(   90.924057) ata1.00: SRST failed (errno=-16)
(   90.924137) ata1.00: hard resetting link
(   91.239949) ata1.01: hard resetting link
(   92.280056) ata1.01: failed to resume link (SControl 0)
(   97.480057) ata1.00: link is slow to respond, please be patient (ready=0)
(  100.959977) ata1.00: SRST failed (errno=-16)
(  100.960058) ata1.00: hard resetting link
(  101.274332) ata1.01: hard resetting link
(  102.311977) ata1.01: failed to resume link (SControl 0)
(  107.512056) ata1.00: link is slow to respond, please be patient (ready=0)
(  136.012054) ata1.00: SRST failed (errno=-16)
(  136.012132) ata1.00: limiting SATA link speed to 1.5 Gbps
(  136.012216) ata1.00: hard resetting link
(  136.327925) ata1.01: hard resetting link
(  137.368056) ata1.01: failed to resume link (SControl 0)
(  141.068041) ata1.00: SRST failed (errno=-16)
(  141.079858) ata1.00: reset failed, giving up
(  141.079929) ata1.00: disabled
(  141.080011) ata1: EH complete
(  141.080103) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  141.080219) sd 0:0:0:0: (sda) tag#0 CDB: Synchronize Cache(10) 35 00 00 00 00 00 00 00 00 00
(  141.080333) print_req_error: I/O error, dev sda, sector 0
(  141.080502) JBD2: recovery failed
(  141.080594) EXT4-fs (sda2): error loading journal
(  141.087107) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  141.087230) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 1f 07 b8 00 00 00 20 00
(  141.087337) print_req_error: I/O error, dev sda, sector 520599552
(  141.087520) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  141.087638) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 1f 07 b8 00 00 00 08 00
(  141.087745) print_req_error: I/O error, dev sda, sector 520599552
(  141.087824) Buffer I/O error on dev sda3, logical block 0, async page read
(  141.094200) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  141.094323) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 01 12 c8 00 00 00 20 00
(  141.094432) print_req_error: I/O error, dev sda, sector 18008064
(  141.094612) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  141.094744) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 01 12 c8 00 00 00 02 00
(  141.094851) print_req_error: I/O error, dev sda, sector 18008064
(  141.094929) Buffer I/O error on dev sda4, logical block 0, async page read
(  141.095053) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  141.095166) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 01 12 c8 02 00 00 02 00
(  141.095273) print_req_error: I/O error, dev sda, sector 18008066
(  141.095349) Buffer I/O error on dev sda4, logical block 1, async page read
(  141.095458) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  141.095571) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 01 12 c8 04 00 00 02 00
(  141.095677) print_req_error: I/O error, dev sda, sector 18008068
(  141.095754) Buffer I/O error on dev sda4, logical block 2, async page read
(  141.095860) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  141.095983) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 01 12 c8 06 00 00 02 00
(  141.096091) print_req_error: I/O error, dev sda, sector 18008070
(  141.096168) Buffer I/O error on dev sda4, logical block 3, async page read
(  141.302353) ISO 9660 Extensions: Microsoft Joliet Level 3
(  141.308138) ISO 9660 Extensions: RRIP_1991A
(  143.664195) random: crng init done
(  143.664278) random: 7 urandom warning(s) missed due to ratelimiting
(  143.757956) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  143.758080) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 37 e4 36 00 00 00 08 00
(  143.758187) print_req_error: I/O error, dev sda, sector 937702912
(  143.758412) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  143.758544) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 37 e4 36 00 00 00 08 00
(  143.758650) print_req_error: I/O error, dev sda, sector 937702912
(  143.758728) Buffer I/O error on dev sda, logical block 117212864, async page read
(  143.760227) Buffer I/O error on dev sda2, logical block 0, async page read
(  143.762692) Buffer I/O error on dev sda, logical block 117212864, async page read
(  143.764075) Buffer I/O error on dev sda3, logical block 0, async page read
(  143.766392) Buffer I/O error on dev sda, logical block 117212864, async page read
(  151.652888) ip_tables: (C) 2000-2006 Netfilter Core Team
(  151.667361) systemd(1): systemd 237 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
(  151.684246) systemd(1): Detected architecture x86-64.
(  151.699817) systemd(1): Set hostname to .
(  151.941123) systemd(1): Reached target Remote File Systems.
(  151.941788) systemd(1): Started Forward Password Requests to Wall Directory Watch.
(  151.942225) systemd(1): Reached target User and Group Name Lookups.
(  151.942969) systemd(1): Set up automount Arbitrary Executable File Formats File System Automount Point.
(  151.943421) systemd(1): Reached target Swap.
(  151.944365) systemd(1): Created slice User and Session Slice.
(  151.945030) systemd(1): Created slice System Slice.
(  152.194071) lp: driver loaded but no devices found
(  152.240035) ppdev: user-space parallel port driver
(  152.248140) systemd-journald(831): Received request to flush runtime journal from PID 1
(  152.338874) scsi_io_completion: 24 callbacks suppressed
(  152.338887) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  152.338897) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
(  152.338900) print_req_error: 24 callbacks suppressed
(  152.338903) print_req_error: I/O error, dev sda, sector 0
(  152.339316) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  152.339324) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 37 e4 36 00 00 00 08 00
(  152.339328) print_req_error: I/O error, dev sda, sector 937702912
(  152.339519) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  152.339526) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 37 e4 36 a0 00 00 08 00
(  152.339530) print_req_error: I/O error, dev sda, sector 937703072
(  152.339704) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  152.339711) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
(  152.339714) print_req_error: I/O error, dev sda, sector 0
(  152.339865) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  152.339872) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 00 00 00 08 00 00 08 00
(  152.339875) print_req_error: I/O error, dev sda, sector 8
(  152.340978) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  152.340986) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
(  152.340990) print_req_error: I/O error, dev sda, sector 0
(  152.341645) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  152.341652) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 1f 07 af 80 00 00 08 00
(  152.341656) print_req_error: I/O error, dev sda, sector 520597376
(  152.341854) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  152.341861) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 1f 07 af f0 00 00 08 00
(  152.341864) print_req_error: I/O error, dev sda, sector 520597488
(  152.342044) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  152.342051) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 07 52 c8 00 00 00 08 00
(  152.342054) print_req_error: I/O error, dev sda, sector 122865664
(  152.342228) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  152.342235) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 07 52 c8 08 00 00 08 00
(  152.342239) print_req_error: I/O error, dev sda, sector 122865672

.... skipped ....

154.024673) buffer_io_error: 11 callbacks suppressed
(  154.024678) Buffer I/O error on dev sda, logical block 117212864, async page read
...
(  154.558029) Buffer I/O error on dev sda4, logical block 52428608, async page read
(  154.558178) Buffer I/O error on dev sda4, logical block 52428609, async page read
(  154.558294) Buffer I/O error on dev sda4, logical block 52428610, async page read
(  154.558419) Buffer I/O error on dev sda4, logical block 52428611, async page read
(  154.562397) Buffer I/O error on dev sda2, logical block 49716464, async page read
(  154.564862) Buffer I/O error on dev sda3, logical block 52137920, async page read

...

339.695928) perf: interrupt took too long (2501 > 2500), lowering kernel.perf_event_max_sample_rate to 79750
(  419.711202) perf: interrupt took too long (3150 > 3126), lowering kernel.perf_event_max_sample_rate to 63500
(  513.633303) perf: interrupt took too long (3944 > 3937), lowering kernel.perf_event_max_sample_rate to 50500
(  671.315820) perf: interrupt took too long (4944 > 4930), lowering kernel.perf_event_max_sample_rate to 40250
(  776.515277) scsi_io_completion: 21 callbacks suppressed
(  776.515290) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  776.515301) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
(  776.515304) print_req_error: 21 callbacks suppressed
(  776.515307) print_req_error: I/O error, dev sda, sector 0
(  776.515388) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  776.515395) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
(  776.515398) print_req_error: I/O error, dev sda, sector 0
(  776.515406) Buffer I/O error on dev sda, logical block 0, async page read
(  776.515467) sd 0:0:0:0: (sda) tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  776.515473) sd 0:0:0:0: (sda) tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
(  776.515477) print_req_error: I/O error, dev sda, sector 0
(  776.515482) Buffer I/O error on dev sda, logical block 0, async page read
(  776.516889) sd 0:0:0:0: (sda) Read Capacity(16) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  776.516896) sd 0:0:0:0: (sda) Sense not available.
(  776.516966) sd 0:0:0:0: (sda) Read Capacity(10) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
(  776.516970) sd 0:0:0:0: (sda) Sense not available.
(  776.517044) sd 0:0:0:0: (sda) 0 512-byte logical blocks: (0 B/0 B)
(  776.517155) sda: detected capacity change from 480103981056 to 0

The drive detectable in the BIOS however and initially after rebooting, I can see its partition table with lsblk:

mint@mint:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0    7:0    0   1.8G  1 loop /rofs
sda      8:0    0 447.1G  0 disk 
├─sda2   8:2    0 189.7G  0 part 
├─sda3   8:3    0 198.9G  0 part 
└─sda4   8:4    0    50G  0 part 
sdb      8:16   1   3.8G  0 disk /cdrom
├─sdb1   8:17   1   1.9G  0 part 
└─sdb2   8:18   1   2.3M  0 part 

But after trying to run fdisk on it, it disappears and fdisk reports:

fdisk: cannot open /dev/sda: Input/output error

hdparm -I before using fdisk reports:

mint@mint:~$ sudo hdparm -I /dev/sda

/dev/sda:
 HDIO_DRIVE_CMD(identify) failed: Input/output error
mint@mint:~$ sudo hdparm -I /dev/sdb

/dev/sdb:
SG_IO: bad/missing sense data, sb():  70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

ATA device, with non-removable media
Standards:
    Likely used: 1
Configuration:
    Logical     max current
    cylinders   0   0
    heads       0   0
    sectors/track   0   0
    --
    Logical/Physical Sector size:           512 bytes
    device size with M = 1024*1024:           0 MBytes
    device size with M = 1000*1000:           0 MBytes 
    cache/buffer size  = unknown
Capabilities:
    IORDY not likely
    Cannot perform double-word IO
    R/W multiple sector transfer: not supported
    DMA: not supported
    PIO: pio0

Any suggestion to take further steps to investigate the problem, if any, as well as any explanation of what I am dealing with here are welcome and will be appreciated. Please don't write "throw it in the trash" here if you don't know anything about what's going on here. Thanks in advance.

data recovery – is it possible to go back to an earlier date on my Samsung Galaxy Tab A?

Battery exchange network

The Stack Exchange network includes 175 question and answer communities, including Stack Overflow, the largest and most reliable online community for developers who want to learn, share knowledge and develop their careers.

Visit Stack Exchange

mysql – Why does InnoDB damage tables during recovery?

When adjusting

innodb_fast_shutdown=0

MySQL deletes all incomplete transactions before closing / crashing. The default is 1, which is understandable to preserve incomplete transactions.

However, in recovery mode (for example, innodb_force_recovery = 6), MySQL treats all incomplete transactions as committed. This obviously damages the table because the transactions are incomplete.

What is the purpose of preserving incomplete transactions when it damages the entire table?

If this is necessary in some cases, why innodb_force_recovery have the option to simply delete all incomplete transactions (when they cannot be validated) as innodb_fast_shutdown=0 save the table? Or am I missing something?

[ Politics ] Open question: Why are the Fs democrats who are blocking the recovery plan!?!?! Americans don't work anymore, we could use the extra money 💀💀👹💀?

[Politics] Open question: Why are the Fs democrats blocking the recovery plan!?!?! Americans no longer work, we could use the extra money 💀💀👹💀?