Re: pgsql: Exclude unlogged tables from base backups

2018-03-25 Thread David Steele
On 3/25/18 3:54 PM, Tom Lane wrote: > David Steele writes: >> On 3/25/18 3:22 PM, Tom Lane wrote: >>> Actually, that code didn't guarantee zero termination under *any* >>> circumstances; it only happened to work if the stack contained >>> zeroes to start with. > >> Interesting. strncpy() says it

Re: pgsql: Exclude unlogged tables from base backups

2018-03-25 Thread Tom Lane
David Steele writes: > On 3/25/18 3:22 PM, Tom Lane wrote: >> Actually, that code didn't guarantee zero termination under *any* >> circumstances; it only happened to work if the stack contained >> zeroes to start with. > Interesting. strncpy() says it will pad the destination with NULLs when > s

Re: pgsql: Exclude unlogged tables from base backups

2018-03-25 Thread David Steele
On 3/25/18 3:22 PM, Tom Lane wrote: > David Steele writes: >> On 3/25/18 2:16 PM, Tom Lane wrote: >>> Buildfarm member skink (valgrind) has reported this during its last couple >>> of runs: > >> I think skink is using large values for rel oids and that has exposed a >> bug. The strncpy doesn't z

Re: pgsql: Exclude unlogged tables from base backups

2018-03-25 Thread Tom Lane
David Steele writes: > On 3/25/18 2:16 PM, Tom Lane wrote: >> Buildfarm member skink (valgrind) has reported this during its last couple >> of runs: > I think skink is using large values for rel oids and that has exposed a > bug. The strncpy doesn't zero terminate the string if the oid has the >

Re: pgsql: Exclude unlogged tables from base backups

2018-03-25 Thread Tom Lane
I wrote: > I might be wrong to blame that on this patch, but nothing else has > touched basebackup.c lately. Ah, I see the problem, I think. Fixed. regards, tom lane

Re: pgsql: Exclude unlogged tables from base backups

2018-03-25 Thread David Steele
On 3/25/18 2:16 PM, Tom Lane wrote: > Teodor Sigaev writes: >> Exclude unlogged tables from base backups > > Buildfarm member skink (valgrind) has reported this during its last couple > of runs: > > 2018-03-24 03:18:23.409 UTC [17302] 010_pg_basebackup.pl LOG: received > replication command: B

Re: pgsql: Exclude unlogged tables from base backups

2018-03-25 Thread Tom Lane
Teodor Sigaev writes: > Exclude unlogged tables from base backups Buildfarm member skink (valgrind) has reported this during its last couple of runs: 2018-03-24 03:18:23.409 UTC [17302] 010_pg_basebackup.pl LOG: received replication command: BASE_BACKUP LABEL 'pg_basebackup base backup'NOW